Version Description
(2020-01-08) =
Release notes: Update 4.0.0 - The all new more comprehensive yet easier to read WordPress activity log
-
New features
- New activity log viewer with two different view modes: grid and list view.
- Two new types of WodPress activity log metadata: event type and object. OPTIONAL: Upgrade old activity log data to v4.
- New WordPress activity log severity levels (and icons).
- New UI / UX for the WordPress activity log search & filters.
- Added search filters for the two new metadata types in the activity logs: event type and object.
-
Improvements
- Updated the severity levels of all activity log events.
- Included the two new metadata types in the email notification templates (event type and object metadata).
- Updated the Freemius SDK to version 2.3.2.
- Added a notification to refresh search when the filters change.
- Added several new reference links in the plugin's help text.
-
Bug fixes
- Addressed a warning message in the logs generated by the connector when using PHP 7.4.
- Fixed an issue which was triggered when using the User Switching filter hook.
- Few spelling mistakes in the plugin's UI and settings pages.
Download this release
Release Info
Developer | WPWhiteSecurity |
Plugin | WP Security Audit Log |
Version | 4.0.0 |
Comparing to | |
See all releases |
Code changes from version 3.5.2.1 to 4.0.0
- classes/Adapters/MySQL/ActiveRecordAdapter.php +23 -1
- classes/Adapters/MySQL/TmpUserAdapter.php +7 -7
- classes/Alert.php +31 -14
- classes/AlertManager.php +311 -5
- classes/AuditLogGridView.php +1077 -0
- classes/AuditLogListView.php +81 -44
- classes/Connector/ConnectorFactory.php +1 -1
- classes/ConstantManager.php +44 -2
- classes/Loggers/Database.php +4 -4
- classes/Models/Occurrence.php +12 -1
- classes/Sensors/BBPress.php +1 -1
- classes/Sensors/Comments.php +14 -0
- classes/Sensors/Content.php +11 -27
- classes/Sensors/FileChanges.php +10 -4
- classes/Sensors/Files.php +1 -1
- classes/Sensors/FrontendWooCommerce.php +5 -3
- classes/Sensors/LogInOut.php +14 -0
- classes/Sensors/Menus.php +31 -19
- classes/Sensors/MetaData.php +20 -2
- classes/Sensors/Multisite.php +60 -36
- classes/Sensors/PluginsThemes.php +9 -0
- classes/Sensors/Public.php +9 -86
- classes/Sensors/Request.php +5 -5
- classes/Sensors/System.php +23 -33
- classes/Sensors/UserProfile.php +35 -3
- classes/Sensors/Widgets.php +20 -18
- classes/Sensors/WooCommerce.php +160 -132
- classes/Sensors/YoastSEO.php +82 -79
- classes/Settings.php +73 -43
- classes/Views/AuditLog.php +110 -19
- classes/Views/Help.php +7 -7
- classes/Views/Settings.php +25 -21
- classes/Views/SetupWizard.php +6 -6
- classes/Views/ToggleAlerts.php +40 -59
- classes/Views/addons/html-view.php +23 -6
- css/auditlog.css +265 -36
- css/dist/wsal-wizard.build.css +1 -1
- css/dist/wsal-wizard.build.css.map +1 -0
- css/extensions.css +0 -12
- css/src/wsal-wizard.scss +183 -183
- css/wsal-ref.css +507 -507
- defaults.php +391 -366
- img/icons/audit-log-inverted.svg +17 -0
- img/icons/critical.svg +23 -0
- img/icons/high.svg +23 -0
- img/icons/info.svg +23 -0
- img/icons/low.svg +23 -0
- img/icons/medium.svg +23 -0
- img/icons/save-search.svg +17 -0
- js/auditlog.js +9 -1
- js/common.js +1 -1
- js/dist/wsal-wizard.js +8314 -8314
- js/dist/wsal-wizard.js.map +1 -0
classes/Adapters/MySQL/ActiveRecordAdapter.php
CHANGED
@@ -484,7 +484,7 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
|
|
484 |
Â
* @param string $_post_statuses - (Optional) Post statuses.
|
485 |
Â
* @return array Report results
|
486 |
Â
*/
|
487 |
-
public function GetReporting( $_site_id, $_user_id, $_role_name, $_alert_code, $_start_timestamp, $_end_timestamp, $_next_date = null, $_limit = 0, $_post_types = '', $_post_statuses = '' ) {
|
488 |
Â
global $wpdb;
|
489 |
Â
$user_names = $this->GetUserNames( $_user_id );
|
490 |
Â
|
@@ -532,6 +532,16 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
|
|
532 |
Â
replace(replace(replace(meta.value, ']', ''), '[', ''), '\\'', '') REGEXP @roleName
|
533 |
Â
)
|
534 |
Â
)
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
535 |
Â
AND (@alertCode is NULL OR find_in_set(occ.alert_id, @alertCode) > 0)
|
536 |
Â
AND (@startTimestamp is NULL OR occ.created_on >= @startTimestamp)
|
537 |
Â
AND (@endTimestamp is NULL OR occ.created_on <= @endTimestamp)
|
@@ -582,6 +592,16 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
|
|
582 |
Â
OR
|
583 |
Â
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='PostStatus' AND find_in_set(meta.value, @postStatus) > 0)
|
584 |
Â
)
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
585 |
Â
{$condition_date}
|
586 |
Â
ORDER BY
|
587 |
Â
created_on DESC
|
@@ -592,6 +612,8 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
|
|
592 |
Â
$_wpdb->query( "SET @userId = $_user_id" );
|
593 |
Â
$_wpdb->query( "SET @postType = $_post_types" );
|
594 |
Â
$_wpdb->query( "SET @postStatus = $_post_statuses" );
|
Â
|
|
Â
|
|
595 |
Â
$_wpdb->query( "SET @roleName = $_role_name" );
|
596 |
Â
$_wpdb->query( "SET @alertCode = $_alert_code" );
|
597 |
Â
$_wpdb->query( "SET @startTimestamp = $_start_timestamp" );
|
484 |
Â
* @param string $_post_statuses - (Optional) Post statuses.
|
485 |
Â
* @return array Report results
|
486 |
Â
*/
|
487 |
+
public function GetReporting( $_site_id, $_user_id, $_role_name, $_alert_code, $_start_timestamp, $_end_timestamp, $_next_date = null, $_limit = 0, $_post_types = '', $_post_statuses = '', $_objects = '', $_event_types = '' ) {
|
488 |
Â
global $wpdb;
|
489 |
Â
$user_names = $this->GetUserNames( $_user_id );
|
490 |
Â
|
532 |
Â
replace(replace(replace(meta.value, ']', ''), '[', ''), '\\'', '') REGEXP @roleName
|
533 |
Â
)
|
534 |
Â
)
|
535 |
+
AND (
|
536 |
+
@object is NULL
|
537 |
+
OR
|
538 |
+
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='Object' AND find_in_set(meta.value, @object) > 0)
|
539 |
+
)
|
540 |
+
AND (
|
541 |
+
@eventType is NULL
|
542 |
+
OR
|
543 |
+
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='EventType' AND find_in_set(meta.value, @eventType) > 0)
|
544 |
+
)
|
545 |
Â
AND (@alertCode is NULL OR find_in_set(occ.alert_id, @alertCode) > 0)
|
546 |
Â
AND (@startTimestamp is NULL OR occ.created_on >= @startTimestamp)
|
547 |
Â
AND (@endTimestamp is NULL OR occ.created_on <= @endTimestamp)
|
592 |
Â
OR
|
593 |
Â
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='PostStatus' AND find_in_set(meta.value, @postStatus) > 0)
|
594 |
Â
)
|
595 |
+
AND (
|
596 |
+
@object is NULL
|
597 |
+
OR
|
598 |
+
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='Object' AND find_in_set(meta.value, @object) > 0)
|
599 |
+
)
|
600 |
+
AND (
|
601 |
+
@eventType is NULL
|
602 |
+
OR
|
603 |
+
EXISTS(SELECT 1 FROM $table_meta as meta WHERE meta.occurrence_id = occ.id AND meta.name='EventType' AND find_in_set(meta.value, @eventType) > 0)
|
604 |
+
)
|
605 |
Â
{$condition_date}
|
606 |
Â
ORDER BY
|
607 |
Â
created_on DESC
|
612 |
Â
$_wpdb->query( "SET @userId = $_user_id" );
|
613 |
Â
$_wpdb->query( "SET @postType = $_post_types" );
|
614 |
Â
$_wpdb->query( "SET @postStatus = $_post_statuses" );
|
615 |
+
$_wpdb->query( "SET @object = $_objects" );
|
616 |
+
$_wpdb->query( "SET @eventType = $_event_types" );
|
617 |
Â
$_wpdb->query( "SET @roleName = $_role_name" );
|
618 |
Â
$_wpdb->query( "SET @alertCode = $_alert_code" );
|
619 |
Â
$_wpdb->query( "SET @startTimestamp = $_start_timestamp" );
|
classes/Adapters/MySQL/TmpUserAdapter.php
CHANGED
@@ -56,13 +56,13 @@ class WSAL_Adapters_MySQL_TmpUser extends WSAL_Adapters_MySQL_ActiveRecord {
|
|
56 |
Â
* @return string
|
57 |
Â
*/
|
58 |
Â
protected function _GetInstallQuery( $prefix = false ) {
|
59 |
-
$_wpdb
|
60 |
-
$table_name = ($prefix) ? $this->GetWPTable() : $this->GetTable();
|
61 |
-
$sql
|
62 |
-
$sql
|
63 |
-
$sql
|
64 |
-
$sql
|
65 |
-
$sql
|
66 |
Â
if ( ! empty( $_wpdb->charset ) ) {
|
67 |
Â
$sql .= ' DEFAULT CHARACTER SET ' . $_wpdb->charset;
|
68 |
Â
}
|
56 |
Â
* @return string
|
57 |
Â
*/
|
58 |
Â
protected function _GetInstallQuery( $prefix = false ) {
|
59 |
+
$_wpdb = $this->connection;
|
60 |
+
$table_name = ( $prefix ) ? $this->GetWPTable() : $this->GetTable();
|
61 |
+
$sql = 'CREATE TABLE IF NOT EXISTS ' . $table_name . ' (' . PHP_EOL;
|
62 |
+
$sql .= 'ID BIGINT NOT NULL,' . PHP_EOL;
|
63 |
+
$sql .= 'user_login VARCHAR(60) NOT NULL,' . PHP_EOL;
|
64 |
+
$sql .= 'INDEX (ID)' . PHP_EOL;
|
65 |
+
$sql .= ')';
|
66 |
Â
if ( ! empty( $_wpdb->charset ) ) {
|
67 |
Â
$sql .= ' DEFAULT CHARACTER SET ' . $_wpdb->charset;
|
68 |
Â
}
|
classes/Alert.php
CHANGED
@@ -49,22 +49,39 @@ final class WSAL_Alert {
|
|
49 |
Â
public $mesg = '';
|
50 |
Â
|
51 |
Â
/**
|
52 |
-
*
|
53 |
Â
*
|
54 |
-
* @
|
55 |
-
|
56 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
57 |
Â
* @param string $subcatg - Subcategory of alert.
|
58 |
-
* @param string $desc
|
59 |
-
* @param string $mesg
|
Â
|
|
60 |
Â
*/
|
61 |
-
public function __construct( $type = 0, $code = 0, $catg = '', $subcatg = '', $desc = '', $mesg = '' ) {
|
62 |
-
$this->type
|
63 |
-
$this->code
|
64 |
-
$this->catg
|
65 |
-
$this->subcatg
|
66 |
-
$this->desc
|
67 |
-
$this->mesg
|
Â
|
|
Â
|
|
68 |
Â
}
|
69 |
Â
|
70 |
Â
/**
|
@@ -83,7 +100,7 @@ final class WSAL_Alert {
|
|
83 |
Â
if ( is_scalar( $meta ) || is_null( $meta ) ) {
|
84 |
Â
return $meta; // This isn't 100% correct.
|
85 |
Â
}
|
86 |
-
$meta = is_array( $meta ) ? $meta[ $part ] : $meta->$part;
|
87 |
Â
}
|
88 |
Â
return is_scalar( $meta ) ? (string) $meta : var_export( $meta, true );
|
89 |
Â
}
|
49 |
Â
public $mesg = '';
|
50 |
Â
|
51 |
Â
/**
|
52 |
+
* Event object.
|
53 |
Â
*
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public $object = '';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Event type.
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
public $event_type = '';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Constructor.
|
67 |
+
*
|
68 |
+
* @param integer $type - Type of alert.
|
69 |
+
* @param integer $code - Code of alert.
|
70 |
+
* @param string $catg - Category of alert.
|
71 |
Â
* @param string $subcatg - Subcategory of alert.
|
72 |
+
* @param string $desc - Description.
|
73 |
+
* @param string $mesg - Alert message.
|
74 |
+
* @param string $object - Event object.
|
75 |
Â
*/
|
76 |
+
public function __construct( $type = 0, $code = 0, $catg = '', $subcatg = '', $desc = '', $mesg = '', $object = '', $event_type = '' ) {
|
77 |
+
$this->type = $type;
|
78 |
+
$this->code = $code;
|
79 |
+
$this->catg = $catg;
|
80 |
+
$this->subcatg = $subcatg;
|
81 |
+
$this->desc = $desc;
|
82 |
+
$this->mesg = $mesg;
|
83 |
+
$this->object = $object;
|
84 |
+
$this->event_type = $event_type;
|
85 |
Â
}
|
86 |
Â
|
87 |
Â
/**
|
100 |
Â
if ( is_scalar( $meta ) || is_null( $meta ) ) {
|
101 |
Â
return $meta; // This isn't 100% correct.
|
102 |
Â
}
|
103 |
+
$meta = is_array( $meta ) ? $meta[ $part ] : ( isset( $meta->$part ) ? $meta->$part : 'NULL' );
|
104 |
Â
}
|
105 |
Â
return is_scalar( $meta ) ? (string) $meta : var_export( $meta, true );
|
106 |
Â
}
|
classes/AlertManager.php
CHANGED
@@ -259,7 +259,7 @@ final class WSAL_AlertManager {
|
|
259 |
Â
}
|
260 |
Â
|
261 |
Â
// Get current user roles.
|
262 |
-
if ( isset( $old_user ) ) {
|
263 |
Â
// looks like this is a switched user so setup original user
|
264 |
Â
// roles and values for later user.
|
265 |
Â
$roles = $old_user->roles;
|
@@ -412,13 +412,15 @@ final class WSAL_AlertManager {
|
|
412 |
Â
public function Register( $info ) {
|
413 |
Â
if ( func_num_args() === 1 ) {
|
414 |
Â
// Handle single item.
|
415 |
-
list( $type, $code, $catg, $subcatg, $desc, $mesg ) = $info;
|
Â
|
|
416 |
Â
if ( isset( $this->_alerts[ $type ] ) ) {
|
417 |
Â
add_action( 'admin_notices', array( $this, 'duplicate_event_notice' ) );
|
418 |
Â
/* Translators: Event ID */
|
419 |
Â
throw new Exception( sprintf( esc_html__( 'Event %s already registered with WP Security Audit Log.', 'wp-security-audit-log' ), $type ) );
|
420 |
Â
}
|
421 |
-
|
Â
|
|
422 |
Â
} else {
|
423 |
Â
// Handle multiple items.
|
424 |
Â
foreach ( func_get_args() as $arg ) {
|
@@ -437,8 +439,16 @@ final class WSAL_AlertManager {
|
|
437 |
Â
foreach ( $groups as $name => $group ) {
|
438 |
Â
foreach ( $group as $subname => $subgroup ) {
|
439 |
Â
foreach ( $subgroup as $item ) {
|
440 |
-
|
441 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
442 |
Â
}
|
443 |
Â
}
|
444 |
Â
}
|
@@ -567,6 +577,29 @@ final class WSAL_AlertManager {
|
|
567 |
Â
$event_data['Severity'] = 4;
|
568 |
Â
} elseif ( 'E_NOTICE' === $severity->name ) {
|
569 |
Â
$event_data['Severity'] = 5;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
570 |
Â
}
|
571 |
Â
|
572 |
Â
/**
|
@@ -1021,6 +1054,279 @@ final class WSAL_AlertManager {
|
|
1021 |
Â
return apply_filters( 'wsal_public_event_ids', array( 1000, 1002, 1003, 1004, 1005, 1007, 2126, 4000, 4012, 6023 ) ); // Public events.
|
1022 |
Â
}
|
1023 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1024 |
Â
/**
|
1025 |
Â
* Filter query for MWPAL.
|
1026 |
Â
*
|
259 |
Â
}
|
260 |
Â
|
261 |
Â
// Get current user roles.
|
262 |
+
if ( isset( $old_user ) && ! false === $old_user ) {
|
263 |
Â
// looks like this is a switched user so setup original user
|
264 |
Â
// roles and values for later user.
|
265 |
Â
$roles = $old_user->roles;
|
412 |
Â
public function Register( $info ) {
|
413 |
Â
if ( func_num_args() === 1 ) {
|
414 |
Â
// Handle single item.
|
415 |
+
list( $type, $code, $catg, $subcatg, $desc, $mesg, $object, $event_type ) = $info;
|
416 |
+
|
417 |
Â
if ( isset( $this->_alerts[ $type ] ) ) {
|
418 |
Â
add_action( 'admin_notices', array( $this, 'duplicate_event_notice' ) );
|
419 |
Â
/* Translators: Event ID */
|
420 |
Â
throw new Exception( sprintf( esc_html__( 'Event %s already registered with WP Security Audit Log.', 'wp-security-audit-log' ), $type ) );
|
421 |
Â
}
|
422 |
+
|
423 |
+
$this->_alerts[ $type ] = new WSAL_Alert( $type, $code, $catg, $subcatg, $desc, $mesg, $object, $event_type );
|
424 |
Â
} else {
|
425 |
Â
// Handle multiple items.
|
426 |
Â
foreach ( func_get_args() as $arg ) {
|
439 |
Â
foreach ( $groups as $name => $group ) {
|
440 |
Â
foreach ( $group as $subname => $subgroup ) {
|
441 |
Â
foreach ( $subgroup as $item ) {
|
442 |
+
if ( ! isset( $item[4] ) ) {
|
443 |
+
$item[4] = ''; // Set default event object.
|
444 |
+
}
|
445 |
+
|
446 |
+
if ( ! isset( $item[5] ) ) {
|
447 |
+
$item[5] = ''; // Set default event type.
|
448 |
+
}
|
449 |
+
|
450 |
+
list( $type, $code, $desc, $mesg, $object, $event_type ) = $item;
|
451 |
+
$this->Register( array( $type, $code, $name, $subname, $desc, $mesg, $object, $event_type ) );
|
452 |
Â
}
|
453 |
Â
}
|
454 |
Â
}
|
577 |
Â
$event_data['Severity'] = 4;
|
578 |
Â
} elseif ( 'E_NOTICE' === $severity->name ) {
|
579 |
Â
$event_data['Severity'] = 5;
|
580 |
+
} elseif ( 'WSAL_CRITICAL' === $severity->name ) {
|
581 |
+
$event_data['Severity'] = 1;
|
582 |
+
} elseif ( 'WSAL_HIGH' === $severity->name ) {
|
583 |
+
$event_data['Severity'] = 6;
|
584 |
+
} elseif ( 'WSAL_MEDIUM' === $severity->name ) {
|
585 |
+
$event_data['Severity'] = 10;
|
586 |
+
} elseif ( 'WSAL_LOW' === $severity->name ) {
|
587 |
+
$event_data['Severity'] = 15;
|
588 |
+
} elseif ( 'WSAL_INFORMATIONAL' === $severity->name ) {
|
589 |
+
$event_data['Severity'] = 20;
|
590 |
+
} else {
|
591 |
+
// assuming this is a missclasified item and using info code.
|
592 |
+
$code = 20;
|
593 |
+
}
|
594 |
+
|
595 |
+
// Add event object.
|
596 |
+
if ( $alert_obj && ! isset( $event_data['Object'] ) ) {
|
597 |
+
$event_data['Object'] = $alert_obj->object;
|
598 |
+
}
|
599 |
+
|
600 |
+
// Add event type.
|
601 |
+
if ( $alert_obj && ! isset( $event_data['EventType'] ) ) {
|
602 |
+
$event_data['EventType'] = $alert_obj->event_type;
|
603 |
Â
}
|
604 |
Â
|
605 |
Â
/**
|
1054 |
Â
return apply_filters( 'wsal_public_event_ids', array( 1000, 1002, 1003, 1004, 1005, 1007, 2126, 4000, 4012, 6023 ) ); // Public events.
|
1055 |
Â
}
|
1056 |
Â
|
1057 |
+
/**
|
1058 |
+
* Get event objects.
|
1059 |
+
*
|
1060 |
+
* @return array
|
1061 |
+
*/
|
1062 |
+
public function get_event_objects_data() {
|
1063 |
+
$objects = array(
|
1064 |
+
'user' => __( 'User', 'wp-security-audit-log' ),
|
1065 |
+
'system' => __( 'System', 'wp-security-audit-log' ),
|
1066 |
+
'plugin' => __( 'Plugin', 'wp-security-audit-log' ),
|
1067 |
+
'database' => __( 'Database', 'wp-security-audit-log' ),
|
1068 |
+
'post' => __( 'Post', 'wp-security-audit-log' ),
|
1069 |
+
'file' => __( 'File', 'wp-security-audit-log' ),
|
1070 |
+
'tag' => __( 'Tag', 'wp-security-audit-log' ),
|
1071 |
+
'comment' => __( 'Comment', 'wp-security-audit-log' ),
|
1072 |
+
'setting' => __( 'Setting', 'wp-security-audit-log' ),
|
1073 |
+
'file' => __( 'File', 'wp-security-audit-log' ),
|
1074 |
+
'system-setting' => __( 'System Setting', 'wp-security-audit-log' ),
|
1075 |
+
'bbpress' => __( 'BBPress', 'wp-security-audit-log' ),
|
1076 |
+
'bbpress-forum' => __( 'BBPress Forum', 'wp-security-audit-log' ),
|
1077 |
+
'woocommerce-product' => __( 'WooCommerce Product', 'wp-security-audit-log' ),
|
1078 |
+
'woocommerce-store' => __( 'WooCommerce Store', 'wp-security-audit-log' ),
|
1079 |
+
'mainwp-network' => __( 'MainWP Network', 'wp-security-audit-log' ),
|
1080 |
+
'mainwp' => __( 'MainWP', 'wp-security-audit-log' ),
|
1081 |
+
'yoast-seo' => __( 'Yoast SEO', 'wp-security-audit-log' ),
|
1082 |
+
'category' => __( 'Category', 'wp-security-audit-log' ),
|
1083 |
+
'custom-field' => __( 'Custom Field', 'wp-security-audit-log' ),
|
1084 |
+
'widget' => __( 'Widget', 'wp-security-audit-log' ),
|
1085 |
+
'menu' => __( 'Menu', 'wp-security-audit-log' ),
|
1086 |
+
'theme' => __( 'Theme', 'wp-security-audit-log' ),
|
1087 |
+
'activity-logs' => __( 'Activity Logs', 'wp-security-audit-log' ),
|
1088 |
+
'multisite-network' => __( 'Multisite Network', 'wp-security-audit-log' ),
|
1089 |
+
'ip-address' => __( 'IP Address', 'wp-security-audit-log' ),
|
1090 |
+
);
|
1091 |
+
asort( $objects );
|
1092 |
+
return apply_filters(
|
1093 |
+
'wsal_event_objects',
|
1094 |
+
$objects
|
1095 |
+
);
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* Returns the text to display for object.
|
1100 |
+
*
|
1101 |
+
* @param string $object - Object.
|
1102 |
+
* @return string
|
1103 |
+
*/
|
1104 |
+
public function get_display_object_text( $object ) {
|
1105 |
+
$display = '';
|
1106 |
+
|
1107 |
+
switch ( $object ) {
|
1108 |
+
case 'user':
|
1109 |
+
$display = __( 'User', 'wp-security-audit-log' );
|
1110 |
+
break;
|
1111 |
+
case 'system':
|
1112 |
+
$display = __( 'System', 'wp-security-audit-log' );
|
1113 |
+
break;
|
1114 |
+
case 'plugin':
|
1115 |
+
$display = __( 'Plugin', 'wp-security-audit-log' );
|
1116 |
+
break;
|
1117 |
+
case 'database':
|
1118 |
+
$display = __( 'Database', 'wp-security-audit-log' );
|
1119 |
+
break;
|
1120 |
+
case 'post':
|
1121 |
+
$display = __( 'Post', 'wp-security-audit-log' );
|
1122 |
+
break;
|
1123 |
+
case 'file':
|
1124 |
+
$display = __( 'File', 'wp-security-audit-log' );
|
1125 |
+
break;
|
1126 |
+
case 'tag':
|
1127 |
+
$display = __( 'Tag', 'wp-security-audit-log' );
|
1128 |
+
break;
|
1129 |
+
case 'comment':
|
1130 |
+
$display = __( 'Comment', 'wp-security-audit-log' );
|
1131 |
+
break;
|
1132 |
+
case 'setting':
|
1133 |
+
$display = __( 'Setting', 'wp-security-audit-log' );
|
1134 |
+
break;
|
1135 |
+
case 'file':
|
1136 |
+
$display = __( 'File', 'wp-security-audit-log' );
|
1137 |
+
break;
|
1138 |
+
case 'system-setting':
|
1139 |
+
$display = __( 'System Setting', 'wp-security-audit-log' );
|
1140 |
+
break;
|
1141 |
+
case 'bbpress':
|
1142 |
+
$display = __( 'BBPress', 'wp-security-audit-log' );
|
1143 |
+
break;
|
1144 |
+
case 'bbpress-forum':
|
1145 |
+
$display = __( 'BBPress Forum', 'wp-security-audit-log' );
|
1146 |
+
break;
|
1147 |
+
case 'woocommerce-product':
|
1148 |
+
$display = __( 'WooCommerce Product', 'wp-security-audit-log' );
|
1149 |
+
break;
|
1150 |
+
case 'woocommerce-store':
|
1151 |
+
$display = __( 'WooCommerce Store', 'wp-security-audit-log' );
|
1152 |
+
break;
|
1153 |
+
case 'mainwp-network':
|
1154 |
+
$display = __( 'MainWP Network', 'wp-security-audit-log' );
|
1155 |
+
break;
|
1156 |
+
case 'mainwp':
|
1157 |
+
$display = __( 'MainWP', 'wp-security-audit-log' );
|
1158 |
+
break;
|
1159 |
+
case 'yoast-seo':
|
1160 |
+
$display = __( 'Yoast SEO', 'wp-security-audit-log' );
|
1161 |
+
break;
|
1162 |
+
case 'category':
|
1163 |
+
$display = __( 'Category', 'wp-security-audit-log' );
|
1164 |
+
break;
|
1165 |
+
case 'custom-field':
|
1166 |
+
$display = __( 'Custom Field', 'wp-security-audit-log' );
|
1167 |
+
break;
|
1168 |
+
case 'widget':
|
1169 |
+
$display = __( 'Widget', 'wp-security-audit-log' );
|
1170 |
+
break;
|
1171 |
+
case 'menu':
|
1172 |
+
$display = __( 'Menu', 'wp-security-audit-log' );
|
1173 |
+
break;
|
1174 |
+
case 'theme':
|
1175 |
+
$display = __( 'Theme', 'wp-security-audit-log' );
|
1176 |
+
break;
|
1177 |
+
case 'activity-logs':
|
1178 |
+
$display = __( 'Activity Logs', 'wp-security-audit-log' );
|
1179 |
+
break;
|
1180 |
+
case 'multisite-network':
|
1181 |
+
$display = __( 'Multisite Network', 'wp-security-audit-log' );
|
1182 |
+
break;
|
1183 |
+
case 'ip-address':
|
1184 |
+
$display = __( 'IP Address', 'wp-security-audit-log' );
|
1185 |
+
break;
|
1186 |
+
default:
|
1187 |
+
break;
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
return $display;
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
/**
|
1194 |
+
* Get event type data.
|
1195 |
+
*
|
1196 |
+
* @return array
|
1197 |
+
*/
|
1198 |
+
public function get_event_type_data() {
|
1199 |
+
$types = array(
|
1200 |
+
'login' => __( 'Login', 'wp-security-audit-log' ),
|
1201 |
+
'logout' => __( 'Logout', 'wp-security-audit-log' ),
|
1202 |
+
'installed' => __( 'Installed', 'wp-security-audit-log' ),
|
1203 |
+
'activated' => __( 'Activated', 'wp-security-audit-log' ),
|
1204 |
+
'deactivated' => __( 'Deactivated', 'wp-security-audit-log' ),
|
1205 |
+
'uninstalled' => __( 'Uninstalled', 'wp-security-audit-log' ),
|
1206 |
+
'updated' => __( 'Updated', 'wp-security-audit-log' ),
|
1207 |
+
'created' => __( 'Created', 'wp-security-audit-log' ),
|
1208 |
+
'modified' => __( 'Modified', 'wp-security-audit-log' ),
|
1209 |
+
'deleted' => __( 'Deleted', 'wp-security-audit-log' ),
|
1210 |
+
'published' => __( 'Published', 'wp-security-audit-log' ),
|
1211 |
+
'approved' => __( 'Approved', 'wp-security-audit-log' ),
|
1212 |
+
'unapproved' => __( 'Unapproved', 'wp-security-audit-log' ),
|
1213 |
+
'enabled' => __( 'Enabled', 'wp-security-audit-log' ),
|
1214 |
+
'disabled' => __( 'Disabled', 'wp-security-audit-log' ),
|
1215 |
+
'added' => __( 'Added', 'wp-security-audit-log' ),
|
1216 |
+
'failed-login' => __( 'Failed Login', 'wp-security-audit-log' ),
|
1217 |
+
'blocked' => __( 'Blocked', 'wp-security-audit-log' ),
|
1218 |
+
'uploaded' => __( 'Uploaded', 'wp-security-audit-log' ),
|
1219 |
+
'restored' => __( 'Restored', 'wp-security-audit-log' ),
|
1220 |
+
'opened' => __( 'Opened', 'wp-security-audit-log' ),
|
1221 |
+
'viewed' => __( 'Viewed', 'wp-security-audit-log' ),
|
1222 |
+
'started' => __( 'Started', 'wp-security-audit-log' ),
|
1223 |
+
'stopped' => __( 'Stopped', 'wp-security-audit-log' ),
|
1224 |
+
'removed' => __( 'Removed', 'wp-security-audit-log' ),
|
1225 |
+
'unblocked' => __( 'Unblocked', 'wp-security-audit-log' ),
|
1226 |
+
);
|
1227 |
+
// sort the types alphabetically.
|
1228 |
+
asort( $types );
|
1229 |
+
return apply_filters(
|
1230 |
+
'wsal_event_type_data',
|
1231 |
+
$types
|
1232 |
+
);
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
/**
|
1236 |
+
* Returns the text to display for event type.
|
1237 |
+
*
|
1238 |
+
* @param string $event_type - Event type.
|
1239 |
+
* @return string
|
1240 |
+
*/
|
1241 |
+
public function get_display_event_type_text( $event_type ) {
|
1242 |
+
$display = '';
|
1243 |
+
|
1244 |
+
switch ( $event_type ) {
|
1245 |
+
case 'login':
|
1246 |
+
$display = __( 'Login', 'wp-security-audit-log' );
|
1247 |
+
break;
|
1248 |
+
case 'logout':
|
1249 |
+
$display = __( 'Logout', 'wp-security-audit-log' );
|
1250 |
+
break;
|
1251 |
+
case 'installed':
|
1252 |
+
$display = __( 'Installed', 'wp-security-audit-log' );
|
1253 |
+
break;
|
1254 |
+
case 'activated':
|
1255 |
+
$display = __( 'Activated', 'wp-security-audit-log' );
|
1256 |
+
break;
|
1257 |
+
case 'deactivated':
|
1258 |
+
$display = __( 'Deactivated', 'wp-security-audit-log' );
|
1259 |
+
break;
|
1260 |
+
case 'uninstalled':
|
1261 |
+
$display = __( 'Uninstalled', 'wp-security-audit-log' );
|
1262 |
+
break;
|
1263 |
+
case 'updated':
|
1264 |
+
$display = __( 'Updated', 'wp-security-audit-log' );
|
1265 |
+
break;
|
1266 |
+
case 'created':
|
1267 |
+
$display = __( 'Created', 'wp-security-audit-log' );
|
1268 |
+
break;
|
1269 |
+
case 'modified':
|
1270 |
+
$display = __( 'Modified', 'wp-security-audit-log' );
|
1271 |
+
break;
|
1272 |
+
case 'deleted':
|
1273 |
+
$display = __( 'Deleted', 'wp-security-audit-log' );
|
1274 |
+
break;
|
1275 |
+
case 'published':
|
1276 |
+
$display = __( 'Published', 'wp-security-audit-log' );
|
1277 |
+
break;
|
1278 |
+
case 'approved':
|
1279 |
+
$display = __( 'Approved', 'wp-security-audit-log' );
|
1280 |
+
break;
|
1281 |
+
case 'unapproved':
|
1282 |
+
$display = __( 'Unapproved', 'wp-security-audit-log' );
|
1283 |
+
break;
|
1284 |
+
case 'enabled':
|
1285 |
+
$display = __( 'Enabled', 'wp-security-audit-log' );
|
1286 |
+
break;
|
1287 |
+
case 'disabled':
|
1288 |
+
$display = __( 'Disabled', 'wp-security-audit-log' );
|
1289 |
+
break;
|
1290 |
+
case 'added':
|
1291 |
+
$display = __( 'Added', 'wp-security-audit-log' );
|
1292 |
+
break;
|
1293 |
+
case 'failed-login':
|
1294 |
+
$display = __( 'Failed Login', 'wp-security-audit-log' );
|
1295 |
+
break;
|
1296 |
+
case 'blocked':
|
1297 |
+
$display = __( 'Blocked', 'wp-security-audit-log' );
|
1298 |
+
break;
|
1299 |
+
case 'uploaded':
|
1300 |
+
$display = __( 'Uploaded', 'wp-security-audit-log' );
|
1301 |
+
break;
|
1302 |
+
case 'restored':
|
1303 |
+
$display = __( 'Restored', 'wp-security-audit-log' );
|
1304 |
+
break;
|
1305 |
+
case 'opened':
|
1306 |
+
$display = __( 'Opened', 'wp-security-audit-log' );
|
1307 |
+
break;
|
1308 |
+
case 'viewed':
|
1309 |
+
$display = __( 'Viewed', 'wp-security-audit-log' );
|
1310 |
+
break;
|
1311 |
+
case 'started':
|
1312 |
+
$display = __( 'Started', 'wp-security-audit-log' );
|
1313 |
+
break;
|
1314 |
+
case 'stopped':
|
1315 |
+
$display = __( 'Stopped', 'wp-security-audit-log' );
|
1316 |
+
break;
|
1317 |
+
case 'removed':
|
1318 |
+
$display = __( 'Removed', 'wp-security-audit-log' );
|
1319 |
+
break;
|
1320 |
+
case 'unblocked':
|
1321 |
+
$display = __( 'Unblocked', 'wp-security-audit-log' );
|
1322 |
+
break;
|
1323 |
+
default:
|
1324 |
+
break;
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
return $display;
|
1328 |
+
}
|
1329 |
+
|
1330 |
Â
/**
|
1331 |
Â
* Filter query for MWPAL.
|
1332 |
Â
*
|
classes/AuditLogGridView.php
ADDED
@@ -0,0 +1,1077 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Audit Log List View
|
4 |
+
*
|
5 |
+
* CLass file for audit log list view.
|
6 |
+
*
|
7 |
+
* @since 1.0.0
|
8 |
+
* @package Wsal
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
require_once ABSPATH . 'wp-admin/includes/admin.php';
|
17 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* This view is included in Audit Log Viewer Page.
|
21 |
+
*
|
22 |
+
* @see Views/AuditLog.php
|
23 |
+
* @package Wsal
|
24 |
+
*/
|
25 |
+
class WSAL_AuditLogGridView extends WP_List_Table {
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Instance of WpSecurityAuditLog.
|
29 |
+
*
|
30 |
+
* @var WpSecurityAuditLog
|
31 |
+
*/
|
32 |
+
protected $_plugin;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* GMT Offset
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
protected $_gmt_offset_sec = 0;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Current Alert ID
|
43 |
+
*
|
44 |
+
* This class member is used to store the alert ID
|
45 |
+
* of the alert which is being rendered.
|
46 |
+
*
|
47 |
+
* @var integer
|
48 |
+
*/
|
49 |
+
private $current_alert_id = 0;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Selected Columns.
|
53 |
+
*
|
54 |
+
* @since 3.3.1
|
55 |
+
*
|
56 |
+
* @var array()
|
57 |
+
*/
|
58 |
+
private $selected_columns = '';
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Display Name Type.
|
62 |
+
*
|
63 |
+
* @since 3.3.1
|
64 |
+
*
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
private $name_type = '';
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Events Query Arguments.
|
71 |
+
*
|
72 |
+
* @since 3.3.1.1
|
73 |
+
*
|
74 |
+
* @var stdClass
|
75 |
+
*/
|
76 |
+
private $query_args;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Event Items Meta Array.
|
80 |
+
*
|
81 |
+
* @since 3.4
|
82 |
+
*
|
83 |
+
* @var array
|
84 |
+
*/
|
85 |
+
private $item_meta = array();
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Method: Constructor.
|
89 |
+
*
|
90 |
+
* @param object $plugin - Instance of WpSecurityAuditLog.
|
91 |
+
* @param stdClass $query_args - Events query arguments.
|
92 |
+
*/
|
93 |
+
public function __construct( $plugin, $query_args ) {
|
94 |
+
$this->_plugin = $plugin;
|
95 |
+
$this->query_args = $query_args;
|
96 |
+
$timezone = $this->_plugin->settings->GetTimezone();
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Transform timezone values.
|
100 |
+
*
|
101 |
+
* @since 3.2.3
|
102 |
+
*/
|
103 |
+
if ( '0' === $timezone ) {
|
104 |
+
$timezone = 'utc';
|
105 |
+
} elseif ( '1' === $timezone ) {
|
106 |
+
$timezone = 'wp';
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( 'utc' === $timezone ) {
|
110 |
+
$this->_gmt_offset_sec = date( 'Z' );
|
111 |
+
} else {
|
112 |
+
$this->_gmt_offset_sec = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
|
113 |
+
}
|
114 |
+
|
115 |
+
parent::__construct(
|
116 |
+
array(
|
117 |
+
'singular' => 'log',
|
118 |
+
'plural' => 'logs',
|
119 |
+
'ajax' => true,
|
120 |
+
'screen' => 'interval-grid',
|
121 |
+
)
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Empty View.
|
127 |
+
*/
|
128 |
+
public function no_items() {
|
129 |
+
esc_html_e( 'No events so far.', 'wp-security-audit-log' );
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
protected function get_table_classes() {
|
134 |
+
$table_classes = array( 'widefat', 'fixed', 'striped', $this->_args['plural'], 'wsal-table', 'wsal-table-grid' );
|
135 |
+
return $table_classes;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Generate the table navigation above or below the table
|
140 |
+
*
|
141 |
+
* @since 3.2.3
|
142 |
+
* @param string $which – Position of the nav.
|
143 |
+
*/
|
144 |
+
protected function display_tablenav( $which ) {
|
145 |
+
if ( 'top' === $which ) {
|
146 |
+
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
|
147 |
+
}
|
148 |
+
?>
|
149 |
+
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
150 |
+
<?php
|
151 |
+
$this->extra_tablenav( $which );
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Action: `wsal_search_filters_list`
|
155 |
+
*
|
156 |
+
* Display list of search filters of WSAL.
|
157 |
+
*
|
158 |
+
* @param string $which – Navigation position; value is either top or bottom.
|
159 |
+
* @since 3.2.3
|
160 |
+
*/
|
161 |
+
do_action( 'wsal_search_filters_list', $which );
|
162 |
+
?>
|
163 |
+
<div class="display-type-buttons">
|
164 |
+
<?php
|
165 |
+
$user_selected_view = $this->_plugin->views->views[0]->detect_view_type();
|
166 |
+
$view_link = get_admin_url( null, 'admin.php?page=wsal-auditlog' );
|
167 |
+
?>
|
168 |
+
<a id ="wsal-list-view-toggle" href="<?php echo esc_url( add_query_arg( 'view', 'list', $view_link ) ); ?>" class="button wsal-button dashicons-before dashicons-list-view" <?php echo ( 'list' === $user_selected_view ) ? esc_attr( 'disabled' ) : ''; ?>><?php esc_html_e( 'List View', 'wp-security-audit-log' ); ?></a>
|
169 |
+
<a id ="wsal-grid-view-toggle" href="<?php echo esc_url( add_query_arg( 'view', 'grid', $view_link ) ); ?>" class="button wsal-button dashicons-before dashicons-grid-view" <?php echo ( 'grid' === $user_selected_view ) ? esc_attr( 'disabled' ) : ''; ?>><?php esc_html_e( 'Grid View', 'wp-security-audit-log' ); ?></a>
|
170 |
+
</div>
|
171 |
+
<?php
|
172 |
+
$this->pagination( $which );
|
173 |
+
?>
|
174 |
+
</div>
|
175 |
+
<?php
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Table navigation.
|
180 |
+
*
|
181 |
+
* @param string $which - Position of the nav.
|
182 |
+
*/
|
183 |
+
public function extra_tablenav( $which ) {
|
184 |
+
// If the position is not top then render.
|
185 |
+
if ( 'top' !== $which && ! $this->_plugin->settings->is_infinite_scroll() ) :
|
186 |
+
// Items-per-page widget.
|
187 |
+
$p = $this->_plugin->settings->GetViewPerPage();
|
188 |
+
$items = array( 5, 10, 15, 30, 50 );
|
189 |
+
if ( ! in_array( $p, $items, true ) ) {
|
190 |
+
$items[] = $p;
|
191 |
+
}
|
192 |
+
?>
|
193 |
+
<div class="wsal-ipp wsal-ipp-<?php echo esc_attr( $which ); ?>">
|
194 |
+
<?php esc_html_e( 'Show ', 'wp-security-audit-log' ); ?>
|
195 |
+
<select class="wsal-ipps" onfocus="WsalIppsFocus(value);" onchange="WsalIppsChange(value);">
|
196 |
+
<?php foreach ( $items as $item ) : ?>
|
197 |
+
<option value="<?php echo is_string( $item ) ? '' : esc_attr( $item ); ?>" <?php echo ( $item === $p ) ? 'selected="selected"' : false; ?>>
|
198 |
+
<?php echo esc_html( $item ); ?>
|
199 |
+
</option>
|
200 |
+
<?php endforeach; ?>
|
201 |
+
</select>
|
202 |
+
<?php esc_html_e( ' Items', 'wp-security-audit-log' ); ?>
|
203 |
+
</div>
|
204 |
+
<?php
|
205 |
+
endif;
|
206 |
+
|
207 |
+
if ( 'top' !== $which && $this->_plugin->settings->is_infinite_scroll() ) :
|
208 |
+
?>
|
209 |
+
<div id="wsal-auditlog-end"><p><?php esc_html_e( '— End of Activity Log —', 'wp-security-audit-log' ); ?></p></div>
|
210 |
+
<div id="wsal-event-loader"><div class="wsal-lds-ellipsis"><div></div><div></div><div></div><div></div></div></div>
|
211 |
+
<?php
|
212 |
+
endif;
|
213 |
+
|
214 |
+
// Show site alerts widget.
|
215 |
+
// NOTE: this is shown when the filter IS NOT true.
|
216 |
+
if ( $this->is_multisite() && $this->is_main_blog() && ! apply_filters( 'search_extensition_active', false ) ) {
|
217 |
+
if (
|
218 |
+
( 'top' === $which && $this->_plugin->settings->is_infinite_scroll() )
|
219 |
+
|| ! $this->_plugin->settings->is_infinite_scroll()
|
220 |
+
) {
|
221 |
+
$curr = $this->_plugin->settings->get_view_site_id();
|
222 |
+
?>
|
223 |
+
<div class="wsal-ssa wsal-ssa-<?php echo esc_attr( $which ); ?>">
|
224 |
+
<?php if ( $this->get_site_count() > 15 ) : ?>
|
225 |
+
<?php $curr = $curr ? get_blog_details( $curr ) : null; ?>
|
226 |
+
<?php $curr = $curr ? ( $curr->blogname . ' (' . $curr->domain . ')' ) : 'All Sites'; ?>
|
227 |
+
<input type="text" class="wsal-ssas" value="<?php echo esc_attr( $curr ); ?>"/>
|
228 |
+
<?php else : ?>
|
229 |
+
<select class="wsal-ssas" onchange="WsalSsasChange(value);">
|
230 |
+
<option value="0"><?php esc_html_e( 'All Sites', 'wp-security-audit-log' ); ?></option>
|
231 |
+
<?php foreach ( $this->get_sites() as $info ) : ?>
|
232 |
+
<option value="<?php echo esc_attr( $info->blog_id ); ?>" <?php echo ( $info->blog_id == $curr ) ? 'selected="selected"' : false; ?>>
|
233 |
+
<?php echo esc_html( $info->blogname ) . ' (' . esc_html( $info->domain ) . ')'; ?>
|
234 |
+
</option>
|
235 |
+
<?php endforeach; ?>
|
236 |
+
</select>
|
237 |
+
<?php endif; ?>
|
238 |
+
</div>
|
239 |
+
<?php
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
// Switch to live or archive DB.
|
244 |
+
if ( $this->_plugin->settings->IsArchivingEnabled() ) {
|
245 |
+
if (
|
246 |
+
( 'top' === $which && $this->_plugin->settings->is_infinite_scroll() )
|
247 |
+
|| ! $this->_plugin->settings->is_infinite_scroll()
|
248 |
+
) {
|
249 |
+
$selected = 'live';
|
250 |
+
$selected_db = get_transient( 'wsal_wp_selected_db' );
|
251 |
+
if ( $selected_db && 'archive' === $selected_db ) {
|
252 |
+
$selected = 'archive';
|
253 |
+
}
|
254 |
+
?>
|
255 |
+
<div class="wsal-ssa wsal-db">
|
256 |
+
<select class="wsal-db" onchange="WsalDBChange(value);">
|
257 |
+
<option value="live" <?php echo ( 'live' == $selected ) ? 'selected="selected"' : false; ?>>
|
258 |
+
<?php esc_html_e( 'Live Database', 'wp-security-audit-log' ); ?>
|
259 |
+
</option>
|
260 |
+
<option value="archive" <?php echo ( 'archive' == $selected ) ? 'selected="selected"' : false; ?>>
|
261 |
+
<?php esc_html_e( 'Archive Database', 'wp-security-audit-log' ); ?>
|
262 |
+
</option>
|
263 |
+
</select>
|
264 |
+
</div>
|
265 |
+
<?php
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Method: Object with keys: blog_id, blogname, domain.
|
272 |
+
*
|
273 |
+
* @param int|null $limit - Maximum number of sites to return (null = no limit).
|
274 |
+
* @return object
|
275 |
+
*/
|
276 |
+
public function get_sites( $limit = null ) {
|
277 |
+
global $wpdb;
|
278 |
+
// Build query.
|
279 |
+
$sql = 'SELECT blog_id, domain FROM ' . $wpdb->blogs;
|
280 |
+
if ( ! is_null( $limit ) ) {
|
281 |
+
$sql .= ' LIMIT ' . $limit;
|
282 |
+
}
|
283 |
+
|
284 |
+
// Execute query.
|
285 |
+
$res = $wpdb->get_results( $sql );
|
286 |
+
|
287 |
+
// Modify result.
|
288 |
+
foreach ( $res as $row ) {
|
289 |
+
$row->blogname = get_blog_option( $row->blog_id, 'blogname' );
|
290 |
+
}
|
291 |
+
|
292 |
+
// Return result.
|
293 |
+
return $res;
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Method: The number of sites on the network.
|
298 |
+
*
|
299 |
+
* @return int
|
300 |
+
*/
|
301 |
+
public function get_site_count() {
|
302 |
+
global $wpdb;
|
303 |
+
$sql = 'SELECT COUNT(*) FROM ' . $wpdb->blogs;
|
304 |
+
return (int) $wpdb->get_var( $sql );
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Method: Get View Columns.
|
309 |
+
*
|
310 |
+
* @return array
|
311 |
+
*/
|
312 |
+
public function get_columns() {
|
313 |
+
|
314 |
+
$cols = array(
|
315 |
+
'type' => __( 'ID', 'wp-security-audit-log' ),
|
316 |
+
'code' => __( 'Severity', 'wp-security-audit-log' ),
|
317 |
+
'info' => __( 'Info', 'wp-security-audit-log' ),
|
318 |
+
);
|
319 |
+
|
320 |
+
// If multisite then add "Site" column to the view.
|
321 |
+
if ( $this->is_multisite() && $this->is_main_blog() && ! $this->is_specific_view() ) {
|
322 |
+
$cols['site'] = __( 'Site', 'wp-security-audit-log' );
|
323 |
+
}
|
324 |
+
|
325 |
+
$cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
|
326 |
+
|
327 |
+
// Get selected columns from settings.
|
328 |
+
if ( empty( $this->selected_columns ) && ! is_array( $this->selected_columns ) ) {
|
329 |
+
$this->selected_columns = $this->_plugin->settings->GetColumnsSelected();
|
330 |
+
}
|
331 |
+
|
332 |
+
// If selected columns are not empty, then unset default columns.
|
333 |
+
if ( ! empty( $this->selected_columns ) ) {
|
334 |
+
unset( $cols );
|
335 |
+
$this->selected_columns = is_string( $this->selected_columns ) ? (array) json_decode( $this->selected_columns ) : $this->selected_columns;
|
336 |
+
foreach ( $this->selected_columns as $key => $value ) {
|
337 |
+
switch ( $key ) {
|
338 |
+
case 'alert_code':
|
339 |
+
$cols['type'] = __( 'ID', 'wp-security-audit-log' );
|
340 |
+
break;
|
341 |
+
case 'type':
|
342 |
+
$cols['code'] = __( 'Severity', 'wp-security-audit-log' );
|
343 |
+
break;
|
344 |
+
case 'info':
|
345 |
+
$cols['info'] = __( 'Grid', 'wp-security-audit-log' );
|
346 |
+
break;
|
347 |
+
case 'message':
|
348 |
+
$cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
|
349 |
+
break;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
}
|
353 |
+
$cols['data'] = '';
|
354 |
+
return $cols;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Method: Get checkbox column.
|
359 |
+
*
|
360 |
+
* @param object $item - Item.
|
361 |
+
* @return string
|
362 |
+
*/
|
363 |
+
public function column_cb( $item ) {
|
364 |
+
return '<input type="checkbox" value="' . $item->id . '" name="' . esc_attr( $this->_args['singular'] ) . '[]" />';
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Method: Get Sortable Columns.
|
369 |
+
*
|
370 |
+
* @return array
|
371 |
+
*/
|
372 |
+
public function get_sortable_columns() {
|
373 |
+
return array(
|
374 |
+
'type' => array( 'alert_id', false ),
|
375 |
+
'info' => array( 'info', false ),
|
376 |
+
);
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Method: Get default column values.
|
381 |
+
*
|
382 |
+
* @param WSAL_Models_Occurrence $item - Column item.
|
383 |
+
* @param string $column_name - Name of the column.
|
384 |
+
*/
|
385 |
+
public function column_default( $item, $column_name ) {
|
386 |
+
// Get date format.
|
387 |
+
$datetime_format = $this->_plugin->settings->GetDatetimeFormat();
|
388 |
+
|
389 |
+
// Store meta if not set.
|
390 |
+
if ( ! isset( $this->item_meta[ $item->getId() ] ) ) {
|
391 |
+
$this->item_meta[ $item->getId() ] = $item->GetMetaArray();
|
392 |
+
}
|
393 |
+
|
394 |
+
// Store current alert id.
|
395 |
+
$this->current_alert_id = $item->id;
|
396 |
+
|
397 |
+
switch ( $column_name ) {
|
398 |
+
case 'type':
|
399 |
+
$code = $this->_plugin->alerts->GetAlert( $item->alert_id );
|
400 |
+
$extra_msg = '';
|
401 |
+
$data_link = '';
|
402 |
+
$modification_alerts = array( 1002, 1003, 6007, 6023 );
|
403 |
+
if ( in_array( $item->alert_id, $modification_alerts, true ) ) {
|
404 |
+
$extra_msg = '. Modify this alert.';
|
405 |
+
if ( 1002 === $item->alert_id || 1003 === $item->alert_id ) {
|
406 |
+
$data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-users-profiles---activity', admin_url( 'admin.php' ) );
|
407 |
+
} elseif ( 6007 === $item->alert_id || 6023 === $item->alert_id ) {
|
408 |
+
$data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-system-activity', admin_url( 'admin.php' ) );
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
if ( ! $this->_plugin->settings->CurrentUserCan( 'edit' ) ) {
|
413 |
+
return '<span class="log-disable">' . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
|
414 |
+
}
|
415 |
+
|
416 |
+
return '<span class="log-disable" data-disable-alert-nonce="' . wp_create_nonce( 'disable-alert-nonce' . $item->alert_id ) . '" data-tooltip="' . __( 'Disable this type of events.', 'wp-security-audit-log' ) . '<br>' . $item->alert_id . ' - ' . esc_html( $code->desc ) . $extra_msg . '" data-alert-id="' . $item->alert_id . '" ' . esc_attr( 'data-link=' . $data_link ) . ' >'
|
417 |
+
. str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
|
418 |
+
case 'code':
|
419 |
+
$code = $this->_plugin->alerts->GetAlert( $item->alert_id );
|
420 |
+
$code = $code ? $code->code : 0;
|
421 |
+
$const = $this->_plugin->constants->get_constant_to_display( $code );
|
422 |
+
|
423 |
+
return '<a class="tooltip" href="#" data-tooltip="' . esc_html( $const->name ) . '"><span class="log-type log-type-' . $const->value . '"></span></a>';
|
424 |
+
case 'site':
|
425 |
+
$info = get_blog_details( $item->site_id, true );
|
426 |
+
return ! $info ? ( 'Unknown Site ' . $item->site_id )
|
427 |
+
: ( '<a href="' . esc_attr( $info->siteurl ) . '">' . esc_html( $info->blogname ) . '</a>' );
|
428 |
+
case 'mesg':
|
429 |
+
ob_start();
|
430 |
+
// login, logout and failed login has no message attached.
|
431 |
+
if ( ! in_array( $item->alert_id, array( 1000, 1001, 1002 ), true ) ) {
|
432 |
+
?>
|
433 |
+
<table id="Event<?php echo absint( $item->id ); ?>">
|
434 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'Message:', 'alm-' ); ?></td>
|
435 |
+
<td class="wsal-grid-text-data"><?php echo wp_kses_post( $item->GetMessage( array( $this->_plugin->settings, 'meta_formatter' ), false, $this->item_meta[ $item->getId() ] ) ); ?></td>
|
436 |
+
</table>
|
437 |
+
<?php
|
438 |
+
}
|
439 |
+
return ob_get_clean();
|
440 |
+
case 'info':
|
441 |
+
$code = $this->_plugin->alerts->GetAlert( $item->alert_id );
|
442 |
+
$extra_msg = '';
|
443 |
+
$data_link = '';
|
444 |
+
$modification_alerts = array( 1002, 1003, 6007, 6023 );
|
445 |
+
|
446 |
+
$date_format = $this->_plugin->settings->GetDateFormat();
|
447 |
+
$show_microseconds = $this->_plugin->settings->get_show_milliseconds();
|
448 |
+
if ( 'no' === $show_microseconds ) {
|
449 |
+
// remove the microseconds placeholder from format string.
|
450 |
+
$datetime_format = str_replace( '.$$$', '', $datetime_format );
|
451 |
+
}
|
452 |
+
$eventdate = $item->created_on ? (
|
453 |
+
str_replace(
|
454 |
+
'$$$',
|
455 |
+
substr( number_format( fmod( $item->created_on + $this->_gmt_offset_sec, 1 ), 3 ), 2 ),
|
456 |
+
date( $date_format, $item->created_on + $this->_gmt_offset_sec )
|
457 |
+
)
|
458 |
+
) : '<i>' . __( 'Unknown', 'wp-security-audit-log' ) . '</i>';
|
459 |
+
$eventtime = $item->created_on ? (
|
460 |
+
str_replace(
|
461 |
+
'$$$',
|
462 |
+
substr( number_format( fmod( $item->created_on + $this->_gmt_offset_sec, 1 ), 3 ), 2 ),
|
463 |
+
date( get_option( 'time_format' ), $item->created_on + $this->_gmt_offset_sec )
|
464 |
+
)
|
465 |
+
) : '<i>' . __( 'Unknown', 'wp-security-audit-log' ) . '</i>';
|
466 |
+
|
467 |
+
$username = $item->GetUsername( $this->item_meta[ $item->getId() ] ); // Get username.
|
468 |
+
$user = get_user_by( 'login', $username ); // Get user.
|
469 |
+
if ( empty( $this->name_type ) ) {
|
470 |
+
$this->name_type = $this->_plugin->settings->get_type_username();
|
471 |
+
}
|
472 |
+
|
473 |
+
// Check if the username and user exists.
|
474 |
+
if ( $username && $user ) {
|
475 |
+
|
476 |
+
// Checks for display name.
|
477 |
+
if ( 'display_name' === $this->name_type && ! empty( $user->display_name ) ) {
|
478 |
+
$display_name = $user->display_name;
|
479 |
+
} elseif (
|
480 |
+
'first_last_name' === $this->name_type
|
481 |
+
&& ( ! empty( $user->first_name ) || ! empty( $user->last_name ) )
|
482 |
+
) {
|
483 |
+
$display_name = $user->first_name . ' ' . $user->last_name;
|
484 |
+
} else {
|
485 |
+
$display_name = $user->user_login;
|
486 |
+
}
|
487 |
+
|
488 |
+
if ( class_exists( 'WSAL_SearchExtension' ) ) {
|
489 |
+
$tooltip = esc_attr__( 'Show me all activity by this User', 'wp-security-audit-log' );
|
490 |
+
|
491 |
+
$uhtml = '<a class="search-user" data-tooltip="' . $tooltip . '" data-user="' . $user->user_login . '" href="' . admin_url( 'user-edit.php?user_id=' . $user->ID )
|
492 |
+
. '" target="_blank">' . esc_html( $display_name ) . '</a>';
|
493 |
+
} else {
|
494 |
+
$uhtml = '<a href="' . admin_url( 'user-edit.php?user_id=' . $user->ID )
|
495 |
+
. '" target="_blank">' . esc_html( $display_name ) . '</a>';
|
496 |
+
}
|
497 |
+
|
498 |
+
$roles = $item->GetUserRoles( $this->item_meta[ $item->getId() ] );
|
499 |
+
if ( is_array( $roles ) && count( $roles ) ) {
|
500 |
+
$roles = esc_html( ucwords( implode( ', ', $roles ) ) );
|
501 |
+
} elseif ( is_string( $roles ) && '' != $roles ) {
|
502 |
+
$roles = esc_html( ucwords( str_replace( array( '"', '[', ']' ), ' ', $roles ) ) );
|
503 |
+
} else {
|
504 |
+
$roles = '<i>' . __( 'Unknown', 'wp-security-audit-log' ) . '</i>';
|
505 |
+
}
|
506 |
+
} elseif ( 'Plugin' == $username ) {
|
507 |
+
$uhtml = '<i>' . __( 'Plugin', 'wp-security-audit-log' ) . '</i>';
|
508 |
+
$roles = '';
|
509 |
+
} elseif ( 'Plugins' == $username ) {
|
510 |
+
$uhtml = '<i>' . __( 'Plugins', 'wp-security-audit-log' ) . '</i>';
|
511 |
+
$roles = '';
|
512 |
+
} elseif ( 'Website Visitor' == $username ) {
|
513 |
+
$uhtml = '<i>' . __( 'Website Visitor', 'wp-security-audit-log' ) . '</i>';
|
514 |
+
$roles = '';
|
515 |
+
} else {
|
516 |
+
$uhtml = '<i>' . __( 'System', 'wp-security-audit-log' ) . '</i>';
|
517 |
+
$roles = '';
|
518 |
+
}
|
519 |
+
$row_user_data = $uhtml . '<br/>' . $roles;
|
520 |
+
|
521 |
+
/**
|
522 |
+
* WSAL Filter: `wsal_auditlog_row_user_data`
|
523 |
+
*
|
524 |
+
* Filters user data before displaying on the audit log.
|
525 |
+
*
|
526 |
+
* @since 3.3.1
|
527 |
+
*
|
528 |
+
* @param string $row_user_data - User data to display in audit log row.
|
529 |
+
* @param integer $this->current_alert_id - Event database ID.
|
530 |
+
*/
|
531 |
+
$eventuser = apply_filters( 'wsal_auditlog_row_user_data', $row_user_data, $this->current_alert_id );
|
532 |
+
|
533 |
+
|
534 |
+
|
535 |
+
$scip = $item->GetSourceIP( $this->item_meta[ $item->getId() ] );
|
536 |
+
if ( is_string( $scip ) ) {
|
537 |
+
$scip = str_replace( array( '"', '[', ']' ), '', $scip );
|
538 |
+
}
|
539 |
+
|
540 |
+
$oips = array(); // $item->GetOtherIPs();
|
541 |
+
|
542 |
+
// If there's no IP...
|
543 |
+
if ( is_null( $scip ) || '' == $scip ) {
|
544 |
+
return '<i>unknown</i>';
|
545 |
+
}
|
546 |
+
|
547 |
+
// If there's only one IP...
|
548 |
+
$link = 'https://whatismyipaddress.com/ip/' . $scip . '?utm_source=plugin&utm_medium=referral&utm_campaign=WPSAL';
|
549 |
+
if ( class_exists( 'WSAL_SearchExtension' ) ) {
|
550 |
+
$tooltip = esc_attr__( 'Show me all activity originating from this IP Address', 'wp-security-audit-log' );
|
551 |
+
|
552 |
+
if ( count( $oips ) < 2 ) {
|
553 |
+
$oips_html = "<a class='search-ip' data-tooltip='$tooltip' data-ip='$scip' target='_blank' href='$link'>" . esc_html( $scip ) . '</a>';
|
554 |
+
}
|
555 |
+
} else {
|
556 |
+
if ( count( $oips ) < 2 ) {
|
557 |
+
$oips_html = "<a target='_blank' href='$link'>" . esc_html( $scip ) . '</a>';
|
558 |
+
}
|
559 |
+
}
|
560 |
+
|
561 |
+
// If there are many IPs...
|
562 |
+
if ( class_exists( 'WSAL_SearchExtension' ) ) {
|
563 |
+
$tooltip = esc_attr__( 'Show me all activity originating from this IP Address', 'wp-security-audit-log' );
|
564 |
+
|
565 |
+
$ip_html = "<a class='search-ip' data-tooltip='$tooltip' data-ip='$scip' target='_blank' href='https://whatismyipaddress.com/ip/$scip'>" . esc_html( $scip ) . '</a> <a href="javascript:;" onclick="jQuery(this).hide().next().show();">(more…)</a><div style="display: none;">';
|
566 |
+
foreach ( $oips as $ip ) {
|
567 |
+
if ( $scip != $ip ) {
|
568 |
+
$ip_html .= '<div>' . $ip . '</div>';
|
569 |
+
}
|
570 |
+
}
|
571 |
+
$ip_html .= '</div>';
|
572 |
+
} else {
|
573 |
+
$ip_html = "<a target='_blank' href='https://whatismyipaddress.com/ip/$scip'>" . esc_html( $scip ) . '</a> <a href="javascript:;" onclick="jQuery(this).hide().next().show();">(more…)</a><div style="display: none;">';
|
574 |
+
foreach ( $oips as $ip ) {
|
575 |
+
if ( $scip != $ip ) {
|
576 |
+
$ip_html .= '<div>' . $ip . '</div>';
|
577 |
+
}
|
578 |
+
}
|
579 |
+
$ip_html .= '</div>';
|
580 |
+
}
|
581 |
+
|
582 |
+
|
583 |
+
|
584 |
+
$eventobj = isset( $this->item_meta[ $item->getId() ]['Object'] ) ? $this->_plugin->alerts->get_display_object_text( $this->item_meta[ $item->getId() ]['Object'] ) : '';
|
585 |
+
|
586 |
+
$eventtypeobj = isset( $this->item_meta[ $item->getId() ]['EventType'] ) ? $this->_plugin->alerts->get_display_event_type_text( $this->item_meta[ $item->getId() ]['EventType'] ) : '';
|
587 |
+
|
588 |
+
ob_start();
|
589 |
+
?>
|
590 |
+
<table>
|
591 |
+
<tr>
|
592 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'Date:' ); ?></td>
|
593 |
+
<td class="wsal-grid-text-data"><?php echo $eventdate; ?></td>
|
594 |
+
</tr>
|
595 |
+
<tr>
|
596 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'Time:' ); ?></td>
|
597 |
+
<td class="wsal-grid-text-data"><?php echo $eventtime; ?></td>
|
598 |
+
</tr>
|
599 |
+
<tr>
|
600 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'User:' ); ?></td>
|
601 |
+
<td class="wsal-grid-text-data"><?php echo $eventuser; ?></td>
|
602 |
+
</tr>
|
603 |
+
<tr>
|
604 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'IP:' ); ?></td>
|
605 |
+
<td class="wsal-grid-text-data"><?php echo ( isset( $oips_html ) && ! empty( $oips_html ) ) ? $oips_html : $ip_html ?></td>
|
606 |
+
</tr>
|
607 |
+
<tr>
|
608 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'Object:' ); ?></td>
|
609 |
+
<td class="wsal-grid-text-data"><?php echo $eventobj; ?></td>
|
610 |
+
</tr>
|
611 |
+
<tr>
|
612 |
+
<td class="wsal-grid-text-header"><?php esc_html_e( 'Event Type:' ); ?></td>
|
613 |
+
<td class="wsal-grid-text-data"><?php echo $eventtypeobj; ?></td>
|
614 |
+
</tr>
|
615 |
+
</table>
|
616 |
+
<?php
|
617 |
+
return ob_get_clean();
|
618 |
+
case 'data':
|
619 |
+
$url = admin_url( 'admin-ajax.php' ) . '?action=AjaxInspector&occurrence=' . $item->id;
|
620 |
+
$tooltip = esc_attr__( 'View all details of this change', 'wp-security-audit-log' );
|
621 |
+
return '<a class="more-info thickbox" data-tooltip="' . $tooltip . '" title="' . __( 'Alert Data Inspector', 'wp-security-audit-log' ) . '"'
|
622 |
+
. ' href="' . $url . '&TB_iframe=true&width=600&height=550">…</a>';
|
623 |
+
default:
|
624 |
+
return isset( $item->$column_name )
|
625 |
+
? esc_html( $item->$column_name )
|
626 |
+
: 'Column "' . esc_html( $column_name ) . '" not found';
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Method: Reorder string items.
|
632 |
+
*
|
633 |
+
* @param object $a - Item to compare.
|
634 |
+
* @param object $b - Item to compare.
|
635 |
+
* @return int
|
636 |
+
*/
|
637 |
+
public function reorder_items_str( $a, $b ) {
|
638 |
+
$result = strcmp( $a->{$this->_orderby}, $b->{$this->_orderby} );
|
639 |
+
return ( 'asc' === $this->_order ) ? $result : -$result;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Method: Reorder items.
|
644 |
+
*
|
645 |
+
* @param object $a - Item to compare.
|
646 |
+
* @param object $b - Item to compare.
|
647 |
+
* @return int
|
648 |
+
*/
|
649 |
+
public function reorder_items_int( $a, $b ) {
|
650 |
+
$result = $a->{$this->_orderby} - $b->{$this->_orderby};
|
651 |
+
return ( 'asc' === $this->_order ) ? $result : -$result;
|
652 |
+
}
|
653 |
+
|
654 |
+
/**
|
655 |
+
* Method: Meta data formater.
|
656 |
+
*
|
657 |
+
* @param string $name - Name of the data.
|
658 |
+
* @param mixed $value - Value of the data.
|
659 |
+
* @return string
|
660 |
+
* @deprecated 3.3
|
661 |
+
*/
|
662 |
+
public function meta_formatter( $name, $value ) {
|
663 |
+
switch ( true ) {
|
664 |
+
case '%Message%' == $name:
|
665 |
+
return esc_html( $value );
|
666 |
+
|
667 |
+
case '%PromoMessage%' == $name:
|
668 |
+
return '<p class="promo-alert">' . $value . '</p>';
|
669 |
+
|
670 |
+
case '%PromoLink%' == $name:
|
671 |
+
case '%CommentLink%' == $name:
|
672 |
+
case '%CommentMsg%' == $name:
|
673 |
+
return $value;
|
674 |
+
|
675 |
+
case '%MetaLink%' == $name:
|
676 |
+
if ( ! empty( $value ) ) {
|
677 |
+
return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
|
678 |
+
} else {
|
679 |
+
return '';
|
680 |
+
}
|
681 |
+
|
682 |
+
case '%RevisionLink%' === $name:
|
683 |
+
$check_value = (string) $value;
|
684 |
+
if ( 'NULL' !== $check_value ) {
|
685 |
+
return ' Click <a target="_blank" href="' . esc_url( $value ) . '">here</a> to see the content changes.';
|
686 |
+
} else {
|
687 |
+
return false;
|
688 |
+
}
|
689 |
+
|
690 |
+
case '%EditorLinkPost%' == $name:
|
691 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">post</a>';
|
692 |
+
|
693 |
+
case '%EditorLinkPage%' == $name:
|
694 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">page</a>';
|
695 |
+
|
696 |
+
case '%CategoryLink%' == $name:
|
697 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">category</a>';
|
698 |
+
|
699 |
+
case '%TagLink%' == $name:
|
700 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">tag</a>';
|
701 |
+
|
702 |
+
case '%EditorLinkForum%' == $name:
|
703 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">forum</a>';
|
704 |
+
|
705 |
+
case '%EditorLinkTopic%' == $name:
|
706 |
+
return ' View the <a target="_blank" href="' . esc_url( $value ) . '">topic</a>';
|
707 |
+
|
708 |
+
case in_array( $name, array( '%MetaValue%', '%MetaValueOld%', '%MetaValueNew%' ) ):
|
709 |
+
return '<strong>' . (
|
710 |
+
strlen( $value ) > 50 ? ( esc_html( substr( $value, 0, 50 ) ) . '…' ) : esc_html( $value )
|
711 |
+
) . '</strong>';
|
712 |
+
|
713 |
+
case '%ClientIP%' == $name:
|
714 |
+
if ( is_string( $value ) ) {
|
715 |
+
return '<strong>' . str_replace( array( '"', '[', ']' ), '', $value ) . '</strong>';
|
716 |
+
} else {
|
717 |
+
return '<i>unknown</i>';
|
718 |
+
}
|
719 |
+
|
720 |
+
case '%LinkFile%' === $name:
|
721 |
+
if ( 'NULL' != $value ) {
|
722 |
+
$site_id = $this->get_view_site_id(); // Site id for multisite.
|
723 |
+
return '<a href="javascript:;" onclick="download_404_log( this )" data-log-file="' . esc_attr( $value ) . '" data-site-id="' . esc_attr( $site_id ) . '" data-nonce-404="' . esc_attr( wp_create_nonce( 'wsal-download-404-log-' . $value ) ) . '" title="' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '">' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '</a>';
|
724 |
+
} else {
|
725 |
+
return 'Click <a href="' . esc_url( admin_url( 'admin.php?page=wsal-togglealerts#tab-system-activity' ) ) . '">here</a> to log such requests to file';
|
726 |
+
}
|
727 |
+
|
728 |
+
case '%URL%' === $name:
|
729 |
+
return ' or <a href="javascript:;" data-exclude-url="' . esc_url( $value ) . '" data-exclude-url-nonce="' . wp_create_nonce( 'wsal-exclude-url-' . $value ) . '" onclick="wsal_exclude_url( this )">exclude this URL</a> from being reported.';
|
730 |
+
|
731 |
+
case '%LogFileLink%' === $name: // Failed login file link.
|
732 |
+
return '';
|
733 |
+
|
734 |
+
case '%Attempts%' === $name: // Failed login attempts.
|
735 |
+
$check_value = (int) $value;
|
736 |
+
if ( 0 === $check_value ) {
|
737 |
+
return '';
|
738 |
+
} else {
|
739 |
+
return $value;
|
740 |
+
}
|
741 |
+
|
742 |
+
case '%LogFileText%' === $name: // Failed login file text.
|
743 |
+
return '<a href="javascript:;" onclick="download_failed_login_log( this )" data-download-nonce="' . esc_attr( wp_create_nonce( 'wsal-download-failed-logins' ) ) . '" title="' . esc_html__( 'Download the log file.', 'wp-security-audit-log' ) . '">' . esc_html__( 'Download the log file.', 'wp-security-audit-log' ) . '</a>';
|
744 |
+
|
745 |
+
case strncmp( $value, 'http://', 7 ) === 0:
|
746 |
+
case strncmp( $value, 'https://', 8 ) === 0:
|
747 |
+
return '<a href="' . esc_html( $value ) . '" title="' . esc_html( $value ) . '" target="_blank">' . esc_html( $value ) . '</a>';
|
748 |
+
|
749 |
+
case '%PostStatus%' === $name:
|
750 |
+
if ( ! empty( $value ) && 'publish' === $value ) {
|
751 |
+
return '<strong>' . esc_html__( 'published', 'wp-security-audit-log' ) . '</strong>';
|
752 |
+
} else {
|
753 |
+
return '<strong>' . esc_html( $value ) . '</strong>';
|
754 |
+
}
|
755 |
+
|
756 |
+
case '%multisite_text%' === $name:
|
757 |
+
if ( $this->is_multisite() && $value ) {
|
758 |
+
$site_info = get_blog_details( $value, true );
|
759 |
+
if ( $site_info ) {
|
760 |
+
return ' on site <a href="' . esc_url( $site_info->siteurl ) . '">' . esc_html( $site_info->blogname ) . '</a>';
|
761 |
+
}
|
762 |
+
return;
|
763 |
+
}
|
764 |
+
return;
|
765 |
+
|
766 |
+
case '%ReportText%' === $name:
|
767 |
+
return;
|
768 |
+
|
769 |
+
case '%ChangeText%' === $name:
|
770 |
+
$url = admin_url( 'admin-ajax.php' ) . '?action=AjaxInspector&occurrence=' . $this->current_alert_id;
|
771 |
+
return ' View the changes in <a class="thickbox" title="' . __( 'Alert Data Inspector', 'wp-security-audit-log' ) . '"'
|
772 |
+
. ' href="' . $url . '&TB_iframe=true&width=600&height=550">data inspector.</a>';
|
773 |
+
|
774 |
+
case '%ScanError%' === $name:
|
775 |
+
if ( 'NULL' === $value ) {
|
776 |
+
return false;
|
777 |
+
}
|
778 |
+
/* translators: Mailto link for support. */
|
779 |
+
return ' with errors. ' . sprintf( __( 'Contact us on %s for assistance', 'wp-security-audit-log' ), '<a href="mailto:support@wpsecurityauditlog.com" target="_blank">support@wpsecurityauditlog.com</a>' );
|
780 |
+
|
781 |
+
default:
|
782 |
+
return '<strong>' . esc_html( $value ) . '</strong>';
|
783 |
+
}
|
784 |
+
}
|
785 |
+
|
786 |
+
/**
|
787 |
+
* Method: Check if multisite.
|
788 |
+
*
|
789 |
+
* @return bool
|
790 |
+
*/
|
791 |
+
protected function is_multisite() {
|
792 |
+
return $this->_plugin->IsMultisite();
|
793 |
+
}
|
794 |
+
|
795 |
+
/**
|
796 |
+
* Method: Check if the blog is main blog.
|
797 |
+
*
|
798 |
+
* @return bool
|
799 |
+
*/
|
800 |
+
protected function is_main_blog() {
|
801 |
+
return get_current_blog_id() == 1;
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Method: Check if it is a specific view.
|
806 |
+
*
|
807 |
+
* @return bool
|
808 |
+
*/
|
809 |
+
protected function is_specific_view() {
|
810 |
+
return isset( $this->query_args->site_id ) && '0' != $this->query_args->site_id;
|
811 |
+
}
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Method: Get a specific view.
|
815 |
+
*
|
816 |
+
* @return int
|
817 |
+
*/
|
818 |
+
protected function get_specific_view() {
|
819 |
+
return isset( $this->query_args->site_id ) ? (int) $this->query_args->site_id : 0;
|
820 |
+
}
|
821 |
+
|
822 |
+
/**
|
823 |
+
* Method: Get view site id.
|
824 |
+
*
|
825 |
+
* @return int
|
826 |
+
*/
|
827 |
+
protected function get_view_site_id() {
|
828 |
+
switch ( true ) {
|
829 |
+
// Non-multisite.
|
830 |
+
case ! $this->is_multisite():
|
831 |
+
return 0;
|
832 |
+
// Multisite + main site view.
|
833 |
+
case $this->is_main_blog() && ! $this->is_specific_view():
|
834 |
+
return 0;
|
835 |
+
// Multisite + switched site view.
|
836 |
+
case $this->is_main_blog() && $this->is_specific_view():
|
837 |
+
return $this->get_specific_view();
|
838 |
+
// Multisite + local site view.
|
839 |
+
default:
|
840 |
+
return get_current_blog_id();
|
841 |
+
}
|
842 |
+
}
|
843 |
+
|
844 |
+
/**
|
845 |
+
* Set Events for Audit Log Viewer.
|
846 |
+
*/
|
847 |
+
public function prepare_items() {
|
848 |
+
$columns = $this->get_columns();
|
849 |
+
$hidden = array();
|
850 |
+
$sortable = $this->get_sortable_columns();
|
851 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
852 |
+
|
853 |
+
$query_events = $this->query_events();
|
854 |
+
$this->items = isset( $query_events['items'] ) ? $query_events['items'] : false;
|
855 |
+
$total_items = isset( $query_events['total_items'] ) ? $query_events['total_items'] : false;
|
856 |
+
$per_page = isset( $query_events['per_page'] ) ? $query_events['per_page'] : false;
|
857 |
+
|
858 |
+
if ( ! $this->_plugin->settings->is_infinite_scroll() ) {
|
859 |
+
$this->set_pagination_args(
|
860 |
+
array(
|
861 |
+
'total_items' => $total_items,
|
862 |
+
'per_page' => $per_page,
|
863 |
+
'total_pages' => ceil( $total_items / $per_page ),
|
864 |
+
)
|
865 |
+
);
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
/**
|
870 |
+
* Method: Output Single row.
|
871 |
+
*
|
872 |
+
* @param object $item - Item.
|
873 |
+
*/
|
874 |
+
public function single_row( $item ) {
|
875 |
+
if ( 9999 === $item->alert_id ) {
|
876 |
+
echo '<tr style="background-color: #D5E46E">';
|
877 |
+
$this->single_row_columns( $item );
|
878 |
+
echo '</tr>';
|
879 |
+
} else {
|
880 |
+
parent::single_row( $item );
|
881 |
+
}
|
882 |
+
}
|
883 |
+
|
884 |
+
/**
|
885 |
+
* Print column headers, accounting for hidden and sortable columns.
|
886 |
+
*
|
887 |
+
* @static var int $cb_counter
|
888 |
+
*
|
889 |
+
* @param bool $with_id – Whether to set the id attribute or not.
|
890 |
+
* @since 3.2.3
|
891 |
+
*/
|
892 |
+
public function print_column_headers( $with_id = true ) {
|
893 |
+
list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
|
894 |
+
|
895 |
+
$current_url = set_url_scheme( esc_url_raw( wp_unslash( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ) );
|
896 |
+
$current_url = remove_query_arg( 'paged', $current_url );
|
897 |
+
|
898 |
+
// Set order by query arg.
|
899 |
+
if ( isset( $this->query_args->order_by ) ) {
|
900 |
+
$current_orderby = $this->query_args->order_by;
|
901 |
+
} else {
|
902 |
+
$current_orderby = '';
|
903 |
+
}
|
904 |
+
|
905 |
+
if ( isset( $this->query_args->order ) && 'desc' === $this->query_args->order ) {
|
906 |
+
$current_order = 'desc';
|
907 |
+
} else {
|
908 |
+
$current_order = 'asc';
|
909 |
+
}
|
910 |
+
|
911 |
+
if ( ! empty( $columns['cb'] ) ) {
|
912 |
+
static $cb_counter = 1;
|
913 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
|
914 |
+
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
|
915 |
+
$cb_counter++;
|
916 |
+
}
|
917 |
+
|
918 |
+
foreach ( $columns as $column_key => $column_display_name ) {
|
919 |
+
$class = array( 'manage-column', "column-$column_key" );
|
920 |
+
|
921 |
+
if ( in_array( $column_key, $hidden ) ) {
|
922 |
+
$class[] = 'hidden';
|
923 |
+
}
|
924 |
+
|
925 |
+
if ( 'cb' === $column_key ) {
|
926 |
+
$class[] = 'check-column';
|
927 |
+
} elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) {
|
928 |
+
$class[] = 'num';
|
929 |
+
}
|
930 |
+
|
931 |
+
if ( $column_key === $primary ) {
|
932 |
+
$class[] = 'column-primary';
|
933 |
+
}
|
934 |
+
|
935 |
+
if ( isset( $sortable[ $column_key ] ) ) {
|
936 |
+
list( $orderby, $desc_first ) = $sortable[ $column_key ];
|
937 |
+
|
938 |
+
if ( $current_orderby === $orderby ) {
|
939 |
+
$order = 'asc' === $current_order ? 'desc' : 'asc';
|
940 |
+
$class[] = 'sorted';
|
941 |
+
$class[] = $current_order;
|
942 |
+
} else {
|
943 |
+
$order = $desc_first ? 'desc' : 'asc';
|
944 |
+
$class[] = 'sortable';
|
945 |
+
$class[] = $desc_first ? 'asc' : 'desc';
|
946 |
+
}
|
947 |
+
|
948 |
+
$column_display_name = '<a class="wsal-column-name" href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
|
949 |
+
}
|
950 |
+
|
951 |
+
$tag = ( 'cb' === $column_key ) ? 'td' : 'th';
|
952 |
+
$scope = ( 'th' === $tag ) ? 'scope="col"' : '';
|
953 |
+
$id = $with_id ? "id='$column_key'" : '';
|
954 |
+
|
955 |
+
if ( ! empty( $class ) ) {
|
956 |
+
$class = "class='" . implode( ' ', $class ) . "'";
|
957 |
+
}
|
958 |
+
|
959 |
+
echo "<$tag $scope $id $class>";
|
960 |
+
echo ! in_array( $column_key, array( 'code', 'data', 'site' ), true ) ? '<div class="wsal-filter-wrap">' : '';
|
961 |
+
|
962 |
+
if ( $with_id ) {
|
963 |
+
/**
|
964 |
+
* Action: `wsal_audit_log_column_header`
|
965 |
+
*
|
966 |
+
* Action hook to add search filters in the audit log
|
967 |
+
* column headers.
|
968 |
+
*
|
969 |
+
* @param string $column_key – Column key.
|
970 |
+
*/
|
971 |
+
do_action( 'wsal_audit_log_column_header', $column_key );
|
972 |
+
}
|
973 |
+
|
974 |
+
echo $column_display_name;
|
975 |
+
echo ! in_array( $column_key, array( 'code', 'data', 'site' ), true ) ? '</div>' : '';
|
976 |
+
echo "</$tag>";
|
977 |
+
}
|
978 |
+
}
|
979 |
+
|
980 |
+
/**
|
981 |
+
* Returns total events in the Audit Log.
|
982 |
+
*
|
983 |
+
* @return int
|
984 |
+
*/
|
985 |
+
public function get_total_items() {
|
986 |
+
return isset( $this->_pagination_args['total_items'] ) ? $this->_pagination_args['total_items'] : false;
|
987 |
+
}
|
988 |
+
|
989 |
+
/**
|
990 |
+
* Query Events from WSAL DB.
|
991 |
+
*
|
992 |
+
* @since 3.3.1.1
|
993 |
+
*
|
994 |
+
* @param integer $paged - Page number.
|
995 |
+
* @return array
|
996 |
+
*/
|
997 |
+
public function query_events( $paged = 0 ) {
|
998 |
+
if ( $this->_plugin->settings->IsArchivingEnabled() ) {
|
999 |
+
// Switch to Archive DB.
|
1000 |
+
$selected_db = get_transient( 'wsal_wp_selected_db' );
|
1001 |
+
if ( $selected_db && 'archive' === $selected_db ) {
|
1002 |
+
$this->_plugin->settings->SwitchToArchiveDB();
|
1003 |
+
}
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
// TO DO: Get rid of OccurrenceQuery and use the Occurence Model.
|
1007 |
+
$query = new WSAL_Models_OccurrenceQuery();
|
1008 |
+
|
1009 |
+
$bid = (int) $this->query_args->site_id;
|
1010 |
+
if ( $bid ) {
|
1011 |
+
$query->addCondition( 'site_id = %s ', $bid );
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
/**
|
1015 |
+
* Hook: `wsal_auditlog_query`
|
1016 |
+
*
|
1017 |
+
* This hook is used to filter events query object.
|
1018 |
+
* It is used to support search by filters.
|
1019 |
+
*
|
1020 |
+
* @see WSAL_SearchExtension()->__construct()
|
1021 |
+
* @param WSAL_Models_OccurrenceQuery $query - Audit log events query object.
|
1022 |
+
*/
|
1023 |
+
$query = apply_filters( 'wsal_auditlog_query', $query );
|
1024 |
+
|
1025 |
+
if ( ! $this->_plugin->settings->is_infinite_scroll() ) {
|
1026 |
+
$total_items = $query->getAdapter()->Count( $query );
|
1027 |
+
$per_page = $this->_plugin->settings->GetViewPerPage();
|
1028 |
+
$offset = ( $this->get_pagenum() - 1 ) * $per_page;
|
1029 |
+
} else {
|
1030 |
+
$total_items = false;
|
1031 |
+
$per_page = apply_filters( 'wsal_infinite_scroll_events', 25 ); // Manually set per page events for infinite scroll.
|
1032 |
+
$offset = ( max( 1, $paged ) - 1 ) * $per_page;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
// Set query order arguments.
|
1036 |
+
$order_by = isset( $this->query_args->order_by ) ? $this->query_args->order_by : false;
|
1037 |
+
$order = isset( $this->query_args->order ) ? $this->query_args->order : false;
|
1038 |
+
|
1039 |
+
if ( ! $order_by ) {
|
1040 |
+
$query->addOrderBy( 'created_on', true );
|
1041 |
+
} else {
|
1042 |
+
$is_descending = true;
|
1043 |
+
if ( $order && 'asc' === $order ) {
|
1044 |
+
$is_descending = false;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
if ( 'code' === $order_by ) {
|
1048 |
+
/*
|
1049 |
+
* Handle the 'code' (Severity) column sorting.
|
1050 |
+
*/
|
1051 |
+
$query->addMetaJoin(); // Since LEFT JOIN clause causes the result values to duplicate.
|
1052 |
+
$query->addCondition( 'meta.name = %s', 'Severity' ); // A where condition is added to make sure that we're only requesting the relevant meta data rows from metadata table.
|
1053 |
+
$query->addOrderBy( 'CASE WHEN meta.name = "Severity" THEN meta.value END', $is_descending );
|
1054 |
+
} elseif ( 'info' === $order_by ) {
|
1055 |
+
// for the info col we are ordering just by dates.
|
1056 |
+
$query->addOrderBy( 'created_on', $is_descending );
|
1057 |
+
} else {
|
1058 |
+
$tmp = new WSAL_Models_Occurrence();
|
1059 |
+
// Making sure the field exists to order by.
|
1060 |
+
if ( isset( $tmp->{$order_by} ) ) {
|
1061 |
+
// TODO: We used to use a custom comparator ... is it safe to let MySQL do the ordering now?.
|
1062 |
+
$query->addOrderBy( $order_by, $is_descending );
|
1063 |
+
} else {
|
1064 |
+
$query->addOrderBy( 'created_on', true );
|
1065 |
+
}
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
$query->setOffset( $offset ); // Set query offset.
|
1070 |
+
$query->setLimit( $per_page ); // Set number of events per page.
|
1071 |
+
return array(
|
1072 |
+
'total_items' => $total_items,
|
1073 |
+
'per_page' => $per_page,
|
1074 |
+
'items' => $query->getAdapter()->Execute( $query ),
|
1075 |
+
);
|
1076 |
+
}
|
1077 |
+
}
|
classes/AuditLogListView.php
CHANGED
@@ -129,6 +129,18 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
129 |
Â
esc_html_e( 'No events so far.', 'wp-security-audit-log' );
|
130 |
Â
}
|
131 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
132 |
Â
/**
|
133 |
Â
* Generate the table navigation above or below the table
|
134 |
Â
*
|
@@ -153,10 +165,18 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
153 |
Â
* @since 3.2.3
|
154 |
Â
*/
|
155 |
Â
do_action( 'wsal_search_filters_list', $which );
|
156 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
157 |
Â
$this->pagination( $which );
|
158 |
Â
?>
|
159 |
-
<br class="clear" />
|
160 |
Â
</div>
|
161 |
Â
<?php
|
162 |
Â
}
|
@@ -198,7 +218,8 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
198 |
Â
endif;
|
199 |
Â
|
200 |
Â
// Show site alerts widget.
|
201 |
-
|
Â
|
|
202 |
Â
if (
|
203 |
Â
( 'top' === $which && $this->_plugin->settings->is_infinite_scroll() )
|
204 |
Â
|| ! $this->_plugin->settings->is_infinite_scroll()
|
@@ -296,22 +317,23 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
296 |
Â
*/
|
297 |
Â
public function get_columns() {
|
298 |
Â
// Get user information from settings.
|
299 |
-
if ( empty( $this->name_type ) ) {
|
300 |
-
|
301 |
-
}
|
302 |
-
if ( 'display_name' === $this->name_type || 'first_last_name' === $this->name_type ) {
|
303 |
-
|
304 |
-
} elseif ( 'username' === $this->name_type ) {
|
305 |
-
|
306 |
-
}
|
307 |
-
|
308 |
Â
// Audit log columns.
|
309 |
Â
$cols = array(
|
310 |
-
'type'
|
311 |
-
'code'
|
312 |
-
'crtd'
|
313 |
-
'user'
|
314 |
-
'scip'
|
Â
|
|
Â
|
|
315 |
Â
);
|
316 |
Â
|
317 |
Â
// If multisite then add "Site" column to the view.
|
@@ -333,7 +355,7 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
333 |
Â
foreach ( $this->selected_columns as $key => $value ) {
|
334 |
Â
switch ( $key ) {
|
335 |
Â
case 'alert_code':
|
336 |
-
$cols['type'] = __( '
|
337 |
Â
break;
|
338 |
Â
case 'type':
|
339 |
Â
$cols['code'] = __( 'Severity', 'wp-security-audit-log' );
|
@@ -342,14 +364,20 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
342 |
Â
$cols['crtd'] = __( 'Date', 'wp-security-audit-log' );
|
343 |
Â
break;
|
344 |
Â
case 'username':
|
345 |
-
$cols['user'] =
|
346 |
Â
break;
|
347 |
Â
case 'source_ip':
|
348 |
-
$cols['scip'] = __( '
|
349 |
Â
break;
|
350 |
Â
case 'site':
|
351 |
Â
$cols['site'] = __( 'Site', 'wp-security-audit-log' );
|
352 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
353 |
Â
case 'message':
|
354 |
Â
$cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
|
355 |
Â
break;
|
@@ -377,12 +405,14 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
377 |
Â
*/
|
378 |
Â
public function get_sortable_columns() {
|
379 |
Â
return array(
|
380 |
-
'read'
|
381 |
-
'type'
|
382 |
-
'crtd'
|
383 |
-
'user'
|
384 |
-
'scip'
|
385 |
-
'code'
|
Â
|
|
Â
|
|
386 |
Â
);
|
387 |
Â
}
|
388 |
Â
|
@@ -438,24 +468,13 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
438 |
Â
case 'code':
|
439 |
Â
$code = $this->_plugin->alerts->GetAlert( $item->alert_id );
|
440 |
Â
$code = $code ? $code->code : 0;
|
441 |
-
$const = (
|
442 |
-
|
443 |
-
'value' => 0,
|
444 |
-
'description' => __( 'Unknown error code.', 'wp-security-audit-log' ),
|
445 |
-
);
|
446 |
-
$const = $this->_plugin->constants->GetConstantBy( 'value', $code, $const );
|
447 |
-
if ( 'E_CRITICAL' === $const->name ) {
|
448 |
-
$const->name = __( 'Critical', 'wp-security-audit-log' );
|
449 |
-
} elseif ( 'E_WARNING' === $const->name ) {
|
450 |
-
$const->name = __( 'Warning', 'wp-security-audit-log' );
|
451 |
-
} elseif ( 'E_NOTICE' === $const->name ) {
|
452 |
-
$const->name = __( 'Notification', 'wp-security-audit-log' );
|
453 |
-
}
|
454 |
Â
return '<a class="tooltip" href="#" data-tooltip="' . esc_html( $const->name ) . '"><span class="log-type log-type-' . $const->value . '"></span></a>';
|
455 |
Â
case 'crtd':
|
456 |
-
$
|
457 |
-
if ( 'no' === $
|
458 |
-
// remove the
|
459 |
Â
$datetime_format = str_replace( '.$$$', '', $datetime_format );
|
460 |
Â
}
|
461 |
Â
return $item->created_on ? (
|
@@ -598,6 +617,10 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
598 |
Â
$tooltip = esc_attr__( 'View all details of this change', 'wp-security-audit-log' );
|
599 |
Â
return '<a class="more-info thickbox" data-tooltip="' . $tooltip . '" title="' . __( 'Alert Data Inspector', 'wp-security-audit-log' ) . '"'
|
600 |
Â
. ' href="' . $url . '&TB_iframe=true&width=600&height=550">…</a>';
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
601 |
Â
default:
|
602 |
Â
return isset( $item->$column_name )
|
603 |
Â
? esc_html( $item->$column_name )
|
@@ -935,7 +958,7 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
935 |
Â
}
|
936 |
Â
|
937 |
Â
echo "<$tag $scope $id $class>";
|
938 |
-
echo '<div class="wsal-filter-wrap">';
|
939 |
Â
|
940 |
Â
if ( $with_id ) {
|
941 |
Â
/**
|
@@ -950,7 +973,7 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
950 |
Â
}
|
951 |
Â
|
952 |
Â
echo $column_display_name;
|
953 |
-
echo '</div>';
|
954 |
Â
echo "</$tag>";
|
955 |
Â
}
|
956 |
Â
}
|
@@ -1038,6 +1061,20 @@ class WSAL_AuditLogListView extends WP_List_Table {
|
|
1038 |
Â
$query->addMetaJoin(); // Since LEFT JOIN clause causes the result values to duplicate.
|
1039 |
Â
$query->addCondition( 'meta.name = %s', 'Severity' ); // A where condition is added to make sure that we're only requesting the relevant meta data rows from metadata table.
|
1040 |
Â
$query->addOrderBy( 'CASE WHEN meta.name = "Severity" THEN meta.value END', $is_descending );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1041 |
Â
} else {
|
1042 |
Â
$tmp = new WSAL_Models_Occurrence();
|
1043 |
Â
// Making sure the field exists to order by.
|
129 |
Â
esc_html_e( 'No events so far.', 'wp-security-audit-log' );
|
130 |
Â
}
|
131 |
Â
|
132 |
+
/**
|
133 |
+
* Array of class names that are applied to the table for this view.
|
134 |
+
*
|
135 |
+
* @method get_table_classes
|
136 |
+
* @since 4.0.0
|
137 |
+
* @return array of strings
|
138 |
+
*/
|
139 |
+
protected function get_table_classes() {
|
140 |
+
$table_classes = array( 'widefat', 'fixed', 'striped', $this->_args['plural'], 'wsal-table' );
|
141 |
+
return $table_classes;
|
142 |
+
}
|
143 |
+
|
144 |
Â
/**
|
145 |
Â
* Generate the table navigation above or below the table
|
146 |
Â
*
|
165 |
Â
* @since 3.2.3
|
166 |
Â
*/
|
167 |
Â
do_action( 'wsal_search_filters_list', $which );
|
168 |
+
?>
|
169 |
+
<div class="display-type-buttons">
|
170 |
+
<?php
|
171 |
+
$user_selected_view = $this->_plugin->views->views[0]->detect_view_type();
|
172 |
+
$view_link = get_admin_url( null, 'admin.php?page=wsal-auditlog' );
|
173 |
+
?>
|
174 |
+
<a id ="wsal-list-view-toggle" href="<?php echo esc_url( add_query_arg( 'view', 'list', $view_link ) ); ?>" class="button wsal-button dashicons-before dashicons-list-view" <?php echo ( 'list' === $user_selected_view ) ? esc_attr( 'disabled' ) : ''; ?>><?php esc_html_e( 'List View', 'wp-security-audit-log' ); ?></a>
|
175 |
+
<a id ="wsal-grid-view-toggle" href="<?php echo esc_url( add_query_arg( 'view', 'grid', $view_link ) ); ?>" class="button wsal-button dashicons-before dashicons-grid-view" <?php echo ( 'grid' === $user_selected_view ) ? esc_attr( 'disabled' ) : ''; ?>><?php esc_html_e( 'Grid View', 'wp-security-audit-log' ); ?></a>
|
176 |
+
</div>
|
177 |
+
<?php
|
178 |
Â
$this->pagination( $which );
|
179 |
Â
?>
|
Â
|
|
180 |
Â
</div>
|
181 |
Â
<?php
|
182 |
Â
}
|
218 |
Â
endif;
|
219 |
Â
|
220 |
Â
// Show site alerts widget.
|
221 |
+
// NOTE: this is shown when the filter IS NOT true.
|
222 |
+
if ( $this->is_multisite() && $this->is_main_blog() && ! apply_filters( 'search_extensition_active', false ) ) {
|
223 |
Â
if (
|
224 |
Â
( 'top' === $which && $this->_plugin->settings->is_infinite_scroll() )
|
225 |
Â
|| ! $this->_plugin->settings->is_infinite_scroll()
|
317 |
Â
*/
|
318 |
Â
public function get_columns() {
|
319 |
Â
// Get user information from settings.
|
320 |
+
// if ( empty( $this->name_type ) ) {
|
321 |
+
// $this->name_type = $this->_plugin->settings->get_type_username();
|
322 |
+
// }
|
323 |
+
// if ( 'display_name' === $this->name_type || 'first_last_name' === $this->name_type ) {
|
324 |
+
// $name_column = __( 'User', 'wp-security-audit-log' );
|
325 |
+
// } elseif ( 'username' === $this->name_type ) {
|
326 |
+
// $name_column = __( 'Username', 'wp-security-audit-log' );
|
327 |
+
// }
|
Â
|
|
328 |
Â
// Audit log columns.
|
329 |
Â
$cols = array(
|
330 |
+
'type' => __( 'ID', 'wp-security-audit-log' ),
|
331 |
+
'code' => __( 'Severity', 'wp-security-audit-log' ),
|
332 |
+
'crtd' => __( 'Date', 'wp-security-audit-log' ),
|
333 |
+
'user' => __( 'User', 'wp-security-audit-log' ),
|
334 |
+
'scip' => __( 'IP', 'wp-security-audit-log' ),
|
335 |
+
'object' => __( 'Object', 'wp-security-audit-log' ),
|
336 |
+
'event_type' => __( 'Event Type', 'wp-security-audit-log' ),
|
337 |
Â
);
|
338 |
Â
|
339 |
Â
// If multisite then add "Site" column to the view.
|
355 |
Â
foreach ( $this->selected_columns as $key => $value ) {
|
356 |
Â
switch ( $key ) {
|
357 |
Â
case 'alert_code':
|
358 |
+
$cols['type'] = __( 'ID', 'wp-security-audit-log' );
|
359 |
Â
break;
|
360 |
Â
case 'type':
|
361 |
Â
$cols['code'] = __( 'Severity', 'wp-security-audit-log' );
|
364 |
Â
$cols['crtd'] = __( 'Date', 'wp-security-audit-log' );
|
365 |
Â
break;
|
366 |
Â
case 'username':
|
367 |
+
$cols['user'] = __( 'User', 'wp-security-audit-log' );
|
368 |
Â
break;
|
369 |
Â
case 'source_ip':
|
370 |
+
$cols['scip'] = __( 'IP', 'wp-security-audit-log' );
|
371 |
Â
break;
|
372 |
Â
case 'site':
|
373 |
Â
$cols['site'] = __( 'Site', 'wp-security-audit-log' );
|
374 |
Â
break;
|
375 |
+
case 'object':
|
376 |
+
$cols['object'] = __( 'Object', 'wp-security-audit-log' );
|
377 |
+
break;
|
378 |
+
case 'event_type':
|
379 |
+
$cols['event_type'] = __( 'Event Type', 'wp-security-audit-log' );
|
380 |
+
break;
|
381 |
Â
case 'message':
|
382 |
Â
$cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
|
383 |
Â
break;
|
405 |
Â
*/
|
406 |
Â
public function get_sortable_columns() {
|
407 |
Â
return array(
|
408 |
+
'read' => array( 'is_read', false ),
|
409 |
+
'type' => array( 'alert_id', false ),
|
410 |
+
'crtd' => array( 'created_on', true ),
|
411 |
+
'user' => array( 'user', true ),
|
412 |
+
'scip' => array( 'scip', false ),
|
413 |
+
'code' => array( 'code', false ),
|
414 |
+
'object' => array( 'object', false ),
|
415 |
+
'event_type' => array( 'event_type', false ),
|
416 |
Â
);
|
417 |
Â
}
|
418 |
Â
|
468 |
Â
case 'code':
|
469 |
Â
$code = $this->_plugin->alerts->GetAlert( $item->alert_id );
|
470 |
Â
$code = $code ? $code->code : 0;
|
471 |
+
$const = $this->_plugin->constants->get_constant_to_display( $code );
|
472 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
473 |
Â
return '<a class="tooltip" href="#" data-tooltip="' . esc_html( $const->name ) . '"><span class="log-type log-type-' . $const->value . '"></span></a>';
|
474 |
Â
case 'crtd':
|
475 |
+
$show_milliseconds = $this->_plugin->settings->get_show_milliseconds();
|
476 |
+
if ( 'no' === $show_milliseconds ) {
|
477 |
+
// remove the milliseconds placeholder from format string.
|
478 |
Â
$datetime_format = str_replace( '.$$$', '', $datetime_format );
|
479 |
Â
}
|
480 |
Â
return $item->created_on ? (
|
617 |
Â
$tooltip = esc_attr__( 'View all details of this change', 'wp-security-audit-log' );
|
618 |
Â
return '<a class="more-info thickbox" data-tooltip="' . $tooltip . '" title="' . __( 'Alert Data Inspector', 'wp-security-audit-log' ) . '"'
|
619 |
Â
. ' href="' . $url . '&TB_iframe=true&width=600&height=550">…</a>';
|
620 |
+
case 'object':
|
621 |
+
return isset( $this->item_meta[ $item->getId() ]['Object'] ) ? $this->_plugin->alerts->get_display_object_text( $this->item_meta[ $item->getId() ]['Object'] ) : '';
|
622 |
+
case 'event_type':
|
623 |
+
return isset( $this->item_meta[ $item->getId() ]['EventType'] ) ? $this->_plugin->alerts->get_display_event_type_text( $this->item_meta[ $item->getId() ]['EventType'] ) : '';
|
624 |
Â
default:
|
625 |
Â
return isset( $item->$column_name )
|
626 |
Â
? esc_html( $item->$column_name )
|
958 |
Â
}
|
959 |
Â
|
960 |
Â
echo "<$tag $scope $id $class>";
|
961 |
+
echo ! in_array( $column_key, array( 'code', 'data', 'site' ), true ) ? '<div class="wsal-filter-wrap">' : '';
|
962 |
Â
|
963 |
Â
if ( $with_id ) {
|
964 |
Â
/**
|
973 |
Â
}
|
974 |
Â
|
975 |
Â
echo $column_display_name;
|
976 |
+
echo ! in_array( $column_key, array( 'code', 'data', 'site' ), true ) ? '</div>' : '';
|
977 |
Â
echo "</$tag>";
|
978 |
Â
}
|
979 |
Â
}
|
1061 |
Â
$query->addMetaJoin(); // Since LEFT JOIN clause causes the result values to duplicate.
|
1062 |
Â
$query->addCondition( 'meta.name = %s', 'Severity' ); // A where condition is added to make sure that we're only requesting the relevant meta data rows from metadata table.
|
1063 |
Â
$query->addOrderBy( 'CASE WHEN meta.name = "Severity" THEN meta.value END', $is_descending );
|
1064 |
+
} elseif ( 'object' === $order_by ) {
|
1065 |
+
/*
|
1066 |
+
* Handle the 'object' column sorting.
|
1067 |
+
*/
|
1068 |
+
$query->addMetaJoin(); // Since LEFT JOIN clause causes the result values to duplicate.
|
1069 |
+
$query->addCondition( 'meta.name = %s', 'Object' ); // A where condition is added to make sure that we're only requesting the relevant meta data rows from metadata table.
|
1070 |
+
$query->addOrderBy( 'CASE WHEN meta.name = "Object" THEN meta.value END', $is_descending );
|
1071 |
+
} elseif ( 'event_type' === $order_by ) {
|
1072 |
+
/*
|
1073 |
+
* Handle the 'Event Type' column sorting.
|
1074 |
+
*/
|
1075 |
+
$query->addMetaJoin(); // Since LEFT JOIN clause causes the result values to duplicate.
|
1076 |
+
$query->addCondition( 'meta.name = %s', 'EventType' ); // A where condition is added to make sure that we're only requesting the relevant meta data rows from metadata table.
|
1077 |
+
$query->addOrderBy( 'CASE WHEN meta.name = "EventType" THEN meta.value END', $is_descending );
|
1078 |
Â
} else {
|
1079 |
Â
$tmp = new WSAL_Models_Occurrence();
|
1080 |
Â
// Making sure the field exists to order by.
|
classes/Connector/ConnectorFactory.php
CHANGED
@@ -75,7 +75,7 @@ abstract class WSAL_Connector_ConnectorFactory {
|
|
75 |
Â
|
76 |
Â
// TO DO: Load connection config.
|
77 |
Â
if ( null == self::$connector || ! empty( $config ) || $reset ) {
|
78 |
-
switch ( strtolower( $connection_config['type'] ) ) {
|
79 |
Â
// TO DO: Add other connectors.
|
80 |
Â
case 'mysql':
|
81 |
Â
default:
|
75 |
Â
|
76 |
Â
// TO DO: Load connection config.
|
77 |
Â
if ( null == self::$connector || ! empty( $config ) || $reset ) {
|
78 |
+
switch ( strtolower( isset( $connection_config['type'] ) ? $connection_config['type'] : '' ) ) {
|
79 |
Â
// TO DO: Add other connectors.
|
80 |
Â
case 'mysql':
|
81 |
Â
default:
|
classes/ConstantManager.php
CHANGED
@@ -97,7 +97,7 @@ class WSAL_ConstantManager {
|
|
97 |
Â
*
|
98 |
Â
* @param string $what - The type of detail: 'name', 'value'.
|
99 |
Â
* @param mixed $value - The detail expected value.
|
100 |
-
* @param
|
101 |
Â
*
|
102 |
Â
* @throws Exception - Error if detail type is unexpected.
|
103 |
Â
*
|
@@ -116,14 +116,56 @@ class WSAL_ConstantManager {
|
|
116 |
Â
return $this->constants_cache[ $value ];
|
117 |
Â
}
|
118 |
Â
|
Â
|
|
119 |
Â
// Return constant match the property value.
|
120 |
Â
foreach ( $this->_constants as $constant ) {
|
121 |
Â
if ( $value == $constant->$what ) {
|
122 |
Â
$this->constants_cache[ $value ] = $constant;
|
123 |
-
|
124 |
Â
}
|
125 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
126 |
Â
}
|
127 |
Â
return $default;
|
128 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
129 |
Â
}
|
97 |
Â
*
|
98 |
Â
* @param string $what - The type of detail: 'name', 'value'.
|
99 |
Â
* @param mixed $value - The detail expected value.
|
100 |
+
* @param mixed $default - Default value of constant.
|
101 |
Â
*
|
102 |
Â
* @throws Exception - Error if detail type is unexpected.
|
103 |
Â
*
|
116 |
Â
return $this->constants_cache[ $value ];
|
117 |
Â
}
|
118 |
Â
|
119 |
+
$possible_matches = array();
|
120 |
Â
// Return constant match the property value.
|
121 |
Â
foreach ( $this->_constants as $constant ) {
|
122 |
Â
if ( $value == $constant->$what ) {
|
123 |
Â
$this->constants_cache[ $value ] = $constant;
|
124 |
+
$possible_matches[] = $constant;
|
125 |
Â
}
|
126 |
Â
}
|
127 |
+
|
128 |
+
// If we got matches then get the last one in the array,
|
129 |
+
if ( count( $possible_matches ) >= 1 ) {
|
130 |
+
return end( $possible_matches );
|
131 |
+
}
|
132 |
Â
}
|
133 |
Â
return $default;
|
134 |
Â
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get constant object for displaying.
|
138 |
+
*
|
139 |
+
* @param integer $code - Value of the constant.
|
140 |
+
* @return stdClass
|
141 |
+
*/
|
142 |
+
public function get_constant_to_display( $code ) {
|
143 |
+
$const = (object) array(
|
144 |
+
'name' => 'E_UNKNOWN',
|
145 |
+
'value' => 0,
|
146 |
+
'description' => __( 'Unknown error code.', 'wp-security-audit-log' ),
|
147 |
+
);
|
148 |
+
|
149 |
+
$const = $this->GetConstantBy( 'value', $code, $const );
|
150 |
+
|
151 |
+
if ( 'E_CRITICAL' === $const->name ) {
|
152 |
+
$const->name = __( 'Critical', 'wp-security-audit-log' );
|
153 |
+
} elseif ( 'E_WARNING' === $const->name ) {
|
154 |
+
$const->name = __( 'Warning', 'wp-security-audit-log' );
|
155 |
+
} elseif ( 'E_NOTICE' === $const->name ) {
|
156 |
+
$const->name = __( 'Notification', 'wp-security-audit-log' );
|
157 |
+
} elseif ( 'WSAL_CRITICAL' === $const->name ) {
|
158 |
+
$const->name = __( 'Critical', 'wp-security-audit-log' );
|
159 |
+
} elseif ( 'WSAL_HIGH' === $const->name ) {
|
160 |
+
$const->name = __( 'High', 'wp-security-audit-log' );
|
161 |
+
} elseif ( 'WSAL_MEDIUM' === $const->name ) {
|
162 |
+
$const->name = __( 'Medium', 'wp-security-audit-log' );
|
163 |
+
} elseif ( 'WSAL_LOW' === $const->name ) {
|
164 |
+
$const->name = __( 'Low', 'wp-security-audit-log' );
|
165 |
+
} elseif ( 'WSAL_INFORMATIONAL' === $const->name ) {
|
166 |
+
$const->name = __( 'Informational', 'wp-security-audit-log' );
|
167 |
+
}
|
168 |
+
|
169 |
+
return $const;
|
170 |
+
}
|
171 |
Â
}
|
classes/Loggers/Database.php
CHANGED
@@ -233,10 +233,10 @@ class WSAL_Loggers_Database extends WSAL_AbstractLogger {
|
|
233 |
Â
$upgrade_link = add_query_arg( 'page', 'wsal-auditlog-pricing', admin_url( 'admin.php' ) );
|
234 |
Â
$more_info_link = add_query_arg(
|
235 |
Â
array(
|
236 |
-
'utm_source' => '
|
237 |
-
'utm_medium' => '
|
238 |
-
'
|
239 |
-
'
|
240 |
Â
),
|
241 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
242 |
Â
);
|
233 |
Â
$upgrade_link = add_query_arg( 'page', 'wsal-auditlog-pricing', admin_url( 'admin.php' ) );
|
234 |
Â
$more_info_link = add_query_arg(
|
235 |
Â
array(
|
236 |
+
'utm_source' => 'plugin',
|
237 |
+
'utm_medium' => 'referral',
|
238 |
+
'utm_campaign' => 'WSAL',
|
239 |
+
'utm_content' => 'db+integrations',
|
240 |
Â
),
|
241 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
242 |
Â
);
|
classes/Models/Occurrence.php
CHANGED
@@ -207,6 +207,17 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
|
|
207 |
Â
return parent::Delete();
|
208 |
Â
}
|
209 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
210 |
Â
/**
|
211 |
Â
* Gets the username.
|
212 |
Â
*
|
@@ -284,7 +295,7 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
|
|
284 |
Â
/**
|
285 |
Â
* Method: Get Microtime.
|
286 |
Â
*
|
287 |
-
* @return float - Number of seconds (and
|
288 |
Â
* @todo This needs some caching.
|
289 |
Â
*/
|
290 |
Â
protected function GetMicrotime() {
|
207 |
Â
return parent::Delete();
|
208 |
Â
}
|
209 |
Â
|
210 |
+
/**
|
211 |
+
* Gets the actual alert event ID.
|
212 |
+
*
|
213 |
+
* @method get_alert_id
|
214 |
+
* @since 4.0.0
|
215 |
+
* @return int
|
216 |
+
*/
|
217 |
+
public function get_alert_id() {
|
218 |
+
return ( isset( $this->alert_id ) ) ? $this->alert_id : 0;
|
219 |
+
}
|
220 |
+
|
221 |
Â
/**
|
222 |
Â
* Gets the username.
|
223 |
Â
*
|
295 |
Â
/**
|
296 |
Â
* Method: Get Microtime.
|
297 |
Â
*
|
298 |
+
* @return float - Number of seconds (and milliseconds as fraction) since unix Day 0.
|
299 |
Â
* @todo This needs some caching.
|
300 |
Â
*/
|
301 |
Â
protected function GetMicrotime() {
|
classes/Sensors/BBPress.php
CHANGED
@@ -83,7 +83,7 @@ class WSAL_Sensors_BBPress extends WSAL_AbstractSensor {
|
|
83 |
Â
if ( isset( $post_array['post_ID'] )
|
84 |
Â
&& isset( $post_array['_wpnonce'] )
|
85 |
Â
&& ! wp_verify_nonce( $post_array['_wpnonce'], 'update-post_' . $post_array['post_ID'] ) ) {
|
86 |
-
return;
|
87 |
Â
}
|
88 |
Â
|
89 |
Â
if ( isset( $post_array ) && isset( $post_array['post_ID'] )
|
83 |
Â
if ( isset( $post_array['post_ID'] )
|
84 |
Â
&& isset( $post_array['_wpnonce'] )
|
85 |
Â
&& ! wp_verify_nonce( $post_array['_wpnonce'], 'update-post_' . $post_array['post_ID'] ) ) {
|
86 |
+
return false;
|
87 |
Â
}
|
88 |
Â
|
89 |
Â
if ( isset( $post_array ) && isset( $post_array['post_ID'] )
|
classes/Sensors/Comments.php
CHANGED
@@ -68,6 +68,10 @@ class WSAL_Sensors_Comments extends WSAL_AbstractSensor {
|
|
68 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment->comment_ID;
|
69 |
Â
$fields = array(
|
70 |
Â
'PostTitle' => $post->post_title,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
71 |
Â
'Author' => $comment->comment_author,
|
72 |
Â
'Date' => $comment->comment_date,
|
73 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
@@ -147,6 +151,11 @@ class WSAL_Sensors_Comments extends WSAL_AbstractSensor {
|
|
147 |
Â
$post = get_post( $comment->comment_post_ID );
|
148 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
149 |
Â
$fields = array(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
150 |
Â
'Date' => $comment->comment_date,
|
151 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
152 |
Â
);
|
@@ -186,6 +195,11 @@ class WSAL_Sensors_Comments extends WSAL_AbstractSensor {
|
|
186 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
187 |
Â
$fields = array(
|
188 |
Â
'PostTitle' => $post->post_title,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
189 |
Â
'Author' => $comment->comment_author,
|
190 |
Â
'Date' => $comment->comment_date,
|
191 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
68 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment->comment_ID;
|
69 |
Â
$fields = array(
|
70 |
Â
'PostTitle' => $post->post_title,
|
71 |
+
'PostID' => $post->ID,
|
72 |
+
'PostType' => $post->post_type,
|
73 |
+
'PostStatus' => $post->post_status,
|
74 |
+
'CommentID' => $comment->comment_ID,
|
75 |
Â
'Author' => $comment->comment_author,
|
76 |
Â
'Date' => $comment->comment_date,
|
77 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
151 |
Â
$post = get_post( $comment->comment_post_ID );
|
152 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
153 |
Â
$fields = array(
|
154 |
+
'PostTitle' => $post->post_title,
|
155 |
+
'PostID' => $post->ID,
|
156 |
+
'PostType' => $post->post_type,
|
157 |
+
'PostStatus' => $post->post_status,
|
158 |
+
'CommentID' => $comment->comment_ID,
|
159 |
Â
'Date' => $comment->comment_date,
|
160 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
161 |
Â
);
|
195 |
Â
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
196 |
Â
$fields = array(
|
197 |
Â
'PostTitle' => $post->post_title,
|
198 |
+
'PostTitle' => $post->post_title,
|
199 |
+
'PostID' => $post->ID,
|
200 |
+
'PostType' => $post->post_type,
|
201 |
+
'PostStatus' => $post->post_status,
|
202 |
+
'CommentID' => $comment->comment_ID,
|
203 |
Â
'Author' => $comment->comment_author,
|
204 |
Â
'Date' => $comment->comment_date,
|
205 |
Â
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
classes/Sensors/Content.php
CHANGED
@@ -518,10 +518,10 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
518 |
Â
*/
|
519 |
Â
public function event_update_term_data( $data, $term_id, $taxonomy, $args ) {
|
520 |
Â
// Get new data.
|
521 |
-
$new_name =
|
522 |
-
$new_slug =
|
523 |
-
$new_desc =
|
524 |
-
$new_parent =
|
525 |
Â
|
526 |
Â
// Get old data.
|
527 |
Â
$term = get_term( $term_id, $taxonomy );
|
@@ -567,7 +567,6 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
567 |
Â
'TagLink' => $term_link,
|
568 |
Â
'old_desc' => $old_desc,
|
569 |
Â
'new_desc' => $new_desc,
|
570 |
-
'ReportText' => $old_desc . '|' . $new_desc,
|
571 |
Â
)
|
572 |
Â
);
|
573 |
Â
}
|
@@ -618,6 +617,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
618 |
Â
'OldParent' => $old_parent_name,
|
619 |
Â
'NewParent' => $new_parent_name,
|
620 |
Â
'CategoryLink' => $term_link,
|
Â
|
|
621 |
Â
)
|
622 |
Â
);
|
623 |
Â
}
|
@@ -961,7 +961,6 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
961 |
Â
'OldUrl' => $old_link,
|
962 |
Â
'NewUrl' => $new_link,
|
963 |
Â
$editor_link['name'] => $editor_link['value'],
|
964 |
-
'ReportText' => '"' . $old_link . '"|"' . $new_link . '"',
|
965 |
Â
)
|
966 |
Â
);
|
967 |
Â
return 1;
|
@@ -1071,18 +1070,9 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
1071 |
Â
|
1072 |
Â
// Comments.
|
1073 |
Â
if ( $oldpost->comment_status !== $newpost->comment_status ) {
|
1074 |
-
$type = 'Comments';
|
1075 |
-
|
1076 |
-
if ( 'open' === $newpost->comment_status ) {
|
1077 |
-
$event = $this->get_comments_pings_event( $newpost, 'enable' );
|
1078 |
-
} else {
|
1079 |
-
$event = $this->get_comments_pings_event( $newpost, 'disable' );
|
1080 |
-
}
|
1081 |
-
|
1082 |
Â
$this->plugin->alerts->Trigger(
|
1083 |
-
|
1084 |
Â
array(
|
1085 |
-
'Type' => $type,
|
1086 |
Â
'PostID' => $newpost->ID,
|
1087 |
Â
'PostType' => $newpost->post_type,
|
1088 |
Â
'PostStatus' => $newpost->post_status,
|
@@ -1091,24 +1081,17 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
1091 |
Â
'PostStatus' => $newpost->post_status,
|
1092 |
Â
'PostUrl' => get_permalink( $newpost->ID ),
|
1093 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
1094 |
Â
)
|
1095 |
Â
);
|
1096 |
Â
$result = 1;
|
1097 |
Â
}
|
Â
|
|
1098 |
Â
// Trackbacks and Pingbacks.
|
1099 |
Â
if ( $oldpost->ping_status !== $newpost->ping_status ) {
|
1100 |
-
$type = 'Trackbacks and Pingbacks';
|
1101 |
-
|
1102 |
-
if ( 'open' === $newpost->ping_status ) {
|
1103 |
-
$event = $this->get_comments_pings_event( $newpost, 'enable' );
|
1104 |
-
} else {
|
1105 |
-
$event = $this->get_comments_pings_event( $newpost, 'disable' );
|
1106 |
-
}
|
1107 |
-
|
1108 |
Â
$this->plugin->alerts->Trigger(
|
1109 |
-
|
1110 |
Â
array(
|
1111 |
-
'Type' => $type,
|
1112 |
Â
'PostID' => $newpost->ID,
|
1113 |
Â
'PostType' => $newpost->post_type,
|
1114 |
Â
'PostTitle' => $newpost->post_title,
|
@@ -1116,6 +1099,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
1116 |
Â
'PostDate' => $newpost->post_date,
|
1117 |
Â
'PostUrl' => get_permalink( $newpost->ID ),
|
1118 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
1119 |
Â
)
|
1120 |
Â
);
|
1121 |
Â
$result = 1;
|
@@ -1257,7 +1241,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
|
|
1257 |
Â
if ( $event ) {
|
1258 |
Â
if ( 2002 === $event ) {
|
1259 |
Â
// Get Yoast alerts.
|
1260 |
-
$yoast_alerts = $this->plugin->alerts->
|
1261 |
Â
|
1262 |
Â
// Check all alerts.
|
1263 |
Â
foreach ( $yoast_alerts as $alert_code => $alert ) {
|
518 |
Â
*/
|
519 |
Â
public function event_update_term_data( $data, $term_id, $taxonomy, $args ) {
|
520 |
Â
// Get new data.
|
521 |
+
$new_name = isset( $data['name'] ) ? $data['name'] : false;
|
522 |
+
$new_slug = isset( $data['slug'] ) ? $data['slug'] : false;
|
523 |
+
$new_desc = isset( $args['description'] ) ? $args['description'] : false;
|
524 |
+
$new_parent = isset( $args['parent'] ) ? $args['parent'] : false;
|
525 |
Â
|
526 |
Â
// Get old data.
|
527 |
Â
$term = get_term( $term_id, $taxonomy );
|
567 |
Â
'TagLink' => $term_link,
|
568 |
Â
'old_desc' => $old_desc,
|
569 |
Â
'new_desc' => $new_desc,
|
Â
|
|
570 |
Â
)
|
571 |
Â
);
|
572 |
Â
}
|
617 |
Â
'OldParent' => $old_parent_name,
|
618 |
Â
'NewParent' => $new_parent_name,
|
619 |
Â
'CategoryLink' => $term_link,
|
620 |
+
'Slug' => $new_slug,
|
621 |
Â
)
|
622 |
Â
);
|
623 |
Â
}
|
961 |
Â
'OldUrl' => $old_link,
|
962 |
Â
'NewUrl' => $new_link,
|
963 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
964 |
Â
)
|
965 |
Â
);
|
966 |
Â
return 1;
|
1070 |
Â
|
1071 |
Â
// Comments.
|
1072 |
Â
if ( $oldpost->comment_status !== $newpost->comment_status ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1073 |
Â
$this->plugin->alerts->Trigger(
|
1074 |
+
2111,
|
1075 |
Â
array(
|
Â
|
|
1076 |
Â
'PostID' => $newpost->ID,
|
1077 |
Â
'PostType' => $newpost->post_type,
|
1078 |
Â
'PostStatus' => $newpost->post_status,
|
1081 |
Â
'PostStatus' => $newpost->post_status,
|
1082 |
Â
'PostUrl' => get_permalink( $newpost->ID ),
|
1083 |
Â
$editor_link['name'] => $editor_link['value'],
|
1084 |
+
'EventType' => 'open' === $newpost->comment_status ? 'enabled' : 'disabled',
|
1085 |
Â
)
|
1086 |
Â
);
|
1087 |
Â
$result = 1;
|
1088 |
Â
}
|
1089 |
+
|
1090 |
Â
// Trackbacks and Pingbacks.
|
1091 |
Â
if ( $oldpost->ping_status !== $newpost->ping_status ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1092 |
Â
$this->plugin->alerts->Trigger(
|
1093 |
+
2112,
|
1094 |
Â
array(
|
Â
|
|
1095 |
Â
'PostID' => $newpost->ID,
|
1096 |
Â
'PostType' => $newpost->post_type,
|
1097 |
Â
'PostTitle' => $newpost->post_title,
|
1099 |
Â
'PostDate' => $newpost->post_date,
|
1100 |
Â
'PostUrl' => get_permalink( $newpost->ID ),
|
1101 |
Â
$editor_link['name'] => $editor_link['value'],
|
1102 |
+
'EventType' => 'open' === $newpost->ping_status ? 'enabled' : 'disabled',
|
1103 |
Â
)
|
1104 |
Â
);
|
1105 |
Â
$result = 1;
|
1241 |
Â
if ( $event ) {
|
1242 |
Â
if ( 2002 === $event ) {
|
1243 |
Â
// Get Yoast alerts.
|
1244 |
+
$yoast_alerts = $this->plugin->alerts->get_alerts_by_category( 'Yoast SEO' );
|
1245 |
Â
|
1246 |
Â
// Check all alerts.
|
1247 |
Â
foreach ( $yoast_alerts as $alert_code => $alert ) {
|
classes/Sensors/FileChanges.php
CHANGED
@@ -406,7 +406,8 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
406 |
Â
$this->plugin->alerts->Trigger(
|
407 |
Â
6029,
|
408 |
Â
array(
|
409 |
-
'
|
Â
|
|
410 |
Â
'FileHash' => $file_hash,
|
411 |
Â
'CurrentUserID' => '0',
|
412 |
Â
)
|
@@ -443,7 +444,8 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
443 |
Â
$this->plugin->alerts->Trigger(
|
444 |
Â
6030,
|
445 |
Â
array(
|
446 |
-
'
|
Â
|
|
447 |
Â
'FileHash' => $file_hash,
|
448 |
Â
'CurrentUserID' => '0',
|
449 |
Â
)
|
@@ -458,7 +460,8 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
458 |
Â
$this->plugin->alerts->Trigger(
|
459 |
Â
6028,
|
460 |
Â
array(
|
461 |
-
'
|
Â
|
|
462 |
Â
'FileHash' => $file_hash,
|
463 |
Â
'CurrentUserID' => '0',
|
464 |
Â
)
|
@@ -511,6 +514,7 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
511 |
Â
array(
|
512 |
Â
'CurrentUserID' => '0',
|
513 |
Â
'ScanStatus' => 'started',
|
Â
|
|
514 |
Â
)
|
515 |
Â
);
|
516 |
Â
} elseif ( 6 === $next_to_scan ) {
|
@@ -522,6 +526,7 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
522 |
Â
array(
|
523 |
Â
'CurrentUserID' => '0',
|
524 |
Â
'ScanStatus' => 'stopped',
|
Â
|
|
525 |
Â
)
|
526 |
Â
);
|
527 |
Â
} else {
|
@@ -666,7 +671,8 @@ class WSAL_Sensors_FileChanges extends WSAL_AbstractSensor {
|
|
666 |
Â
$this->plugin->alerts->Trigger(
|
667 |
Â
6031,
|
668 |
Â
array(
|
669 |
-
'
|
Â
|
|
670 |
Â
'CurrentUserID' => '0',
|
671 |
Â
)
|
672 |
Â
);
|
406 |
Â
$this->plugin->alerts->Trigger(
|
407 |
Â
6029,
|
408 |
Â
array(
|
409 |
+
'File' => basename( $file ),
|
410 |
+
'FileLocation' => dirname( $file ),
|
411 |
Â
'FileHash' => $file_hash,
|
412 |
Â
'CurrentUserID' => '0',
|
413 |
Â
)
|
444 |
Â
$this->plugin->alerts->Trigger(
|
445 |
Â
6030,
|
446 |
Â
array(
|
447 |
+
'File' => basename( $file ),
|
448 |
+
'FileLocation' => dirname( $file ),
|
449 |
Â
'FileHash' => $file_hash,
|
450 |
Â
'CurrentUserID' => '0',
|
451 |
Â
)
|
460 |
Â
$this->plugin->alerts->Trigger(
|
461 |
Â
6028,
|
462 |
Â
array(
|
463 |
+
'File' => basename( $file ),
|
464 |
+
'FileLocation' => dirname( $file ),
|
465 |
Â
'FileHash' => $file_hash,
|
466 |
Â
'CurrentUserID' => '0',
|
467 |
Â
)
|
514 |
Â
array(
|
515 |
Â
'CurrentUserID' => '0',
|
516 |
Â
'ScanStatus' => 'started',
|
517 |
+
'EventType' => 'started',
|
518 |
Â
)
|
519 |
Â
);
|
520 |
Â
} elseif ( 6 === $next_to_scan ) {
|
526 |
Â
array(
|
527 |
Â
'CurrentUserID' => '0',
|
528 |
Â
'ScanStatus' => 'stopped',
|
529 |
+
'EventType' => 'stopped',
|
530 |
Â
)
|
531 |
Â
);
|
532 |
Â
} else {
|
671 |
Â
$this->plugin->alerts->Trigger(
|
672 |
Â
6031,
|
673 |
Â
array(
|
674 |
+
'File' => basename( $absolute_name ),
|
675 |
+
'FileLocation' => dirname( $absolute_name ),
|
676 |
Â
'CurrentUserID' => '0',
|
677 |
Â
)
|
678 |
Â
);
|
classes/Sensors/Files.php
CHANGED
@@ -118,7 +118,7 @@ class WSAL_Sensors_Files extends WSAL_AbstractSensor {
|
|
118 |
Â
$this->plugin->alerts->Trigger(
|
119 |
Â
2046, array(
|
120 |
Â
'File' => $file,
|
121 |
-
'Theme' => $stylesheet,
|
122 |
Â
)
|
123 |
Â
);
|
124 |
Â
}
|
118 |
Â
$this->plugin->alerts->Trigger(
|
119 |
Â
2046, array(
|
120 |
Â
'File' => $file,
|
121 |
+
'Theme' => trailingslashit( get_theme_root() ) . $stylesheet,
|
122 |
Â
)
|
123 |
Â
);
|
124 |
Â
}
|
classes/Sensors/FrontendWooCommerce.php
CHANGED
@@ -160,8 +160,9 @@ class WSAL_Sensors_FrontendWooCommerce extends WSAL_AbstractSensor {
|
|
160 |
Â
$this->plugin->alerts->Trigger(
|
161 |
Â
9018,
|
162 |
Â
array(
|
Â
|
|
163 |
Â
'ProductTitle' => $product_title,
|
164 |
-
'ProductStatus' =>
|
165 |
Â
'OldStatus' => $this->get_stock_status( $old_stock_status ),
|
166 |
Â
'NewStatus' => $this->get_stock_status( $new_stock_status ),
|
167 |
Â
'Username' => $username,
|
@@ -178,9 +179,10 @@ class WSAL_Sensors_FrontendWooCommerce extends WSAL_AbstractSensor {
|
|
178 |
Â
$this->plugin->alerts->Trigger(
|
179 |
Â
9019,
|
180 |
Â
array(
|
Â
|
|
181 |
Â
'ProductTitle' => $product_title,
|
182 |
-
'ProductStatus' =>
|
183 |
-
'OldValue' =>
|
184 |
Â
'NewValue' => $new_stock,
|
185 |
Â
'Username' => $username,
|
186 |
Â
$editor_link['name'] => $editor_link['value'],
|
160 |
Â
$this->plugin->alerts->Trigger(
|
161 |
Â
9018,
|
162 |
Â
array(
|
163 |
+
'PostID' => $post->ID,
|
164 |
Â
'ProductTitle' => $product_title,
|
165 |
+
'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
|
166 |
Â
'OldStatus' => $this->get_stock_status( $old_stock_status ),
|
167 |
Â
'NewStatus' => $this->get_stock_status( $new_stock_status ),
|
168 |
Â
'Username' => $username,
|
179 |
Â
$this->plugin->alerts->Trigger(
|
180 |
Â
9019,
|
181 |
Â
array(
|
182 |
+
'PostID' => $post->ID,
|
183 |
Â
'ProductTitle' => $product_title,
|
184 |
+
'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
|
185 |
+
'OldValue' => ! empty( $old_stock ) ? $old_stock : 0,
|
186 |
Â
'NewValue' => $new_stock,
|
187 |
Â
'Username' => $username,
|
188 |
Â
$editor_link['name'] => $editor_link['value'],
|
classes/Sensors/LogInOut.php
CHANGED
@@ -220,6 +220,20 @@ class WSAL_Sensors_LogInOut extends WSAL_AbstractSensor {
|
|
220 |
Â
*/
|
221 |
Â
public function EventLogout() {
|
222 |
Â
if ( $this->_current_user->ID ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
223 |
Â
$this->plugin->alerts->Trigger(
|
224 |
Â
1001,
|
225 |
Â
array(
|
220 |
Â
*/
|
221 |
Â
public function EventLogout() {
|
222 |
Â
if ( $this->_current_user->ID ) {
|
223 |
+
// get the list of excluded users.
|
224 |
+
$excluded_users = $this->plugin->settings->GetExcludedMonitoringUsers();
|
225 |
+
$excluded_user_ids = array();
|
226 |
+
// convert excluded usernames into IDs.
|
227 |
+
if ( ! empty( $excluded_users ) && is_array( $excluded_users ) ) {
|
228 |
+
foreach ( $excluded_users as $excluded_user ) {
|
229 |
+
$user = get_user_by( 'login', $excluded_user );
|
230 |
+
$excluded_user_ids[] = $user->ID;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
// bail early if this user is in the excluded ids list.
|
234 |
+
if ( in_array( $this->_current_user->ID, $excluded_user_ids, true ) ) {
|
235 |
+
return;
|
236 |
+
}
|
237 |
Â
$this->plugin->alerts->Trigger(
|
238 |
Â
1001,
|
239 |
Â
array(
|
classes/Sensors/Menus.php
CHANGED
@@ -127,7 +127,7 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
127 |
Â
}
|
128 |
Â
if ( $is_sub_item && wp_verify_nonce( $post_array['update-nav-menu-nonce'], 'update-nav_menu' ) ) {
|
129 |
Â
$item_parent_id = $args['menu-item-parent-id'];
|
130 |
-
$item_name
|
131 |
Â
if ( $old_menu_items[ $menu_item_db_id ]['parent'] != $item_parent_id ) {
|
132 |
Â
$parent_name = isset( $old_menu_items[ $item_parent_id ]['title'] ) ? $old_menu_items[ $item_parent_id ]['title'] : false;
|
133 |
Â
$this->EventChangeSubItem( $item_name, $parent_name, $post_array['menu-name'] );
|
@@ -162,9 +162,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
162 |
Â
*/
|
163 |
Â
public function CreateMenu( $term_id, $menu_data ) {
|
164 |
Â
$this->plugin->alerts->Trigger(
|
165 |
-
2078,
|
166 |
-
|
167 |
-
)
|
168 |
Â
);
|
169 |
Â
}
|
170 |
Â
|
@@ -221,7 +220,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
221 |
Â
public function DeleteMenu( $term_id ) {
|
222 |
Â
if ( $this->_old_menu ) {
|
223 |
Â
$this->plugin->alerts->Trigger(
|
224 |
-
2081,
|
Â
|
|
225 |
Â
'MenuName' => $this->_old_menu->name,
|
226 |
Â
)
|
227 |
Â
);
|
@@ -261,7 +261,7 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
261 |
Â
} else {
|
262 |
Â
// Remove the last menu item.
|
263 |
Â
// if ( count( $content_names_old ) == 1 && count( $content_types_old ) == 1 ) {
|
264 |
-
//
|
265 |
Â
// }
|
266 |
Â
}
|
267 |
Â
}
|
@@ -270,7 +270,7 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
270 |
Â
|
271 |
Â
// Enable/Disable menu setting.
|
272 |
Â
$nav_menu_options = maybe_unserialize( get_option( 'nav_menu_options' ) );
|
273 |
-
$auto_add
|
274 |
Â
if ( isset( $nav_menu_options['auto_add'] ) ) {
|
275 |
Â
if ( in_array( $menu_id, $nav_menu_options['auto_add'] ) ) {
|
276 |
Â
if ( empty( $post_array['auto-add-pages'] ) ) {
|
@@ -344,7 +344,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
344 |
Â
if ( ! empty( $menus ) ) {
|
345 |
Â
foreach ( $menus as $menu ) {
|
346 |
Â
array_push(
|
347 |
-
$this->_old_menu_terms,
|
Â
|
|
348 |
Â
'term_id' => $menu->term_id,
|
349 |
Â
'name' => $menu->name,
|
350 |
Â
)
|
@@ -353,7 +354,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
353 |
Â
if ( ! empty( $items ) ) {
|
354 |
Â
foreach ( $items as $item ) {
|
355 |
Â
array_push(
|
356 |
-
$this->_old_menu_items,
|
Â
|
|
357 |
Â
'menu_id' => $menu->term_id,
|
358 |
Â
'item_id' => $item->ID,
|
359 |
Â
'title' => $item->title,
|
@@ -414,7 +416,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
414 |
Â
if ( ! empty( $menus ) ) {
|
415 |
Â
foreach ( $menus as $menu ) {
|
416 |
Â
array_push(
|
417 |
-
$update_menus,
|
Â
|
|
418 |
Â
'term_id' => $menu->term_id,
|
419 |
Â
'name' => $menu->name,
|
420 |
Â
)
|
@@ -430,7 +433,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
430 |
Â
if ( isset( $terms ) && count( $terms ) > 0 ) {
|
431 |
Â
foreach ( $terms as $term ) {
|
432 |
Â
$this->plugin->alerts->Trigger(
|
433 |
-
2081,
|
Â
|
|
434 |
Â
'MenuName' => $term['name'],
|
435 |
Â
)
|
436 |
Â
);
|
@@ -539,7 +543,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
539 |
Â
*/
|
540 |
Â
private function EventAddItems( $content_type, $content_name, $menu_name ) {
|
541 |
Â
$this->plugin->alerts->Trigger(
|
542 |
-
2079,
|
Â
|
|
543 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
544 |
Â
'ContentName' => $content_name,
|
545 |
Â
'MenuName' => $menu_name,
|
@@ -556,7 +561,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
556 |
Â
*/
|
557 |
Â
private function EventRemoveItems( $content_type, $content_name, $menu_name ) {
|
558 |
Â
$this->plugin->alerts->Trigger(
|
559 |
-
2080,
|
Â
|
|
560 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
561 |
Â
'ContentName' => $content_name,
|
562 |
Â
'MenuName' => $menu_name,
|
@@ -572,9 +578,11 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
572 |
Â
* @param string $menu_setting - Menu setting.
|
573 |
Â
*/
|
574 |
Â
private function EventMenuSetting( $menu_name, $status, $menu_setting ) {
|
Â
|
|
575 |
Â
$this->plugin->alerts->Trigger(
|
576 |
-
2082,
|
577 |
-
|
Â
|
|
578 |
Â
'MenuSetting' => $menu_setting,
|
579 |
Â
'MenuName' => $menu_name,
|
580 |
Â
)
|
@@ -590,7 +598,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
590 |
Â
*/
|
591 |
Â
private function EventModifiedItems( $content_type, $content_name, $menu_name ) {
|
592 |
Â
$this->plugin->alerts->Trigger(
|
593 |
-
2083,
|
Â
|
|
594 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
595 |
Â
'ContentName' => $content_name,
|
596 |
Â
'MenuName' => $menu_name,
|
@@ -606,7 +615,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
606 |
Â
*/
|
607 |
Â
private function EventChangeName( $old_menu_name, $new_menu_name ) {
|
608 |
Â
$this->plugin->alerts->Trigger(
|
609 |
-
2084,
|
Â
|
|
610 |
Â
'OldMenuName' => $old_menu_name,
|
611 |
Â
'NewMenuName' => $new_menu_name,
|
612 |
Â
)
|
@@ -621,7 +631,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
621 |
Â
*/
|
622 |
Â
private function EventChangeOrder( $item_name, $menu_name ) {
|
623 |
Â
$this->plugin->alerts->Trigger(
|
624 |
-
2085,
|
Â
|
|
625 |
Â
'ItemName' => $item_name,
|
626 |
Â
'MenuName' => $menu_name,
|
627 |
Â
)
|
@@ -637,7 +648,8 @@ class WSAL_Sensors_Menus extends WSAL_AbstractSensor {
|
|
637 |
Â
*/
|
638 |
Â
private function EventChangeSubItem( $item_name, $parent_name, $menu_name ) {
|
639 |
Â
$this->plugin->alerts->Trigger(
|
640 |
-
2089,
|
Â
|
|
641 |
Â
'ItemName' => $item_name,
|
642 |
Â
'ParentName' => $parent_name,
|
643 |
Â
'MenuName' => $menu_name,
|
127 |
Â
}
|
128 |
Â
if ( $is_sub_item && wp_verify_nonce( $post_array['update-nav-menu-nonce'], 'update-nav_menu' ) ) {
|
129 |
Â
$item_parent_id = $args['menu-item-parent-id'];
|
130 |
+
$item_name = $old_menu_items[ $menu_item_db_id ]['title'];
|
131 |
Â
if ( $old_menu_items[ $menu_item_db_id ]['parent'] != $item_parent_id ) {
|
132 |
Â
$parent_name = isset( $old_menu_items[ $item_parent_id ]['title'] ) ? $old_menu_items[ $item_parent_id ]['title'] : false;
|
133 |
Â
$this->EventChangeSubItem( $item_name, $parent_name, $post_array['menu-name'] );
|
162 |
Â
*/
|
163 |
Â
public function CreateMenu( $term_id, $menu_data ) {
|
164 |
Â
$this->plugin->alerts->Trigger(
|
165 |
+
2078,
|
166 |
+
array( 'MenuName' => $menu_data['menu-name'] )
|
Â
|
|
167 |
Â
);
|
168 |
Â
}
|
169 |
Â
|
220 |
Â
public function DeleteMenu( $term_id ) {
|
221 |
Â
if ( $this->_old_menu ) {
|
222 |
Â
$this->plugin->alerts->Trigger(
|
223 |
+
2081,
|
224 |
+
array(
|
225 |
Â
'MenuName' => $this->_old_menu->name,
|
226 |
Â
)
|
227 |
Â
);
|
261 |
Â
} else {
|
262 |
Â
// Remove the last menu item.
|
263 |
Â
// if ( count( $content_names_old ) == 1 && count( $content_types_old ) == 1 ) {
|
264 |
+
// $this->EventRemoveItems( $content_types_old[0], $content_names_old[0], $post_array['menu-name'] );
|
265 |
Â
// }
|
266 |
Â
}
|
267 |
Â
}
|
270 |
Â
|
271 |
Â
// Enable/Disable menu setting.
|
272 |
Â
$nav_menu_options = maybe_unserialize( get_option( 'nav_menu_options' ) );
|
273 |
+
$auto_add = null;
|
274 |
Â
if ( isset( $nav_menu_options['auto_add'] ) ) {
|
275 |
Â
if ( in_array( $menu_id, $nav_menu_options['auto_add'] ) ) {
|
276 |
Â
if ( empty( $post_array['auto-add-pages'] ) ) {
|
344 |
Â
if ( ! empty( $menus ) ) {
|
345 |
Â
foreach ( $menus as $menu ) {
|
346 |
Â
array_push(
|
347 |
+
$this->_old_menu_terms,
|
348 |
+
array(
|
349 |
Â
'term_id' => $menu->term_id,
|
350 |
Â
'name' => $menu->name,
|
351 |
Â
)
|
354 |
Â
if ( ! empty( $items ) ) {
|
355 |
Â
foreach ( $items as $item ) {
|
356 |
Â
array_push(
|
357 |
+
$this->_old_menu_items,
|
358 |
+
array(
|
359 |
Â
'menu_id' => $menu->term_id,
|
360 |
Â
'item_id' => $item->ID,
|
361 |
Â
'title' => $item->title,
|
416 |
Â
if ( ! empty( $menus ) ) {
|
417 |
Â
foreach ( $menus as $menu ) {
|
418 |
Â
array_push(
|
419 |
+
$update_menus,
|
420 |
+
array(
|
421 |
Â
'term_id' => $menu->term_id,
|
422 |
Â
'name' => $menu->name,
|
423 |
Â
)
|
433 |
Â
if ( isset( $terms ) && count( $terms ) > 0 ) {
|
434 |
Â
foreach ( $terms as $term ) {
|
435 |
Â
$this->plugin->alerts->Trigger(
|
436 |
+
2081,
|
437 |
+
array(
|
438 |
Â
'MenuName' => $term['name'],
|
439 |
Â
)
|
440 |
Â
);
|
543 |
Â
*/
|
544 |
Â
private function EventAddItems( $content_type, $content_name, $menu_name ) {
|
545 |
Â
$this->plugin->alerts->Trigger(
|
546 |
+
2079,
|
547 |
+
array(
|
548 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
549 |
Â
'ContentName' => $content_name,
|
550 |
Â
'MenuName' => $menu_name,
|
561 |
Â
*/
|
562 |
Â
private function EventRemoveItems( $content_type, $content_name, $menu_name ) {
|
563 |
Â
$this->plugin->alerts->Trigger(
|
564 |
+
2080,
|
565 |
+
array(
|
566 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
567 |
Â
'ContentName' => $content_name,
|
568 |
Â
'MenuName' => $menu_name,
|
578 |
Â
* @param string $menu_setting - Menu setting.
|
579 |
Â
*/
|
580 |
Â
private function EventMenuSetting( $menu_name, $status, $menu_setting ) {
|
581 |
+
$status = 'Enabled' === $status ? 'enabled' : 'disabled';
|
582 |
Â
$this->plugin->alerts->Trigger(
|
583 |
+
2082,
|
584 |
+
array(
|
585 |
+
'EventType' => $status,
|
586 |
Â
'MenuSetting' => $menu_setting,
|
587 |
Â
'MenuName' => $menu_name,
|
588 |
Â
)
|
598 |
Â
*/
|
599 |
Â
private function EventModifiedItems( $content_type, $content_name, $menu_name ) {
|
600 |
Â
$this->plugin->alerts->Trigger(
|
601 |
+
2083,
|
602 |
+
array(
|
603 |
Â
'ContentType' => 'custom' === $content_type ? 'custom link' : $content_type,
|
604 |
Â
'ContentName' => $content_name,
|
605 |
Â
'MenuName' => $menu_name,
|
615 |
Â
*/
|
616 |
Â
private function EventChangeName( $old_menu_name, $new_menu_name ) {
|
617 |
Â
$this->plugin->alerts->Trigger(
|
618 |
+
2084,
|
619 |
+
array(
|
620 |
Â
'OldMenuName' => $old_menu_name,
|
621 |
Â
'NewMenuName' => $new_menu_name,
|
622 |
Â
)
|
631 |
Â
*/
|
632 |
Â
private function EventChangeOrder( $item_name, $menu_name ) {
|
633 |
Â
$this->plugin->alerts->Trigger(
|
634 |
+
2085,
|
635 |
+
array(
|
636 |
Â
'ItemName' => $item_name,
|
637 |
Â
'MenuName' => $menu_name,
|
638 |
Â
)
|
648 |
Â
*/
|
649 |
Â
private function EventChangeSubItem( $item_name, $parent_name, $menu_name ) {
|
650 |
Â
$this->plugin->alerts->Trigger(
|
651 |
+
2089,
|
652 |
+
array(
|
653 |
Â
'ItemName' => $item_name,
|
654 |
Â
'ParentName' => $parent_name,
|
655 |
Â
'MenuName' => $menu_name,
|
classes/Sensors/MetaData.php
CHANGED
@@ -307,7 +307,6 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
307 |
Â
'MetaValueOld' => $this->old_meta[ $meta_id ]->val,
|
308 |
Â
'MetaLink' => $meta_key,
|
309 |
Â
$editor_link['name'] => $editor_link['value'],
|
310 |
-
'ReportText' => is_string( $this->old_meta[ $meta_id ]->val ) ? $this->old_meta[ $meta_id ]->val . '|' . $meta_value : false,
|
311 |
Â
)
|
312 |
Â
);
|
313 |
Â
}
|
@@ -437,6 +436,10 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
437 |
Â
'TargetUsername' => $user->user_login,
|
438 |
Â
'custom_field_name' => $meta_key,
|
439 |
Â
'new_value' => $meta_value,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
440 |
Â
),
|
441 |
Â
array( $this, 'must_not_contain_new_user_alert' )
|
442 |
Â
);
|
@@ -495,7 +498,10 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
495 |
Â
'custom_field_name' => $meta_key,
|
496 |
Â
'new_value' => $meta_value,
|
497 |
Â
'old_value' => $this->old_meta[ $meta_id ]->val,
|
498 |
-
'
|
Â
|
|
Â
|
|
Â
|
|
499 |
Â
),
|
500 |
Â
array( $this, 'must_not_contain_role_changes' )
|
501 |
Â
);
|
@@ -513,6 +519,10 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
513 |
Â
'TargetUsername' => $user->user_login,
|
514 |
Â
'new_firstname' => $meta_value,
|
515 |
Â
'old_firstname' => $this->old_meta[ $meta_id ]->val,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
516 |
Â
)
|
517 |
Â
);
|
518 |
Â
}
|
@@ -526,6 +536,10 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
526 |
Â
'TargetUsername' => $user->user_login,
|
527 |
Â
'new_lastname' => $meta_value,
|
528 |
Â
'old_lastname' => $this->old_meta[ $meta_id ]->val,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
529 |
Â
)
|
530 |
Â
);
|
531 |
Â
}
|
@@ -539,6 +553,10 @@ class WSAL_Sensors_MetaData extends WSAL_AbstractSensor {
|
|
539 |
Â
'TargetUsername' => $user->user_login,
|
540 |
Â
'new_nickname' => $meta_value,
|
541 |
Â
'old_nickname' => $this->old_meta[ $meta_id ]->val,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
542 |
Â
)
|
543 |
Â
);
|
544 |
Â
}
|
307 |
Â
'MetaValueOld' => $this->old_meta[ $meta_id ]->val,
|
308 |
Â
'MetaLink' => $meta_key,
|
309 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
310 |
Â
)
|
311 |
Â
);
|
312 |
Â
}
|
436 |
Â
'TargetUsername' => $user->user_login,
|
437 |
Â
'custom_field_name' => $meta_key,
|
438 |
Â
'new_value' => $meta_value,
|
439 |
+
'FirstName' => $user->user_firstname,
|
440 |
+
'LastName' => $user->user_lastname,
|
441 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
442 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
443 |
Â
),
|
444 |
Â
array( $this, 'must_not_contain_new_user_alert' )
|
445 |
Â
);
|
498 |
Â
'custom_field_name' => $meta_key,
|
499 |
Â
'new_value' => $meta_value,
|
500 |
Â
'old_value' => $this->old_meta[ $meta_id ]->val,
|
501 |
+
'FirstName' => $user->user_firstname,
|
502 |
+
'LastName' => $user->user_lastname,
|
503 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
504 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
505 |
Â
),
|
506 |
Â
array( $this, 'must_not_contain_role_changes' )
|
507 |
Â
);
|
519 |
Â
'TargetUsername' => $user->user_login,
|
520 |
Â
'new_firstname' => $meta_value,
|
521 |
Â
'old_firstname' => $this->old_meta[ $meta_id ]->val,
|
522 |
+
'FirstName' => $user->user_firstname,
|
523 |
+
'LastName' => $user->user_lastname,
|
524 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
525 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
526 |
Â
)
|
527 |
Â
);
|
528 |
Â
}
|
536 |
Â
'TargetUsername' => $user->user_login,
|
537 |
Â
'new_lastname' => $meta_value,
|
538 |
Â
'old_lastname' => $this->old_meta[ $meta_id ]->val,
|
539 |
+
'FirstName' => $user->user_firstname,
|
540 |
+
'LastName' => $user->user_lastname,
|
541 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
542 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
543 |
Â
)
|
544 |
Â
);
|
545 |
Â
}
|
553 |
Â
'TargetUsername' => $user->user_login,
|
554 |
Â
'new_nickname' => $meta_value,
|
555 |
Â
'old_nickname' => $this->old_meta[ $meta_id ]->val,
|
556 |
+
'FirstName' => $user->user_firstname,
|
557 |
+
'LastName' => $user->user_lastname,
|
558 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
559 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
560 |
Â
)
|
561 |
Â
);
|
562 |
Â
}
|
classes/Sensors/Multisite.php
CHANGED
@@ -79,13 +79,14 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
79 |
Â
if ( ! in_array( $theme, (array) $this->old_allowedthemes ) ) {
|
80 |
Â
$theme = wp_get_theme( $theme );
|
81 |
Â
$this->plugin->alerts->Trigger(
|
82 |
-
5008,
|
Â
|
|
83 |
Â
'Theme' => (object) array(
|
84 |
-
'Name'
|
85 |
-
'ThemeURI'
|
86 |
-
'Description'
|
87 |
-
'Author'
|
88 |
-
'Version'
|
89 |
Â
'get_template_directory' => $theme->get_template_directory(),
|
90 |
Â
),
|
91 |
Â
)
|
@@ -98,13 +99,14 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
98 |
Â
if ( ! in_array( $theme, $new_allowedthemes ) ) {
|
99 |
Â
$theme = wp_get_theme( $theme );
|
100 |
Â
$this->plugin->alerts->Trigger(
|
101 |
-
5009,
|
Â
|
|
102 |
Â
'Theme' => (object) array(
|
103 |
-
'Name'
|
104 |
-
'ThemeURI'
|
105 |
-
'Description'
|
106 |
-
'Author'
|
107 |
-
'Version'
|
108 |
Â
'get_template_directory' => $theme->get_template_directory(),
|
109 |
Â
),
|
110 |
Â
)
|
@@ -120,9 +122,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
120 |
Â
*/
|
121 |
Â
public function EventNewBlog( $blog_id ) {
|
122 |
Â
$this->plugin->alerts->Trigger(
|
123 |
-
7000,
|
124 |
-
|
Â
|
|
125 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
126 |
Â
)
|
127 |
Â
);
|
128 |
Â
}
|
@@ -134,9 +138,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
134 |
Â
*/
|
135 |
Â
public function EventArchiveBlog( $blog_id ) {
|
136 |
Â
$this->plugin->alerts->Trigger(
|
137 |
-
7001,
|
138 |
-
|
Â
|
|
139 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
140 |
Â
)
|
141 |
Â
);
|
142 |
Â
}
|
@@ -148,9 +154,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
148 |
Â
*/
|
149 |
Â
public function EventUnarchiveBlog( $blog_id ) {
|
150 |
Â
$this->plugin->alerts->Trigger(
|
151 |
-
7002,
|
152 |
-
|
Â
|
|
153 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
154 |
Â
)
|
155 |
Â
);
|
156 |
Â
}
|
@@ -162,9 +170,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
162 |
Â
*/
|
163 |
Â
public function EventActivateBlog( $blog_id ) {
|
164 |
Â
$this->plugin->alerts->Trigger(
|
165 |
-
7003,
|
166 |
-
|
Â
|
|
167 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
168 |
Â
)
|
169 |
Â
);
|
170 |
Â
}
|
@@ -176,9 +186,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
176 |
Â
*/
|
177 |
Â
public function EventDeactivateBlog( $blog_id ) {
|
178 |
Â
$this->plugin->alerts->Trigger(
|
179 |
-
7004,
|
180 |
-
|
Â
|
|
181 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
182 |
Â
)
|
183 |
Â
);
|
184 |
Â
}
|
@@ -190,9 +202,11 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
190 |
Â
*/
|
191 |
Â
public function EventDeleteBlog( $blog_id ) {
|
192 |
Â
$this->plugin->alerts->Trigger(
|
193 |
-
7005,
|
194 |
-
|
Â
|
|
195 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
Â
|
|
196 |
Â
)
|
197 |
Â
);
|
198 |
Â
}
|
@@ -205,14 +219,20 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
205 |
Â
* @param int $blog_id - Blog ID.
|
206 |
Â
*/
|
207 |
Â
public function EventUserAddedToBlog( $user_id, $role, $blog_id ) {
|
Â
|
|
208 |
Â
$this->plugin->alerts->TriggerIf(
|
209 |
-
4010,
|
210 |
-
|
211 |
-
'
|
Â
|
|
212 |
Â
'TargetUserRole' => $role,
|
213 |
-
'BlogID'
|
214 |
-
'SiteName'
|
215 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
216 |
Â
);
|
217 |
Â
}
|
218 |
Â
|
@@ -224,15 +244,19 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
|
|
224 |
Â
*/
|
225 |
Â
public function EventUserRemovedFromBlog( $user_id, $blog_id ) {
|
226 |
Â
$user = get_userdata( $user_id );
|
227 |
-
// $blog_id = (isset( $_REQUEST['id'] ) ? $_REQUEST['id'] : 0);
|
228 |
Â
$this->plugin->alerts->TriggerIf(
|
229 |
-
4011,
|
230 |
-
|
Â
|
|
231 |
Â
'TargetUsername' => $user->user_login,
|
232 |
Â
'TargetUserRole' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
233 |
-
'BlogID'
|
234 |
-
'SiteName'
|
235 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
236 |
Â
);
|
237 |
Â
}
|
238 |
Â
|
79 |
Â
if ( ! in_array( $theme, (array) $this->old_allowedthemes ) ) {
|
80 |
Â
$theme = wp_get_theme( $theme );
|
81 |
Â
$this->plugin->alerts->Trigger(
|
82 |
+
5008,
|
83 |
+
array(
|
84 |
Â
'Theme' => (object) array(
|
85 |
+
'Name' => $theme->Name,
|
86 |
+
'ThemeURI' => $theme->ThemeURI,
|
87 |
+
'Description' => $theme->Description,
|
88 |
+
'Author' => $theme->Author,
|
89 |
+
'Version' => $theme->Version,
|
90 |
Â
'get_template_directory' => $theme->get_template_directory(),
|
91 |
Â
),
|
92 |
Â
)
|
99 |
Â
if ( ! in_array( $theme, $new_allowedthemes ) ) {
|
100 |
Â
$theme = wp_get_theme( $theme );
|
101 |
Â
$this->plugin->alerts->Trigger(
|
102 |
+
5009,
|
103 |
+
array(
|
104 |
Â
'Theme' => (object) array(
|
105 |
+
'Name' => $theme->Name,
|
106 |
+
'ThemeURI' => $theme->ThemeURI,
|
107 |
+
'Description' => $theme->Description,
|
108 |
+
'Author' => $theme->Author,
|
109 |
+
'Version' => $theme->Version,
|
110 |
Â
'get_template_directory' => $theme->get_template_directory(),
|
111 |
Â
),
|
112 |
Â
)
|
122 |
Â
*/
|
123 |
Â
public function EventNewBlog( $blog_id ) {
|
124 |
Â
$this->plugin->alerts->Trigger(
|
125 |
+
7000,
|
126 |
+
array(
|
127 |
+
'BlogID' => $blog_id,
|
128 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
129 |
+
'BlogURL' => get_home_url( $blog_id ),
|
130 |
Â
)
|
131 |
Â
);
|
132 |
Â
}
|
138 |
Â
*/
|
139 |
Â
public function EventArchiveBlog( $blog_id ) {
|
140 |
Â
$this->plugin->alerts->Trigger(
|
141 |
+
7001,
|
142 |
+
array(
|
143 |
+
'BlogID' => $blog_id,
|
144 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
145 |
+
'BlogURL' => get_home_url( $blog_id ),
|
146 |
Â
)
|
147 |
Â
);
|
148 |
Â
}
|
154 |
Â
*/
|
155 |
Â
public function EventUnarchiveBlog( $blog_id ) {
|
156 |
Â
$this->plugin->alerts->Trigger(
|
157 |
+
7002,
|
158 |
+
array(
|
159 |
+
'BlogID' => $blog_id,
|
160 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
161 |
+
'BlogURL' => get_home_url( $blog_id ),
|
162 |
Â
)
|
163 |
Â
);
|
164 |
Â
}
|
170 |
Â
*/
|
171 |
Â
public function EventActivateBlog( $blog_id ) {
|
172 |
Â
$this->plugin->alerts->Trigger(
|
173 |
+
7003,
|
174 |
+
array(
|
175 |
+
'BlogID' => $blog_id,
|
176 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
177 |
+
'BlogURL' => get_home_url( $blog_id ),
|
178 |
Â
)
|
179 |
Â
);
|
180 |
Â
}
|
186 |
Â
*/
|
187 |
Â
public function EventDeactivateBlog( $blog_id ) {
|
188 |
Â
$this->plugin->alerts->Trigger(
|
189 |
+
7004,
|
190 |
+
array(
|
191 |
+
'BlogID' => $blog_id,
|
192 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
193 |
+
'BlogURL' => get_home_url( $blog_id ),
|
194 |
Â
)
|
195 |
Â
);
|
196 |
Â
}
|
202 |
Â
*/
|
203 |
Â
public function EventDeleteBlog( $blog_id ) {
|
204 |
Â
$this->plugin->alerts->Trigger(
|
205 |
+
7005,
|
206 |
+
array(
|
207 |
+
'BlogID' => $blog_id,
|
208 |
Â
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
209 |
+
'BlogURL' => get_home_url( $blog_id ),
|
210 |
Â
)
|
211 |
Â
);
|
212 |
Â
}
|
219 |
Â
* @param int $blog_id - Blog ID.
|
220 |
Â
*/
|
221 |
Â
public function EventUserAddedToBlog( $user_id, $role, $blog_id ) {
|
222 |
+
$user = get_userdata( $user_id );
|
223 |
Â
$this->plugin->alerts->TriggerIf(
|
224 |
+
4010,
|
225 |
+
array(
|
226 |
+
'TargetUserID' => $user_id,
|
227 |
+
'TargetUsername' => $user ? $user->user_login : false,
|
228 |
Â
'TargetUserRole' => $role,
|
229 |
+
'BlogID' => $blog_id,
|
230 |
+
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
231 |
+
'FirstName' => $user ? $user->user_firstname : false,
|
232 |
+
'LastName' => $user ? $user->user_lastname : false,
|
233 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
234 |
+
),
|
235 |
+
array( $this, 'MustNotContainCreateUser' )
|
236 |
Â
);
|
237 |
Â
}
|
238 |
Â
|
244 |
Â
*/
|
245 |
Â
public function EventUserRemovedFromBlog( $user_id, $blog_id ) {
|
246 |
Â
$user = get_userdata( $user_id );
|
Â
|
|
247 |
Â
$this->plugin->alerts->TriggerIf(
|
248 |
+
4011,
|
249 |
+
array(
|
250 |
+
'TargetUserID' => $user_id,
|
251 |
Â
'TargetUsername' => $user->user_login,
|
252 |
Â
'TargetUserRole' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
253 |
+
'BlogID' => $blog_id,
|
254 |
+
'SiteName' => get_blog_option( $blog_id, 'blogname' ),
|
255 |
+
'FirstName' => $user ? $user->user_firstname : false,
|
256 |
+
'LastName' => $user ? $user->user_lastname : false,
|
257 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
258 |
+
),
|
259 |
+
array( $this, 'MustNotContainCreateUser' )
|
260 |
Â
);
|
261 |
Â
}
|
262 |
Â
|
classes/Sensors/PluginsThemes.php
CHANGED
@@ -619,12 +619,17 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
|
|
619 |
Â
)
|
620 |
Â
);
|
621 |
Â
} else {
|
Â
|
|
Â
|
|
Â
|
|
622 |
Â
$this->plugin->alerts->Trigger(
|
623 |
Â
5019,
|
624 |
Â
array(
|
Â
|
|
625 |
Â
'PostID' => $post->ID,
|
626 |
Â
'PostType' => $post->post_type,
|
627 |
Â
'PostTitle' => $post->post_title,
|
Â
|
|
628 |
Â
'Username' => 'Plugins',
|
629 |
Â
$editor_link['name'] => $editor_link['value'],
|
630 |
Â
)
|
@@ -660,13 +665,17 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
|
|
660 |
Â
// Ignore WooCommerce Bulk Stock Management page.
|
661 |
Â
// OR MainWP plugin requests.
|
662 |
Â
} else {
|
Â
|
|
Â
|
|
663 |
Â
$editor_link = $this->GetEditorLink( $post );
|
664 |
Â
$this->plugin->alerts->Trigger(
|
665 |
Â
5019,
|
666 |
Â
array(
|
Â
|
|
667 |
Â
'PostID' => $post->ID,
|
668 |
Â
'PostType' => $post->post_type,
|
669 |
Â
'PostTitle' => $post->post_title,
|
Â
|
|
670 |
Â
'Username' => 'Plugins',
|
671 |
Â
$editor_link['name'] => $editor_link['value'],
|
672 |
Â
)
|
619 |
Â
)
|
620 |
Â
);
|
621 |
Â
} else {
|
622 |
+
$plugin_name = isset( $get_array['plugin'] ) ? $get_array['plugin'] : false;
|
623 |
+
$plugin_data = $plugin_name ? get_plugin_data( trailingslashit( WP_PLUGIN_DIR ) . $plugin_name ) : false;
|
624 |
+
|
625 |
Â
$this->plugin->alerts->Trigger(
|
626 |
Â
5019,
|
627 |
Â
array(
|
628 |
+
'PluginName' => ( $plugin_data && isset( $plugin_data['Name'] ) ) ? $plugin_data['Name'] : false,
|
629 |
Â
'PostID' => $post->ID,
|
630 |
Â
'PostType' => $post->post_type,
|
631 |
Â
'PostTitle' => $post->post_title,
|
632 |
+
'PostStatus' => $post->post_status,
|
633 |
Â
'Username' => 'Plugins',
|
634 |
Â
$editor_link['name'] => $editor_link['value'],
|
635 |
Â
)
|
665 |
Â
// Ignore WooCommerce Bulk Stock Management page.
|
666 |
Â
// OR MainWP plugin requests.
|
667 |
Â
} else {
|
668 |
+
$plugin_name = isset( $get_array['plugin'] ) ? $get_array['plugin'] : false;
|
669 |
+
$plugin_data = $plugin_name ? get_plugin_data( trailingslashit( WP_PLUGIN_DIR ) . $plugin_name ) : false;
|
670 |
Â
$editor_link = $this->GetEditorLink( $post );
|
671 |
Â
$this->plugin->alerts->Trigger(
|
672 |
Â
5019,
|
673 |
Â
array(
|
674 |
+
'PluginName' => ( $plugin_data && isset( $plugin_data['Name'] ) ) ? $plugin_data['Name'] : false,
|
675 |
Â
'PostID' => $post->ID,
|
676 |
Â
'PostType' => $post->post_type,
|
677 |
Â
'PostTitle' => $post->post_title,
|
678 |
+
'PostStatus' => $post->post_status,
|
679 |
Â
'Username' => 'Plugins',
|
680 |
Â
$editor_link['name'] => $editor_link['value'],
|
681 |
Â
)
|
classes/Sensors/Public.php
CHANGED
@@ -48,7 +48,6 @@ class WSAL_Sensors_Public extends WSAL_AbstractSensor {
|
|
48 |
Â
// Hook the events if user is logged in OR if user is not logged in and visitor events are allowed to load.
|
49 |
Â
if ( is_user_logged_in() ) {
|
50 |
Â
add_action( 'user_register', array( $this, 'event_user_register' ) );
|
51 |
-
add_action( 'comment_post', array( $this, 'event_comment' ), 10, 3 );
|
52 |
Â
|
53 |
Â
// Check if WooCommerce plugin exists.
|
54 |
Â
if ( WpSecurityAuditLog::is_woocommerce_active() ) {
|
@@ -75,99 +74,21 @@ class WSAL_Sensors_Public extends WSAL_AbstractSensor {
|
|
75 |
Â
$this->plugin->alerts->Trigger(
|
76 |
Â
$event,
|
77 |
Â
array(
|
78 |
-
'NewUserID'
|
79 |
-
'UserChanger'
|
80 |
-
'NewUserData'
|
81 |
Â
'Username' => $user->user_login,
|
82 |
Â
'FirstName' => $user->user_firstname,
|
83 |
Â
'LastName' => $user->user_lastname,
|
84 |
Â
'Email' => $user->user_email,
|
85 |
Â
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
86 |
Â
),
|
Â
|
|
87 |
Â
),
|
88 |
Â
true
|
89 |
Â
);
|
90 |
Â
}
|
91 |
Â
|
92 |
-
/**
|
93 |
-
* Fires immediately after a comment is inserted into the database.
|
94 |
-
*
|
95 |
-
* @param int $comment_id - The comment ID.
|
96 |
-
* @param mixed $comment_approved - 1 if the comment is approved, 0 if not, 'spam' if spam.
|
97 |
-
* @param array $comment_data - Comment data.
|
98 |
-
*/
|
99 |
-
public function event_comment( $comment_id, $comment_approved, $comment_data ) {
|
100 |
-
if ( ! $comment_id ) {
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
// Check if the comment is response to another comment.
|
105 |
-
if ( isset( $comment_data['comment_parent'] ) && $comment_data['comment_parent'] ) {
|
106 |
-
$this->event_generic( $comment_id, 2092 );
|
107 |
-
return;
|
108 |
-
}
|
109 |
-
|
110 |
-
// Get WP comment object.
|
111 |
-
$comment = get_comment( $comment_id );
|
112 |
-
|
113 |
-
if ( $comment && 'spam' !== $comment->comment_approved ) {
|
114 |
-
$post = get_post( $comment->comment_post_ID );
|
115 |
-
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
116 |
-
$fields = array(
|
117 |
-
'Date' => $comment->comment_date,
|
118 |
-
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
119 |
-
);
|
120 |
-
|
121 |
-
// Get user data.
|
122 |
-
$user_data = get_user_by( 'email', $comment->comment_author_email );
|
123 |
-
|
124 |
-
if ( $user_data ) {
|
125 |
-
// Get user roles.
|
126 |
-
$user_roles = $user_data->roles;
|
127 |
-
|
128 |
-
// Check if superadmin.
|
129 |
-
if ( function_exists( 'is_super_admin' ) && is_super_admin() ) {
|
130 |
-
$user_roles[] = 'superadmin';
|
131 |
-
}
|
132 |
-
|
133 |
-
/* Translators: %s: Post title */
|
134 |
-
$comment_msg = sprintf( __( 'Posted a comment in response to the post %s', 'wp-security-audit-log' ), '<strong>' . $post->post_title . '</strong>' );
|
135 |
-
|
136 |
-
// Set the fields.
|
137 |
-
$fields['Username'] = $user_data->user_login;
|
138 |
-
$fields['CurrentUserRoles'] = $user_roles;
|
139 |
-
$fields['CommentMsg'] = $comment_msg;
|
140 |
-
$this->plugin->alerts->Trigger( 2099, $fields );
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Trigger generic event.
|
147 |
-
*
|
148 |
-
* @since 3.4
|
149 |
-
*
|
150 |
-
* @param integer $comment_id - Comment ID.
|
151 |
-
* @param integer $alert_code - Event code.
|
152 |
-
*/
|
153 |
-
private function event_generic( $comment_id, $alert_code ) {
|
154 |
-
$comment = get_comment( $comment_id );
|
155 |
-
if ( $comment ) {
|
156 |
-
$post = get_post( $comment->comment_post_ID );
|
157 |
-
$comment_link = get_permalink( $post->ID ) . '#comment-' . $comment_id;
|
158 |
-
$fields = array(
|
159 |
-
'PostTitle' => $post->post_title,
|
160 |
-
'Author' => $comment->comment_author,
|
161 |
-
'Date' => $comment->comment_date,
|
162 |
-
'CommentLink' => '<a target="_blank" href="' . $comment_link . '">' . $comment->comment_date . '</a>',
|
163 |
-
);
|
164 |
-
|
165 |
-
if ( 'shop_order' !== $post->post_type ) {
|
166 |
-
$this->plugin->alerts->Trigger( $alert_code, $fields );
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
Â
/**
|
172 |
Â
* Shows the username if the comment is owned by a user
|
173 |
Â
* and the email if the comment was posted by a non WordPress user
|
@@ -424,8 +345,9 @@ class WSAL_Sensors_Public extends WSAL_AbstractSensor {
|
|
424 |
Â
$this->plugin->alerts->Trigger(
|
425 |
Â
9018,
|
426 |
Â
array(
|
Â
|
|
427 |
Â
'ProductTitle' => $product_title,
|
428 |
-
'ProductStatus' =>
|
429 |
Â
'OldStatus' => $this->get_stock_status( $old_stock_status ),
|
430 |
Â
'NewStatus' => $this->get_stock_status( $new_stock_status ),
|
431 |
Â
'Username' => $username,
|
@@ -442,9 +364,10 @@ class WSAL_Sensors_Public extends WSAL_AbstractSensor {
|
|
442 |
Â
$this->plugin->alerts->Trigger(
|
443 |
Â
9019,
|
444 |
Â
array(
|
Â
|
|
445 |
Â
'ProductTitle' => $product_title,
|
446 |
-
'ProductStatus' =>
|
447 |
-
'OldValue' =>
|
448 |
Â
'NewValue' => $new_stock,
|
449 |
Â
'Username' => $username,
|
450 |
Â
$editor_link['name'] => $editor_link['value'],
|
48 |
Â
// Hook the events if user is logged in OR if user is not logged in and visitor events are allowed to load.
|
49 |
Â
if ( is_user_logged_in() ) {
|
50 |
Â
add_action( 'user_register', array( $this, 'event_user_register' ) );
|
Â
|
|
51 |
Â
|
52 |
Â
// Check if WooCommerce plugin exists.
|
53 |
Â
if ( WpSecurityAuditLog::is_woocommerce_active() ) {
|
74 |
Â
$this->plugin->alerts->Trigger(
|
75 |
Â
$event,
|
76 |
Â
array(
|
77 |
+
'NewUserID' => $user_id,
|
78 |
+
'UserChanger' => ! empty( $current_user ) ? $current_user->user_login : '',
|
79 |
+
'NewUserData' => (object) array(
|
80 |
Â
'Username' => $user->user_login,
|
81 |
Â
'FirstName' => $user->user_firstname,
|
82 |
Â
'LastName' => $user->user_lastname,
|
83 |
Â
'Email' => $user->user_email,
|
84 |
Â
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
85 |
Â
),
|
86 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
87 |
Â
),
|
88 |
Â
true
|
89 |
Â
);
|
90 |
Â
}
|
91 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
92 |
Â
/**
|
93 |
Â
* Shows the username if the comment is owned by a user
|
94 |
Â
* and the email if the comment was posted by a non WordPress user
|
345 |
Â
$this->plugin->alerts->Trigger(
|
346 |
Â
9018,
|
347 |
Â
array(
|
348 |
+
'PostID' => $post->ID,
|
349 |
Â
'ProductTitle' => $product_title,
|
350 |
+
'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
|
351 |
Â
'OldStatus' => $this->get_stock_status( $old_stock_status ),
|
352 |
Â
'NewStatus' => $this->get_stock_status( $new_stock_status ),
|
353 |
Â
'Username' => $username,
|
364 |
Â
$this->plugin->alerts->Trigger(
|
365 |
Â
9019,
|
366 |
Â
array(
|
367 |
+
'PostID' => $post->ID,
|
368 |
Â
'ProductTitle' => $product_title,
|
369 |
+
'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
|
370 |
+
'OldValue' => ! empty( $old_stock ) ? $old_stock : 0,
|
371 |
Â
'NewValue' => $new_stock,
|
372 |
Â
'Username' => $username,
|
373 |
Â
$editor_link['name'] => $editor_link['value'],
|
classes/Sensors/Request.php
CHANGED
@@ -42,10 +42,10 @@ class WSAL_Sensors_Request extends WSAL_AbstractSensor {
|
|
42 |
Â
*/
|
43 |
Â
public function EventShutdown() {
|
44 |
Â
// Filter global arrays for security.
|
45 |
-
$post_array
|
46 |
Â
$server_array = filter_input_array( INPUT_SERVER );
|
47 |
Â
|
48 |
-
$upload_dir
|
49 |
Â
$uploads_dir_path = trailingslashit( $upload_dir['basedir'] ) . 'wp-security-audit-log/';
|
50 |
Â
if ( ! $this->CheckDirectory( $uploads_dir_path ) ) {
|
51 |
Â
wp_mkdir_p( $uploads_dir_path );
|
@@ -54,13 +54,13 @@ class WSAL_Sensors_Request extends WSAL_AbstractSensor {
|
|
54 |
Â
$file = $uploads_dir_path . 'Request.log.php';
|
55 |
Â
|
56 |
Â
$request_method = isset( $server_array['REQUEST_METHOD'] ) ? $server_array['REQUEST_METHOD'] : false;
|
57 |
-
$request_uri
|
58 |
Â
|
59 |
Â
$line = '[' . date( 'Y-m-d H:i:s' ) . '] '
|
60 |
Â
. $request_method . ' '
|
61 |
Â
. $request_uri . ' '
|
62 |
-
. ( ! empty( $post_array ) ? str_pad( PHP_EOL, 24 ) . json_encode( $post_array ) : ''
|
63 |
-
. ( ! empty( self::$envvars ) ? str_pad( PHP_EOL, 24 ) . json_encode( self::$envvars ) : ''
|
64 |
Â
. PHP_EOL;
|
65 |
Â
|
66 |
Â
if ( ! file_exists( $file ) && ! file_put_contents( $file, '<' . '?php die(\'Access Denied\'); ?>' . PHP_EOL ) ) {
|
42 |
Â
*/
|
43 |
Â
public function EventShutdown() {
|
44 |
Â
// Filter global arrays for security.
|
45 |
+
$post_array = filter_input_array( INPUT_POST );
|
46 |
Â
$server_array = filter_input_array( INPUT_SERVER );
|
47 |
Â
|
48 |
+
$upload_dir = wp_upload_dir();
|
49 |
Â
$uploads_dir_path = trailingslashit( $upload_dir['basedir'] ) . 'wp-security-audit-log/';
|
50 |
Â
if ( ! $this->CheckDirectory( $uploads_dir_path ) ) {
|
51 |
Â
wp_mkdir_p( $uploads_dir_path );
|
54 |
Â
$file = $uploads_dir_path . 'Request.log.php';
|
55 |
Â
|
56 |
Â
$request_method = isset( $server_array['REQUEST_METHOD'] ) ? $server_array['REQUEST_METHOD'] : false;
|
57 |
+
$request_uri = isset( $server_array['REQUEST_URI'] ) ? $server_array['REQUEST_URI'] : false;
|
58 |
Â
|
59 |
Â
$line = '[' . date( 'Y-m-d H:i:s' ) . '] '
|
60 |
Â
. $request_method . ' '
|
61 |
Â
. $request_uri . ' '
|
62 |
+
. ( ! empty( $post_array ) ? str_pad( PHP_EOL, 24 ) . json_encode( $post_array ) : '')
|
63 |
+
. ( ! empty( self::$envvars ) ? str_pad( PHP_EOL, 24 ) . json_encode( self::$envvars ) : '')
|
64 |
Â
. PHP_EOL;
|
65 |
Â
|
66 |
Â
if ( ! file_exists( $file ) && ! file_put_contents( $file, '<' . '?php die(\'Access Denied\'); ?>' . PHP_EOL ) ) {
|
classes/Sensors/System.php
CHANGED
@@ -405,17 +405,15 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
|
|
405 |
Â
}
|
406 |
Â
|
407 |
Â
// Registeration Option.
|
408 |
-
if ( $is_option_page
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
if ( $old != $new ) {
|
414 |
Â
$this->plugin->alerts->Trigger(
|
415 |
Â
6001,
|
416 |
Â
array(
|
417 |
-
'
|
418 |
-
'NewValue' => $new,
|
419 |
Â
'CurrentUserID' => wp_get_current_user()->ID,
|
420 |
Â
)
|
421 |
Â
);
|
@@ -530,13 +528,11 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
|
|
530 |
Â
$allow_anonymous = get_option( '_bbp_allow_anonymous' );
|
531 |
Â
$old_status = ! empty( $allow_anonymous ) ? 1 : 0;
|
532 |
Â
$new_status = ! empty( $post_array['_bbp_allow_anonymous'] ) ? 1 : 0;
|
Â
|
|
533 |
Â
if ( $old_status !== $new_status ) {
|
534 |
-
$status = ( 1 === $new_status ) ? 'Enabled' : 'Disabled';
|
535 |
Â
$this->plugin->alerts->Trigger(
|
536 |
Â
8010,
|
537 |
-
array(
|
538 |
-
'Status' => $status,
|
539 |
-
)
|
540 |
Â
);
|
541 |
Â
}
|
542 |
Â
|
@@ -652,17 +648,15 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
|
|
652 |
Â
public function EventOptions( $whitelist = null ) {
|
653 |
Â
// Filter global arrays for security.
|
654 |
Â
$post_array = filter_input_array( INPUT_POST );
|
655 |
-
$get_array = filter_input_array( INPUT_GET );
|
656 |
Â
|
657 |
Â
if ( isset( $post_array['option_page'] ) && 'reading' === $post_array['option_page'] ) {
|
658 |
Â
$old_status = (int) get_option( 'blog_public', 1 );
|
659 |
Â
$new_status = isset( $post_array['blog_public'] ) ? 0 : 1;
|
Â
|
|
660 |
Â
if ( $old_status !== $new_status ) {
|
661 |
Â
$this->plugin->alerts->Trigger(
|
662 |
Â
6008,
|
663 |
-
array(
|
664 |
-
'Status' => ( 0 === $new_status ) ? 'Enabled' : 'Disabled',
|
665 |
-
)
|
666 |
Â
);
|
667 |
Â
}
|
668 |
Â
}
|
@@ -670,46 +664,44 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
|
|
670 |
Â
if ( isset( $post_array['option_page'] ) && 'discussion' === $post_array['option_page'] ) {
|
671 |
Â
$old_status = get_option( 'default_comment_status', 'closed' );
|
672 |
Â
$new_status = isset( $post_array['default_comment_status'] ) ? 'open' : 'closed';
|
Â
|
|
673 |
Â
if ( $old_status !== $new_status ) {
|
674 |
Â
$this->plugin->alerts->Trigger(
|
675 |
Â
6009,
|
676 |
-
array(
|
677 |
-
'Status' => ( 'open' === $new_status ) ? 'Enabled' : 'Disabled',
|
678 |
-
)
|
679 |
Â
);
|
680 |
Â
}
|
681 |
Â
|
682 |
Â
$old_status = (int) get_option( 'require_name_email', 0 );
|
683 |
Â
$new_status = isset( $post_array['require_name_email'] ) ? 1 : 0;
|
Â
|
|
684 |
Â
if ( $old_status !== $new_status ) {
|
685 |
Â
$this->plugin->alerts->Trigger(
|
686 |
Â
6010,
|
687 |
-
array(
|
688 |
-
'Status' => ( 1 === $new_status ) ? 'Enabled' : 'Disabled',
|
689 |
-
)
|
690 |
Â
);
|
691 |
Â
}
|
692 |
Â
|
693 |
Â
$old_status = (int) get_option( 'comment_registration', 0 );
|
694 |
Â
$new_status = isset( $post_array['comment_registration'] ) ? 1 : 0;
|
Â
|
|
695 |
Â
if ( $old_status !== $new_status ) {
|
696 |
Â
$this->plugin->alerts->Trigger(
|
697 |
Â
6011,
|
698 |
-
array(
|
699 |
-
'Status' => ( 1 === $new_status ) ? 'Enabled' : 'Disabled',
|
700 |
-
)
|
701 |
Â
);
|
702 |
Â
}
|
703 |
Â
|
704 |
Â
$old_status = (int) get_option( 'close_comments_for_old_posts', 0 );
|
705 |
Â
$new_status = isset( $post_array['close_comments_for_old_posts'] ) ? 1 : 0;
|
Â
|
|
706 |
Â
if ( $old_status !== $new_status ) {
|
707 |
Â
$value = isset( $post_array['close_comments_days_old'] ) ? $post_array['close_comments_days_old'] : 0;
|
708 |
Â
$this->plugin->alerts->Trigger(
|
709 |
Â
6012,
|
710 |
Â
array(
|
711 |
-
'
|
712 |
-
'Value'
|
713 |
Â
)
|
714 |
Â
);
|
715 |
Â
}
|
@@ -728,23 +720,21 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
|
|
728 |
Â
|
729 |
Â
$old_status = (int) get_option( 'comment_moderation', 0 );
|
730 |
Â
$new_status = isset( $post_array['comment_moderation'] ) ? 1 : 0;
|
Â
|
|
731 |
Â
if ( $old_status !== $new_status ) {
|
732 |
Â
$this->plugin->alerts->Trigger(
|
733 |
Â
6014,
|
734 |
-
array(
|
735 |
-
'Status' => ( 1 === $new_status ) ? 'Enabled' : 'Disabled',
|
736 |
-
)
|
737 |
Â
);
|
738 |
Â
}
|
739 |
Â
|
740 |
Â
$old_status = (int) get_option( 'comment_whitelist', 0 );
|
741 |
Â
$new_status = isset( $post_array['comment_whitelist'] ) ? 1 : 0;
|
Â
|
|
742 |
Â
if ( $old_status !== $new_status ) {
|
743 |
Â
$this->plugin->alerts->Trigger(
|
744 |
Â
6015,
|
745 |
-
array(
|
746 |
-
'Status' => ( 1 === $new_status ) ? 'Enabled' : 'Disabled',
|
747 |
-
)
|
748 |
Â
);
|
749 |
Â
}
|
750 |
Â
|
405 |
Â
}
|
406 |
Â
|
407 |
Â
// Registeration Option.
|
408 |
+
if ( $is_option_page && wp_verify_nonce( $post_array['_wpnonce'], 'general-options' ) && ( get_option( 'users_can_register' ) xor isset( $post_array['users_can_register'] ) ) ) {
|
409 |
+
$old = get_option( 'users_can_register' ) ? 'enabled' : 'disabled';
|
410 |
+
$new = isset( $post_array['users_can_register'] ) ? 'enabled' : 'disabled';
|
411 |
+
|
412 |
+
if ( $old !== $new ) {
|
Â
|
|
413 |
Â
$this->plugin->alerts->Trigger(
|
414 |
Â
6001,
|
415 |
Â
array(
|
416 |
+
'EventType' => $new,
|
Â
|
|
417 |
Â
'CurrentUserID' => wp_get_current_user()->ID,
|
418 |
Â
)
|
419 |
Â
);
|
528 |
Â
$allow_anonymous = get_option( '_bbp_allow_anonymous' );
|
529 |
Â
$old_status = ! empty( $allow_anonymous ) ? 1 : 0;
|
530 |
Â
$new_status = ! empty( $post_array['_bbp_allow_anonymous'] ) ? 1 : 0;
|
531 |
+
|
532 |
Â
if ( $old_status !== $new_status ) {
|
Â
|
|
533 |
Â
$this->plugin->alerts->Trigger(
|
534 |
Â
8010,
|
535 |
+
array( 'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
536 |
Â
);
|
537 |
Â
}
|
538 |
Â
|
648 |
Â
public function EventOptions( $whitelist = null ) {
|
649 |
Â
// Filter global arrays for security.
|
650 |
Â
$post_array = filter_input_array( INPUT_POST );
|
Â
|
|
651 |
Â
|
652 |
Â
if ( isset( $post_array['option_page'] ) && 'reading' === $post_array['option_page'] ) {
|
653 |
Â
$old_status = (int) get_option( 'blog_public', 1 );
|
654 |
Â
$new_status = isset( $post_array['blog_public'] ) ? 0 : 1;
|
655 |
+
|
656 |
Â
if ( $old_status !== $new_status ) {
|
657 |
Â
$this->plugin->alerts->Trigger(
|
658 |
Â
6008,
|
659 |
+
array( 'EventType' => ( 0 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
660 |
Â
);
|
661 |
Â
}
|
662 |
Â
}
|
664 |
Â
if ( isset( $post_array['option_page'] ) && 'discussion' === $post_array['option_page'] ) {
|
665 |
Â
$old_status = get_option( 'default_comment_status', 'closed' );
|
666 |
Â
$new_status = isset( $post_array['default_comment_status'] ) ? 'open' : 'closed';
|
667 |
+
|
668 |
Â
if ( $old_status !== $new_status ) {
|
669 |
Â
$this->plugin->alerts->Trigger(
|
670 |
Â
6009,
|
671 |
+
array( 'EventType' => ( 'open' === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
672 |
Â
);
|
673 |
Â
}
|
674 |
Â
|
675 |
Â
$old_status = (int) get_option( 'require_name_email', 0 );
|
676 |
Â
$new_status = isset( $post_array['require_name_email'] ) ? 1 : 0;
|
677 |
+
|
678 |
Â
if ( $old_status !== $new_status ) {
|
679 |
Â
$this->plugin->alerts->Trigger(
|
680 |
Â
6010,
|
681 |
+
array( 'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
682 |
Â
);
|
683 |
Â
}
|
684 |
Â
|
685 |
Â
$old_status = (int) get_option( 'comment_registration', 0 );
|
686 |
Â
$new_status = isset( $post_array['comment_registration'] ) ? 1 : 0;
|
687 |
+
|
688 |
Â
if ( $old_status !== $new_status ) {
|
689 |
Â
$this->plugin->alerts->Trigger(
|
690 |
Â
6011,
|
691 |
+
array( 'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
692 |
Â
);
|
693 |
Â
}
|
694 |
Â
|
695 |
Â
$old_status = (int) get_option( 'close_comments_for_old_posts', 0 );
|
696 |
Â
$new_status = isset( $post_array['close_comments_for_old_posts'] ) ? 1 : 0;
|
697 |
+
|
698 |
Â
if ( $old_status !== $new_status ) {
|
699 |
Â
$value = isset( $post_array['close_comments_days_old'] ) ? $post_array['close_comments_days_old'] : 0;
|
700 |
Â
$this->plugin->alerts->Trigger(
|
701 |
Â
6012,
|
702 |
Â
array(
|
703 |
+
'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled',
|
704 |
+
'Value' => $value,
|
705 |
Â
)
|
706 |
Â
);
|
707 |
Â
}
|
720 |
Â
|
721 |
Â
$old_status = (int) get_option( 'comment_moderation', 0 );
|
722 |
Â
$new_status = isset( $post_array['comment_moderation'] ) ? 1 : 0;
|
723 |
+
|
724 |
Â
if ( $old_status !== $new_status ) {
|
725 |
Â
$this->plugin->alerts->Trigger(
|
726 |
Â
6014,
|
727 |
+
array( 'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
728 |
Â
);
|
729 |
Â
}
|
730 |
Â
|
731 |
Â
$old_status = (int) get_option( 'comment_whitelist', 0 );
|
732 |
Â
$new_status = isset( $post_array['comment_whitelist'] ) ? 1 : 0;
|
733 |
+
|
734 |
Â
if ( $old_status !== $new_status ) {
|
735 |
Â
$this->plugin->alerts->Trigger(
|
736 |
Â
6015,
|
737 |
+
array( 'EventType' => ( 1 === $new_status ) ? 'enabled' : 'disabled' )
|
Â
|
|
Â
|
|
738 |
Â
);
|
739 |
Â
}
|
740 |
Â
|
classes/Sensors/UserProfile.php
CHANGED
@@ -91,6 +91,9 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
91 |
Â
'OldRole' => $old_bbpress_roles,
|
92 |
Â
'NewRole' => $new_bbpress_roles,
|
93 |
Â
'UserChanger' => $current_user->user_login,
|
Â
|
|
Â
|
|
Â
|
|
94 |
Â
)
|
95 |
Â
);
|
96 |
Â
}
|
@@ -105,16 +108,20 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
105 |
Â
array(
|
106 |
Â
'TargetUserID' => $user_id,
|
107 |
Â
'TargetUserData' => (object) array(
|
108 |
-
'Username'
|
109 |
-
'Roles'
|
Â
|
|
Â
|
|
110 |
Â
),
|
Â
|
|
111 |
Â
)
|
112 |
Â
);
|
113 |
Â
}
|
114 |
Â
|
115 |
Â
// Alert if user email is changed.
|
116 |
Â
if ( $old_userdata->user_email !== $new_userdata->user_email ) {
|
117 |
-
$event
|
Â
|
|
118 |
Â
$this->plugin->alerts->Trigger(
|
119 |
Â
$event,
|
120 |
Â
array(
|
@@ -122,18 +129,27 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
122 |
Â
'TargetUsername' => $new_userdata->user_login,
|
123 |
Â
'OldEmail' => $old_userdata->user_email,
|
124 |
Â
'NewEmail' => $new_userdata->user_email,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
125 |
Â
)
|
126 |
Â
);
|
127 |
Â
}
|
128 |
Â
|
129 |
Â
// Alert if display name is changed.
|
130 |
Â
if ( $old_userdata->display_name !== $new_userdata->display_name ) {
|
Â
|
|
131 |
Â
$this->plugin->alerts->Trigger(
|
132 |
Â
4020,
|
133 |
Â
array(
|
134 |
Â
'TargetUsername' => $new_userdata->user_login,
|
135 |
Â
'old_displayname' => $old_userdata->display_name,
|
136 |
Â
'new_displayname' => $new_userdata->display_name,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
137 |
Â
)
|
138 |
Â
);
|
139 |
Â
}
|
@@ -183,6 +199,9 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
183 |
Â
'TargetUsername' => $user->user_login,
|
184 |
Â
'OldRole' => $old_roles,
|
185 |
Â
'NewRole' => $new_roles,
|
Â
|
|
Â
|
|
Â
|
|
186 |
Â
'multisite_text' => $this->plugin->IsMultisite() ? get_current_blog_id() : false,
|
187 |
Â
),
|
188 |
Â
array( $this, 'MustNotContainUserChanges' )
|
@@ -226,11 +245,16 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
226 |
Â
$current_user = wp_get_current_user();
|
227 |
Â
$updated = isset( $_GET['updated'] ); // @codingStandardsIgnoreLine
|
228 |
Â
if ( $current_user && ( $user->ID !== $current_user->ID ) && ! $updated ) {
|
Â
|
|
229 |
Â
$this->plugin->alerts->Trigger(
|
230 |
Â
4014,
|
231 |
Â
array(
|
232 |
Â
'UserChanger' => $current_user->user_login,
|
233 |
Â
'TargetUsername' => $user->user_login,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
234 |
Â
)
|
235 |
Â
);
|
236 |
Â
}
|
@@ -260,6 +284,10 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
260 |
Â
array(
|
261 |
Â
'TargetUserID' => $user_id,
|
262 |
Â
'TargetUsername' => $user->user_login,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
263 |
Â
)
|
264 |
Â
);
|
265 |
Â
}
|
@@ -282,6 +310,10 @@ class WSAL_Sensors_UserProfile extends WSAL_AbstractSensor {
|
|
282 |
Â
array(
|
283 |
Â
'TargetUserID' => $user_id,
|
284 |
Â
'TargetUsername' => $user->user_login,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
285 |
Â
)
|
286 |
Â
);
|
287 |
Â
}
|
91 |
Â
'OldRole' => $old_bbpress_roles,
|
92 |
Â
'NewRole' => $new_bbpress_roles,
|
93 |
Â
'UserChanger' => $current_user->user_login,
|
94 |
+
'FirstName' => $new_userdata->user_firstname,
|
95 |
+
'LastName' => $new_userdata->user_lastname,
|
96 |
+
'EditUserLink' => add_query_arg( 'user_id', $new_userdata->ID, admin_url( 'user-edit.php' ) )
|
97 |
Â
)
|
98 |
Â
);
|
99 |
Â
}
|
108 |
Â
array(
|
109 |
Â
'TargetUserID' => $user_id,
|
110 |
Â
'TargetUserData' => (object) array(
|
111 |
+
'Username' => $new_userdata->user_login,
|
112 |
+
'Roles' => $user_roles,
|
113 |
+
'FirstName' => $new_userdata->user_firstname,
|
114 |
+
'LastName' => $new_userdata->user_lastname,
|
115 |
Â
),
|
116 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
117 |
Â
)
|
118 |
Â
);
|
119 |
Â
}
|
120 |
Â
|
121 |
Â
// Alert if user email is changed.
|
122 |
Â
if ( $old_userdata->user_email !== $new_userdata->user_email ) {
|
123 |
+
$event = get_current_user_id() === $user_id ? 4005 : 4006;
|
124 |
+
$user_roles = implode( ', ', array_map( array( $this, 'filter_role_names' ), $new_userdata->roles ) );
|
125 |
Â
$this->plugin->alerts->Trigger(
|
126 |
Â
$event,
|
127 |
Â
array(
|
129 |
Â
'TargetUsername' => $new_userdata->user_login,
|
130 |
Â
'OldEmail' => $old_userdata->user_email,
|
131 |
Â
'NewEmail' => $new_userdata->user_email,
|
132 |
+
'Roles' => $user_roles,
|
133 |
+
'FirstName' => $new_userdata->user_firstname,
|
134 |
+
'LastName' => $new_userdata->user_lastname,
|
135 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
136 |
Â
)
|
137 |
Â
);
|
138 |
Â
}
|
139 |
Â
|
140 |
Â
// Alert if display name is changed.
|
141 |
Â
if ( $old_userdata->display_name !== $new_userdata->display_name ) {
|
142 |
+
$user_roles = implode( ', ', array_map( array( $this, 'filter_role_names' ), $new_userdata->roles ) );
|
143 |
Â
$this->plugin->alerts->Trigger(
|
144 |
Â
4020,
|
145 |
Â
array(
|
146 |
Â
'TargetUsername' => $new_userdata->user_login,
|
147 |
Â
'old_displayname' => $old_userdata->display_name,
|
148 |
Â
'new_displayname' => $new_userdata->display_name,
|
149 |
+
'Roles' => $user_roles,
|
150 |
+
'FirstName' => $new_userdata->user_firstname,
|
151 |
+
'LastName' => $new_userdata->user_lastname,
|
152 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
153 |
Â
)
|
154 |
Â
);
|
155 |
Â
}
|
199 |
Â
'TargetUsername' => $user->user_login,
|
200 |
Â
'OldRole' => $old_roles,
|
201 |
Â
'NewRole' => $new_roles,
|
202 |
+
'FirstName' => $user->user_firstname,
|
203 |
+
'LastName' => $user->user_lastname,
|
204 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
205 |
Â
'multisite_text' => $this->plugin->IsMultisite() ? get_current_blog_id() : false,
|
206 |
Â
),
|
207 |
Â
array( $this, 'MustNotContainUserChanges' )
|
245 |
Â
$current_user = wp_get_current_user();
|
246 |
Â
$updated = isset( $_GET['updated'] ); // @codingStandardsIgnoreLine
|
247 |
Â
if ( $current_user && ( $user->ID !== $current_user->ID ) && ! $updated ) {
|
248 |
+
$user_roles = implode( ', ', array_map( array( $this, 'filter_role_names' ), $user->roles ) );
|
249 |
Â
$this->plugin->alerts->Trigger(
|
250 |
Â
4014,
|
251 |
Â
array(
|
252 |
Â
'UserChanger' => $current_user->user_login,
|
253 |
Â
'TargetUsername' => $user->user_login,
|
254 |
+
'FirstName' => $user->user_firstname,
|
255 |
+
'LastName' => $user->user_lastname,
|
256 |
+
'Roles' => $user_roles,
|
257 |
+
'EditUserLink' => add_query_arg( 'user_id', $user->ID, admin_url( 'user-edit.php' ) ),
|
258 |
Â
)
|
259 |
Â
);
|
260 |
Â
}
|
284 |
Â
array(
|
285 |
Â
'TargetUserID' => $user_id,
|
286 |
Â
'TargetUsername' => $user->user_login,
|
287 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
288 |
+
'FirstName' => $user->user_firstname,
|
289 |
+
'LastName' => $user->user_lastname,
|
290 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
291 |
Â
)
|
292 |
Â
);
|
293 |
Â
}
|
310 |
Â
array(
|
311 |
Â
'TargetUserID' => $user_id,
|
312 |
Â
'TargetUsername' => $user->user_login,
|
313 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
314 |
+
'FirstName' => $user->user_firstname,
|
315 |
+
'LastName' => $user->user_lastname,
|
316 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
317 |
Â
)
|
318 |
Â
);
|
319 |
Â
}
|
classes/Sensors/Widgets.php
CHANGED
@@ -59,7 +59,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
59 |
Â
|
60 |
Â
if ( isset( $post_array ) && ! empty( $post_array['sidebars'] ) ) {
|
61 |
Â
$current_sidebars = $post_array['sidebars'];
|
62 |
-
$sidebars
|
63 |
Â
foreach ( $current_sidebars as $key => $val ) {
|
64 |
Â
$sb = array();
|
65 |
Â
if ( ! empty( $val ) ) {
|
@@ -74,8 +74,8 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
74 |
Â
$sidebars[ $key ] = $sb;
|
75 |
Â
}
|
76 |
Â
$current_sidebars = $sidebars;
|
77 |
-
$db_sidebars
|
78 |
-
$widget_name
|
79 |
Â
foreach ( $current_sidebars as $sidebar_name => $values ) {
|
80 |
Â
if ( is_array( $values ) && ! empty( $values ) && isset( $db_sidebars[ $sidebar_name ] ) ) {
|
81 |
Â
foreach ( $values as $widget_name ) {
|
@@ -103,8 +103,8 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
103 |
Â
// we will then check for this variable in the EventWidgetPostMove() event.
|
104 |
Â
$this->_widget_move_data = array(
|
105 |
Â
'widget' => $widget_name,
|
106 |
-
'from'
|
107 |
-
'to'
|
108 |
Â
);
|
109 |
Â
return;
|
110 |
Â
}
|
@@ -128,7 +128,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
128 |
Â
$post_array = filter_input_array( INPUT_POST );
|
129 |
Â
|
130 |
Â
// #!-- generates the event 2071
|
131 |
-
if ( isset( $post_array['action'] ) && (
|
132 |
Â
if ( isset( $post_array['sidebars'] ) ) {
|
133 |
Â
// Get the sidebars from $post_array.
|
134 |
Â
$request_sidebars = array();
|
@@ -166,10 +166,10 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
166 |
Â
}
|
167 |
Â
$this->plugin->alerts->Trigger(
|
168 |
Â
2071, array(
|
169 |
-
'WidgetName'
|
170 |
Â
'OldPosition' => $i + 1,
|
171 |
Â
'NewPosition' => $index + 1,
|
172 |
-
'Sidebar'
|
173 |
Â
)
|
174 |
Â
);
|
175 |
Â
}
|
@@ -181,22 +181,24 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
181 |
Â
}
|
182 |
Â
// #!--
|
183 |
Â
if ( $this->_widget_move_data ) {
|
184 |
-
$widget_name
|
185 |
Â
$from_sidebar = $this->_widget_move_data['from'];
|
186 |
-
$to_sidebar
|
187 |
Â
|
188 |
Â
global $wp_registered_sidebars;
|
189 |
Â
|
190 |
Â
if ( preg_match( '/^sidebar-/', $from_sidebar ) ) {
|
191 |
Â
$from_sidebar = isset( $wp_registered_sidebars[ $from_sidebar ] )
|
192 |
Â
? $wp_registered_sidebars[ $from_sidebar ]['name']
|
193 |
-
: $from_sidebar
|
Â
|
|
194 |
Â
}
|
195 |
Â
|
196 |
Â
if ( preg_match( '/^sidebar-/', $to_sidebar ) ) {
|
197 |
Â
$to_sidebar = isset( $wp_registered_sidebars[ $to_sidebar ] )
|
198 |
Â
? $wp_registered_sidebars[ $to_sidebar ]['name']
|
199 |
-
: $to_sidebar
|
Â
|
|
200 |
Â
}
|
201 |
Â
|
202 |
Â
$this->plugin->alerts->Trigger(
|
@@ -225,7 +227,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
225 |
Â
}
|
226 |
Â
|
227 |
Â
global $wp_registered_sidebars;
|
228 |
-
$can_check_sidebar = (
|
229 |
Â
|
230 |
Â
switch ( true ) {
|
231 |
Â
// Added widget.
|
@@ -237,7 +239,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
237 |
Â
$this->plugin->alerts->Trigger(
|
238 |
Â
2042, array(
|
239 |
Â
'WidgetName' => $post_array['id_base'],
|
240 |
-
'Sidebar'
|
241 |
Â
)
|
242 |
Â
);
|
243 |
Â
break;
|
@@ -250,7 +252,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
250 |
Â
$this->plugin->alerts->Trigger(
|
251 |
Â
2044, array(
|
252 |
Â
'WidgetName' => $post_array['id_base'],
|
253 |
-
'Sidebar'
|
254 |
Â
)
|
255 |
Â
);
|
256 |
Â
break;
|
@@ -267,7 +269,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
267 |
Â
}
|
268 |
Â
|
269 |
Â
$widget_name = $post_array['id_base'];
|
270 |
-
$sidebar
|
271 |
Â
$widget_data = isset( $post_array[ "widget-$widget_name" ][ $widget_id ] )
|
272 |
Â
? $post_array[ "widget-$widget_name" ][ $widget_id ]
|
273 |
Â
: null;
|
@@ -289,7 +291,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
289 |
Â
}
|
290 |
Â
|
291 |
Â
// Compare - checks for any changes inside widgets.
|
292 |
-
$diff
|
293 |
Â
$count = count( $diff );
|
294 |
Â
if ( $count > 0 ) {
|
295 |
Â
if ( $can_check_sidebar && preg_match( '/^sidebar-/', $sidebar ) ) {
|
@@ -298,7 +300,7 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
|
|
298 |
Â
$this->plugin->alerts->Trigger(
|
299 |
Â
2043, array(
|
300 |
Â
'WidgetName' => $widget_name,
|
301 |
-
'Sidebar'
|
302 |
Â
)
|
303 |
Â
);
|
304 |
Â
}
|
59 |
Â
|
60 |
Â
if ( isset( $post_array ) && ! empty( $post_array['sidebars'] ) ) {
|
61 |
Â
$current_sidebars = $post_array['sidebars'];
|
62 |
+
$sidebars = array();
|
63 |
Â
foreach ( $current_sidebars as $key => $val ) {
|
64 |
Â
$sb = array();
|
65 |
Â
if ( ! empty( $val ) ) {
|
74 |
Â
$sidebars[ $key ] = $sb;
|
75 |
Â
}
|
76 |
Â
$current_sidebars = $sidebars;
|
77 |
+
$db_sidebars = get_option( 'sidebars_widgets' );
|
78 |
+
$widget_name = $from_sidebar = $to_sidebar = '';
|
79 |
Â
foreach ( $current_sidebars as $sidebar_name => $values ) {
|
80 |
Â
if ( is_array( $values ) && ! empty( $values ) && isset( $db_sidebars[ $sidebar_name ] ) ) {
|
81 |
Â
foreach ( $values as $widget_name ) {
|
103 |
Â
// we will then check for this variable in the EventWidgetPostMove() event.
|
104 |
Â
$this->_widget_move_data = array(
|
105 |
Â
'widget' => $widget_name,
|
106 |
+
'from' => $from_sidebar,
|
107 |
+
'to' => $to_sidebar,
|
108 |
Â
);
|
109 |
Â
return;
|
110 |
Â
}
|
128 |
Â
$post_array = filter_input_array( INPUT_POST );
|
129 |
Â
|
130 |
Â
// #!-- generates the event 2071
|
131 |
+
if ( isset( $post_array['action'] ) && ('widgets-order' == $post_array['action']) ) {
|
132 |
Â
if ( isset( $post_array['sidebars'] ) ) {
|
133 |
Â
// Get the sidebars from $post_array.
|
134 |
Â
$request_sidebars = array();
|
166 |
Â
}
|
167 |
Â
$this->plugin->alerts->Trigger(
|
168 |
Â
2071, array(
|
169 |
+
'WidgetName' => $widget_name,
|
170 |
Â
'OldPosition' => $i + 1,
|
171 |
Â
'NewPosition' => $index + 1,
|
172 |
+
'Sidebar' => $sn,
|
173 |
Â
)
|
174 |
Â
);
|
175 |
Â
}
|
181 |
Â
}
|
182 |
Â
// #!--
|
183 |
Â
if ( $this->_widget_move_data ) {
|
184 |
+
$widget_name = $this->_widget_move_data['widget'];
|
185 |
Â
$from_sidebar = $this->_widget_move_data['from'];
|
186 |
+
$to_sidebar = $this->_widget_move_data['to'];
|
187 |
Â
|
188 |
Â
global $wp_registered_sidebars;
|
189 |
Â
|
190 |
Â
if ( preg_match( '/^sidebar-/', $from_sidebar ) ) {
|
191 |
Â
$from_sidebar = isset( $wp_registered_sidebars[ $from_sidebar ] )
|
192 |
Â
? $wp_registered_sidebars[ $from_sidebar ]['name']
|
193 |
+
: $from_sidebar
|
194 |
+
;
|
195 |
Â
}
|
196 |
Â
|
197 |
Â
if ( preg_match( '/^sidebar-/', $to_sidebar ) ) {
|
198 |
Â
$to_sidebar = isset( $wp_registered_sidebars[ $to_sidebar ] )
|
199 |
Â
? $wp_registered_sidebars[ $to_sidebar ]['name']
|
200 |
+
: $to_sidebar
|
201 |
+
;
|
202 |
Â
}
|
203 |
Â
|
204 |
Â
$this->plugin->alerts->Trigger(
|
227 |
Â
}
|
228 |
Â
|
229 |
Â
global $wp_registered_sidebars;
|
230 |
+
$can_check_sidebar = (empty( $wp_registered_sidebars ) ? false : true);
|
231 |
Â
|
232 |
Â
switch ( true ) {
|
233 |
Â
// Added widget.
|
239 |
Â
$this->plugin->alerts->Trigger(
|
240 |
Â
2042, array(
|
241 |
Â
'WidgetName' => $post_array['id_base'],
|
242 |
+
'Sidebar' => $sidebar,
|
243 |
Â
)
|
244 |
Â
);
|
245 |
Â
break;
|
252 |
Â
$this->plugin->alerts->Trigger(
|
253 |
Â
2044, array(
|
254 |
Â
'WidgetName' => $post_array['id_base'],
|
255 |
+
'Sidebar' => $sidebar,
|
256 |
Â
)
|
257 |
Â
);
|
258 |
Â
break;
|
269 |
Â
}
|
270 |
Â
|
271 |
Â
$widget_name = $post_array['id_base'];
|
272 |
+
$sidebar = isset( $post_array['sidebar'] ) ? $post_array['sidebar'] : null;
|
273 |
Â
$widget_data = isset( $post_array[ "widget-$widget_name" ][ $widget_id ] )
|
274 |
Â
? $post_array[ "widget-$widget_name" ][ $widget_id ]
|
275 |
Â
: null;
|
291 |
Â
}
|
292 |
Â
|
293 |
Â
// Compare - checks for any changes inside widgets.
|
294 |
+
$diff = array_diff_assoc( $widget_data, $widget_db_data[ $widget_id ] );
|
295 |
Â
$count = count( $diff );
|
296 |
Â
if ( $count > 0 ) {
|
297 |
Â
if ( $can_check_sidebar && preg_match( '/^sidebar-/', $sidebar ) ) {
|
300 |
Â
$this->plugin->alerts->Trigger(
|
301 |
Â
2043, array(
|
302 |
Â
'WidgetName' => $widget_name,
|
303 |
+
'Sidebar' => $sidebar,
|
304 |
Â
)
|
305 |
Â
);
|
306 |
Â
}
|
classes/Sensors/WooCommerce.php
CHANGED
@@ -312,11 +312,14 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
312 |
Â
if ( empty( $coupon ) || ! $coupon instanceof WP_Post ) {
|
313 |
Â
return array();
|
314 |
Â
}
|
Â
|
|
Â
|
|
315 |
Â
return array(
|
316 |
-
'CouponID'
|
317 |
-
'CouponName'
|
318 |
-
'CouponStatus'
|
319 |
-
'CouponExcerpt'
|
Â
|
|
320 |
Â
);
|
321 |
Â
}
|
322 |
Â
|
@@ -341,6 +344,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
341 |
Â
array(
|
342 |
Â
'ProductTitle' => $new_post->post_title,
|
343 |
Â
'ProductUrl' => get_post_permalink( $new_post->ID ),
|
Â
|
|
Â
|
|
344 |
Â
$editor_link['name'] => $editor_link['value'],
|
345 |
Â
)
|
346 |
Â
);
|
@@ -350,6 +355,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
350 |
Â
9000,
|
351 |
Â
array(
|
352 |
Â
'ProductTitle' => $new_post->post_title,
|
Â
|
|
Â
|
|
353 |
Â
$editor_link['name'] => $editor_link['value'],
|
354 |
Â
)
|
355 |
Â
);
|
@@ -374,8 +381,9 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
374 |
Â
$this->plugin->alerts->Trigger(
|
375 |
Â
9002,
|
376 |
Â
array(
|
377 |
-
'CategoryName'
|
378 |
-
'Slug'
|
Â
|
|
379 |
Â
)
|
380 |
Â
);
|
381 |
Â
}
|
@@ -405,6 +413,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
405 |
Â
array(
|
406 |
Â
'ProductTitle' => $newpost->post_title,
|
407 |
Â
'ProductStatus' => $newpost->post_status,
|
Â
|
|
408 |
Â
'OldCategories' => $old_cats ? $old_cats : 'no categories',
|
409 |
Â
'NewCategories' => $new_cats ? $new_cats : 'no categories',
|
410 |
Â
$editor_link['name'] => $editor_link['value'],
|
@@ -433,6 +442,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
433 |
Â
$this->plugin->alerts->Trigger(
|
434 |
Â
9004,
|
435 |
Â
array(
|
Â
|
|
436 |
Â
'ProductTitle' => $oldpost->post_title,
|
437 |
Â
'ProductStatus' => $oldpost->post_status,
|
438 |
Â
'OldDescription' => $oldpost->post_excerpt,
|
@@ -442,7 +452,9 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
442 |
Â
);
|
443 |
Â
return 1;
|
444 |
Â
} elseif ( 'shop_coupon' === $newpost->post_type ) {
|
445 |
-
$coupon_data
|
Â
|
|
Â
|
|
446 |
Â
$this->plugin->alerts->Trigger( 9069, $coupon_data );
|
447 |
Â
return 1;
|
448 |
Â
}
|
@@ -466,6 +478,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
466 |
Â
$this->plugin->alerts->Trigger(
|
467 |
Â
9005,
|
468 |
Â
array(
|
Â
|
|
469 |
Â
'ProductTitle' => $oldpost->post_title,
|
470 |
Â
'ProductStatus' => $oldpost->post_status,
|
471 |
Â
$editor_link['name'] => $editor_link['value'],
|
@@ -490,6 +503,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
490 |
Â
$this->plugin->alerts->Trigger(
|
491 |
Â
9006,
|
492 |
Â
array(
|
Â
|
|
493 |
Â
'ProductTitle' => $post->post_title,
|
494 |
Â
'ProductStatus' => $post->post_status,
|
495 |
Â
'OldUrl' => $old_link,
|
@@ -518,6 +532,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
518 |
Â
$this->plugin->alerts->Trigger(
|
519 |
Â
9007,
|
520 |
Â
array(
|
Â
|
|
521 |
Â
'ProductTitle' => $post->post_title,
|
522 |
Â
'ProductStatus' => $post->post_status,
|
523 |
Â
'OldType' => $old_type,
|
@@ -550,6 +565,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
550 |
Â
$this->plugin->alerts->Trigger(
|
551 |
Â
9008,
|
552 |
Â
array(
|
Â
|
|
553 |
Â
'ProductTitle' => $oldpost->post_title,
|
554 |
Â
'ProductStatus' => $oldpost->post_status,
|
555 |
Â
'OldDate' => $oldpost->post_date,
|
@@ -598,6 +614,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
598 |
Â
$this->plugin->alerts->Trigger(
|
599 |
Â
9009,
|
600 |
Â
array(
|
Â
|
|
601 |
Â
'ProductTitle' => $oldpost->post_title,
|
602 |
Â
'ProductStatus' => $oldpost->post_status,
|
603 |
Â
'OldVisibility' => $old_visibility,
|
@@ -681,6 +698,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
681 |
Â
$this->plugin->alerts->Trigger(
|
682 |
Â
9042,
|
683 |
Â
array(
|
Â
|
|
684 |
Â
'ProductTitle' => $post->post_title,
|
685 |
Â
'ProductStatus' => $post->post_status,
|
686 |
Â
'OldVisibility' => isset( $wc_visibilities[ $old_visibility ] ) ? $wc_visibilities[ $old_visibility ] : false,
|
@@ -710,9 +728,10 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
710 |
Â
$this->plugin->alerts->Trigger(
|
711 |
Â
9043,
|
712 |
Â
array(
|
Â
|
|
713 |
Â
'ProductTitle' => $post->post_title,
|
714 |
Â
'ProductStatus' => $post->post_status,
|
715 |
-
'
|
716 |
Â
$editor_link['name'] => $editor_link['value'],
|
717 |
Â
)
|
718 |
Â
);
|
@@ -745,6 +764,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
745 |
Â
$this->plugin->alerts->Trigger(
|
746 |
Â
9044,
|
747 |
Â
array(
|
Â
|
|
748 |
Â
'ProductTitle' => $oldpost->post_title,
|
749 |
Â
'ProductStatus' => $oldpost->post_status,
|
750 |
Â
'OldStatus' => $old_backorder,
|
@@ -773,6 +793,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
773 |
Â
// Compute the difference.
|
774 |
Â
$added_upsells = array();
|
775 |
Â
$removed_upsells = array();
|
Â
|
|
776 |
Â
if ( is_array( $new_upsell_ids ) && is_array( $old_upsell_ids ) ) {
|
777 |
Â
$added_upsells = array_diff( $new_upsell_ids, $old_upsell_ids );
|
778 |
Â
$removed_upsells = array_diff( $old_upsell_ids, $new_upsell_ids );
|
@@ -791,7 +812,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
791 |
Â
$this->plugin->alerts->Trigger(
|
792 |
Â
9045,
|
793 |
Â
array(
|
794 |
-
'
|
Â
|
|
795 |
Â
'ProductTitle' => $oldpost->post_title,
|
796 |
Â
'ProductStatus' => $oldpost->post_status,
|
797 |
Â
'UpsellTitle' => $upsell_title,
|
@@ -810,7 +832,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
810 |
Â
$this->plugin->alerts->Trigger(
|
811 |
Â
9045,
|
812 |
Â
array(
|
813 |
-
'
|
Â
|
|
814 |
Â
'ProductTitle' => $oldpost->post_title,
|
815 |
Â
'ProductStatus' => $oldpost->post_status,
|
816 |
Â
'UpsellTitle' => $upsell_title,
|
@@ -858,7 +881,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
858 |
Â
$this->plugin->alerts->Trigger(
|
859 |
Â
9046,
|
860 |
Â
array(
|
861 |
-
'
|
Â
|
|
862 |
Â
'ProductTitle' => $oldpost->post_title,
|
863 |
Â
'ProductStatus' => $oldpost->post_status,
|
864 |
Â
'CrossSellTitle' => $cross_sell_title,
|
@@ -877,7 +901,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
877 |
Â
$this->plugin->alerts->Trigger(
|
878 |
Â
9046,
|
879 |
Â
array(
|
880 |
-
'
|
Â
|
|
881 |
Â
'ProductTitle' => $oldpost->post_title,
|
882 |
Â
'ProductStatus' => $oldpost->post_status,
|
883 |
Â
'CrossSellTitle' => $cross_sell_title,
|
@@ -917,6 +942,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
917 |
Â
$this->plugin->alerts->Trigger(
|
918 |
Â
9010,
|
919 |
Â
array(
|
Â
|
|
920 |
Â
'ProductTitle' => $oldpost->post_title,
|
921 |
Â
'ProductStatus' => $oldpost->post_status,
|
922 |
Â
'ProductUrl' => get_post_permalink( $oldpost->ID ),
|
@@ -940,6 +966,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
940 |
Â
$this->plugin->alerts->Trigger(
|
941 |
Â
9012,
|
942 |
Â
array(
|
Â
|
|
943 |
Â
'ProductTitle' => $post->post_title,
|
944 |
Â
'ProductStatus' => $post->post_status,
|
945 |
Â
'ProductUrl' => get_post_permalink( $post->ID ),
|
@@ -969,7 +996,13 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
969 |
Â
}
|
970 |
Â
|
971 |
Â
if ( 'product' === $post->post_type ) {
|
972 |
-
$this->plugin->alerts->Trigger(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
973 |
Â
} elseif ( 'shop_order' === $post->post_type ) {
|
974 |
Â
$this->plugin->alerts->Trigger( 9039, array( 'OrderTitle' => $this->get_order_title( $post_id ) ) );
|
975 |
Â
}
|
@@ -991,7 +1024,9 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
991 |
Â
$this->plugin->alerts->Trigger(
|
992 |
Â
9014,
|
993 |
Â
array(
|
Â
|
|
994 |
Â
'ProductTitle' => $post->post_title,
|
Â
|
|
995 |
Â
$editor_link['name'] => $editor_link['value'],
|
996 |
Â
)
|
997 |
Â
);
|
@@ -1069,6 +1104,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1069 |
Â
$this->plugin->alerts->Trigger(
|
1070 |
Â
9015,
|
1071 |
Â
array(
|
Â
|
|
1072 |
Â
'ProductTitle' => $oldpost->post_title,
|
1073 |
Â
'OldStatus' => $oldpost->post_status,
|
1074 |
Â
'NewStatus' => $newpost->post_status,
|
@@ -1076,18 +1112,17 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1076 |
Â
)
|
1077 |
Â
);
|
1078 |
Â
return 1;
|
1079 |
-
} elseif ( 'shop_coupon' === $newpost->post_type ) {
|
1080 |
-
// Get coupon data.
|
1081 |
-
$coupon_data = $this->get_coupon_event_data( $newpost );
|
1082 |
-
|
1083 |
-
// Set status event data.
|
1084 |
-
$coupon_data['OldStatus'] = $oldpost->post_status;
|
1085 |
-
$coupon_data['NewStatus'] = $newpost->post_status;
|
1086 |
-
|
1087 |
-
// Log the event.
|
1088 |
-
$this->plugin->alerts->Trigger( 9070, $coupon_data );
|
1089 |
-
return 1;
|
1090 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1091 |
Â
}
|
1092 |
Â
}
|
1093 |
Â
return 0;
|
@@ -1130,6 +1165,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1130 |
Â
$this->plugin->alerts->Trigger(
|
1131 |
Â
9016,
|
1132 |
Â
array(
|
Â
|
|
1133 |
Â
'ProductTitle' => $post->post_title,
|
1134 |
Â
'ProductStatus' => $post->post_status,
|
1135 |
Â
'PriceType' => $type,
|
@@ -1160,6 +1196,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1160 |
Â
$this->plugin->alerts->Trigger(
|
1161 |
Â
9017,
|
1162 |
Â
array(
|
Â
|
|
1163 |
Â
'ProductTitle' => $oldpost->post_title,
|
1164 |
Â
'ProductStatus' => $oldpost->post_status,
|
1165 |
Â
'OldSku' => ! empty( $old_sku ) ? $old_sku : 0,
|
@@ -1191,6 +1228,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1191 |
Â
$this->plugin->alerts->Trigger(
|
1192 |
Â
9018,
|
1193 |
Â
array(
|
Â
|
|
1194 |
Â
'ProductTitle' => $oldpost->post_title,
|
1195 |
Â
'ProductStatus' => $oldpost->post_status,
|
1196 |
Â
'OldStatus' => $this->GetStockStatusName( $old_status ),
|
@@ -1222,6 +1260,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1222 |
Â
$this->plugin->alerts->Trigger(
|
1223 |
Â
9019,
|
1224 |
Â
array(
|
Â
|
|
1225 |
Â
'ProductTitle' => $oldpost->post_title,
|
1226 |
Â
'ProductStatus' => $oldpost->post_status,
|
1227 |
Â
'OldValue' => ! empty( $old_value ) ? $old_value : 0,
|
@@ -1284,10 +1323,11 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1284 |
Â
$this->plugin->alerts->Trigger(
|
1285 |
Â
9020,
|
1286 |
Â
array(
|
Â
|
|
1287 |
Â
'ProductTitle' => $oldpost->post_title,
|
1288 |
Â
'ProductStatus' => $oldpost->post_status,
|
1289 |
-
'OldType' =>
|
1290 |
-
'NewType' =>
|
1291 |
Â
$editor_link['name'] => $editor_link['value'],
|
1292 |
Â
)
|
1293 |
Â
);
|
@@ -1299,6 +1339,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1299 |
Â
$this->plugin->alerts->Trigger(
|
1300 |
Â
9020,
|
1301 |
Â
array(
|
Â
|
|
1302 |
Â
'ProductTitle' => $oldpost->post_title,
|
1303 |
Â
'ProductStatus' => $oldpost->post_status,
|
1304 |
Â
'OldType' => ( 'yes' === $old_download ) ? 'Downloadable' : 'Non-Downloadable',
|
@@ -1311,28 +1352,6 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1311 |
Â
return $result;
|
1312 |
Â
}
|
1313 |
Â
|
1314 |
-
/**
|
1315 |
-
* Group the Type changes in one function.
|
1316 |
-
*
|
1317 |
-
* @deprecated 3.3.1
|
1318 |
-
*
|
1319 |
-
* @param object $oldpost - Old product object.
|
1320 |
-
* @param string $type - Product Type.
|
1321 |
-
* @return int
|
1322 |
-
*/
|
1323 |
-
private function EventType( $oldpost, $type ) {
|
1324 |
-
$editor_link = $this->GetEditorLink( $oldpost );
|
1325 |
-
$this->plugin->alerts->Trigger(
|
1326 |
-
9020,
|
1327 |
-
array(
|
1328 |
-
'ProductTitle' => $oldpost->post_title,
|
1329 |
-
'Type' => $type,
|
1330 |
-
$editor_link['name'] => $editor_link['value'],
|
1331 |
-
)
|
1332 |
-
);
|
1333 |
-
return 1;
|
1334 |
-
}
|
1335 |
-
|
1336 |
Â
/**
|
1337 |
Â
* Trigger events 9021
|
1338 |
Â
*
|
@@ -1353,6 +1372,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1353 |
Â
$this->plugin->alerts->Trigger(
|
1354 |
Â
9021,
|
1355 |
Â
array(
|
Â
|
|
1356 |
Â
'ProductTitle' => $oldpost->post_title,
|
1357 |
Â
'ProductStatus' => $oldpost->post_status,
|
1358 |
Â
'OldWeight' => ! empty( $old_weight ) ? $old_weight . ' ' . $weight_unit : 0,
|
@@ -1439,6 +1459,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1439 |
Â
$this->plugin->alerts->Trigger(
|
1440 |
Â
9022,
|
1441 |
Â
array(
|
Â
|
|
1442 |
Â
'ProductTitle' => $oldpost->post_title,
|
1443 |
Â
'ProductStatus' => $oldpost->post_status,
|
1444 |
Â
'DimensionType' => $type,
|
@@ -1494,6 +1515,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1494 |
Â
$this->plugin->alerts->Trigger(
|
1495 |
Â
9023,
|
1496 |
Â
array(
|
Â
|
|
1497 |
Â
'ProductTitle' => $oldpost->post_title,
|
1498 |
Â
'ProductStatus' => $oldpost->post_status,
|
1499 |
Â
'FileName' => $new_file_names[ $key ],
|
@@ -1516,6 +1538,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1516 |
Â
$this->plugin->alerts->Trigger(
|
1517 |
Â
9024,
|
1518 |
Â
array(
|
Â
|
|
1519 |
Â
'ProductTitle' => $oldpost->post_title,
|
1520 |
Â
'ProductStatus' => $oldpost->post_status,
|
1521 |
Â
'FileName' => $old_file_names[ $key ],
|
@@ -1535,6 +1558,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1535 |
Â
$this->plugin->alerts->Trigger(
|
1536 |
Â
9025,
|
1537 |
Â
array(
|
Â
|
|
1538 |
Â
'ProductTitle' => $oldpost->post_title,
|
1539 |
Â
'ProductStatus' => $oldpost->post_status,
|
1540 |
Â
'OldName' => $old_file_names[ $key ],
|
@@ -1552,6 +1576,7 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1552 |
Â
$this->plugin->alerts->Trigger(
|
1553 |
Â
9026,
|
1554 |
Â
array(
|
Â
|
|
1555 |
Â
'ProductTitle' => $oldpost->post_title,
|
1556 |
Â
'ProductStatus' => $oldpost->post_status,
|
1557 |
Â
'FileName' => $new_file_names[ $key ],
|
@@ -1609,8 +1634,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1609 |
Â
$old_enable_guest_checkout = $this->GetConfig( 'enable_guest_checkout' );
|
1610 |
Â
$new_enable_guest_checkout = isset( $_POST['woocommerce_enable_guest_checkout'] ) ? 'yes' : 'no';
|
1611 |
Â
if ( $old_enable_guest_checkout !== $new_enable_guest_checkout ) {
|
1612 |
-
$status = 'yes' === $new_enable_guest_checkout ? '
|
1613 |
-
$this->plugin->alerts->Trigger( 9033, array( '
|
1614 |
Â
}
|
1615 |
Â
} elseif ( isset( $_GET['tab'] ) && 'checkout' === sanitize_text_field( wp_unslash( $_GET['tab'] ) ) ) {
|
1616 |
Â
// Get payment method.
|
@@ -1628,8 +1653,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1628 |
Â
|
1629 |
Â
// Check status change.
|
1630 |
Â
if ( $old_cash_on_delivery !== $new_cash_on_delivery ) {
|
1631 |
-
$status =
|
1632 |
-
$this->plugin->alerts->Trigger( 9034, array( '
|
1633 |
Â
$status_change = true;
|
1634 |
Â
}
|
1635 |
Â
} elseif ( $gateway ) {
|
@@ -1640,25 +1665,15 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1640 |
Â
|
1641 |
Â
// Check status change.
|
1642 |
Â
if ( $old_gateway_status !== $new_gateway_status ) {
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
} else {
|
1653 |
-
// Gateway disabled.
|
1654 |
-
$this->plugin->alerts->Trigger(
|
1655 |
-
9075,
|
1656 |
-
array(
|
1657 |
-
'GatewayID' => $gateway,
|
1658 |
-
'GatewayName' => isset( $gateway_settings['title'] ) ? $gateway_settings['title'] : false,
|
1659 |
-
)
|
1660 |
-
);
|
1661 |
-
}
|
1662 |
Â
$status_change = true;
|
1663 |
Â
}
|
1664 |
Â
}
|
@@ -1741,15 +1756,15 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1741 |
Â
$old_tax_round = $this->GetConfig( 'tax_round_at_subtotal' );
|
1742 |
Â
$new_tax_round = isset( $_POST['woocommerce_tax_round_at_subtotal'] ) ? 'yes' : 'no';
|
1743 |
Â
if ( $old_tax_round !== $new_tax_round ) {
|
1744 |
-
$this->plugin->alerts->Trigger( 9081, array( '
|
1745 |
Â
}
|
1746 |
Â
} elseif ( empty( $_GET['tab'] ) || 'general' === sanitize_text_field( wp_unslash( $_GET['tab'] ) ) ) {
|
1747 |
Â
// "Enable Coupon" event.
|
1748 |
Â
$old_enable_coupons = $this->GetConfig( 'enable_coupons' );
|
1749 |
Â
$new_enable_coupons = isset( $_POST['woocommerce_enable_coupons'] ) ? 'yes' : 'no';
|
1750 |
Â
if ( $old_enable_coupons !== $new_enable_coupons ) {
|
1751 |
-
$status = 'yes' === $new_enable_coupons ? '
|
1752 |
-
$this->plugin->alerts->Trigger( 9032, array( '
|
1753 |
Â
}
|
1754 |
Â
|
1755 |
Â
if ( isset( $_POST['woocommerce_default_country'] ) ) {
|
@@ -1770,8 +1785,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1770 |
Â
$old_calc_taxes = $this->GetConfig( 'calc_taxes' );
|
1771 |
Â
$new_calc_taxes = isset( $_POST['woocommerce_calc_taxes'] ) ? 'yes' : 'no';
|
1772 |
Â
if ( $old_calc_taxes !== $new_calc_taxes ) {
|
1773 |
-
$status =
|
1774 |
-
$this->plugin->alerts->Trigger( 9030, array( '
|
1775 |
Â
}
|
1776 |
Â
}
|
1777 |
Â
|
@@ -1811,32 +1826,18 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1811 |
Â
$enabled = $gateway->get_option( 'enabled', 'no' );
|
1812 |
Â
|
1813 |
Â
if ( 'cod' === $gateway->id ) {
|
1814 |
-
|
1815 |
-
|
1816 |
-
} else {
|
1817 |
-
$status = 'Disabled';
|
1818 |
-
}
|
1819 |
-
$this->plugin->alerts->Trigger( 9034, array( 'Status' => $status ) );
|
1820 |
Â
} else {
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
} else {
|
1831 |
-
// Gateway disabled.
|
1832 |
-
$this->plugin->alerts->Trigger(
|
1833 |
-
9075,
|
1834 |
-
array(
|
1835 |
-
'GatewayID' => $gateway->id,
|
1836 |
-
'GatewayName' => $gateway->title,
|
1837 |
-
)
|
1838 |
-
);
|
1839 |
-
}
|
1840 |
Â
}
|
1841 |
Â
}
|
1842 |
Â
}
|
@@ -1855,8 +1856,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1855 |
Â
$this->plugin->alerts->Trigger(
|
1856 |
Â
9082,
|
1857 |
Â
array(
|
1858 |
-
'
|
1859 |
-
'ShippingZoneName'
|
1860 |
Â
)
|
1861 |
Â
);
|
1862 |
Â
} elseif ( ! empty( $_POST['changes'] ) ) {
|
@@ -1865,9 +1866,9 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1865 |
Â
$this->plugin->alerts->Trigger(
|
1866 |
Â
9082,
|
1867 |
Â
array(
|
1868 |
-
'ShippingZoneID'
|
1869 |
-
'
|
1870 |
-
'ShippingZoneName'
|
1871 |
Â
)
|
1872 |
Â
);
|
1873 |
Â
}
|
@@ -1886,9 +1887,9 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
1886 |
Â
$this->plugin->alerts->Trigger(
|
1887 |
Â
9082,
|
1888 |
Â
array(
|
1889 |
-
'ShippingZoneID'
|
1890 |
-
'
|
1891 |
-
'ShippingZoneName'
|
1892 |
Â
)
|
1893 |
Â
);
|
1894 |
Â
}
|
@@ -2017,6 +2018,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
2017 |
Â
// Meta value key.
|
2018 |
Â
if ( 'shop_order' === $post->post_type ) {
|
2019 |
Â
$name = 'EditorLinkOrder';
|
Â
|
|
Â
|
|
2020 |
Â
} else {
|
2021 |
Â
$name = 'EditorLinkProduct';
|
2022 |
Â
}
|
@@ -2561,8 +2564,8 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
2561 |
Â
|
2562 |
Â
// Check the attribute archives.
|
2563 |
Â
if ( isset( $data['attribute_public'] ) && isset( $this->old_attr_data->has_archives ) && $data['attribute_public'] !== (int) $this->old_attr_data->has_archives ) {
|
2564 |
-
$attr_event
|
2565 |
-
$attr_event['
|
2566 |
Â
$this->plugin->alerts->Trigger( 9062, $attr_event );
|
2567 |
Â
}
|
2568 |
Â
}
|
@@ -3046,10 +3049,11 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3046 |
Â
$this->plugin->alerts->Trigger(
|
3047 |
Â
9053,
|
3048 |
Â
array(
|
3049 |
-
'CategoryID'
|
3050 |
-
'CategoryName'
|
3051 |
-
'OldSlug'
|
3052 |
-
'NewSlug'
|
Â
|
|
3053 |
Â
)
|
3054 |
Â
);
|
3055 |
Â
}
|
@@ -3059,12 +3063,14 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3059 |
Â
$this->plugin->alerts->Trigger(
|
3060 |
Â
9054,
|
3061 |
Â
array(
|
3062 |
-
'CategoryID'
|
3063 |
-
'CategoryName'
|
3064 |
-
'
|
3065 |
-
'
|
3066 |
-
'
|
3067 |
-
'
|
Â
|
|
Â
|
|
3068 |
Â
)
|
3069 |
Â
);
|
3070 |
Â
}
|
@@ -3074,10 +3080,12 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3074 |
Â
$this->plugin->alerts->Trigger(
|
3075 |
Â
9056,
|
3076 |
Â
array(
|
3077 |
-
'CategoryID'
|
3078 |
-
'CategoryName'
|
3079 |
-
'OldName'
|
3080 |
-
'NewName'
|
Â
|
|
Â
|
|
3081 |
Â
)
|
3082 |
Â
);
|
3083 |
Â
}
|
@@ -3114,8 +3122,10 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3114 |
Â
array(
|
3115 |
Â
'CategoryID' => $object_id,
|
3116 |
Â
'CategoryName' => $term->name,
|
Â
|
|
3117 |
Â
'OldDisplayType' => $old_display,
|
3118 |
Â
'NewDisplayType' => $meta_value,
|
Â
|
|
3119 |
Â
)
|
3120 |
Â
);
|
3121 |
Â
}
|
@@ -3316,19 +3326,21 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3316 |
Â
}
|
3317 |
Â
|
3318 |
Â
if ( $event_id ) {
|
3319 |
-
$user
|
3320 |
-
$old_address_key = 'Old' . $this->get_key_for_event( $meta_key );
|
3321 |
-
$new_address_key = 'New' . $this->get_key_for_event( $meta_key );
|
3322 |
-
$address_field
|
3323 |
-
$address_field
|
3324 |
Â
|
3325 |
Â
$this->plugin->alerts->Trigger(
|
3326 |
Â
$event_id,
|
3327 |
Â
array(
|
3328 |
Â
'TargetUsername' => $user ? $user->user_login : false,
|
3329 |
Â
'AddressField' => $address_field,
|
3330 |
-
|
3331 |
-
|
Â
|
|
Â
|
|
3332 |
Â
)
|
3333 |
Â
);
|
3334 |
Â
}
|
@@ -3390,4 +3402,20 @@ class WSAL_Sensors_WooCommerce extends WSAL_AbstractSensor {
|
|
3390 |
Â
$this->CheckStockQuantityChange( $old_product_post, $old_product->get_stock_quantity(), $product->get_stock_quantity() );
|
3391 |
Â
}
|
3392 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3393 |
Â
}
|
312 |
Â
if ( empty( $coupon ) || ! $coupon instanceof WP_Post ) {
|
313 |
Â
return array();
|
314 |
Â
}
|
315 |
+
|
316 |
+
$editor_link = $this->GetEditorLink( $coupon );
|
317 |
Â
return array(
|
318 |
+
'CouponID' => $coupon->ID,
|
319 |
+
'CouponName' => $coupon->post_title,
|
320 |
+
'CouponStatus' => $coupon->post_status,
|
321 |
+
'CouponExcerpt' => $coupon->post_excerpt,
|
322 |
+
$editor_link['name'] => $editor_link['value'],
|
323 |
Â
);
|
324 |
Â
}
|
325 |
Â
|
344 |
Â
array(
|
345 |
Â
'ProductTitle' => $new_post->post_title,
|
346 |
Â
'ProductUrl' => get_post_permalink( $new_post->ID ),
|
347 |
+
'PostID' => $new_post->ID,
|
348 |
+
'ProductStatus' => $new_post->post_status,
|
349 |
Â
$editor_link['name'] => $editor_link['value'],
|
350 |
Â
)
|
351 |
Â
);
|
355 |
Â
9000,
|
356 |
Â
array(
|
357 |
Â
'ProductTitle' => $new_post->post_title,
|
358 |
+
'PostID' => $new_post->ID,
|
359 |
+
'ProductStatus' => $new_post->post_status,
|
360 |
Â
$editor_link['name'] => $editor_link['value'],
|
361 |
Â
)
|
362 |
Â
);
|
381 |
Â
$this->plugin->alerts->Trigger(
|
382 |
Â
9002,
|
383 |
Â
array(
|
384 |
+
'CategoryName' => $term->name,
|
385 |
+
'Slug' => $term->slug,
|
386 |
+
'ProductCatLink' => $this->get_taxonomy_edit_link( $term_id ),
|
387 |
Â
)
|
388 |
Â
);
|
389 |
Â
}
|
413 |
Â
array(
|
414 |
Â
'ProductTitle' => $newpost->post_title,
|
415 |
Â
'ProductStatus' => $newpost->post_status,
|
416 |
+
'PostID' => $newpost->ID,
|
417 |
Â
'OldCategories' => $old_cats ? $old_cats : 'no categories',
|
418 |
Â
'NewCategories' => $new_cats ? $new_cats : 'no categories',
|
419 |
Â
$editor_link['name'] => $editor_link['value'],
|
442 |
Â
$this->plugin->alerts->Trigger(
|
443 |
Â
9004,
|
444 |
Â
array(
|
445 |
+
'PostID' => $oldpost->ID,
|
446 |
Â
'ProductTitle' => $oldpost->post_title,
|
447 |
Â
'ProductStatus' => $oldpost->post_status,
|
448 |
Â
'OldDescription' => $oldpost->post_excerpt,
|
452 |
Â
);
|
453 |
Â
return 1;
|
454 |
Â
} elseif ( 'shop_coupon' === $newpost->post_type ) {
|
455 |
+
$coupon_data = $this->get_coupon_event_data( $newpost );
|
456 |
+
$coupon_data['OldDescription'] = $oldpost->post_excerpt;
|
457 |
+
$coupon_data['NewDescription'] = $newpost->post_excerpt;
|
458 |
Â
$this->plugin->alerts->Trigger( 9069, $coupon_data );
|
459 |
Â
return 1;
|
460 |
Â
}
|
478 |
Â
$this->plugin->alerts->Trigger(
|
479 |
Â
9005,
|
480 |
Â
array(
|
481 |
+
'PostID' => $oldpost->ID,
|
482 |
Â
'ProductTitle' => $oldpost->post_title,
|
483 |
Â
'ProductStatus' => $oldpost->post_status,
|
484 |
Â
$editor_link['name'] => $editor_link['value'],
|
503 |
Â
$this->plugin->alerts->Trigger(
|
504 |
Â
9006,
|
505 |
Â
array(
|
506 |
+
'PostID' => $post->ID,
|
507 |
Â
'ProductTitle' => $post->post_title,
|
508 |
Â
'ProductStatus' => $post->post_status,
|
509 |
Â
'OldUrl' => $old_link,
|
532 |
Â
$this->plugin->alerts->Trigger(
|
533 |
Â
9007,
|
534 |
Â
array(
|
535 |
+
'PostID' => $post->ID,
|
536 |
Â
'ProductTitle' => $post->post_title,
|
537 |
Â
'ProductStatus' => $post->post_status,
|
538 |
Â
'OldType' => $old_type,
|
565 |
Â
$this->plugin->alerts->Trigger(
|
566 |
Â
9008,
|
567 |
Â
array(
|
568 |
+
'PostID' => $oldpost->ID,
|
569 |
Â
'ProductTitle' => $oldpost->post_title,
|
570 |
Â
'ProductStatus' => $oldpost->post_status,
|
571 |
Â
'OldDate' => $oldpost->post_date,
|
614 |
Â
$this->plugin->alerts->Trigger(
|
615 |
Â
9009,
|
616 |
Â
array(
|
617 |
+
'PostID' => $oldpost->ID,
|
618 |
Â
'ProductTitle' => $oldpost->post_title,
|
619 |
Â
'ProductStatus' => $oldpost->post_status,
|
620 |
Â
'OldVisibility' => $old_visibility,
|
698 |
Â
$this->plugin->alerts->Trigger(
|
699 |
Â
9042,
|
700 |
Â
array(
|
701 |
+
'PostID' => $post->ID,
|
702 |
Â
'ProductTitle' => $post->post_title,
|
703 |
Â
'ProductStatus' => $post->post_status,
|
704 |
Â
'OldVisibility' => isset( $wc_visibilities[ $old_visibility ] ) ? $wc_visibilities[ $old_visibility ] : false,
|
728 |
Â
$this->plugin->alerts->Trigger(
|
729 |
Â
9043,
|
730 |
Â
array(
|
731 |
+
'PostID' => $post->ID,
|
732 |
Â
'ProductTitle' => $post->post_title,
|
733 |
Â
'ProductStatus' => $post->post_status,
|
734 |
+
'EventType' => $new_featured ? 'enabled' : 'disabled',
|
735 |
Â
$editor_link['name'] => $editor_link['value'],
|
736 |
Â
)
|
737 |
Â
);
|
764 |
Â
$this->plugin->alerts->Trigger(
|
765 |
Â
9044,
|
766 |
Â
array(
|
767 |
+
'PostID' => $oldpost->ID,
|
768 |
Â
'ProductTitle' => $oldpost->post_title,
|
769 |
Â
'ProductStatus' => $oldpost->post_status,
|
770 |
Â
'OldStatus' => $old_backorder,
|
793 |
Â
// Compute the difference.
|
794 |
Â
$added_upsells = array();
|
795 |
Â
$removed_upsells = array();
|
796 |
+
|
797 |
Â
if ( is_array( $new_upsell_ids ) && is_array( $old_upsell_ids ) ) {
|
798 |
Â
$added_upsells = array_diff( $new_upsell_ids, $old_upsell_ids );
|
799 |
Â
$removed_upsells = array_diff( $old_upsell_ids, $new_upsell_ids );
|
812 |
Â
$this->plugin->alerts->Trigger(
|
813 |
Â
9045,
|
814 |
Â
array(
|
815 |
+
'EventType' => 'added',
|
816 |
+
'PostID' => $oldpost->ID,
|
817 |
Â
'ProductTitle' => $oldpost->post_title,
|
818 |
Â
'ProductStatus' => $oldpost->post_status,
|
819 |
Â
'UpsellTitle' => $upsell_title,
|
832 |
Â
$this->plugin->alerts->Trigger(
|
833 |
Â
9045,
|
834 |
Â
array(
|
835 |
+
'EventType' => 'removed',
|
836 |
+
'PostID' => $oldpost->ID,
|
837 |
Â
'ProductTitle' => $oldpost->post_title,
|
838 |
Â
'ProductStatus' => $oldpost->post_status,
|
839 |
Â
'UpsellTitle' => $upsell_title,
|
881 |
Â
$this->plugin->alerts->Trigger(
|
882 |
Â
9046,
|
883 |
Â
array(
|
884 |
+
'EventType' => 'added',
|
885 |
+
'PostID' => $oldpost->ID,
|
886 |
Â
'ProductTitle' => $oldpost->post_title,
|
887 |
Â
'ProductStatus' => $oldpost->post_status,
|
888 |
Â
'CrossSellTitle' => $cross_sell_title,
|
901 |
Â
$this->plugin->alerts->Trigger(
|
902 |
Â
9046,
|
903 |
Â
array(
|
904 |
+
'EventType' => 'removed',
|
905 |
+
'PostID' => $oldpost->ID,
|
906 |
Â
'ProductTitle' => $oldpost->post_title,
|
907 |
Â
'ProductStatus' => $oldpost->post_status,
|
908 |
Â
'CrossSellTitle' => $cross_sell_title,
|
942 |
Â
$this->plugin->alerts->Trigger(
|
943 |
Â
9010,
|
944 |
Â
array(
|
945 |
+
'PostID' => $oldpost->ID,
|
946 |
Â
'ProductTitle' => $oldpost->post_title,
|
947 |
Â
'ProductStatus' => $oldpost->post_status,
|
948 |
Â
'ProductUrl' => get_post_permalink( $oldpost->ID ),
|
966 |
Â
$this->plugin->alerts->Trigger(
|
967 |
Â
9012,
|
968 |
Â
array(
|
969 |
+
'PostID' => $post->ID,
|
970 |
Â
'ProductTitle' => $post->post_title,
|
971 |
Â
'ProductStatus' => $post->post_status,
|
972 |
Â
'ProductUrl' => get_post_permalink( $post->ID ),
|
996 |
Â
}
|
997 |
Â
|
998 |
Â
if ( 'product' === $post->post_type ) {
|
999 |
+
$this->plugin->alerts->Trigger(
|
1000 |
+
9013,
|
1001 |
+
array(
|
1002 |
+
'PostID' => $post->ID,
|
1003 |
+
'ProductTitle' => $post->post_title,
|
1004 |
+
)
|
1005 |
+
);
|
1006 |
Â
} elseif ( 'shop_order' === $post->post_type ) {
|
1007 |
Â
$this->plugin->alerts->Trigger( 9039, array( 'OrderTitle' => $this->get_order_title( $post_id ) ) );
|
1008 |
Â
}
|
1024 |
Â
$this->plugin->alerts->Trigger(
|
1025 |
Â
9014,
|
1026 |
Â
array(
|
1027 |
+
'PostID' => $post->ID,
|
1028 |
Â
'ProductTitle' => $post->post_title,
|
1029 |
+
'ProductStatus' => $post->post_status,
|
1030 |
Â
$editor_link['name'] => $editor_link['value'],
|
1031 |
Â
)
|
1032 |
Â
);
|
1104 |
Â
$this->plugin->alerts->Trigger(
|
1105 |
Â
9015,
|
1106 |
Â
array(
|
1107 |
+
'PostID' => $oldpost->ID,
|
1108 |
Â
'ProductTitle' => $oldpost->post_title,
|
1109 |
Â
'OldStatus' => $oldpost->post_status,
|
1110 |
Â
'NewStatus' => $newpost->post_status,
|
1112 |
Â
)
|
1113 |
Â
);
|
1114 |
Â
return 1;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1115 |
Â
}
|
1116 |
+
// elseif ( 'shop_coupon' === $newpost->post_type ) {
|
1117 |
+
// Get coupon data.
|
1118 |
+
// $coupon_data = $this->get_coupon_event_data( $newpost );
|
1119 |
+
// Set status event data.
|
1120 |
+
// $coupon_data['OldStatus'] = $oldpost->post_status;
|
1121 |
+
// $coupon_data['NewStatus'] = $newpost->post_status;
|
1122 |
+
// Log the event.
|
1123 |
+
// $this->plugin->alerts->Trigger( 9070, $coupon_data );
|
1124 |
+
// return 1;
|
1125 |
+
// }
|
1126 |
Â
}
|
1127 |
Â
}
|
1128 |
Â
return 0;
|
1165 |
Â
$this->plugin->alerts->Trigger(
|
1166 |
Â
9016,
|
1167 |
Â
array(
|
1168 |
+
'PostID' => $post->ID,
|
1169 |
Â
'ProductTitle' => $post->post_title,
|
1170 |
Â
'ProductStatus' => $post->post_status,
|
1171 |
Â
'PriceType' => $type,
|
1196 |
Â
$this->plugin->alerts->Trigger(
|
1197 |
Â
9017,
|
1198 |
Â
array(
|
1199 |
+
'PostID' => $oldpost->ID,
|
1200 |
Â
'ProductTitle' => $oldpost->post_title,
|
1201 |
Â
'ProductStatus' => $oldpost->post_status,
|
1202 |
Â
'OldSku' => ! empty( $old_sku ) ? $old_sku : 0,
|
1228 |
Â
$this->plugin->alerts->Trigger(
|
1229 |
Â
9018,
|
1230 |
Â
array(
|
1231 |
+
'PostID' => $oldpost->ID,
|
1232 |
Â
'ProductTitle' => $oldpost->post_title,
|
1233 |
Â
'ProductStatus' => $oldpost->post_status,
|
1234 |
Â
'OldStatus' => $this->GetStockStatusName( $old_status ),
|
1260 |
Â
$this->plugin->alerts->Trigger(
|
1261 |
Â
9019,
|
1262 |
Â
array(
|
1263 |
+
'PostID' => $oldpost->ID,
|
1264 |
Â
'ProductTitle' => $oldpost->post_title,
|
1265 |
Â
'ProductStatus' => $oldpost->post_status,
|
1266 |
Â
'OldValue' => ! empty( $old_value ) ? $old_value : 0,
|
1323 |
Â
$this->plugin->alerts->Trigger(
|
1324 |
Â
9020,
|
1325 |
Â
array(
|
1326 |
+
'PostID' => $oldpost->ID,
|
1327 |
Â
'ProductTitle' => $oldpost->post_title,
|
1328 |
Â
'ProductStatus' => $oldpost->post_status,
|
1329 |
+
'OldType' => 'yes' === $old_virtual ? 'Virtual' : 'Non-Virtual',
|
1330 |
+
'NewType' => 'yes' === $new_virtual ? 'Virtual' : 'Non-Virtual',
|
1331 |
Â
$editor_link['name'] => $editor_link['value'],
|
1332 |
Â
)
|
1333 |
Â
);
|
1339 |
Â
$this->plugin->alerts->Trigger(
|
1340 |
Â
9020,
|
1341 |
Â
array(
|
1342 |
+
'PostID' => $oldpost->ID,
|
1343 |
Â
'ProductTitle' => $oldpost->post_title,
|
1344 |
Â
'ProductStatus' => $oldpost->post_status,
|
1345 |
Â
'OldType' => ( 'yes' === $old_download ) ? 'Downloadable' : 'Non-Downloadable',
|
1352 |
Â
return $result;
|
1353 |
Â
}
|
1354 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1355 |
Â
/**
|
1356 |
Â
* Trigger events 9021
|
1357 |
Â
*
|
1372 |
Â
$this->plugin->alerts->Trigger(
|
1373 |
Â
9021,
|
1374 |
Â
array(
|
1375 |
+
'PostID' => $oldpost->ID,
|
1376 |
Â
'ProductTitle' => $oldpost->post_title,
|
1377 |
Â
'ProductStatus' => $oldpost->post_status,
|
1378 |
Â
'OldWeight' => ! empty( $old_weight ) ? $old_weight . ' ' . $weight_unit : 0,
|
1459 |
Â
$this->plugin->alerts->Trigger(
|
1460 |
Â
9022,
|
1461 |
Â
array(
|
1462 |
+
'PostID' => $oldpost->ID,
|
1463 |
Â
'ProductTitle' => $oldpost->post_title,
|
1464 |
Â
'ProductStatus' => $oldpost->post_status,
|
1465 |
Â
'DimensionType' => $type,
|
1515 |
Â
$this->plugin->alerts->Trigger(
|
1516 |
Â
9023,
|
1517 |
Â
array(
|
1518 |
+
'PostID' => $oldpost->ID,
|
1519 |
Â
'ProductTitle' => $oldpost->post_title,
|
1520 |
Â
'ProductStatus' => $oldpost->post_status,
|
1521 |
Â
'FileName' => $new_file_names[ $key ],
|
1538 |
Â
$this->plugin->alerts->Trigger(
|
1539 |
Â
9024,
|
1540 |
Â
array(
|
1541 |
+
'PostID' => $oldpost->ID,
|
1542 |
Â
'ProductTitle' => $oldpost->post_title,
|
1543 |
Â
'ProductStatus' => $oldpost->post_status,
|
1544 |
Â
'FileName' => $old_file_names[ $key ],
|
1558 |
Â
$this->plugin->alerts->Trigger(
|
1559 |
Â
9025,
|
1560 |
Â
array(
|
1561 |
+
'PostID' => $oldpost->ID,
|
1562 |
Â
'ProductTitle' => $oldpost->post_title,
|
1563 |
Â
'ProductStatus' => $oldpost->post_status,
|
1564 |
Â
'OldName' => $old_file_names[ $key ],
|
1576 |
Â
$this->plugin->alerts->Trigger(
|
1577 |
Â
9026,
|
1578 |
Â
array(
|
1579 |
+
'PostID' => $oldpost->ID,
|
1580 |
Â
'ProductTitle' => $oldpost->post_title,
|
1581 |
Â
'ProductStatus' => $oldpost->post_status,
|
1582 |
Â
'FileName' => $new_file_names[ $key ],
|
1634 |
Â
$old_enable_guest_checkout = $this->GetConfig( 'enable_guest_checkout' );
|
1635 |
Â
$new_enable_guest_checkout = isset( $_POST['woocommerce_enable_guest_checkout'] ) ? 'yes' : 'no';
|
1636 |
Â
if ( $old_enable_guest_checkout !== $new_enable_guest_checkout ) {
|
1637 |
+
$status = 'yes' === $new_enable_guest_checkout ? 'enabled' : 'disabled';
|
1638 |
+
$this->plugin->alerts->Trigger( 9033, array( 'EventType' => $status ) );
|
1639 |
Â
}
|
1640 |
Â
} elseif ( isset( $_GET['tab'] ) && 'checkout' === sanitize_text_field( wp_unslash( $_GET['tab'] ) ) ) {
|
1641 |
Â
// Get payment method.
|
1653 |
Â
|
1654 |
Â
// Check status change.
|
1655 |
Â
if ( $old_cash_on_delivery !== $new_cash_on_delivery ) {
|
1656 |
+
$status = 'yes' === $new_cash_on_delivery ? 'enabled' : 'disabled';
|
1657 |
+
$this->plugin->alerts->Trigger( 9034, array( 'EventType' => $status ) );
|
1658 |
Â
$status_change = true;
|
1659 |
Â
}
|
1660 |
Â
} elseif ( $gateway ) {
|
1665 |
Â
|
1666 |
Â
// Check status change.
|
1667 |
Â
if ( $old_gateway_status !== $new_gateway_status ) {
|
1668 |
+
// Gateway enabled.
|
1669 |
+
$this->plugin->alerts->Trigger(
|
1670 |
+
9074,
|
1671 |
+
array(
|
1672 |
+
'GatewayID' => $gateway,
|
1673 |
+
'GatewayName' => isset( $gateway_settings['title'] ) ? $gateway_settings['title'] : false,
|
1674 |
+
'EventType' => 'yes' === $new_gateway_status ? 'enabled' : 'disabled',
|
1675 |
+
)
|
1676 |
+
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1677 |
Â
$status_change = true;
|
1678 |
Â
}
|
1679 |
Â
}
|
1756 |
Â
$old_tax_round = $this->GetConfig( 'tax_round_at_subtotal' );
|
1757 |
Â
$new_tax_round = isset( $_POST['woocommerce_tax_round_at_subtotal'] ) ? 'yes' : 'no';
|
1758 |
Â
if ( $old_tax_round !== $new_tax_round ) {
|
1759 |
+
$this->plugin->alerts->Trigger( 9081, array( 'EventType' => 'yes' === $new_tax_round ? 'enabled' : 'disabled' ) );
|
1760 |
Â
}
|
1761 |
Â
} elseif ( empty( $_GET['tab'] ) || 'general' === sanitize_text_field( wp_unslash( $_GET['tab'] ) ) ) {
|
1762 |
Â
// "Enable Coupon" event.
|
1763 |
Â
$old_enable_coupons = $this->GetConfig( 'enable_coupons' );
|
1764 |
Â
$new_enable_coupons = isset( $_POST['woocommerce_enable_coupons'] ) ? 'yes' : 'no';
|
1765 |
Â
if ( $old_enable_coupons !== $new_enable_coupons ) {
|
1766 |
+
$status = 'yes' === $new_enable_coupons ? 'enabled' : 'disabled';
|
1767 |
+
$this->plugin->alerts->Trigger( 9032, array( 'EventType' => $status ) );
|
1768 |
Â
}
|
1769 |
Â
|
1770 |
Â
if ( isset( $_POST['woocommerce_default_country'] ) ) {
|
1785 |
Â
$old_calc_taxes = $this->GetConfig( 'calc_taxes' );
|
1786 |
Â
$new_calc_taxes = isset( $_POST['woocommerce_calc_taxes'] ) ? 'yes' : 'no';
|
1787 |
Â
if ( $old_calc_taxes !== $new_calc_taxes ) {
|
1788 |
+
$status = 'yes' === $new_calc_taxes ? 'enabled' : 'disabled';
|
1789 |
+
$this->plugin->alerts->Trigger( 9030, array( 'EventType' => $status ) );
|
1790 |
Â
}
|
1791 |
Â
}
|
1792 |
Â
|
1826 |
Â
$enabled = $gateway->get_option( 'enabled', 'no' );
|
1827 |
Â
|
1828 |
Â
if ( 'cod' === $gateway->id ) {
|
1829 |
+
$status = ! wc_string_to_bool( $enabled ) ? 'enabled' : 'disabled';
|
1830 |
+
$this->plugin->alerts->Trigger( 9034, array( 'EventType' => $status ) );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1831 |
Â
} else {
|
1832 |
+
// Gateway enabled.
|
1833 |
+
$this->plugin->alerts->Trigger(
|
1834 |
+
9074,
|
1835 |
+
array(
|
1836 |
+
'GatewayID' => $gateway->id,
|
1837 |
+
'GatewayName' => $gateway->title,
|
1838 |
+
'EventType' => ! wc_string_to_bool( $enabled ) ? 'enabled' : 'disabled',
|
1839 |
+
)
|
1840 |
+
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1841 |
Â
}
|
1842 |
Â
}
|
1843 |
Â
}
|
1856 |
Â
$this->plugin->alerts->Trigger(
|
1857 |
Â
9082,
|
1858 |
Â
array(
|
1859 |
+
'EventType' => 'created',
|
1860 |
+
'ShippingZoneName' => $zone_name,
|
1861 |
Â
)
|
1862 |
Â
);
|
1863 |
Â
} elseif ( ! empty( $_POST['changes'] ) ) {
|
1866 |
Â
$this->plugin->alerts->Trigger(
|
1867 |
Â
9082,
|
1868 |
Â
array(
|
1869 |
+
'ShippingZoneID' => $zone_id,
|
1870 |
+
'EventType' => 'modified',
|
1871 |
+
'ShippingZoneName' => $zone_name ? $zone_name : $shipping_zone->get_zone_name(),
|
1872 |
Â
)
|
1873 |
Â
);
|
1874 |
Â
}
|
1887 |
Â
$this->plugin->alerts->Trigger(
|
1888 |
Â
9082,
|
1889 |
Â
array(
|
1890 |
+
'ShippingZoneID' => $zone['zone_id'],
|
1891 |
+
'EventType' => 'deleted',
|
1892 |
+
'ShippingZoneName' => $zone_obj->get_zone_name(),
|
1893 |
Â
)
|
1894 |
Â
);
|
1895 |
Â
}
|
2018 |
Â
// Meta value key.
|
2019 |
Â
if ( 'shop_order' === $post->post_type ) {
|
2020 |
Â
$name = 'EditorLinkOrder';
|
2021 |
+
} elseif ( 'shop_coupon' === $post->post_type ) {
|
2022 |
+
$name = 'EditorLinkCoupon';
|
2023 |
Â
} else {
|
2024 |
Â
$name = 'EditorLinkProduct';
|
2025 |
Â
}
|
2564 |
Â
|
2565 |
Â
// Check the attribute archives.
|
2566 |
Â
if ( isset( $data['attribute_public'] ) && isset( $this->old_attr_data->has_archives ) && $data['attribute_public'] !== (int) $this->old_attr_data->has_archives ) {
|
2567 |
+
$attr_event = $this->get_attribute_event_data( $id, $data );
|
2568 |
+
$attr_event['EventType'] = 1 === $data['attribute_public'] ? 'enabled' : 'disabled';
|
2569 |
Â
$this->plugin->alerts->Trigger( 9062, $attr_event );
|
2570 |
Â
}
|
2571 |
Â
}
|
3049 |
Â
$this->plugin->alerts->Trigger(
|
3050 |
Â
9053,
|
3051 |
Â
array(
|
3052 |
+
'CategoryID' => $term_id,
|
3053 |
+
'CategoryName' => $new_name,
|
3054 |
+
'OldSlug' => $old_slug,
|
3055 |
+
'NewSlug' => $new_slug,
|
3056 |
+
'ProductCatLink' => $this->get_taxonomy_edit_link( $term_id ),
|
3057 |
Â
)
|
3058 |
Â
);
|
3059 |
Â
}
|
3063 |
Â
$this->plugin->alerts->Trigger(
|
3064 |
Â
9054,
|
3065 |
Â
array(
|
3066 |
+
'CategoryID' => $term_id,
|
3067 |
+
'CategoryName' => $new_name,
|
3068 |
+
'CategorySlug' => $term->slug,
|
3069 |
+
'ProductCatLink' => $this->get_taxonomy_edit_link( $term_id ),
|
3070 |
+
'OldParentID' => isset( $old_parent_cat->term_id ) ? $old_parent_cat->term_id : false,
|
3071 |
+
'OldParentCat' => isset( $old_parent_cat->name ) ? $old_parent_cat->name : false,
|
3072 |
+
'NewParentID' => isset( $new_parent_cat->term_id ) ? $new_parent_cat->term_id : false,
|
3073 |
+
'NewParentCat' => isset( $new_parent_cat->name ) ? $new_parent_cat->name : false,
|
3074 |
Â
)
|
3075 |
Â
);
|
3076 |
Â
}
|
3080 |
Â
$this->plugin->alerts->Trigger(
|
3081 |
Â
9056,
|
3082 |
Â
array(
|
3083 |
+
'CategoryID' => $term_id,
|
3084 |
+
'CategoryName' => $new_name,
|
3085 |
+
'OldName' => $old_name,
|
3086 |
+
'NewName' => $new_name,
|
3087 |
+
'CategorySlug' => $term->slug,
|
3088 |
+
'ProductCatLink' => $this->get_taxonomy_edit_link( $term_id ),
|
3089 |
Â
)
|
3090 |
Â
);
|
3091 |
Â
}
|
3122 |
Â
array(
|
3123 |
Â
'CategoryID' => $object_id,
|
3124 |
Â
'CategoryName' => $term->name,
|
3125 |
+
'CategorySlug' => $term->slug,
|
3126 |
Â
'OldDisplayType' => $old_display,
|
3127 |
Â
'NewDisplayType' => $meta_value,
|
3128 |
+
'ProductCatLink' => $this->get_taxonomy_edit_link( $object_id ),
|
3129 |
Â
)
|
3130 |
Â
);
|
3131 |
Â
}
|
3326 |
Â
}
|
3327 |
Â
|
3328 |
Â
if ( $event_id ) {
|
3329 |
+
$user = get_user_by( 'ID', $user_id );
|
3330 |
+
// $old_address_key = 'Old' . $this->get_key_for_event( $meta_key );
|
3331 |
+
// $new_address_key = 'New' . $this->get_key_for_event( $meta_key );
|
3332 |
+
$address_field = str_replace( array( 'shipping_', 'billing_' ), '', $meta_key );
|
3333 |
+
$address_field = ucwords( str_replace( '_', ' ', $address_field ) );
|
3334 |
Â
|
3335 |
Â
$this->plugin->alerts->Trigger(
|
3336 |
Â
$event_id,
|
3337 |
Â
array(
|
3338 |
Â
'TargetUsername' => $user ? $user->user_login : false,
|
3339 |
Â
'AddressField' => $address_field,
|
3340 |
+
'OldValue' => $this->wc_user_meta[ $meta_id ]->value,
|
3341 |
+
'NewValue' => $meta_value,
|
3342 |
+
'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
|
3343 |
+
'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
|
3344 |
Â
)
|
3345 |
Â
);
|
3346 |
Â
}
|
3402 |
Â
$this->CheckStockQuantityChange( $old_product_post, $old_product->get_stock_quantity(), $product->get_stock_quantity() );
|
3403 |
Â
}
|
3404 |
Â
}
|
3405 |
+
|
3406 |
+
/**
|
3407 |
+
* Builds category link.
|
3408 |
+
*
|
3409 |
+
* @param integer $tag_id - Tag ID.
|
3410 |
+
* @param string $taxonomy - Taxonomy.
|
3411 |
+
* @return string|null - Link.
|
3412 |
+
*/
|
3413 |
+
private function get_taxonomy_edit_link( $tag_id, $taxonomy = 'product_cat' ) {
|
3414 |
+
$tag_args = array(
|
3415 |
+
'post_type' => 'product',
|
3416 |
+
'taxonomy' => $taxonomy,
|
3417 |
+
'tag_ID' => $tag_id,
|
3418 |
+
);
|
3419 |
+
return ! empty( $tag_id ) ? add_query_arg( $tag_args, admin_url( 'term.php' ) ) : null;
|
3420 |
+
}
|
3421 |
Â
}
|
classes/Sensors/YoastSEO.php
CHANGED
@@ -89,7 +89,7 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
89 |
Â
}
|
90 |
Â
|
91 |
Â
if ( isset( $post_array ) && isset( $post_array['post_ID'] )
|
92 |
-
&& ! ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE)
|
93 |
Â
&& ! ( isset( $post_array['action'] ) && 'autosave' === $post_array['action'] )
|
94 |
Â
) {
|
95 |
Â
$this->post_id = intval( $post_array['post_ID'] );
|
@@ -224,7 +224,8 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
224 |
Â
if ( $old_title !== $title ) {
|
225 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
226 |
Â
$this->plugin->alerts->Trigger(
|
227 |
-
8801,
|
Â
|
|
228 |
Â
'PostID' => $this->post->ID,
|
229 |
Â
'PostType' => $this->post->post_type,
|
230 |
Â
'PostTitle' => $this->post->post_title,
|
@@ -234,7 +235,6 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
234 |
Â
'OldSEOTitle' => $old_title,
|
235 |
Â
'NewSEOTitle' => $title,
|
236 |
Â
$editor_link['name'] => $editor_link['value'],
|
237 |
-
'ReportText' => $old_title . '|' . $title,
|
238 |
Â
)
|
239 |
Â
);
|
240 |
Â
}
|
@@ -259,7 +259,8 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
259 |
Â
if ( $old_desc !== $desc ) {
|
260 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
261 |
Â
$this->plugin->alerts->Trigger(
|
262 |
-
8802,
|
Â
|
|
263 |
Â
'PostID' => $this->post->ID,
|
264 |
Â
'PostType' => $this->post->post_type,
|
265 |
Â
'PostTitle' => $this->post->post_title,
|
@@ -269,7 +270,6 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
269 |
Â
'old_desc' => $old_desc,
|
270 |
Â
'new_desc' => $desc,
|
271 |
Â
$editor_link['name'] => $editor_link['value'],
|
272 |
-
'ReportText' => $old_desc . '|' . $desc,
|
273 |
Â
)
|
274 |
Â
);
|
275 |
Â
}
|
@@ -300,15 +300,16 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
300 |
Â
if ( $old_index !== $index ) {
|
301 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
302 |
Â
$this->plugin->alerts->Trigger(
|
303 |
-
8803,
|
304 |
-
|
305 |
-
'
|
306 |
-
'
|
307 |
-
'
|
308 |
-
'
|
309 |
-
'
|
310 |
-
'
|
311 |
-
'
|
Â
|
|
312 |
Â
$editor_link['name'] => $editor_link['value'],
|
313 |
Â
)
|
314 |
Â
);
|
@@ -325,29 +326,30 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
325 |
Â
$old_follow = (int) $this->get_post_seo_data( 'meta-robots-nofollow' );
|
326 |
Â
|
327 |
Â
if ( 1 === $old_follow ) {
|
328 |
-
$old_follow = '
|
329 |
Â
} else {
|
330 |
-
$old_follow = '
|
331 |
Â
}
|
332 |
Â
|
333 |
Â
if ( 1 === $follow ) {
|
334 |
-
$follow = '
|
335 |
Â
} else {
|
336 |
-
$follow = '
|
337 |
Â
}
|
338 |
Â
|
339 |
Â
// If setting is changed then log alert.
|
340 |
Â
if ( $old_follow !== $follow ) {
|
341 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
342 |
Â
$this->plugin->alerts->Trigger(
|
343 |
-
8804,
|
344 |
-
|
345 |
-
'
|
346 |
-
'
|
347 |
-
'
|
348 |
-
'
|
349 |
-
'
|
350 |
-
'
|
Â
|
|
351 |
Â
$editor_link['name'] => $editor_link['value'],
|
352 |
Â
)
|
353 |
Â
);
|
@@ -377,14 +379,16 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
377 |
Â
if ( $old_adv !== $advanced ) {
|
378 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
379 |
Â
$this->plugin->alerts->Trigger(
|
380 |
-
8805,
|
381 |
-
|
382 |
-
'
|
383 |
-
'
|
384 |
-
'
|
385 |
-
'
|
386 |
-
'
|
387 |
-
'
|
Â
|
|
Â
|
|
388 |
Â
$editor_link['name'] => $editor_link['value'],
|
389 |
Â
)
|
390 |
Â
);
|
@@ -409,17 +413,17 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
409 |
Â
if ( $old_url !== $canonical_url ) {
|
410 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
411 |
Â
$this->plugin->alerts->Trigger(
|
412 |
-
8806,
|
413 |
-
|
414 |
-
'
|
415 |
-
'
|
416 |
-
'
|
417 |
-
'
|
418 |
-
'
|
419 |
-
'
|
420 |
-
'
|
Â
|
|
421 |
Â
$editor_link['name'] => $editor_link['value'],
|
422 |
-
'ReportText' => '"' . $old_url . '"|"' . $canonical_url . '"',
|
423 |
Â
)
|
424 |
Â
);
|
425 |
Â
}
|
@@ -443,15 +447,16 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
443 |
Â
if ( $old_focus_keys !== $focus_keys ) {
|
444 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
445 |
Â
$this->plugin->alerts->Trigger(
|
446 |
-
8807,
|
447 |
-
|
448 |
-
'
|
449 |
-
'
|
450 |
-
'
|
451 |
-
'
|
452 |
-
'
|
453 |
-
'
|
454 |
-
'
|
Â
|
|
455 |
Â
$editor_link['name'] => $editor_link['value'],
|
456 |
Â
)
|
457 |
Â
);
|
@@ -466,26 +471,27 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
466 |
Â
protected function check_cornerstone_change( $cornerstone ) {
|
467 |
Â
// Get old title value.
|
468 |
Â
$old_cornerstone = (int) $this->get_post_seo_data( 'is_cornerstone' );
|
469 |
-
$cornerstone
|
470 |
Â
|
471 |
Â
if ( 1 === $cornerstone ) {
|
472 |
-
$alert_status = '
|
473 |
Â
} else {
|
474 |
-
$alert_status = '
|
475 |
Â
}
|
476 |
Â
|
477 |
Â
// If setting is changed then log alert.
|
478 |
Â
if ( $old_cornerstone !== $cornerstone ) {
|
479 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
480 |
Â
$this->plugin->alerts->Trigger(
|
481 |
-
8808,
|
482 |
-
|
483 |
-
'
|
484 |
-
'
|
485 |
-
'
|
486 |
-
'
|
487 |
-
'
|
488 |
-
'
|
Â
|
|
489 |
Â
$editor_link['name'] => $editor_link['value'],
|
490 |
Â
)
|
491 |
Â
);
|
@@ -629,8 +635,8 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
629 |
Â
|
630 |
Â
// Find title-* in the key.
|
631 |
Â
if ( false !== strpos( $key, 'title-' ) ) {
|
632 |
-
$seo_post_type
|
633 |
-
$seo_post_type
|
634 |
Â
$seo_post_type .= 's';
|
635 |
Â
|
636 |
Â
// Set alert meta data.
|
@@ -639,8 +645,8 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
639 |
Â
|
640 |
Â
// Find metadesc-* in the key.
|
641 |
Â
if ( false !== strpos( $key, 'metadesc-' ) ) {
|
642 |
-
$seo_post_type
|
643 |
-
$seo_post_type
|
644 |
Â
$seo_post_type .= 's';
|
645 |
Â
|
646 |
Â
// Set alert meta data.
|
@@ -658,12 +664,10 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
658 |
Â
|
659 |
Â
case 'title-home-wpseo':
|
660 |
Â
$alert_code = 8810;
|
661 |
-
$alert_args['ReportText'] = $old_value . '|' . $new_value;
|
662 |
Â
break;
|
663 |
Â
|
664 |
Â
case 'metadesc-home-wpseo':
|
665 |
Â
$alert_code = 8811;
|
666 |
-
$alert_args['ReportText'] = $old_value . '|' . $new_value;
|
667 |
Â
break;
|
668 |
Â
|
669 |
Â
case 'company_or_person':
|
@@ -708,19 +712,19 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
708 |
Â
|
709 |
Â
// Find noindex-* in the key.
|
710 |
Â
if ( false !== strpos( $key, 'noindex-' ) ) {
|
711 |
-
$seo_post_type
|
712 |
-
$seo_post_type
|
713 |
Â
$seo_post_type .= 's';
|
714 |
Â
|
715 |
Â
// Set alert meta data.
|
716 |
Â
$alert_args['SEOPostType'] = $seo_post_type;
|
717 |
-
$status
|
718 |
Â
}
|
719 |
Â
|
720 |
Â
// Find showdate-* in the key.
|
721 |
Â
if ( false !== strpos( $key, 'showdate-' ) ) {
|
722 |
-
$seo_post_type
|
723 |
-
$seo_post_type
|
724 |
Â
$seo_post_type .= 's';
|
725 |
Â
|
726 |
Â
// Set alert meta data.
|
@@ -729,16 +733,15 @@ class WSAL_Sensors_YoastSEO extends WSAL_AbstractSensor {
|
|
729 |
Â
|
730 |
Â
// Find display-metabox-pt-* in the key.
|
731 |
Â
if ( false !== strpos( $key, 'display-metabox-pt-' ) ) {
|
732 |
-
$seo_post_type
|
733 |
-
$seo_post_type
|
734 |
Â
$seo_post_type .= 's';
|
735 |
Â
|
736 |
Â
// Set alert meta data.
|
737 |
Â
$alert_args['SEOPostType'] = $seo_post_type;
|
738 |
Â
}
|
739 |
Â
|
740 |
-
$
|
741 |
-
$alert_args['Status'] = $status;
|
742 |
Â
|
743 |
Â
// Set alert code to NULL initially.
|
744 |
Â
$alert_code = null;
|
89 |
Â
}
|
90 |
Â
|
91 |
Â
if ( isset( $post_array ) && isset( $post_array['post_ID'] )
|
92 |
+
&& ! ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
93 |
Â
&& ! ( isset( $post_array['action'] ) && 'autosave' === $post_array['action'] )
|
94 |
Â
) {
|
95 |
Â
$this->post_id = intval( $post_array['post_ID'] );
|
224 |
Â
if ( $old_title !== $title ) {
|
225 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
226 |
Â
$this->plugin->alerts->Trigger(
|
227 |
+
8801,
|
228 |
+
array(
|
229 |
Â
'PostID' => $this->post->ID,
|
230 |
Â
'PostType' => $this->post->post_type,
|
231 |
Â
'PostTitle' => $this->post->post_title,
|
235 |
Â
'OldSEOTitle' => $old_title,
|
236 |
Â
'NewSEOTitle' => $title,
|
237 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
238 |
Â
)
|
239 |
Â
);
|
240 |
Â
}
|
259 |
Â
if ( $old_desc !== $desc ) {
|
260 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
261 |
Â
$this->plugin->alerts->Trigger(
|
262 |
+
8802,
|
263 |
+
array(
|
264 |
Â
'PostID' => $this->post->ID,
|
265 |
Â
'PostType' => $this->post->post_type,
|
266 |
Â
'PostTitle' => $this->post->post_title,
|
270 |
Â
'old_desc' => $old_desc,
|
271 |
Â
'new_desc' => $desc,
|
272 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
273 |
Â
)
|
274 |
Â
);
|
275 |
Â
}
|
300 |
Â
if ( $old_index !== $index ) {
|
301 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
302 |
Â
$this->plugin->alerts->Trigger(
|
303 |
+
8803,
|
304 |
+
array(
|
305 |
+
'PostID' => $this->post->ID,
|
306 |
+
'PostType' => $this->post->post_type,
|
307 |
+
'PostTitle' => $this->post->post_title,
|
308 |
+
'PostStatus' => $this->post->post_status,
|
309 |
+
'PostDate' => $this->post->post_date,
|
310 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
311 |
+
'OldStatus' => $old_index,
|
312 |
+
'NewStatus' => $index,
|
313 |
Â
$editor_link['name'] => $editor_link['value'],
|
314 |
Â
)
|
315 |
Â
);
|
326 |
Â
$old_follow = (int) $this->get_post_seo_data( 'meta-robots-nofollow' );
|
327 |
Â
|
328 |
Â
if ( 1 === $old_follow ) {
|
329 |
+
$old_follow = 'disabled';
|
330 |
Â
} else {
|
331 |
+
$old_follow = 'enabled';
|
332 |
Â
}
|
333 |
Â
|
334 |
Â
if ( 1 === $follow ) {
|
335 |
+
$follow = 'disabled';
|
336 |
Â
} else {
|
337 |
+
$follow = 'enabled';
|
338 |
Â
}
|
339 |
Â
|
340 |
Â
// If setting is changed then log alert.
|
341 |
Â
if ( $old_follow !== $follow ) {
|
342 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
343 |
Â
$this->plugin->alerts->Trigger(
|
344 |
+
8804,
|
345 |
+
array(
|
346 |
+
'PostID' => $this->post->ID,
|
347 |
+
'PostType' => $this->post->post_type,
|
348 |
+
'PostTitle' => $this->post->post_title,
|
349 |
+
'PostStatus' => $this->post->post_status,
|
350 |
+
'PostDate' => $this->post->post_date,
|
351 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
352 |
+
'EventType' => $follow,
|
353 |
Â
$editor_link['name'] => $editor_link['value'],
|
354 |
Â
)
|
355 |
Â
);
|
379 |
Â
if ( $old_adv !== $advanced ) {
|
380 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
381 |
Â
$this->plugin->alerts->Trigger(
|
382 |
+
8805,
|
383 |
+
array(
|
384 |
+
'PostID' => $this->post->ID,
|
385 |
+
'PostType' => $this->post->post_type,
|
386 |
+
'PostTitle' => $this->post->post_title,
|
387 |
+
'PostStatus' => $this->post->post_status,
|
388 |
+
'PostDate' => $this->post->post_date,
|
389 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
390 |
+
'OldStatus' => $old_adv,
|
391 |
+
'NewStatus' => $advanced,
|
392 |
Â
$editor_link['name'] => $editor_link['value'],
|
393 |
Â
)
|
394 |
Â
);
|
413 |
Â
if ( $old_url !== $canonical_url ) {
|
414 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
415 |
Â
$this->plugin->alerts->Trigger(
|
416 |
+
8806,
|
417 |
+
array(
|
418 |
+
'PostID' => $this->post->ID,
|
419 |
+
'PostType' => $this->post->post_type,
|
420 |
+
'PostTitle' => $this->post->post_title,
|
421 |
+
'PostStatus' => $this->post->post_status,
|
422 |
+
'PostDate' => $this->post->post_date,
|
423 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
424 |
+
'OldCanonicalUrl' => $old_url,
|
425 |
+
'NewCanonicalUrl' => $canonical_url,
|
426 |
Â
$editor_link['name'] => $editor_link['value'],
|
Â
|
|
427 |
Â
)
|
428 |
Â
);
|
429 |
Â
}
|
447 |
Â
if ( $old_focus_keys !== $focus_keys ) {
|
448 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
449 |
Â
$this->plugin->alerts->Trigger(
|
450 |
+
8807,
|
451 |
+
array(
|
452 |
+
'PostID' => $this->post->ID,
|
453 |
+
'PostType' => $this->post->post_type,
|
454 |
+
'PostTitle' => $this->post->post_title,
|
455 |
+
'PostStatus' => $this->post->post_status,
|
456 |
+
'PostDate' => $this->post->post_date,
|
457 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
458 |
+
'old_keywords' => $old_focus_keys,
|
459 |
+
'new_keywords' => $focus_keys,
|
460 |
Â
$editor_link['name'] => $editor_link['value'],
|
461 |
Â
)
|
462 |
Â
);
|
471 |
Â
protected function check_cornerstone_change( $cornerstone ) {
|
472 |
Â
// Get old title value.
|
473 |
Â
$old_cornerstone = (int) $this->get_post_seo_data( 'is_cornerstone' );
|
474 |
+
$cornerstone = (int) $cornerstone;
|
475 |
Â
|
476 |
Â
if ( 1 === $cornerstone ) {
|
477 |
+
$alert_status = 'enabled';
|
478 |
Â
} else {
|
479 |
+
$alert_status = 'disabled';
|
480 |
Â
}
|
481 |
Â
|
482 |
Â
// If setting is changed then log alert.
|
483 |
Â
if ( $old_cornerstone !== $cornerstone ) {
|
484 |
Â
$editor_link = $this->get_editor_link( $this->post_id );
|
485 |
Â
$this->plugin->alerts->Trigger(
|
486 |
+
8808,
|
487 |
+
array(
|
488 |
+
'PostID' => $this->post->ID,
|
489 |
+
'PostType' => $this->post->post_type,
|
490 |
+
'PostTitle' => $this->post->post_title,
|
491 |
+
'PostStatus' => $this->post->post_status,
|
492 |
+
'PostDate' => $this->post->post_date,
|
493 |
+
'PostUrl' => get_permalink( $this->post->ID ),
|
494 |
+
'EventType' => $alert_status,
|
495 |
Â
$editor_link['name'] => $editor_link['value'],
|
496 |
Â
)
|
497 |
Â
);
|
635 |
Â
|
636 |
Â
// Find title-* in the key.
|
637 |
Â
if ( false !== strpos( $key, 'title-' ) ) {
|
638 |
+
$seo_post_type = str_replace( 'title-', '', $key );
|
639 |
+
$seo_post_type = ucfirst( $seo_post_type );
|
640 |
Â
$seo_post_type .= 's';
|
641 |
Â
|
642 |
Â
// Set alert meta data.
|
645 |
Â
|
646 |
Â
// Find metadesc-* in the key.
|
647 |
Â
if ( false !== strpos( $key, 'metadesc-' ) ) {
|
648 |
+
$seo_post_type = str_replace( 'metadesc-', '', $key );
|
649 |
+
$seo_post_type = ucfirst( $seo_post_type );
|
650 |
Â
$seo_post_type .= 's';
|
651 |
Â
|
652 |
Â
// Set alert meta data.
|
664 |
Â
|
665 |
Â
case 'title-home-wpseo':
|
666 |
Â
$alert_code = 8810;
|
Â
|
|
667 |
Â
break;
|
668 |
Â
|
669 |
Â
case 'metadesc-home-wpseo':
|
670 |
Â
$alert_code = 8811;
|
Â
|
|
671 |
Â
break;
|
672 |
Â
|
673 |
Â
case 'company_or_person':
|
712 |
Â
|
713 |
Â
// Find noindex-* in the key.
|
714 |
Â
if ( false !== strpos( $key, 'noindex-' ) ) {
|
715 |
+
$seo_post_type = str_replace( 'noindex-', '', $key );
|
716 |
+
$seo_post_type = ucfirst( $seo_post_type );
|
717 |
Â
$seo_post_type .= 's';
|
718 |
Â
|
719 |
Â
// Set alert meta data.
|
720 |
Â
$alert_args['SEOPostType'] = $seo_post_type;
|
721 |
+
$status = 1 === $status ? 0 : 1;
|
722 |
Â
}
|
723 |
Â
|
724 |
Â
// Find showdate-* in the key.
|
725 |
Â
if ( false !== strpos( $key, 'showdate-' ) ) {
|
726 |
+
$seo_post_type = str_replace( 'showdate-', '', $key );
|
727 |
+
$seo_post_type = ucfirst( $seo_post_type );
|
728 |
Â
$seo_post_type .= 's';
|
729 |
Â
|
730 |
Â
// Set alert meta data.
|
733 |
Â
|
734 |
Â
// Find display-metabox-pt-* in the key.
|
735 |
Â
if ( false !== strpos( $key, 'display-metabox-pt-' ) ) {
|
736 |
+
$seo_post_type = str_replace( 'display-metabox-pt-', '', $key );
|
737 |
+
$seo_post_type = ucfirst( $seo_post_type );
|
738 |
Â
$seo_post_type .= 's';
|
739 |
Â
|
740 |
Â
// Set alert meta data.
|
741 |
Â
$alert_args['SEOPostType'] = $seo_post_type;
|
742 |
Â
}
|
743 |
Â
|
744 |
+
$alert_args['EventType'] = 1 === $status ? 'enabled' : 'disabled';
|
Â
|
|
745 |
Â
|
746 |
Â
// Set alert code to NULL initially.
|
747 |
Â
$alert_code = null;
|
classes/Settings.php
CHANGED
@@ -1131,29 +1131,29 @@ class WSAL_Settings {
|
|
1131 |
Â
}
|
1132 |
Â
|
1133 |
Â
/**
|
1134 |
-
* Helper method to get the stored setting to determine if
|
1135 |
Â
* appear in the admin list view. This should always be a bool.
|
1136 |
Â
*
|
1137 |
-
* @method
|
1138 |
Â
* @since 3.5.2
|
1139 |
Â
* @return bool
|
1140 |
Â
*/
|
1141 |
-
public function
|
1142 |
-
return $this->_plugin->GetGlobalOption( '
|
1143 |
Â
}
|
1144 |
Â
|
1145 |
Â
/**
|
1146 |
-
* Stores the option that dicates if
|
1147 |
Â
* for event times. This is always a bool. When it's not a bool it's set
|
1148 |
Â
* to `true` to match default.
|
1149 |
Â
*
|
1150 |
-
* @method
|
1151 |
Â
* @since 3.5.2
|
1152 |
Â
* @param mixed $newvalue ideally always bool. If not bool then it's cast to true.
|
1153 |
Â
*/
|
1154 |
-
public function
|
1155 |
Â
$newvalue = ( ! empty( $newvalue ) ) ? 'yes' : 'no';
|
1156 |
-
$this->_plugin->SetGlobalOption( '
|
1157 |
Â
}
|
1158 |
Â
|
1159 |
Â
|
@@ -1182,41 +1182,53 @@ class WSAL_Settings {
|
|
1182 |
Â
$this->_plugin->SetGlobalOption( $name_field, trim( $newvalue ) );
|
1183 |
Â
}
|
1184 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1185 |
Â
public function GetColumns() {
|
1186 |
Â
$columns = array(
|
1187 |
Â
'alert_code' => '1',
|
1188 |
Â
'type' => '1',
|
Â
|
|
1189 |
Â
'date' => '1',
|
1190 |
Â
'username' => '1',
|
1191 |
Â
'source_ip' => '1',
|
Â
|
|
Â
|
|
1192 |
Â
'message' => '1',
|
Â
|
|
1193 |
Â
);
|
Â
|
|
1194 |
Â
if ( $this->_plugin->IsMultisite() ) {
|
1195 |
-
$columns = array_slice( $columns, 0,
|
1196 |
-
'site' => '1',
|
1197 |
-
) + array_slice( $columns, 5, null, true );
|
1198 |
Â
}
|
Â
|
|
1199 |
Â
$selected = $this->GetColumnsSelected();
|
Â
|
|
1200 |
Â
if ( ! empty( $selected ) ) {
|
1201 |
Â
$columns = array(
|
1202 |
Â
'alert_code' => '0',
|
1203 |
Â
'type' => '0',
|
Â
|
|
1204 |
Â
'date' => '0',
|
1205 |
Â
'username' => '0',
|
1206 |
Â
'source_ip' => '0',
|
Â
|
|
Â
|
|
1207 |
Â
'message' => '0',
|
1208 |
Â
);
|
Â
|
|
1209 |
Â
if ( $this->_plugin->IsMultisite() ) {
|
1210 |
-
$columns = array_slice( $columns, 0,
|
1211 |
-
'site' => '0',
|
1212 |
-
) + array_slice( $columns, 5, null, true );
|
1213 |
Â
}
|
Â
|
|
1214 |
Â
$selected = (array) json_decode( $selected );
|
1215 |
Â
$columns = array_merge( $columns, $selected );
|
1216 |
-
return $columns;
|
1217 |
-
} else {
|
1218 |
-
return $columns;
|
1219 |
Â
}
|
Â
|
|
Â
|
|
1220 |
Â
}
|
1221 |
Â
|
1222 |
Â
public function GetColumnsSelected() {
|
@@ -1643,31 +1655,36 @@ class WSAL_Settings {
|
|
1643 |
Â
case '%RevisionLink%' === $name:
|
1644 |
Â
$check_value = (string) $value;
|
1645 |
Â
if ( 'NULL' !== $check_value ) {
|
1646 |
-
return '
|
1647 |
-
} else {
|
1648 |
-
return false;
|
1649 |
Â
}
|
Â
|
|
1650 |
Â
|
1651 |
-
case '%EditorLinkPost%'
|
1652 |
-
return '
|
1653 |
Â
|
1654 |
Â
case '%EditorLinkOrder%' == $name:
|
1655 |
Â
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View Order', 'wp-security-audit-log' ) . '</a>';
|
1656 |
Â
|
1657 |
Â
case '%EditorLinkPage%' == $name:
|
1658 |
-
return '
|
1659 |
Â
|
1660 |
Â
case '%CategoryLink%' == $name:
|
1661 |
-
return '
|
1662 |
Â
|
1663 |
Â
case '%TagLink%' == $name:
|
1664 |
-
return '
|
1665 |
Â
|
1666 |
Â
case '%EditorLinkForum%' == $name:
|
1667 |
-
return '
|
1668 |
Â
|
1669 |
Â
case '%EditorLinkTopic%' == $name:
|
1670 |
-
return '
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1671 |
Â
|
1672 |
Â
case in_array( $name, array( '%MetaValue%', '%MetaValueOld%', '%MetaValueNew%' ) ):
|
1673 |
Â
return $highlight_start_tag . (
|
@@ -1698,6 +1715,23 @@ class WSAL_Settings {
|
|
1698 |
Â
}
|
1699 |
Â
return '';
|
1700 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1701 |
Â
case '%LogFileLink%' === $name: // Failed login file link.
|
1702 |
Â
return '';
|
1703 |
Â
|
@@ -1737,20 +1771,7 @@ class WSAL_Settings {
|
|
1737 |
Â
return;
|
1738 |
Â
|
1739 |
Â
case '%ChangeText%' === $name:
|
1740 |
-
|
1741 |
-
$url_args = array(
|
1742 |
-
'action' => 'AjaxInspector',
|
1743 |
-
'occurrence' => $occ_id,
|
1744 |
-
'TB_iframe' => 'true',
|
1745 |
-
'width' => 600,
|
1746 |
-
'height' => 550,
|
1747 |
-
);
|
1748 |
-
$url = add_query_arg( $url_args, admin_url( 'admin-ajax.php' ) );
|
1749 |
-
return ' View the changes in <a class="thickbox" title="' . __( 'Alert Data Inspector', 'wp-security-audit-log' ) . '"'
|
1750 |
-
. ' href="' . $url . '">data inspector.</a>';
|
1751 |
-
} else {
|
1752 |
-
return;
|
1753 |
-
}
|
1754 |
Â
|
1755 |
Â
case '%ScanError%' === $name:
|
1756 |
Â
if ( 'NULL' === $value ) {
|
@@ -1769,10 +1790,16 @@ class WSAL_Settings {
|
|
1769 |
Â
'tab' => 'file-changes',
|
1770 |
Â
);
|
1771 |
Â
$file_settings = add_query_arg( $file_settings_args, admin_url( 'admin.php' ) );
|
1772 |
-
return '<a href="' . esc_url( $file_settings ) . '">' . esc_html__( '
|
1773 |
Â
|
1774 |
Â
case '%ContactSupport%' === $name:
|
1775 |
-
return '<a href="https://www.wpsecurityauditlog.com/contact/" target="_blank">' . esc_html__( '
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1776 |
Â
|
1777 |
Â
default:
|
1778 |
Â
return $highlight_start_tag . esc_html( $value ) . $highlight_end_tag;
|
@@ -2007,6 +2034,9 @@ class WSAL_Settings {
|
|
2007 |
Â
case '%ContactSupport%' === $name:
|
2008 |
Â
return '<https://www.wpsecurityauditlog.com/contact|' . esc_html__( 'contact our support', 'wp-security-audit-log' ) . '>';
|
2009 |
Â
|
Â
|
|
Â
|
|
Â
|
|
2010 |
Â
default:
|
2011 |
Â
return '*' . esc_html( $value ) . '*';
|
2012 |
Â
}
|
1131 |
Â
}
|
1132 |
Â
|
1133 |
Â
/**
|
1134 |
+
* Helper method to get the stored setting to determine if milliseconds
|
1135 |
Â
* appear in the admin list view. This should always be a bool.
|
1136 |
Â
*
|
1137 |
+
* @method get_show_milliseconds
|
1138 |
Â
* @since 3.5.2
|
1139 |
Â
* @return bool
|
1140 |
Â
*/
|
1141 |
+
public function get_show_milliseconds() {
|
1142 |
+
return $this->_plugin->GetGlobalOption( 'show_milliseconds', 'yes' );
|
1143 |
Â
}
|
1144 |
Â
|
1145 |
Â
/**
|
1146 |
+
* Stores the option that dicates if milliseconds show in admin list view
|
1147 |
Â
* for event times. This is always a bool. When it's not a bool it's set
|
1148 |
Â
* to `true` to match default.
|
1149 |
Â
*
|
1150 |
+
* @method set_show_milliseconds
|
1151 |
Â
* @since 3.5.2
|
1152 |
Â
* @param mixed $newvalue ideally always bool. If not bool then it's cast to true.
|
1153 |
Â
*/
|
1154 |
+
public function set_show_milliseconds( $newvalue ) {
|
1155 |
Â
$newvalue = ( ! empty( $newvalue ) ) ? 'yes' : 'no';
|
1156 |
+
$this->_plugin->SetGlobalOption( 'show_milliseconds', $newvalue );
|
1157 |
Â
}
|
1158 |
Â
|
1159 |
Â
|
1182 |
Â
$this->_plugin->SetGlobalOption( $name_field, trim( $newvalue ) );
|
1183 |
Â
}
|
1184 |
Â
|
1185 |
+
/**
|
1186 |
+
* Returns audit log columns.
|
1187 |
+
*
|
1188 |
+
* @return array
|
1189 |
+
*/
|
1190 |
Â
public function GetColumns() {
|
1191 |
Â
$columns = array(
|
1192 |
Â
'alert_code' => '1',
|
1193 |
Â
'type' => '1',
|
1194 |
+
'info' => '1',
|
1195 |
Â
'date' => '1',
|
1196 |
Â
'username' => '1',
|
1197 |
Â
'source_ip' => '1',
|
1198 |
+
'object' => '1',
|
1199 |
+
'event_type' => '1',
|
1200 |
Â
'message' => '1',
|
1201 |
+
'info' => '1',
|
1202 |
Â
);
|
1203 |
+
|
1204 |
Â
if ( $this->_plugin->IsMultisite() ) {
|
1205 |
+
$columns = array_slice( $columns, 0, 6, true ) + array( 'site' => '1' ) + array_slice( $columns, 6, null, true );
|
Â
|
|
Â
|
|
1206 |
Â
}
|
1207 |
+
|
1208 |
Â
$selected = $this->GetColumnsSelected();
|
1209 |
+
|
1210 |
Â
if ( ! empty( $selected ) ) {
|
1211 |
Â
$columns = array(
|
1212 |
Â
'alert_code' => '0',
|
1213 |
Â
'type' => '0',
|
1214 |
+
'info' => '0',
|
1215 |
Â
'date' => '0',
|
1216 |
Â
'username' => '0',
|
1217 |
Â
'source_ip' => '0',
|
1218 |
+
'object' => '0',
|
1219 |
+
'event_type' => '0',
|
1220 |
Â
'message' => '0',
|
1221 |
Â
);
|
1222 |
+
|
1223 |
Â
if ( $this->_plugin->IsMultisite() ) {
|
1224 |
+
$columns = array_slice( $columns, 0, 6, true ) + array( 'site' => '0' ) + array_slice( $columns, 6, null, true );
|
Â
|
|
Â
|
|
1225 |
Â
}
|
1226 |
+
|
1227 |
Â
$selected = (array) json_decode( $selected );
|
1228 |
Â
$columns = array_merge( $columns, $selected );
|
Â
|
|
Â
|
|
Â
|
|
1229 |
Â
}
|
1230 |
+
|
1231 |
+
return $columns;
|
1232 |
Â
}
|
1233 |
Â
|
1234 |
Â
public function GetColumnsSelected() {
|
1655 |
Â
case '%RevisionLink%' === $name:
|
1656 |
Â
$check_value = (string) $value;
|
1657 |
Â
if ( 'NULL' !== $check_value ) {
|
1658 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View the content changes', 'wp-security-audit-log' ) . '</a>';
|
Â
|
|
Â
|
|
1659 |
Â
}
|
1660 |
+
return false;
|
1661 |
Â
|
1662 |
+
case in_array( $name, array( '%EditorLinkPost%', '%EditorLinkProduct%', '%EditorLinkCoupon%' ) ):
|
1663 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View post in the editor', 'wp-security-audit-log' ) . '</a>';
|
1664 |
Â
|
1665 |
Â
case '%EditorLinkOrder%' == $name:
|
1666 |
Â
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View Order', 'wp-security-audit-log' ) . '</a>';
|
1667 |
Â
|
1668 |
Â
case '%EditorLinkPage%' == $name:
|
1669 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View post in the editor', 'wp-security-audit-log' ) . '</a>';
|
1670 |
Â
|
1671 |
Â
case '%CategoryLink%' == $name:
|
1672 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View category', 'wp-security-audit-log' ) . '</a>';
|
1673 |
Â
|
1674 |
Â
case '%TagLink%' == $name:
|
1675 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View tag', 'wp-security-audit-log' ) . '</a>';
|
1676 |
Â
|
1677 |
Â
case '%EditorLinkForum%' == $name:
|
1678 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View the Forum in editor', 'wp-security-audit-log' ) . '</a>';
|
1679 |
Â
|
1680 |
Â
case '%EditorLinkTopic%' == $name:
|
1681 |
+
return '<a target="_blank" href="' . esc_url( $value ) . '">' . __( 'View the Topic in editor', 'wp-security-audit-log' ) . '</a>';
|
1682 |
+
|
1683 |
+
case '%EditUserLink%' === $name:
|
1684 |
+
if ( 'NULL' !== $value ) {
|
1685 |
+
return '<a href="' . $value . '" target="_blank">' . __( 'User profile page', 'wp-security-audit-log' ) . '</a>';
|
1686 |
+
}
|
1687 |
+
return '';
|
1688 |
Â
|
1689 |
Â
case in_array( $name, array( '%MetaValue%', '%MetaValueOld%', '%MetaValueNew%' ) ):
|
1690 |
Â
return $highlight_start_tag . (
|
1715 |
Â
}
|
1716 |
Â
return '';
|
1717 |
Â
|
1718 |
+
case '%PostUrlIfPlublished%' === $name:
|
1719 |
+
// get connection.
|
1720 |
+
$db_config = WSAL_Connector_ConnectorFactory::GetConfig(); // Get DB connector configuration.
|
1721 |
+
$connector = $this->_plugin->getConnector( $db_config ); // Get connector for DB.
|
1722 |
+
$wsal_db = $connector->getConnection(); // Get DB connection.
|
1723 |
+
// get values needed.
|
1724 |
+
$meta_adapter = new WSAL_Adapters_MySQL_Meta( $wsal_db );
|
1725 |
+
$post_id = $meta_adapter->LoadByNameAndOccurenceId( 'PostID', $occ_id );
|
1726 |
+
$occ_post = ( isset( $post_id['value'] ) ) ? get_post( $post_id['value'] ) : null;
|
1727 |
+
// start with an empty string.
|
1728 |
+
$return_value = '';
|
1729 |
+
if ( null !== $occ_post && 'publish' === $occ_post->post_status ) {
|
1730 |
+
$post_permalink = get_permalink( $occ_post->ID );
|
1731 |
+
$return_value = '<br>URL: <a href="' . esc_url( $post_permalink ) . '" title="' . esc_attr( $occ_post->post_title ) . '" target="_blank">' . esc_html( $post_permalink ) . '</a>';
|
1732 |
+
}
|
1733 |
+
return $return_value;
|
1734 |
+
|
1735 |
Â
case '%LogFileLink%' === $name: // Failed login file link.
|
1736 |
Â
return '';
|
1737 |
Â
|
1771 |
Â
return;
|
1772 |
Â
|
1773 |
Â
case '%ChangeText%' === $name:
|
1774 |
+
return;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1775 |
Â
|
1776 |
Â
case '%ScanError%' === $name:
|
1777 |
Â
if ( 'NULL' === $value ) {
|
1790 |
Â
'tab' => 'file-changes',
|
1791 |
Â
);
|
1792 |
Â
$file_settings = add_query_arg( $file_settings_args, admin_url( 'admin.php' ) );
|
1793 |
+
return '<a href="' . esc_url( $file_settings ) . '">' . esc_html__( 'Increase maximum file size limit', 'wp-security-audit-log' ) . '</a>';
|
1794 |
Â
|
1795 |
Â
case '%ContactSupport%' === $name:
|
1796 |
+
return '<a href="https://www.wpsecurityauditlog.com/contact/" target="_blank">' . esc_html__( 'Contact Support', 'wp-security-audit-log' ) . '</a>';
|
1797 |
+
|
1798 |
+
case '%LineBreak%' === $name:
|
1799 |
+
return '<br>';
|
1800 |
+
|
1801 |
+
case '%PluginFile%' === $name:
|
1802 |
+
return $highlight_start_tag . dirname( $value ) . $highlight_end_tag;
|
1803 |
Â
|
1804 |
Â
default:
|
1805 |
Â
return $highlight_start_tag . esc_html( $value ) . $highlight_end_tag;
|
2034 |
Â
case '%ContactSupport%' === $name:
|
2035 |
Â
return '<https://www.wpsecurityauditlog.com/contact|' . esc_html__( 'contact our support', 'wp-security-audit-log' ) . '>';
|
2036 |
Â
|
2037 |
+
case '%LineBreak%' === $name:
|
2038 |
+
return;
|
2039 |
+
|
2040 |
Â
default:
|
2041 |
Â
return '*' . esc_html( $value ) . '*';
|
2042 |
Â
}
|
classes/Views/AuditLog.php
CHANGED
@@ -25,7 +25,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
25 |
Â
*
|
26 |
Â
* @var object
|
27 |
Â
*/
|
28 |
-
protected $
|
29 |
Â
|
30 |
Â
/**
|
31 |
Â
* Plugin version.
|
@@ -52,6 +52,15 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
52 |
Â
*/
|
53 |
Â
private $page_args;
|
54 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
55 |
Â
/**
|
56 |
Â
* Method: Constructor
|
57 |
Â
*
|
@@ -98,6 +107,10 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
98 |
Â
'desc' => __( 'Unlock these and other powerful features with WP Security Audit Log Premium.', 'wp-security-audit-log' ),
|
99 |
Â
),
|
100 |
Â
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
101 |
Â
}
|
102 |
Â
|
103 |
Â
/**
|
@@ -161,9 +174,9 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
161 |
Â
$more_info = add_query_arg(
|
162 |
Â
array(
|
163 |
Â
'utm_source' => 'plugin',
|
164 |
-
'utm_medium' => '
|
165 |
-
'
|
166 |
-
'
|
167 |
Â
),
|
168 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
169 |
Â
);
|
@@ -268,7 +281,18 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
268 |
Â
public function GetIcon() {
|
269 |
Â
return $this->_wpversion < 3.8
|
270 |
Â
? $this->_plugin->GetBaseUrl() . '/img/logo-main-menu.png'
|
271 |
-
: $this->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
272 |
Â
}
|
273 |
Â
|
274 |
Â
/**
|
@@ -288,7 +312,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
288 |
Â
/**
|
289 |
Â
* Method: Get View.
|
290 |
Â
*/
|
291 |
-
protected function
|
292 |
Â
// Set page arguments.
|
293 |
Â
if ( ! $this->page_args ) {
|
294 |
Â
$this->page_args = new stdClass();
|
@@ -308,10 +332,64 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
308 |
Â
}
|
309 |
Â
|
310 |
Â
// Set events listing view class.
|
311 |
-
if ( is_null( $this->
|
312 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
313 |
Â
}
|
314 |
-
return $this->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
315 |
Â
}
|
316 |
Â
|
317 |
Â
/**
|
@@ -350,6 +428,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
350 |
Â
'_wpnonce',
|
351 |
Â
'wsal_as_widget_ip',
|
352 |
Â
'load_saved_search_field',
|
Â
|
|
353 |
Â
);
|
354 |
Â
|
355 |
Â
if ( empty( $site_id ) ) {
|
@@ -383,33 +462,34 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
383 |
Â
check_admin_referer( 'bulk-logs' );
|
384 |
Â
}
|
385 |
Â
|
386 |
-
$this->
|
387 |
Â
?>
|
388 |
Â
<form id="audit-log-viewer" method="get">
|
389 |
Â
<div id="audit-log-viewer-content">
|
390 |
Â
<input type="hidden" name="page" value="<?php echo esc_attr( $this->page_args->page ); ?>" />
|
391 |
Â
<input type="hidden" id="wsal-cbid" name="wsal-cbid" value="<?php echo esc_attr( empty( $this->page_args->site_id ) ? '0' : $this->page_args->site_id ); ?>" />
|
Â
|
|
392 |
Â
<?php
|
393 |
Â
/**
|
394 |
Â
* Hook: `wsal_auditlog_before_view`
|
395 |
Â
*
|
396 |
Â
* This action hook is triggered before displaying the audit log view.
|
397 |
Â
*
|
398 |
-
* @param WSAL_AuditLogListView $this->
|
399 |
Â
*/
|
400 |
-
do_action( 'wsal_auditlog_before_view', $this->
|
401 |
Â
|
402 |
Â
// Display the audit log list.
|
403 |
-
$this->
|
404 |
Â
|
405 |
Â
/**
|
406 |
Â
* Hook: `wsal_auditlog_after_view`
|
407 |
Â
*
|
408 |
Â
* This action hook is triggered after displaying the audit log view.
|
409 |
Â
*
|
410 |
-
* @param WSAL_AuditLogListView $this->
|
411 |
Â
*/
|
412 |
-
do_action( 'wsal_auditlog_after_view', $this->
|
413 |
Â
?>
|
414 |
Â
</div>
|
415 |
Â
</form>
|
@@ -465,7 +545,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
465 |
Â
),
|
466 |
Â
'autorefresh' => array(
|
467 |
Â
'enabled' => ! $is_search_view ? $this->_plugin->settings->IsRefreshAlertsEnabled() : false,
|
468 |
-
'token' => $this->
|
469 |
Â
),
|
470 |
Â
)
|
471 |
Â
);
|
@@ -599,7 +679,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
599 |
Â
|
600 |
Â
$search = $post_array['search'];
|
601 |
Â
|
602 |
-
foreach ( $this->
|
603 |
Â
if ( stripos( $site->blogname, $search ) !== false ) {
|
604 |
Â
$grp1[] = $site;
|
605 |
Â
} elseif ( stripos( $site->domain, $search ) !== false ) {
|
@@ -876,6 +956,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
876 |
Â
'searchFilters' => isset( $this->page_args->search_filters ) ? $this->page_args->search_filters : false,
|
877 |
Â
'viewerNonce' => wp_create_nonce( 'wsal_auditlog_viewer_nonce' ),
|
878 |
Â
'infiniteScroll' => $this->_plugin->settings->is_infinite_scroll(),
|
Â
|
|
879 |
Â
);
|
880 |
Â
wp_localize_script( 'auditlog', 'wsalAuditLogArgs', $audit_log_data );
|
881 |
Â
wp_enqueue_script( 'auditlog' );
|
@@ -1118,10 +1199,10 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
1118 |
Â
$paged = isset( $_POST['page_number'] ) ? sanitize_text_field( wp_unslash( $_POST['page_number'] ) ) : 0;
|
1119 |
Â
|
1120 |
Â
// Query events.
|
1121 |
-
$events_query = $this->
|
1122 |
Â
if ( ! empty( $events_query['items'] ) ) {
|
1123 |
Â
foreach ( $events_query['items'] as $event ) {
|
1124 |
-
$this->
|
1125 |
Â
}
|
1126 |
Â
}
|
1127 |
Â
exit();
|
@@ -1129,4 +1210,14 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
|
|
1129 |
Â
die( esc_html__( 'Nonce verification failed.', 'wp-security-audit-log' ) );
|
1130 |
Â
}
|
1131 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1132 |
Â
}
|
25 |
Â
*
|
26 |
Â
* @var object
|
27 |
Â
*/
|
28 |
+
protected $_view;
|
29 |
Â
|
30 |
Â
/**
|
31 |
Â
* Plugin version.
|
52 |
Â
*/
|
53 |
Â
private $page_args;
|
54 |
Â
|
55 |
+
/**
|
56 |
+
* Stores the value of the last view the user requested.
|
57 |
+
*
|
58 |
+
* @since 4.0.0
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
public $user_last_view = '';
|
63 |
+
|
64 |
Â
/**
|
65 |
Â
* Method: Constructor
|
66 |
Â
*
|
107 |
Â
'desc' => __( 'Unlock these and other powerful features with WP Security Audit Log Premium.', 'wp-security-audit-log' ),
|
108 |
Â
),
|
109 |
Â
);
|
110 |
+
|
111 |
+
// Setup the users last view by getting the value from user meta.
|
112 |
+
$last_view = get_user_meta( get_current_user_id(), 'wsal-selected-main-view', true );
|
113 |
+
$this->user_last_view = ( in_array( $last_view, $this->supported_view_types(), true ) ) ? $last_view : 'list';
|
114 |
Â
}
|
115 |
Â
|
116 |
Â
/**
|
174 |
Â
$more_info = add_query_arg(
|
175 |
Â
array(
|
176 |
Â
'utm_source' => 'plugin',
|
177 |
+
'utm_medium' => 'referral',
|
178 |
+
'utm_campaign' => 'WSAL',
|
179 |
+
'utm_content' => 'tell+me+more',
|
180 |
Â
),
|
181 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
182 |
Â
);
|
281 |
Â
public function GetIcon() {
|
282 |
Â
return $this->_wpversion < 3.8
|
283 |
Â
? $this->_plugin->GetBaseUrl() . '/img/logo-main-menu.png'
|
284 |
+
: $this->get_icon_encoded();
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Returns an encoded SVG strin gfor the menu icon.
|
289 |
+
*
|
290 |
+
* @method get_icon_encoded
|
291 |
+
* @since
|
292 |
+
* @return [type]
|
293 |
+
*/
|
294 |
+
private function get_icon_encoded() {
|
295 |
+
return 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTEycHgiIGhlaWdodD0iMTEwcHgiIHZpZXdCb3g9IjAgMCAxMTIgMTEwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IHNrZXRjaHRvb2wgNTIuNiAoNjc0OTEpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPHRpdGxlPkE2QUQyNDUyLUZERDItNDIwQS05ODMzLTQ3QkJDOTlBQjEzNzwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggc2tldGNodG9vbC48L2Rlc2M+CiAgICA8ZyBpZD0iV1BTQUwtU2NyZWVucyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkN1c3RvbS1pY29ucyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwMjQuMDAwMDAwLCAtNDYxLjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxnIGlkPSJDdXN0b20tSWNvbnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE1MS4wMDAwMDAsIDIyOC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJMb2dvIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MDcuMDAwMDAwLCAyMDQuNjY2NjY3KSI+CiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkF0b21zLS8taWNvbnMtLy1jdXN0b20tcmV2ZXJzZWQtYXVkaXQtbG9nIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1Mi4wMDAwMDAsIDE1LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNzAuMDg0ODc0NSw3OC4zNjU1MDAyIEM3Ny44MDAwOTQyLDc4LjM2NTUwMDIgODQuMDU0OTE2MSw3Mi4xMTA2NzgxIDg0LjA1NDkxNjEsNjQuMzk0NTE5MiBDODQuMDU0OTE2MSw1Ni4xMTk1NTg2IDc2Ljg3Njg5NzUsNDkuNTk2MTM2IDY4LjU1MzEwMDYsNTAuNTExODE5NSBDNjkuMDMxMTM0Myw1MS45MjE1MDIzIDY5LjMwMjU1MjIsNTMuNDI2MDQwNiA2OS4zMDI1NTIyLDU0Ljk5NzI1OTQgQzY5LjMwMjU1MjIsNjIuMTk1MDAwNyA2My44NTcyODgzLDY4LjExNzM1OTMgNTYuODYyNDA2Myw2OC44Nzk5NTkyIEM1OC43MzMyMTc5LDc0LjM5Mjg0MjkgNjMuOTM5OTM0Niw3OC4zNjU1MDAyIDcwLjA4NDg3NDUsNzguMzY1NTAwMiBaIE03MC4wNDA3MzIyLDI1LjU3NzA1NTcgTDEwOC4yNzMwOTUsMjkuNjk5MDM5OCBDMTI0LjgyOTU5LDYzLjc3MDkxNTUgMTA2LjA0NTQwMiwxMDIuODE5NDEzIDY5Ljk4ODEzOTEsMTExLjUyNDUxIEM2OS41NDEwOTc4LDExMS40MTU1NjcgNjkuMTE5NDEzOCwxMTEuMjgzMTQ1IDY4LjY3ODAwNzUsMTExLjE2NzYyOCBMNjguNjc2MTI5Miw5My44NzIwMTIyIEM2OC42NzIzNzI1LDkzLjg3MjAxMjIgNjguNjY5NTU1LDkzLjg3MjAxMjIgNjguNjY1Nzk4NCw5My44NzIwMTIyIEM1My4wNzQ3NjI5LDkzLjEyOTEzNDYgNDAuNjE4NjUxNiw4MC4yMTE4OTM5IDQwLjYxODY1MTYsNjQuNDM4NjYgQzQwLjYxODY1MTYsNTQuOTA4MDM5MSA0Ny41ODI1NDEsMzYuMDA5MjcyNSA2OC42NjU3OTg0LDM1LjAwNjI0NyBDNjguNjY5NTU1LDM1LjAwNjI0NyA2OC42NzIzNzI1LDM1LjAwNTMwNzggNjguNjc2MTI5MiwzNS4wMDUzMDc4IEw2OC42ODE3NjQxLDI1LjcyOTIgQzY5LjczMTc0NzcsMjUuNjEwODY1NSA2OS44NTc1OTU1LDI1LjU5NDg5OTggNzAuMDQwNzMyMiwyNS41NzcwNTU3IFogTTExNC40MjkxMTksODEuNTc0NjE1NCBDMTIyLjYxMjA0MSw2My43NjgwOTU4IDEyMi4wNzAxNDUsNDMuMDc0NTkwOCAxMTIuOTg4NDQ0LDI0LjU2NjUxNjggTDcwLjAwMDE2MTEsMTkuODI2NTY0IEwyNy4wMTA5MzkyLDI0LjU2NjUxNjggQzE3LjkyOTIzODQsNDMuMDczNjUxNiAxNy4zODczNDE2LDYzLjc2NzE1NjYgMjUuNTcxMjAzMiw4MS41NzQ2MTU0IEMzMy43ODIzMDA1LDk5LjQ0MjE4MDcgNDkuOTUwOTIxMiwxMTIuNDc0OTM4IDcwLjAwMDE2MTEsMTE3LjQxNzc1IEM5MC4wNDk0MDEsMTEyLjQ3NDkzOCAxMDYuMjE4MDIyLDk5LjQ0MzExOTggMTE0LjQyOTExOSw4MS41NzQ2MTU0IFogTTExNy40NDEwMTQsMjAuNTMwOTM1NyBDMTI4LjAwNzUzLDQwLjk4MDI1OTIgMTI4LjgyODM1OCw2NC4xMTA4OTE0IDExOS42OTIxODYsODMuOTkyOTYwNyBDMTEwLjYzOTU5OSwxMDMuNjkwMDE1IDkyLjc3MTA5NDIsMTE3Ljk4NTk0NiA3MC42NjY5NjY3LDEyMy4yMTUyMDMgTDcwLjAwMDE2MTQsMTIzLjM3MjA0MyBMNjkuMzMzMzU2LDEyMy4yMTUyMDMgQzQ3LjIyOTIyODUsMTE3Ljk4NTk0NiAyOS4zNTk3ODQ1LDEwMy42OTAwMTUgMjAuMzA4MTM2OCw4My45OTI5NjA3IEMxMS4xNzE5NjQ1LDY0LjExMDg5MTQgMTEuOTkxODUzMyw0MC45NzkzMiAyMi41NTkzMDkyLDIwLjUzMDkzNTcgTDIzLjI3MjEzMzUsMTkuMTUyMjQ1MyBMNzAuMDAwMTYxNCwxNCBMMTE2LjcyODE4OSwxOS4xNTIyNDUzIEwxMTcuNDQxMDE0LDIwLjUzMDkzNTcgWiIgaWQ9ImN1c3RvbS1yZXZlcnNlZC1hdWRpdC1sb2ciPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==';
|
296 |
Â
}
|
297 |
Â
|
298 |
Â
/**
|
312 |
Â
/**
|
313 |
Â
* Method: Get View.
|
314 |
Â
*/
|
315 |
+
protected function GetView() {
|
316 |
Â
// Set page arguments.
|
317 |
Â
if ( ! $this->page_args ) {
|
318 |
Â
$this->page_args = new stdClass();
|
332 |
Â
}
|
333 |
Â
|
334 |
Â
// Set events listing view class.
|
335 |
+
if ( is_null( $this->_view ) ) {
|
336 |
+
// Set the requested view based on POST or GET value. We only care
|
337 |
+
// if the view is 'grid' specifically.
|
338 |
+
$requested_view = $this->detect_view_type();
|
339 |
+
|
340 |
+
// If 'grid' is requested use it otherwise use list view by default.
|
341 |
+
if ( 'grid' !== $requested_view ) {
|
342 |
+
$this->_view = new WSAL_AuditLogListView( $this->_plugin, $this->page_args );
|
343 |
+
} else {
|
344 |
+
$this->_view = new WSAL_AuditLogGridView( $this->_plugin, $this->page_args );
|
345 |
+
}
|
346 |
+
|
347 |
+
// if the requested view didn't match the view users last viewed
|
348 |
+
// then update their preference.
|
349 |
+
if ( $requested_view !== $this->user_last_view ) {
|
350 |
+
update_user_meta( get_current_user_id(), 'wsal-selected-main-view', ( in_array( $requested_view, array( 'list', 'grid' ), true ) ) ? $requested_view : 'list' );
|
351 |
+
$this->user_last_view = $requested_view;
|
352 |
+
}
|
353 |
Â
}
|
354 |
+
return $this->_view;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Helper to store the views that are supported for the plugins lists.
|
359 |
+
*
|
360 |
+
* @method supported_view_types
|
361 |
+
* @since 4.0.0
|
362 |
+
* @return array
|
363 |
+
*/
|
364 |
+
public function supported_view_types() {
|
365 |
+
return array(
|
366 |
+
'list',
|
367 |
+
'grid',
|
368 |
+
);
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Helper to get the current user selected view.
|
373 |
+
*
|
374 |
+
* @method detect_view_type
|
375 |
+
* @since 4.0.0
|
376 |
+
* @return string
|
377 |
+
*/
|
378 |
+
public function detect_view_type() {
|
379 |
+
// First check if there is a GET/POST request for a specific view.
|
380 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
381 |
+
$requested_view = ( isset( $_POST['view'] ) ) ? wp_unslash( filter_input( INPUT_POST, 'view', FILTER_SANITIZE_STRING ) ) : '';
|
382 |
+
} else {
|
383 |
+
$requested_view = ( isset( $_GET['view'] ) ) ? wp_unslash( filter_input( INPUT_GET, 'view', FILTER_SANITIZE_STRING ) ) : '';
|
384 |
+
}
|
385 |
+
|
386 |
+
// When there is no GET/POST view requested use the user value.
|
387 |
+
if ( empty( $requested_view ) ) {
|
388 |
+
$requested_view = $this->user_last_view;
|
389 |
+
}
|
390 |
+
|
391 |
+
// return the requested view. This is 'list' by default.
|
392 |
+
return ( in_array( $requested_view, $this->supported_view_types(), true ) ) ? $requested_view : 'list';
|
393 |
Â
}
|
394 |
Â
|
395 |
Â
/**
|
428 |
Â
'_wpnonce',
|
429 |
Â
'wsal_as_widget_ip',
|
430 |
Â
'load_saved_search_field',
|
431 |
+
'view',
|
432 |
Â
);
|
433 |
Â
|
434 |
Â
if ( empty( $site_id ) ) {
|
462 |
Â
check_admin_referer( 'bulk-logs' );
|
463 |
Â
}
|
464 |
Â
|
465 |
+
$this->GetView()->prepare_items();
|
466 |
Â
?>
|
467 |
Â
<form id="audit-log-viewer" method="get">
|
468 |
Â
<div id="audit-log-viewer-content">
|
469 |
Â
<input type="hidden" name="page" value="<?php echo esc_attr( $this->page_args->page ); ?>" />
|
470 |
Â
<input type="hidden" id="wsal-cbid" name="wsal-cbid" value="<?php echo esc_attr( empty( $this->page_args->site_id ) ? '0' : $this->page_args->site_id ); ?>" />
|
471 |
+
<input type="hidden" id="view" name="view" value="<?php echo ( isset( $_GET['view'] ) && 'grid' === wp_unslash( $_GET['view'] ) ) ? 'grid' : 'list'; ?>" />
|
472 |
Â
<?php
|
473 |
Â
/**
|
474 |
Â
* Hook: `wsal_auditlog_before_view`
|
475 |
Â
*
|
476 |
Â
* This action hook is triggered before displaying the audit log view.
|
477 |
Â
*
|
478 |
+
* @param WSAL_AuditLogListView $this->_view - Audit log view object.
|
479 |
Â
*/
|
480 |
+
do_action( 'wsal_auditlog_before_view', $this->GetView() );
|
481 |
Â
|
482 |
Â
// Display the audit log list.
|
483 |
+
$this->GetView()->display();
|
484 |
Â
|
485 |
Â
/**
|
486 |
Â
* Hook: `wsal_auditlog_after_view`
|
487 |
Â
*
|
488 |
Â
* This action hook is triggered after displaying the audit log view.
|
489 |
Â
*
|
490 |
+
* @param WSAL_AuditLogListView $this->_view - Audit log view object.
|
491 |
Â
*/
|
492 |
+
do_action( 'wsal_auditlog_after_view', $this->GetView() );
|
493 |
Â
?>
|
494 |
Â
</div>
|
495 |
Â
</form>
|
545 |
Â
),
|
546 |
Â
'autorefresh' => array(
|
547 |
Â
'enabled' => ! $is_search_view ? $this->_plugin->settings->IsRefreshAlertsEnabled() : false,
|
548 |
+
'token' => $this->_plugin->settings->is_infinite_scroll() ? $this->get_total_events() : $this->GetView()->get_total_items(),
|
549 |
Â
),
|
550 |
Â
)
|
551 |
Â
);
|
679 |
Â
|
680 |
Â
$search = $post_array['search'];
|
681 |
Â
|
682 |
+
foreach ( $this->GetView()->get_sites() as $site ) {
|
683 |
Â
if ( stripos( $site->blogname, $search ) !== false ) {
|
684 |
Â
$grp1[] = $site;
|
685 |
Â
} elseif ( stripos( $site->domain, $search ) !== false ) {
|
956 |
Â
'searchFilters' => isset( $this->page_args->search_filters ) ? $this->page_args->search_filters : false,
|
957 |
Â
'viewerNonce' => wp_create_nonce( 'wsal_auditlog_viewer_nonce' ),
|
958 |
Â
'infiniteScroll' => $this->_plugin->settings->is_infinite_scroll(),
|
959 |
+
'userView' => ( in_array( $this->user_last_view, $this->supported_view_types(), true ) ) ? $this->user_last_view : 'list',
|
960 |
Â
);
|
961 |
Â
wp_localize_script( 'auditlog', 'wsalAuditLogArgs', $audit_log_data );
|
962 |
Â
wp_enqueue_script( 'auditlog' );
|
1199 |
Â
$paged = isset( $_POST['page_number'] ) ? sanitize_text_field( wp_unslash( $_POST['page_number'] ) ) : 0;
|
1200 |
Â
|
1201 |
Â
// Query events.
|
1202 |
+
$events_query = $this->GetView()->query_events( $paged );
|
1203 |
Â
if ( ! empty( $events_query['items'] ) ) {
|
1204 |
Â
foreach ( $events_query['items'] as $event ) {
|
1205 |
+
$this->GetView()->single_row( $event );
|
1206 |
Â
}
|
1207 |
Â
}
|
1208 |
Â
exit();
|
1210 |
Â
die( esc_html__( 'Nonce verification failed.', 'wp-security-audit-log' ) );
|
1211 |
Â
}
|
1212 |
Â
}
|
1213 |
+
|
1214 |
+
/**
|
1215 |
+
* Return the total number of events in audit log.
|
1216 |
+
*
|
1217 |
+
* @return int
|
1218 |
+
*/
|
1219 |
+
public function get_total_events() {
|
1220 |
+
$occ = new WSAL_Models_Occurrence();
|
1221 |
+
return (int) $occ->Count();
|
1222 |
+
}
|
1223 |
Â
}
|
classes/Views/Help.php
CHANGED
@@ -186,7 +186,7 @@ class WSAL_Views_Help extends WSAL_AbstractView {
|
|
186 |
Â
</p><p>
|
187 |
Â
<a class="button" href="https://wordpress.org/support/plugin/wp-security-audit-log" target="_blank"><?php esc_html_e( 'Free Support Forum', 'wp-security-audit-log' ); ?></a>
|
188 |
Â
|
189 |
-
<a class="button" href="https://www.wpsecurityauditlog.com/support/submit-ticket
|
190 |
Â
</p>
|
191 |
Â
</div>
|
192 |
Â
<div class="wsal-help-section">
|
@@ -195,11 +195,11 @@ class WSAL_Views_Help extends WSAL_AbstractView {
|
|
195 |
Â
<?php esc_html_e( 'For more technical information about the WP Security Audit Log plugin please visit the plugin’s knowledge base.', 'wp-security-audit-log' ); ?>
|
196 |
Â
<?php esc_html_e( 'Refer to the list of WordPress security events for a complete list of Events and IDs that the plugin uses to keep a log of all the changes in the WordPress audit log.', 'wp-security-audit-log' ); ?>
|
197 |
Â
</p><p>
|
198 |
-
<a class="button" href="
|
199 |
Â
|
200 |
-
<a class="button" href="https://www.wpsecurityauditlog.com/support-documentation/?utm_source=plugin&utm_medium=
|
201 |
Â
|
202 |
-
<a class="button" href="
|
203 |
Â
</p>
|
204 |
Â
</div>
|
205 |
Â
<div class="wsal-help-section">
|
@@ -249,19 +249,19 @@ class WSAL_Views_Help extends WSAL_AbstractView {
|
|
249 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/password-policy-manager.jpg',
|
250 |
Â
'desc' => __( 'Enforce strong password policies on WordPress', 'wp-security-audit-log' ),
|
251 |
Â
'alt' => 'Password Policy Manager',
|
252 |
-
'link' => 'https://www.wpwhitesecurity.com/wordpress-plugins/password-policy-manager-wordpress/?utm_source=plugin&utm_medium=
|
253 |
Â
),
|
254 |
Â
array(
|
255 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg',
|
256 |
Â
'desc' => __( 'Automatically identify unauthorized file changes on WordPress', 'wp-security-audit-log' ),
|
257 |
Â
'alt' => 'Website File Changes Monitor',
|
258 |
-
'link' => 'https://www.wpwhitesecurity.com/wordpress-plugins/website-file-changes-monitor/?utm_source=plugin&utm_medium=
|
259 |
Â
),
|
260 |
Â
array(
|
261 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/activity-log-for-mainwp.jpg',
|
262 |
Â
'desc' => __( 'See the child sites activity logs from the central MainWP dashboard', 'wp-security-audit-log' ),
|
263 |
Â
'alt' => 'Activity Log for MainWP',
|
264 |
-
'link' => 'https://www.wpsecurityauditlog.com/activity-log-mainwp-extension/?utm_source=plugin&utm_medium=
|
265 |
Â
),
|
266 |
Â
);
|
267 |
Â
?>
|
186 |
Â
</p><p>
|
187 |
Â
<a class="button" href="https://wordpress.org/support/plugin/wp-security-audit-log" target="_blank"><?php esc_html_e( 'Free Support Forum', 'wp-security-audit-log' ); ?></a>
|
188 |
Â
|
189 |
+
<a class="button" href="https://www.wpsecurityauditlog.com/support/submit-ticket/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=free+support+email" target="_blank"><?php esc_html_e( 'Free Support Email', 'wp-security-audit-log' ); ?></a>
|
190 |
Â
</p>
|
191 |
Â
</div>
|
192 |
Â
<div class="wsal-help-section">
|
195 |
Â
<?php esc_html_e( 'For more technical information about the WP Security Audit Log plugin please visit the plugin’s knowledge base.', 'wp-security-audit-log' ); ?>
|
196 |
Â
<?php esc_html_e( 'Refer to the list of WordPress security events for a complete list of Events and IDs that the plugin uses to keep a log of all the changes in the WordPress audit log.', 'wp-security-audit-log' ); ?>
|
197 |
Â
</p><p>
|
198 |
+
<a class="button" href="https://www.wpsecurityauditlog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+website" target="_blank"><?php esc_html_e( 'Plugin Website', 'wp-security-audit-log' ); ?></a>
|
199 |
Â
|
200 |
+
<a class="button" href="https://www.wpsecurityauditlog.com/support-documentation/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=knowledge+base" target="_blank"><?php esc_html_e( 'Knowledge Base', 'wp-security-audit-log' ); ?></a>
|
201 |
Â
|
202 |
+
<a class="button" href="https://www.wpsecurityauditlog.com/support-documentation/list-wordpress-audit-trail-alerts/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=list+events" target="_blank"><?php esc_html_e( 'List of activity logs event IDs', 'wp-security-audit-log' ); ?></a>
|
203 |
Â
</p>
|
204 |
Â
</div>
|
205 |
Â
<div class="wsal-help-section">
|
249 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/password-policy-manager.jpg',
|
250 |
Â
'desc' => __( 'Enforce strong password policies on WordPress', 'wp-security-audit-log' ),
|
251 |
Â
'alt' => 'Password Policy Manager',
|
252 |
+
'link' => 'https://www.wpwhitesecurity.com/wordpress-plugins/password-policy-manager-wordpress/?utm_source=plugin&utm_medium=referral&utm_campaign=PPMWP&utm_content=WSAL+banner',
|
253 |
Â
),
|
254 |
Â
array(
|
255 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg',
|
256 |
Â
'desc' => __( 'Automatically identify unauthorized file changes on WordPress', 'wp-security-audit-log' ),
|
257 |
Â
'alt' => 'Website File Changes Monitor',
|
258 |
+
'link' => 'https://www.wpwhitesecurity.com/wordpress-plugins/website-file-changes-monitor/?utm_source=plugin&utm_medium=referral&utm_campaign=WFCM&utm_content=WSAL+banner',
|
259 |
Â
),
|
260 |
Â
array(
|
261 |
Â
'img' => trailingslashit( WSAL_BASE_URL ) . 'img/help/activity-log-for-mainwp.jpg',
|
262 |
Â
'desc' => __( 'See the child sites activity logs from the central MainWP dashboard', 'wp-security-audit-log' ),
|
263 |
Â
'alt' => 'Activity Log for MainWP',
|
264 |
+
'link' => 'https://www.wpsecurityauditlog.com/activity-log-mainwp-extension/?utm_source=plugin&utm_medium=referral&utm_campaign=AL4MWP&utm_content=WSAL+banner',
|
265 |
Â
),
|
266 |
Â
);
|
267 |
Â
?>
|
classes/Views/Settings.php
CHANGED
@@ -480,7 +480,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
480 |
Â
*/
|
481 |
Â
private function tab_general() {
|
482 |
Â
?>
|
483 |
-
<p class="description"><?php echo wp_kses( __( 'Need help with setting up the plugin to meet your requirements? <a href="https://www.wpsecurityauditlog.com/contact
|
484 |
Â
|
485 |
Â
<h3><?php esc_html_e( 'Use infinite scroll or pagination for the event viewer?', 'wp-security-audit-log' ); ?></h3>
|
486 |
Â
<p class="description">
|
@@ -488,7 +488,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
488 |
Â
echo sprintf(
|
489 |
Â
/* translators: Learn more link. */
|
490 |
Â
esc_html__( 'When using infinite scroll the event viewer and search results %s load up much faster and require less resources.', 'wp-security-audit-log' ),
|
491 |
-
'<a href="https://www.wpsecurityauditlog.com/premium-features/search-filters-wordpress-activity-log
|
492 |
Â
);
|
493 |
Â
?>
|
494 |
Â
</p>
|
@@ -631,7 +631,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
631 |
Â
<!-- Dashboard Widget -->
|
632 |
Â
|
633 |
Â
<h3><?php esc_html_e( 'Add user notification on the WordPress login page', 'wp-security-audit-log' ); ?></h3>
|
634 |
-
<p class="description"><?php esc_html_e( 'Many compliance regulations (such as the
|
635 |
Â
<table class="form-table wsal-tab">
|
636 |
Â
<tbody>
|
637 |
Â
<tr>
|
@@ -660,7 +660,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
660 |
Â
<?php
|
661 |
Â
// Get login page notification text.
|
662 |
Â
$wsal_lpn_text = $this->_plugin->settings->get_login_page_notification_text();
|
663 |
-
$wsal_lpn_text_default = __( 'For security and auditing purposes, a record of all of your logged-in actions and changes within the WordPress dashboard will be recorded in an audit log with the <a href="https://www.wpsecurityauditlog.com
|
664 |
Â
|
665 |
Â
// Allowed HTML tags for this setting.
|
666 |
Â
$allowed_tags = array(
|
@@ -700,7 +700,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
700 |
Â
echo sprintf(
|
701 |
Â
/* translators: Learn more link. */
|
702 |
Â
esc_html__( 'If your website is running behind a firewall set this option to yes so the plugin retrieves the end user’s IP address from the proxy header - %s.', 'wp-security-audit-log' ),
|
703 |
-
'<a href="https://www.wpsecurityauditlog.com/support-documentation/support-reverse-proxies-web-application-firewalls
|
704 |
Â
);
|
705 |
Â
?>
|
706 |
Â
</p>
|
@@ -746,7 +746,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
746 |
Â
sprintf(
|
747 |
Â
/* translators: Learn more link. */
|
748 |
Â
esc_html__( 'By default only users with administrator or super administrator (multisite) roles can change the settings of the plugin. Though you can change these privileges from this section - %s.', 'wp-security-audit-log' ),
|
749 |
-
'<a href="https://www.wpsecurityauditlog.com/support-documentation/managing-wordpress-activity-log-plugin-privileges
|
750 |
Â
),
|
751 |
Â
$allowed_tags
|
752 |
Â
);
|
@@ -822,7 +822,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
822 |
Â
sprintf(
|
823 |
Â
/* translators: Learn more link. */
|
824 |
Â
esc_html__( 'By default only users with administrator and super administrator (multisite) role can view the WordPress activity log. Though you can allow other users with no admin role to view the events - %s.', 'wp-security-audit-log' ),
|
825 |
-
'<a href="https://www.wpsecurityauditlog.com/support-documentation/can-allow-users-access-audit-trail
|
826 |
Â
),
|
827 |
Â
$allowed_tags
|
828 |
Â
);
|
@@ -990,7 +990,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
990 |
Â
<p class="description">
|
991 |
Â
<?php
|
992 |
Â
esc_html_e( 'The plugin uses an efficient way to store the activity log data in the WordPress database, though the more data you keep the more disk space will be required. ', 'wp-security-audit-log' );
|
993 |
-
$retention_help_text = __( '<a href="https://www.wpsecurityauditlog.com/pricing
|
994 |
Â
|
995 |
Â
if ( wsal_freemius()->is__premium_only() ) {
|
996 |
Â
// If premium version then remove this message.
|
@@ -1124,23 +1124,23 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
1124 |
Â
</tr>
|
1125 |
Â
<!-- Alerts Timestamp -->
|
1126 |
Â
<tr>
|
1127 |
-
<th><?php esc_html_e( 'Show
|
1128 |
Â
<td>
|
1129 |
Â
<fieldset>
|
1130 |
Â
<?php
|
1131 |
-
$
|
1132 |
Â
|
1133 |
Â
/**
|
1134 |
Â
* Transform microsecond values incase of bool.
|
1135 |
Â
*/
|
1136 |
-
if ( 'no' !== $
|
1137 |
-
$
|
1138 |
Â
}
|
1139 |
Â
?>
|
1140 |
-
<label for="
|
1141 |
-
<input type="checkbox" name="
|
1142 |
-
<?php checked( $
|
1143 |
-
<?php esc_html_e( 'Show
|
1144 |
Â
</label>
|
1145 |
Â
</fieldset>
|
1146 |
Â
</td>
|
@@ -1182,7 +1182,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
1182 |
Â
<!-- User Information -->
|
1183 |
Â
|
1184 |
Â
<h3><?php esc_html_e( 'Select the columns to be displayed in the WordPress activity log', 'wp-security-audit-log' ); ?></h3>
|
1185 |
-
<p class="description"><?php esc_html_e( 'When you deselect a column it won’t be shown in the activity log viewer
|
1186 |
Â
<table class="form-table wsal-tab">
|
1187 |
Â
<tbody>
|
1188 |
Â
<tr>
|
@@ -1204,6 +1204,8 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
1204 |
Â
<span><?php esc_html_e( 'User', 'wp-security-audit-log' ); ?></span>
|
1205 |
Â
<?php elseif ( 'source_ip' === $key ) : ?>
|
1206 |
Â
<span><?php esc_html_e( 'Source IP Address', 'wp-security-audit-log' ); ?></span>
|
Â
|
|
Â
|
|
1207 |
Â
<?php else : ?>
|
1208 |
Â
<span><?php echo esc_html( ucwords( str_replace( '_', ' ', $key ) ) ); ?></span>
|
1209 |
Â
<?php endif; ?>
|
@@ -1268,8 +1270,8 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
1268 |
Â
if ( ! empty( $post_array['Columns'] ) ) {
|
1269 |
Â
$this->_plugin->settings->SetColumns( $post_array['Columns'] );
|
1270 |
Â
}
|
1271 |
-
$
|
1272 |
-
$this->_plugin->settings->
|
1273 |
Â
}
|
1274 |
Â
|
1275 |
Â
/**
|
@@ -1281,7 +1283,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
1281 |
Â
?>
|
1282 |
Â
<p class="description">
|
1283 |
Â
<?php esc_html_e( 'The plugin runs file integrity scans on your website so it keeps a log when a file is added, modified or deleted. All the settings for the file integrity scans can be found in this page.', 'wp-security-audit-log' ); ?>
|
1284 |
-
<?php echo wp_kses( __( '<a href="https://www.wpsecurityauditlog.com/support-documentation/wordpress-files-changes-warning-activity-logs
|
1285 |
Â
</p>
|
1286 |
Â
|
1287 |
Â
<h3><?php esc_html_e( 'Do you want the plugin to scan your website for file changes?', 'wp-security-audit-log' ); ?></h3>
|
@@ -2046,7 +2048,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
2046 |
Â
?>
|
2047 |
Â
<p class="description">
|
2048 |
Â
<?php esc_html_e( 'These settings are for advanced users.', 'wp-security-audit-log' ); ?>
|
2049 |
-
<?php echo sprintf( __( 'If you have any questions <a href="https://www.wpsecurityauditlog.com/contact
|
2050 |
Â
</p>
|
2051 |
Â
|
2052 |
Â
<h3><?php esc_html_e( 'Troubleshooting setting: Keep a debug log of all the requests this website receives', 'wp-security-audit-log' ); ?></h3>
|
@@ -2688,6 +2690,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
2688 |
Â
array(
|
2689 |
Â
'CurrentUserID' => '0',
|
2690 |
Â
'ScanStatus' => 'started',
|
Â
|
|
2691 |
Â
)
|
2692 |
Â
);
|
2693 |
Â
} elseif ( 6 === $dir ) {
|
@@ -2697,6 +2700,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
|
|
2697 |
Â
array(
|
2698 |
Â
'CurrentUserID' => '0',
|
2699 |
Â
'ScanStatus' => 'stopped',
|
Â
|
|
2700 |
Â
)
|
2701 |
Â
);
|
2702 |
Â
}
|
480 |
Â
*/
|
481 |
Â
private function tab_general() {
|
482 |
Â
?>
|
483 |
+
<p class="description"><?php echo wp_kses( __( 'Need help with setting up the plugin to meet your requirements? <a href="https://www.wpsecurityauditlog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">Schedule a 20 minutes consultation and setup call</a> with our experts for just $50.', 'wp-security-audit-log' ), $this->_plugin->allowed_html_tags ); ?></p>
|
484 |
Â
|
485 |
Â
<h3><?php esc_html_e( 'Use infinite scroll or pagination for the event viewer?', 'wp-security-audit-log' ); ?></h3>
|
486 |
Â
<p class="description">
|
488 |
Â
echo sprintf(
|
489 |
Â
/* translators: Learn more link. */
|
490 |
Â
esc_html__( 'When using infinite scroll the event viewer and search results %s load up much faster and require less resources.', 'wp-security-audit-log' ),
|
491 |
+
'<a href="https://www.wpsecurityauditlog.com/premium-features/search-filters-wordpress-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">' . esc_html__( '(Premium feature)', 'wp-security-audit-log' ) . '</a>'
|
492 |
Â
);
|
493 |
Â
?>
|
494 |
Â
</p>
|
631 |
Â
<!-- Dashboard Widget -->
|
632 |
Â
|
633 |
Â
<h3><?php esc_html_e( 'Add user notification on the WordPress login page', 'wp-security-audit-log' ); ?></h3>
|
634 |
+
<p class="description"><?php esc_html_e( 'Many compliance regulations (such as the GDPR) require website administrators to tell the users of their website that all the changes they do when logged in are being logged.', 'wp-security-audit-log' ); ?></p>
|
635 |
Â
<table class="form-table wsal-tab">
|
636 |
Â
<tbody>
|
637 |
Â
<tr>
|
660 |
Â
<?php
|
661 |
Â
// Get login page notification text.
|
662 |
Â
$wsal_lpn_text = $this->_plugin->settings->get_login_page_notification_text();
|
663 |
+
$wsal_lpn_text_default = __( 'For security and auditing purposes, a record of all of your logged-in actions and changes within the WordPress dashboard will be recorded in an audit log with the <a href="https://www.wpsecurityauditlog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">WP Security Audit Log plugin</a>. The audit log also includes the IP address where you accessed this site from.', 'wp-security-audit-log' );
|
664 |
Â
|
665 |
Â
// Allowed HTML tags for this setting.
|
666 |
Â
$allowed_tags = array(
|
700 |
Â
echo sprintf(
|
701 |
Â
/* translators: Learn more link. */
|
702 |
Â
esc_html__( 'If your website is running behind a firewall set this option to yes so the plugin retrieves the end user’s IP address from the proxy header - %s.', 'wp-security-audit-log' ),
|
703 |
+
'<a href="https://www.wpsecurityauditlog.com/support-documentation/support-reverse-proxies-web-application-firewalls/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">' . esc_html__( 'learn more', 'wp-security-audit-log' ) . '</a>'
|
704 |
Â
);
|
705 |
Â
?>
|
706 |
Â
</p>
|
746 |
Â
sprintf(
|
747 |
Â
/* translators: Learn more link. */
|
748 |
Â
esc_html__( 'By default only users with administrator or super administrator (multisite) roles can change the settings of the plugin. Though you can change these privileges from this section - %s.', 'wp-security-audit-log' ),
|
749 |
+
'<a href="https://www.wpsecurityauditlog.com/support-documentation/managing-wordpress-activity-log-plugin-privileges/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">' . __( 'learn more', 'wp-security-audit-log' ) . '</a>'
|
750 |
Â
),
|
751 |
Â
$allowed_tags
|
752 |
Â
);
|
822 |
Â
sprintf(
|
823 |
Â
/* translators: Learn more link. */
|
824 |
Â
esc_html__( 'By default only users with administrator and super administrator (multisite) role can view the WordPress activity log. Though you can allow other users with no admin role to view the events - %s.', 'wp-security-audit-log' ),
|
825 |
+
'<a href="https://www.wpsecurityauditlog.com/support-documentation/can-allow-users-access-audit-trail/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">' . __( 'learn more', 'wp-security-audit-log' ) . '</a>'
|
826 |
Â
),
|
827 |
Â
$allowed_tags
|
828 |
Â
);
|
990 |
Â
<p class="description">
|
991 |
Â
<?php
|
992 |
Â
esc_html_e( 'The plugin uses an efficient way to store the activity log data in the WordPress database, though the more data you keep the more disk space will be required. ', 'wp-security-audit-log' );
|
993 |
+
$retention_help_text = __( '<a href="https://www.wpsecurityauditlog.com/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">Upgrade to Premium</a> to store the activity log data in an external database.', 'wp-security-audit-log' );
|
994 |
Â
|
995 |
Â
if ( wsal_freemius()->is__premium_only() ) {
|
996 |
Â
// If premium version then remove this message.
|
1124 |
Â
</tr>
|
1125 |
Â
<!-- Alerts Timestamp -->
|
1126 |
Â
<tr>
|
1127 |
+
<th><?php esc_html_e( 'Show Milliseconds', 'wp-security-audit-log' ); ?></th>
|
1128 |
Â
<td>
|
1129 |
Â
<fieldset>
|
1130 |
Â
<?php
|
1131 |
+
$show_milliseconds = $this->_plugin->settings->get_show_milliseconds();
|
1132 |
Â
|
1133 |
Â
/**
|
1134 |
Â
* Transform microsecond values incase of bool.
|
1135 |
Â
*/
|
1136 |
+
if ( 'no' !== $show_milliseconds ) {
|
1137 |
+
$show_milliseconds = 'yes';
|
1138 |
Â
}
|
1139 |
Â
?>
|
1140 |
+
<label for="show_milliseconds">
|
1141 |
+
<input type="checkbox" name="show_milliseconds" id="show_milliseconds" style="margin-top: -2px;"
|
1142 |
+
<?php checked( $show_milliseconds, 'yes' ); ?> value="yes">
|
1143 |
+
<?php esc_html_e( 'Show Milliseconds in list view', 'wp-security-audit-log' ); ?>
|
1144 |
Â
</label>
|
1145 |
Â
</fieldset>
|
1146 |
Â
</td>
|
1182 |
Â
<!-- User Information -->
|
1183 |
Â
|
1184 |
Â
<h3><?php esc_html_e( 'Select the columns to be displayed in the WordPress activity log', 'wp-security-audit-log' ); ?></h3>
|
1185 |
+
<p class="description"><?php esc_html_e( 'When you deselect a column it won’t be shown in the activity log viewer in both views. The data will still be recorded by the plugin.', 'wp-security-audit-log' ); ?></p>
|
1186 |
Â
<table class="form-table wsal-tab">
|
1187 |
Â
<tbody>
|
1188 |
Â
<tr>
|
1204 |
Â
<span><?php esc_html_e( 'User', 'wp-security-audit-log' ); ?></span>
|
1205 |
Â
<?php elseif ( 'source_ip' === $key ) : ?>
|
1206 |
Â
<span><?php esc_html_e( 'Source IP Address', 'wp-security-audit-log' ); ?></span>
|
1207 |
+
<?php elseif ( 'info' === $key ) : ?>
|
1208 |
+
<span><?php esc_html_e( 'Info (used in Grid view mode only)', 'wp-security-audit-log' ); ?></span>
|
1209 |
Â
<?php else : ?>
|
1210 |
Â
<span><?php echo esc_html( ucwords( str_replace( '_', ' ', $key ) ) ); ?></span>
|
1211 |
Â
<?php endif; ?>
|
1270 |
Â
if ( ! empty( $post_array['Columns'] ) ) {
|
1271 |
Â
$this->_plugin->settings->SetColumns( $post_array['Columns'] );
|
1272 |
Â
}
|
1273 |
+
$show_milliseconds = ( isset( $post_array['show_milliseconds'] ) && 'yes' === $post_array['show_milliseconds'] ) ? true : false;
|
1274 |
+
$this->_plugin->settings->set_show_milliseconds( $show_milliseconds );
|
1275 |
Â
}
|
1276 |
Â
|
1277 |
Â
/**
|
1283 |
Â
?>
|
1284 |
Â
<p class="description">
|
1285 |
Â
<?php esc_html_e( 'The plugin runs file integrity scans on your website so it keeps a log when a file is added, modified or deleted. All the settings for the file integrity scans can be found in this page.', 'wp-security-audit-log' ); ?>
|
1286 |
+
<?php echo wp_kses( __( '<a href="https://www.wpsecurityauditlog.com/support-documentation/wordpress-files-changes-warning-activity-logs/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">Refer to the WordPress file integrity scans feature page</a> for more information.', 'wp-security-audit-log' ), $this->_plugin->allowed_html_tags ); ?>
|
1287 |
Â
</p>
|
1288 |
Â
|
1289 |
Â
<h3><?php esc_html_e( 'Do you want the plugin to scan your website for file changes?', 'wp-security-audit-log' ); ?></h3>
|
2048 |
Â
?>
|
2049 |
Â
<p class="description">
|
2050 |
Â
<?php esc_html_e( 'These settings are for advanced users.', 'wp-security-audit-log' ); ?>
|
2051 |
+
<?php echo sprintf( __( 'If you have any questions <a href="https://www.wpsecurityauditlog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank">contact us</a>.', 'wp-security-audit-log' ), $this->_plugin->allowed_html_tags ); ?>
|
2052 |
Â
</p>
|
2053 |
Â
|
2054 |
Â
<h3><?php esc_html_e( 'Troubleshooting setting: Keep a debug log of all the requests this website receives', 'wp-security-audit-log' ); ?></h3>
|
2690 |
Â
array(
|
2691 |
Â
'CurrentUserID' => '0',
|
2692 |
Â
'ScanStatus' => 'started',
|
2693 |
+
'EventType' => 'started',
|
2694 |
Â
)
|
2695 |
Â
);
|
2696 |
Â
} elseif ( 6 === $dir ) {
|
2700 |
Â
array(
|
2701 |
Â
'CurrentUserID' => '0',
|
2702 |
Â
'ScanStatus' => 'stopped',
|
2703 |
+
'EventType' => 'stopped',
|
2704 |
Â
)
|
2705 |
Â
);
|
2706 |
Â
}
|
classes/Views/SetupWizard.php
CHANGED
@@ -247,7 +247,7 @@ final class WSAL_Views_SetupWizard {
|
|
247 |
Â
<?php do_action( 'admin_head' ); ?>
|
248 |
Â
</head>
|
249 |
Â
<body class="wsal-setup wp-core-ui">
|
250 |
-
<h1 id="wsal-logo"><a href="https://wpsecurityauditlog.com
|
251 |
Â
<?php
|
252 |
Â
}
|
253 |
Â
|
@@ -592,7 +592,7 @@ final class WSAL_Views_SetupWizard {
|
|
592 |
Â
<em>
|
593 |
Â
<?php
|
594 |
Â
// Step help text.
|
595 |
-
$step_help = __( 'The plugin stores the data in the WordPress database in a very efficient way, though the more data you keep the more hard disk space it will consume. If you need need to retain a lot of data we would recommend you to <a href="https://www.wpsecurityauditlog.com/premium-features
|
596 |
Â
|
597 |
Â
if ( wsal_freemius()->is__premium_only() ) {
|
598 |
Â
// Change the help text if premium version of the plugin is active.
|
@@ -880,23 +880,23 @@ final class WSAL_Views_SetupWizard {
|
|
880 |
Â
|
881 |
Â
<ul>
|
882 |
Â
<li>
|
883 |
-
<a href="https://www.wpsecurityauditlog.com/support-documentation/getting-started-wp-security-audit-log
|
884 |
Â
<?php esc_html_e( 'Getting started with the WP Security Audit Log plugin', 'wp-security-audit-log' ); ?>
|
885 |
Â
</a>
|
886 |
Â
</li>
|
887 |
Â
<li>
|
888 |
-
<a href="https://www.wpsecurityauditlog.com/support-documentation
|
889 |
Â
<?php esc_html_e( 'Knowledge Base & Support Documents', 'wp-security-audit-log' ); ?>
|
890 |
Â
</a>
|
891 |
Â
</li>
|
892 |
Â
<li>
|
893 |
-
<a href="https://www.wpsecurityauditlog.com/benefits-wordpress-activity-log
|
894 |
Â
<?php esc_html_e( 'Benefits of keeping a WordPress activity log', 'wp-security-audit-log' ); ?>
|
895 |
Â
</a>
|
896 |
Â
</li>
|
897 |
Â
</ul>
|
898 |
Â
|
899 |
-
<p><?php echo wp_kses( __( 'We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href="https://www.wpsecurityauditlog.com/contact
|
900 |
Â
|
901 |
Â
<form method="post" class="wsal-setup-form">
|
902 |
Â
<?php wp_nonce_field( 'wsal-step-finish' ); ?>
|
247 |
Â
<?php do_action( 'admin_head' ); ?>
|
248 |
Â
</head>
|
249 |
Â
<body class="wsal-setup wp-core-ui">
|
250 |
+
<h1 id="wsal-logo"><a href="https://wpsecurityauditlog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank"><img src="<?php echo esc_url( $this->wsal->GetBaseUrl() ); ?>/img/wsal-logo-full.png" alt="WP Security Audit Log" /></a></h1>
|
251 |
Â
<?php
|
252 |
Â
}
|
253 |
Â
|
592 |
Â
<em>
|
593 |
Â
<?php
|
594 |
Â
// Step help text.
|
595 |
+
$step_help = __( 'The plugin stores the data in the WordPress database in a very efficient way, though the more data you keep the more hard disk space it will consume. If you need need to retain a lot of data we would recommend you to <a href="https://www.wpsecurityauditlog.com/premium-features/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">upgrade to Premium</a> and use the Database tools to store the WordPress activity log in an external database.', 'wp-security-audit-log' );
|
596 |
Â
|
597 |
Â
if ( wsal_freemius()->is__premium_only() ) {
|
598 |
Â
// Change the help text if premium version of the plugin is active.
|
880 |
Â
|
881 |
Â
<ul>
|
882 |
Â
<li>
|
883 |
+
<a href="https://www.wpsecurityauditlog.com/support-documentation/getting-started-wp-security-audit-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
|
884 |
Â
<?php esc_html_e( 'Getting started with the WP Security Audit Log plugin', 'wp-security-audit-log' ); ?>
|
885 |
Â
</a>
|
886 |
Â
</li>
|
887 |
Â
<li>
|
888 |
+
<a href="https://www.wpsecurityauditlog.com/support-documentation/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
|
889 |
Â
<?php esc_html_e( 'Knowledge Base & Support Documents', 'wp-security-audit-log' ); ?>
|
890 |
Â
</a>
|
891 |
Â
</li>
|
892 |
Â
<li>
|
893 |
+
<a href="https://www.wpsecurityauditlog.com/benefits-wordpress-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
|
894 |
Â
<?php esc_html_e( 'Benefits of keeping a WordPress activity log', 'wp-security-audit-log' ); ?>
|
895 |
Â
</a>
|
896 |
Â
</li>
|
897 |
Â
</ul>
|
898 |
Â
|
899 |
+
<p><?php echo wp_kses( __( 'We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href="https://www.wpsecurityauditlog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">please get in touch!</a>', 'wp-security-audit-log' ), $this->wsal->allowed_html_tags ); ?></p>
|
900 |
Â
|
901 |
Â
<form method="post" class="wsal-setup-form">
|
902 |
Â
<?php wp_nonce_field( 'wsal-step-finish' ); ?>
|
classes/Views/ToggleAlerts.php
CHANGED
@@ -187,7 +187,8 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
187 |
Â
$is_custom = ! empty( $events_diff ) ? true : false; // If difference is not empty then mode is custom.
|
188 |
Â
$log_details = $this->_plugin->GetGlobalOption( 'details-level', false ); // Get log level option.
|
189 |
Â
|
190 |
-
$subcat_alerts
|
Â
|
|
191 |
Â
?>
|
192 |
Â
<p>
|
193 |
Â
<form method="post" id="wsal-alerts-level">
|
@@ -218,7 +219,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
218 |
Â
<h2 id="wsal-tabs" class="nav-tab-wrapper">
|
219 |
Â
<?php foreach ( $safe_names as $name => $safe ) : ?>
|
220 |
Â
<a href="#tab-<?php echo esc_attr( $safe ); ?>" class="nav-tab"><?php echo esc_html( $name ); ?></a>
|
221 |
-
<?php if ( __( '
|
222 |
Â
<a href="#tab-frontend-events" class="nav-tab">
|
223 |
Â
<?php esc_html_e( 'Front-end Events', 'wp-security-audit-log' ); ?>
|
224 |
Â
</a>
|
@@ -255,7 +256,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
255 |
Â
if ( $alert->type <= 0006 ) {
|
256 |
Â
continue; // <- Ignore php alerts.
|
257 |
Â
}
|
258 |
-
if (
|
259 |
Â
continue; // <- Ignore promo alerts.
|
260 |
Â
}
|
261 |
Â
$active[ $alert->type ] = $this->_plugin->alerts->IsEnabled( $alert->type );
|
@@ -271,36 +272,49 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
271 |
Â
if ( __( 'Custom Post Types', 'wp-security-audit-log' ) === $subname || __( 'Pages', 'wp-security-audit-log' ) === $subname ) {
|
272 |
Â
continue;
|
273 |
Â
} elseif (
|
274 |
-
|
275 |
-
||
|
276 |
-
||
|
277 |
-
||
|
278 |
-
||
|
279 |
Â
) {
|
280 |
-
switch ( $
|
281 |
-
case
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
282 |
Â
// Check if BBPress plugin exists.
|
283 |
Â
if ( ! WpSecurityAuditLog::is_bbpress_active() ) {
|
284 |
Â
$disabled = 'disabled';
|
285 |
Â
}
|
286 |
Â
break;
|
287 |
Â
|
288 |
-
case
|
289 |
-
case
|
290 |
Â
// Check if WooCommerce plugin exists.
|
291 |
Â
if ( ! WpSecurityAuditLog::is_woocommerce_active() ) {
|
292 |
Â
$disabled = 'disabled';
|
293 |
Â
}
|
294 |
Â
break;
|
295 |
Â
|
296 |
-
case
|
297 |
Â
// Check if Yoast SEO plugin exists.
|
298 |
Â
if ( ! WpSecurityAuditLog::is_wpseo_active() ) {
|
299 |
Â
$disabled = 'disabled';
|
300 |
Â
}
|
301 |
Â
break;
|
302 |
Â
|
303 |
-
case
|
304 |
Â
// Disable if not multisite.
|
305 |
Â
if ( ! is_multisite() ) {
|
306 |
Â
$disabled = 'disabled';
|
@@ -377,11 +391,6 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
377 |
Â
</td>
|
378 |
Â
</tr>
|
379 |
Â
<?php endif; ?>
|
380 |
-
<tr>
|
381 |
-
<td colspan="4">
|
382 |
-
<h3 class="sub-category"><?php esc_html_e( 'User Profiles', 'wp-security-audit-log' ); ?></h3>
|
383 |
-
</td>
|
384 |
-
</tr>
|
385 |
Â
<?php elseif ( __( 'Other User Activity', 'wp-security-audit-log' ) === $subname ) : ?>
|
386 |
Â
<tr>
|
387 |
Â
<td colspan="4">
|
@@ -397,7 +406,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
397 |
Â
continue; // <- Ignore php alerts.
|
398 |
Â
}
|
399 |
Â
|
400 |
-
if ( in_array( $alert->type,
|
401 |
Â
continue; // <- Ignore promo alerts.
|
402 |
Â
}
|
403 |
Â
|
@@ -420,50 +429,12 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
420 |
Â
esc_html_e( 'User Sessions', 'wp-security-audit-log' );
|
421 |
Â
} elseif ( 2010 === $alert->type ) {
|
422 |
Â
esc_html_e( 'Files', 'wp-security-audit-log' );
|
423 |
-
} elseif ( 6007 === $alert->type ) {
|
424 |
-
esc_html_e( 'System', 'wp-security-audit-log' );
|
425 |
Â
} elseif ( 2111 === $alert->type ) {
|
426 |
Â
esc_html_e( 'Post Settings', 'wp-security-audit-log' );
|
427 |
-
} elseif ( 2119 === $alert->type ) {
|
428 |
-
esc_html_e( 'Tags', 'wp-security-audit-log' );
|
429 |
-
} elseif ( 2016 === $alert->type ) {
|
430 |
-
esc_html_e( 'Categories', 'wp-security-audit-log' );
|
431 |
-
} elseif ( 2053 === $alert->type ) {
|
432 |
-
esc_html_e( 'Custom Fields', 'wp-security-audit-log' );
|
433 |
-
} elseif ( 7000 === $alert->type ) {
|
434 |
-
esc_html_e( 'Sites', 'wp-security-audit-log' );
|
435 |
-
} elseif ( 8009 === $alert->type ) {
|
436 |
-
esc_html_e( 'Settings', 'wp-security-audit-log' );
|
437 |
-
} elseif ( 8014 === $alert->type ) {
|
438 |
-
esc_html_e( 'Topics', 'wp-security-audit-log' );
|
439 |
-
} elseif ( 4013 === $alert->type ) {
|
440 |
-
esc_html_e( 'User Profile', 'wp-security-audit-log' );
|
441 |
Â
} elseif ( 9007 === $alert->type ) {
|
442 |
Â
esc_html_e( 'Product Admin', 'wp-security-audit-log' );
|
443 |
Â
} elseif ( 9047 === $alert->type ) {
|
444 |
-
esc_html_e( 'Product
|
445 |
-
} elseif ( 9027 === $alert->type ) {
|
446 |
-
esc_html_e( 'Store Admin', 'wp-security-audit-log' );
|
447 |
-
} elseif ( 9002 === $alert->type ) {
|
448 |
-
esc_html_e( 'Categories', 'wp-security-audit-log' );
|
449 |
-
} elseif ( 9057 === $alert->type ) {
|
450 |
-
esc_html_e( 'Attributes', 'wp-security-audit-log' );
|
451 |
-
} elseif ( 9063 === $alert->type ) {
|
452 |
-
esc_html_e( 'Coupons', 'wp-security-audit-log' );
|
453 |
-
} elseif ( 9035 === $alert->type ) {
|
454 |
-
esc_html_e( 'Orders', 'wp-security-audit-log' );
|
455 |
-
} elseif ( 9083 === $alert->type ) {
|
456 |
-
esc_html_e( 'User Profile', 'wp-security-audit-log' );
|
457 |
-
} elseif ( 8809 === $alert->type ) {
|
458 |
-
esc_html_e( 'Website Changes', 'wp-security-audit-log' );
|
459 |
-
} elseif ( 8813 === $alert->type ) {
|
460 |
-
esc_html_e( 'Plugin Settings', 'wp-security-audit-log' );
|
461 |
-
} elseif ( 6000 === $alert->type ) {
|
462 |
-
esc_html_e( 'System', 'wp-security-audit-log' );
|
463 |
-
} elseif ( 6001 === $alert->type ) {
|
464 |
-
esc_html_e( 'Settings', 'wp-security-audit-log' );
|
465 |
-
} elseif ( 6028 === $alert->type ) {
|
466 |
-
esc_html_e( 'File Changes Scanning', 'wp-security-audit-log' );
|
467 |
Â
}
|
468 |
Â
?>
|
469 |
Â
</h3>
|
@@ -498,6 +469,16 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
|
|
498 |
Â
esc_html_e( 'Warning', 'wp-security-audit-log' );
|
499 |
Â
} elseif ( 'E_NOTICE' === $severity_obj->name ) {
|
500 |
Â
esc_html_e( 'Notification', 'wp-security-audit-log' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
501 |
Â
} else {
|
502 |
Â
esc_html_e( 'Notification', 'wp-security-audit-log' );
|
503 |
Â
}
|
187 |
Â
$is_custom = ! empty( $events_diff ) ? true : false; // If difference is not empty then mode is custom.
|
188 |
Â
$log_details = $this->_plugin->GetGlobalOption( 'details-level', false ); // Get log level option.
|
189 |
Â
|
190 |
+
$subcat_alerts = array( 1004, 2010, 2111, 9007, 9047 );
|
191 |
+
$obsolete_events = array( 9999, 2126, 6023, 9011, 9070, 9075 );
|
192 |
Â
?>
|
193 |
Â
<p>
|
194 |
Â
<form method="post" id="wsal-alerts-level">
|
219 |
Â
<h2 id="wsal-tabs" class="nav-tab-wrapper">
|
220 |
Â
<?php foreach ( $safe_names as $name => $safe ) : ?>
|
221 |
Â
<a href="#tab-<?php echo esc_attr( $safe ); ?>" class="nav-tab"><?php echo esc_html( $name ); ?></a>
|
222 |
+
<?php if ( __( 'Yoast SEO', 'wp-security-audit-log' ) === $name ) : ?>
|
223 |
Â
<a href="#tab-frontend-events" class="nav-tab">
|
224 |
Â
<?php esc_html_e( 'Front-end Events', 'wp-security-audit-log' ); ?>
|
225 |
Â
</a>
|
256 |
Â
if ( $alert->type <= 0006 ) {
|
257 |
Â
continue; // <- Ignore php alerts.
|
258 |
Â
}
|
259 |
+
if ( in_array( $alert->type, $obsolete_events, true ) ) {
|
260 |
Â
continue; // <- Ignore promo alerts.
|
261 |
Â
}
|
262 |
Â
$active[ $alert->type ] = $this->_plugin->alerts->IsEnabled( $alert->type );
|
272 |
Â
if ( __( 'Custom Post Types', 'wp-security-audit-log' ) === $subname || __( 'Pages', 'wp-security-audit-log' ) === $subname ) {
|
273 |
Â
continue;
|
274 |
Â
} elseif (
|
275 |
+
'bbPress Forums' === $name
|
276 |
+
|| 'WooCommerce' === $name
|
277 |
+
|| 'Yoast SEO' === $name
|
278 |
+
|| 'Multisite Network Sites' === $name
|
279 |
+
|| 'User Accounts' === $name
|
280 |
Â
) {
|
281 |
+
switch ( $name ) {
|
282 |
+
case 'User Accounts':
|
283 |
+
if ( 'Multisite User Profiles' === $subname ) {
|
284 |
+
// Check if this is a multisite.
|
285 |
+
if ( ! is_multisite() ) {
|
286 |
+
$disabled = 'disabled';
|
287 |
+
}
|
288 |
+
} elseif ( 'bbPress User Profiles' === $subname ) {
|
289 |
+
// Check if BBPress plugin exists.
|
290 |
+
if ( ! WpSecurityAuditLog::is_bbpress_active() ) {
|
291 |
+
$disabled = 'disabled';
|
292 |
+
}
|
293 |
+
}
|
294 |
+
break;
|
295 |
+
case 'bbPress Forums':
|
296 |
Â
// Check if BBPress plugin exists.
|
297 |
Â
if ( ! WpSecurityAuditLog::is_bbpress_active() ) {
|
298 |
Â
$disabled = 'disabled';
|
299 |
Â
}
|
300 |
Â
break;
|
301 |
Â
|
302 |
+
case 'WooCommerce':
|
303 |
+
case 'WooCommerce Products':
|
304 |
Â
// Check if WooCommerce plugin exists.
|
305 |
Â
if ( ! WpSecurityAuditLog::is_woocommerce_active() ) {
|
306 |
Â
$disabled = 'disabled';
|
307 |
Â
}
|
308 |
Â
break;
|
309 |
Â
|
310 |
+
case 'Yoast SEO':
|
311 |
Â
// Check if Yoast SEO plugin exists.
|
312 |
Â
if ( ! WpSecurityAuditLog::is_wpseo_active() ) {
|
313 |
Â
$disabled = 'disabled';
|
314 |
Â
}
|
315 |
Â
break;
|
316 |
Â
|
317 |
+
case 'Multisite Network Sites':
|
318 |
Â
// Disable if not multisite.
|
319 |
Â
if ( ! is_multisite() ) {
|
320 |
Â
$disabled = 'disabled';
|
391 |
Â
</td>
|
392 |
Â
</tr>
|
393 |
Â
<?php endif; ?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
394 |
Â
<?php elseif ( __( 'Other User Activity', 'wp-security-audit-log' ) === $subname ) : ?>
|
395 |
Â
<tr>
|
396 |
Â
<td colspan="4">
|
406 |
Â
continue; // <- Ignore php alerts.
|
407 |
Â
}
|
408 |
Â
|
409 |
+
if ( in_array( $alert->type, $obsolete_events, true ) ) {
|
410 |
Â
continue; // <- Ignore promo alerts.
|
411 |
Â
}
|
412 |
Â
|
429 |
Â
esc_html_e( 'User Sessions', 'wp-security-audit-log' );
|
430 |
Â
} elseif ( 2010 === $alert->type ) {
|
431 |
Â
esc_html_e( 'Files', 'wp-security-audit-log' );
|
Â
|
|
Â
|
|
432 |
Â
} elseif ( 2111 === $alert->type ) {
|
433 |
Â
esc_html_e( 'Post Settings', 'wp-security-audit-log' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
434 |
Â
} elseif ( 9007 === $alert->type ) {
|
435 |
Â
esc_html_e( 'Product Admin', 'wp-security-audit-log' );
|
436 |
Â
} elseif ( 9047 === $alert->type ) {
|
437 |
+
esc_html_e( 'Product Attributes', 'wp-security-audit-log' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
438 |
Â
}
|
439 |
Â
?>
|
440 |
Â
</h3>
|
469 |
Â
esc_html_e( 'Warning', 'wp-security-audit-log' );
|
470 |
Â
} elseif ( 'E_NOTICE' === $severity_obj->name ) {
|
471 |
Â
esc_html_e( 'Notification', 'wp-security-audit-log' );
|
472 |
+
} elseif ( 'WSAL_CRITICAL' === $severity_obj->name ) {
|
473 |
+
esc_html_e( 'Critical', 'wp-security-audit-log' );
|
474 |
+
} elseif ( 'WSAL_HIGH' === $severity_obj->name ) {
|
475 |
+
esc_html_e( 'High', 'wp-security-audit-log' );
|
476 |
+
} elseif ( 'WSAL_MEDIUM' === $severity_obj->name ) {
|
477 |
+
esc_html_e( 'Medium', 'wp-security-audit-log' );
|
478 |
+
} elseif ( 'WSAL_LOW' === $severity_obj->name ) {
|
479 |
+
esc_html_e( 'Low', 'wp-security-audit-log' );
|
480 |
+
} elseif ( 'WSAL_INFORMATIONAL' === $severity_obj->name ) {
|
481 |
+
esc_html_e( 'Informational', 'wp-security-audit-log' );
|
482 |
Â
} else {
|
483 |
Â
esc_html_e( 'Notification', 'wp-security-audit-log' );
|
484 |
Â
}
|
classes/Views/addons/html-view.php
CHANGED
@@ -9,14 +9,31 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
Â
exit; // Exit if accessed directly.
|
10 |
Â
}
|
11 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
12 |
Â
// Links.
|
13 |
Â
$more_info = add_query_arg(
|
14 |
-
|
15 |
-
'utm_source' => 'plugin',
|
16 |
-
'utm_medium' => 'page',
|
17 |
-
'utm_content' => 'users+sessions+more+info',
|
18 |
-
'utm_campaign' => 'upgrade+premium',
|
19 |
-
),
|
20 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
21 |
Â
);
|
22 |
Â
|
9 |
Â
exit; // Exit if accessed directly.
|
10 |
Â
}
|
11 |
Â
|
12 |
+
$utm_params = array(
|
13 |
+
'utm_source' => 'plugin',
|
14 |
+
'utm_medium' => 'referral',
|
15 |
+
'utm_campaign' => 'WSAL',
|
16 |
+
);
|
17 |
+
switch ( $this->hook_suffix ) {
|
18 |
+
case 'audit-log_page_wsal-loginusers':
|
19 |
+
$utm_params['utm_content'] = 'users+sessions';
|
20 |
+
break;
|
21 |
+
case 'audit-log_page_wsal-reports':
|
22 |
+
$utm_params['utm_content'] = 'reports';
|
23 |
+
break;
|
24 |
+
case 'audit-log_page_wsal-emailnotifications':
|
25 |
+
$utm_params['utm_content'] = 'notifications';
|
26 |
+
break;
|
27 |
+
case 'audit-log_page_wsal-externaldb':
|
28 |
+
$utm_params['utm_content'] = 'db+integrations';
|
29 |
+
break;
|
30 |
+
case 'audit-log_page_wsal-search':
|
31 |
+
$utm_params['utm_content'] = 'search';
|
32 |
+
break;
|
33 |
+
}
|
34 |
Â
// Links.
|
35 |
Â
$more_info = add_query_arg(
|
36 |
+
$utm_params,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
37 |
Â
'https://www.wpsecurityauditlog.com/premium-features/'
|
38 |
Â
);
|
39 |
Â
|
css/auditlog.css
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
Â
.column-read,
|
32 |
Â
.column-more,
|
33 |
Â
.column-data {
|
34 |
-
width:
|
35 |
Â
}
|
36 |
Â
.column-type {
|
37 |
Â
width: 85px;
|
@@ -51,13 +51,30 @@ td.code.column-code a{
|
|
51 |
Â
}
|
52 |
Â
|
53 |
Â
.column-user {
|
54 |
-
width:
|
55 |
Â
}
|
56 |
Â
|
57 |
Â
.column-site {
|
58 |
Â
width: 160px;
|
59 |
Â
}
|
60 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
61 |
Â
td.column-user {
|
62 |
Â
font-size: 75% !important;
|
63 |
Â
}
|
@@ -82,7 +99,7 @@ td.column-user {
|
|
82 |
Â
}
|
83 |
Â
|
84 |
Â
.column-scip {
|
85 |
-
width:
|
86 |
Â
}
|
87 |
Â
|
88 |
Â
.more-info {
|
@@ -143,36 +160,6 @@ td.column-user {
|
|
143 |
Â
margin-right: auto;
|
144 |
Â
}
|
145 |
Â
|
146 |
-
/* errors */
|
147 |
-
.log-type-0:after,
|
148 |
-
.log-type-1:after,
|
149 |
-
.log-type-4:after,
|
150 |
-
.log-type-16:after,
|
151 |
-
.log-type-64:after,
|
152 |
-
.log-type-256:after,
|
153 |
-
.log-type-4096:after,
|
154 |
-
.log-type-E_CRITICAL:after {
|
155 |
-
background: #c9302c; content: "!";
|
156 |
-
}
|
157 |
-
|
158 |
-
/* warnings */
|
159 |
-
.log-type-2:after,
|
160 |
-
.log-type-32:after,
|
161 |
-
.log-type-128:after,
|
162 |
-
.log-type-512:after {
|
163 |
-
background: #ec971f; content: "!";
|
164 |
-
}
|
165 |
-
|
166 |
-
/* notices/strict/deprecation */
|
167 |
-
.log-type-8:after,
|
168 |
-
.log-type-1024:after,
|
169 |
-
.log-type-2048:after,
|
170 |
-
.log-type-8192:after,
|
171 |
-
.log-type-16384:after,
|
172 |
-
.log-type-E_DEBUG:after {
|
173 |
-
background: #ec0; content: "i";
|
174 |
-
}
|
175 |
-
|
176 |
Â
.log-disable .disable {
|
177 |
Â
margin-left: 12px;
|
178 |
Â
}
|
@@ -253,7 +240,7 @@ td.column-user {
|
|
253 |
Â
.dark-tooltip.dark ul.confirm li{ background-color:#0085ba;}
|
254 |
Â
.dark-tooltip.dark ul.confirm li:hover{ background-color:#008ec2; cursor: pointer;}
|
255 |
Â
.dark-tooltip.dark ul.confirm li:last-child {
|
256 |
-
|
257 |
Â
}
|
258 |
Â
.dark-tooltip.dark ul.confirm li:last-child span {
|
259 |
Â
display: inline-block;
|
@@ -338,9 +325,12 @@ div.wsal_notice__wrapper p {
|
|
338 |
Â
text-decoration: none;
|
339 |
Â
}
|
340 |
Â
|
341 |
-
.wp-list-table #type,
|
342 |
Â
.wp-list-table #code {
|
343 |
-
width:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
344 |
Â
}
|
345 |
Â
|
346 |
Â
.wsal-filter-wrap {
|
@@ -416,3 +406,242 @@ div.wsal_notice__wrapper p {
|
|
416 |
Â
transform: translate(19px, 0);
|
417 |
Â
}
|
418 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
31 |
Â
.column-read,
|
32 |
Â
.column-more,
|
33 |
Â
.column-data {
|
34 |
+
width: 20px;
|
35 |
Â
}
|
36 |
Â
.column-type {
|
37 |
Â
width: 85px;
|
51 |
Â
}
|
52 |
Â
|
53 |
Â
.column-user {
|
54 |
+
width: 140px;
|
55 |
Â
}
|
56 |
Â
|
57 |
Â
.column-site {
|
58 |
Â
width: 160px;
|
59 |
Â
}
|
60 |
Â
|
61 |
+
.column-object {
|
62 |
+
width: 135px;
|
63 |
+
}
|
64 |
+
|
65 |
+
.column-event_type {
|
66 |
+
width: 125px;
|
67 |
+
}
|
68 |
+
|
69 |
+
th.column-mesg {
|
70 |
+
padding: 0;
|
71 |
+
}
|
72 |
+
|
73 |
+
.wsal-table-grid .mesg.column-mesg,
|
74 |
+
.wsal-table-grid th.column-mesg {
|
75 |
+
padding-left: 10px;
|
76 |
+
}
|
77 |
+
|
78 |
Â
td.column-user {
|
79 |
Â
font-size: 75% !important;
|
80 |
Â
}
|
99 |
Â
}
|
100 |
Â
|
101 |
Â
.column-scip {
|
102 |
+
width: 140px;
|
103 |
Â
}
|
104 |
Â
|
105 |
Â
.more-info {
|
160 |
Â
margin-right: auto;
|
161 |
Â
}
|
162 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
163 |
Â
.log-disable .disable {
|
164 |
Â
margin-left: 12px;
|
165 |
Â
}
|
240 |
Â
.dark-tooltip.dark ul.confirm li{ background-color:#0085ba;}
|
241 |
Â
.dark-tooltip.dark ul.confirm li:hover{ background-color:#008ec2; cursor: pointer;}
|
242 |
Â
.dark-tooltip.dark ul.confirm li:last-child {
|
243 |
+
padding: 0;
|
244 |
Â
}
|
245 |
Â
.dark-tooltip.dark ul.confirm li:last-child span {
|
246 |
Â
display: inline-block;
|
325 |
Â
text-decoration: none;
|
326 |
Â
}
|
327 |
Â
|
Â
|
|
328 |
Â
.wp-list-table #code {
|
329 |
+
width: 85px;
|
330 |
+
}
|
331 |
+
|
332 |
+
.wp-list-table #type {
|
333 |
+
width: 65px;
|
334 |
Â
}
|
335 |
Â
|
336 |
Â
.wsal-filter-wrap {
|
406 |
Â
transform: translate(19px, 0);
|
407 |
Â
}
|
408 |
Â
}
|
409 |
+
|
410 |
+
.wsal-button-grouping {
|
411 |
+
float:left;
|
412 |
+
margin-bottom: 1em;
|
413 |
+
}
|
414 |
+
|
415 |
+
.wsal-button-grouping.filters-opened {
|
416 |
+
float: none;
|
417 |
+
}
|
418 |
+
|
419 |
+
.search-icon-after {
|
420 |
+
width: 30px;
|
421 |
+
margin-left: -4px;
|
422 |
+
height: 30px;
|
423 |
+
background: #f0f2f2;
|
424 |
+
border: 1px solid #ccc;
|
425 |
+
border-left: none;
|
426 |
+
box-sizing: border-box;
|
427 |
+
font-size: 2em;
|
428 |
+
}
|
429 |
+
|
430 |
+
#wsal-filters-container {
|
431 |
+
display: flex;
|
432 |
+
margin-bottom: 1em;
|
433 |
+
}
|
434 |
+
|
435 |
+
@media screen and (max-width: 782px) {
|
436 |
+
#wsal-filters-container {
|
437 |
+
flex-direction: column;
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
.filter-col {
|
442 |
+
flex-basis: 0;
|
443 |
+
flex-grow: 1;
|
444 |
+
margin-right: 125px;
|
445 |
+
}
|
446 |
+
.filter-col:last-child {
|
447 |
+
margin-right: 0;
|
448 |
+
}
|
449 |
+
|
450 |
+
.filter-wrap,
|
451 |
+
.filter-col.filter-dates-col .wsal-as-filter-widget,
|
452 |
+
.filter-col .wsal-filters-group {
|
453 |
+
min-height: 80px;
|
454 |
+
}
|
455 |
+
|
456 |
+
.filter-wrap:last-child,
|
457 |
+
.filter-col.filter-dates-col .wsal-as-filter-widget:last-child {
|
458 |
+
min-height: auto;
|
459 |
+
}
|
460 |
+
|
461 |
+
.filter-results-button,
|
462 |
+
.display-type-buttons {
|
463 |
+
display: inline-block;
|
464 |
+
}
|
465 |
+
|
466 |
+
.display-type-buttons a.button {
|
467 |
+
display: inline-block;
|
468 |
+
}
|
469 |
+
|
470 |
+
.display-type-buttons {
|
471 |
+
float: right;
|
472 |
+
margin-left: 4px;
|
473 |
+
margin-bottom: 1em;
|
474 |
+
}
|
475 |
+
|
476 |
+
.wsal-table.widefat td {
|
477 |
+
font-size: 1.2em;
|
478 |
+
}
|
479 |
+
|
480 |
+
.button.wsal-button {
|
481 |
+
color: #000;
|
482 |
+
border-color: #ddd;
|
483 |
+
border-radius: 0;
|
484 |
+
}
|
485 |
+
|
486 |
+
.button.wsal-button .dashicons-before:before {
|
487 |
+
vertical-align: text-bottom;
|
488 |
+
}
|
489 |
+
|
490 |
+
.wsal-button.dashicons-before:before {
|
491 |
+
margin: 4px 4px 0 0;
|
492 |
+
}
|
493 |
+
|
494 |
+
td.crtd.column-crtd {
|
495 |
+
font-size: 1em;
|
496 |
+
line-height: 1em;
|
497 |
+
}
|
498 |
+
|
499 |
+
.striped>tbody>:nth-child(even) {
|
500 |
+
background-color: #f9f9f9;
|
501 |
+
}
|
502 |
+
.striped>tbody>:nth-child(odd) {
|
503 |
+
background-color: #fff;
|
504 |
+
}
|
505 |
+
|
506 |
+
.widefat td, .widefat th {
|
507 |
+
padding: 20px 10px;
|
508 |
+
}
|
509 |
+
|
510 |
+
.wp-list-table #type {
|
511 |
+
width: 80px;
|
512 |
+
}
|
513 |
+
|
514 |
+
.column-crtd {
|
515 |
+
width: 135px;
|
516 |
+
}
|
517 |
+
|
518 |
+
.wp-list-table.wsal-table-grid #code,
|
519 |
+
.wp-list-table.wsal-table-grid .code,
|
520 |
+
.wp-list-table.wsal-table-grid #data,
|
521 |
+
.wp-list-table.wsal-table-grid .data {
|
522 |
+
width: 120px;
|
523 |
+
}
|
524 |
+
|
525 |
+
.wsal-table-grid .more-info {
|
526 |
+
float: inherit;
|
527 |
+
width: 35px;
|
528 |
+
height: 35px;
|
529 |
+
font-size: 2em;
|
530 |
+
line-height: 0.65em;
|
531 |
+
}
|
532 |
+
|
533 |
+
.wp-list-table.wsal-table-grid #info,
|
534 |
+
.wsal-table-grid td.grid.column-info {
|
535 |
+
width: 225px;;
|
536 |
+
}
|
537 |
+
|
538 |
+
td.wsal-grid-text-header,
|
539 |
+
td.wsal-grid-text-data {
|
540 |
+
padding: 0
|
541 |
+
}
|
542 |
+
|
543 |
+
.wsal-grid-text-header {
|
544 |
+
font-weight: 800;
|
545 |
+
}
|
546 |
+
|
547 |
+
.wsal-grid-text-header{
|
548 |
+
min-width: 100px;
|
549 |
+
}
|
550 |
+
|
551 |
+
.wsal-table-grid td{
|
552 |
+
color: black;
|
553 |
+
}
|
554 |
+
|
555 |
+
.wsal-table.widefat.wsal-table-grid td td {
|
556 |
+
font-size: 0.9em;
|
557 |
+
}
|
558 |
+
|
559 |
+
.wsal-table-grid .code.column-code,
|
560 |
+
.wsal-table-grid .info.column-info,
|
561 |
+
.wsal-table-grid .type.column-type,
|
562 |
+
.wsal-table-grid .site.column-site {
|
563 |
+
border-right: 1px solid #eee;
|
564 |
+
border-bottom: 1px solid #eee;
|
565 |
+
}
|
566 |
+
|
567 |
+
.log-type:after {
|
568 |
+
display: block;
|
569 |
+
width: 35px;
|
570 |
+
height: 35px;
|
571 |
+
background-size: contain;
|
572 |
+
background-color: inherit;
|
573 |
+
background-repeat: no-repeat;
|
574 |
+
border-radius: 0;
|
575 |
+
font-weight: bold;
|
576 |
+
text-align: center;
|
577 |
+
margin-left: 10px;
|
578 |
+
margin-top: -5px;
|
579 |
+
}
|
580 |
+
|
581 |
+
.wsal-table-grid .log-type:after {
|
582 |
+
margin-left: auto;
|
583 |
+
margin-right: auto;
|
584 |
+
}
|
585 |
+
|
586 |
+
|
587 |
+
|
588 |
+
/* errors */
|
589 |
+
.log-type-0:after,
|
590 |
+
.log-type-1:after,
|
591 |
+
.log-type-4:after,
|
592 |
+
.log-type-16:after,
|
593 |
+
.log-type-64:after,
|
594 |
+
.log-type-256:after,
|
595 |
+
.log-type-4096:after,
|
596 |
+
.log-type-E_CRITICAL:after {
|
597 |
+
content: " ";
|
598 |
+
background-image: url( '../img/icons/critical.svg' );
|
599 |
+
}
|
600 |
+
|
601 |
+
/* high */
|
602 |
+
.log-type-6:after {
|
603 |
+
content: " ";
|
604 |
+
background-image: url( '../img/icons/high.svg' );
|
605 |
+
}
|
606 |
+
|
607 |
+
/* warnings */
|
608 |
+
.log-type-2:after,
|
609 |
+
.log-type-10:after,
|
610 |
+
.log-type-32:after,
|
611 |
+
.log-type-128:after,
|
612 |
+
.log-type-512:after {
|
613 |
+
content: " ";
|
614 |
+
background-image: url( '../img/icons/medium.svg' );
|
615 |
+
}
|
616 |
+
|
617 |
+
/* low */
|
618 |
+
.log-type-15:after {
|
619 |
+
content: " ";
|
620 |
+
background-image: url( '../img/icons/low.svg' );
|
621 |
+
}
|
622 |
+
|
623 |
+
/* notices/strict/deprecation */
|
624 |
+
.log-type-8:after,
|
625 |
+
.log-type-20:after,
|
626 |
+
.log-type-1024:after,
|
627 |
+
.log-type-2048:after,
|
628 |
+
.log-type-8192:after,
|
629 |
+
.log-type-16384:after,
|
630 |
+
.log-type-E_DEBUG:after {
|
631 |
+
content: " ";
|
632 |
+
background-image: url( '../img/icons/info.svg' );
|
633 |
+
}
|
634 |
+
|
635 |
+
.toplevel_page_wsal-auditlog .wp-menu-image img {
|
636 |
+
width: 1.2em;
|
637 |
+
}
|
638 |
+
|
639 |
+
#audit-log-viewer-content .tablenav.top {
|
640 |
+
height:inherit;
|
641 |
+
}
|
642 |
+
|
643 |
+
input#wsal_as_widget_event::-webkit-inner-spin-button,
|
644 |
+
input#wsal_as_widget_event::-webkit-outer-spin-button {
|
645 |
+
-webkit-appearance: none;
|
646 |
+
margin: 0;
|
647 |
+
}
|
css/dist/wsal-wizard.build.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
Â
/**
|
2 |
Â
* WSAL Wizard Styles
|
3 |
Â
*/
|
4 |
-
|
5 |
Â
margin: 65px auto 24px;
|
6 |
Â
-webkit-box-shadow: none;
|
7 |
Â
box-shadow: none;
|
1 |
Â
/**
|
2 |
Â
* WSAL Wizard Styles
|
3 |
Â
*/
|
4 |
+
body {
|
5 |
Â
margin: 65px auto 24px;
|
6 |
Â
-webkit-box-shadow: none;
|
7 |
Â
box-shadow: none;
|
css/dist/wsal-wizard.build.css.map
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"../../css/dist/wsal-wizard.build.css","sourceRoot":""}
|
css/extensions.css
CHANGED
@@ -29,18 +29,6 @@ input[type="submit"] {
|
|
29 |
Â
padding: 0;
|
30 |
Â
}
|
31 |
Â
|
32 |
-
body {
|
33 |
-
/* margin: 0;
|
34 |
-
padding: 0;
|
35 |
-
font-family: 'Roboto', sans-serif;
|
36 |
-
-webkit-font-smoothing: antialiased;
|
37 |
-
font-weight: 400;
|
38 |
-
width: 100%;
|
39 |
-
min-height: 100%;
|
40 |
-
color: #23282d;
|
41 |
-
background: #fff; */
|
42 |
-
}
|
43 |
-
|
44 |
Â
a {
|
45 |
Â
outline: none;
|
46 |
Â
text-decoration: none;
|
29 |
Â
padding: 0;
|
30 |
Â
}
|
31 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
32 |
Â
a {
|
33 |
Â
outline: none;
|
34 |
Â
text-decoration: none;
|
css/src/wsal-wizard.scss
CHANGED
@@ -2,186 +2,186 @@
|
|
2 |
Â
* WSAL Wizard Styles
|
3 |
Â
*/
|
4 |
Â
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
2 |
Â
* WSAL Wizard Styles
|
3 |
Â
*/
|
4 |
Â
|
5 |
+
$color-primary: #009344;
|
6 |
+
$color-secondary: #bdd63a;
|
7 |
+
$color-disable: #b4b9be;
|
8 |
+
|
9 |
+
body {
|
10 |
+
margin: 65px auto 24px;
|
11 |
+
-webkit-box-shadow: none;
|
12 |
+
box-shadow: none;
|
13 |
+
background: #f1f1f1;
|
14 |
+
padding: 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
// Header logo.
|
18 |
+
#wsal-logo {
|
19 |
+
border: 0;
|
20 |
+
margin: 0 0 24px;
|
21 |
+
padding: 0;
|
22 |
+
text-align: center;
|
23 |
+
|
24 |
+
img {
|
25 |
+
width: 400px;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
// Wizard steps.
|
30 |
+
.steps {
|
31 |
+
display: flex;
|
32 |
+
list-style-type: none;
|
33 |
+
margin: 0;
|
34 |
+
padding: 0 0 25px;
|
35 |
+
text-align: center;
|
36 |
+
|
37 |
+
li {
|
38 |
+
flex: 1 0 auto;
|
39 |
+
font-weight: 700;
|
40 |
+
margin: 0 0 5px;
|
41 |
+
color: $color-disable;
|
42 |
+
padding-bottom: 15px;
|
43 |
+
position: relative;
|
44 |
+
|
45 |
+
&.is-active {
|
46 |
+
color: $color-primary;
|
47 |
+
|
48 |
+
&::before {
|
49 |
+
border: 4px solid $color-primary;
|
50 |
+
background: $color-primary;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
&::before {
|
55 |
+
content: '';
|
56 |
+
border: 4px solid $color-disable;
|
57 |
+
border-radius: 100%;
|
58 |
+
width: 4px;
|
59 |
+
height: 4px;
|
60 |
+
position: absolute;
|
61 |
+
bottom: 0;
|
62 |
+
left: 50%;
|
63 |
+
margin-left: -6px;
|
64 |
+
margin-bottom: -8px;
|
65 |
+
background: $color-disable;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
// Wizard Content.
|
71 |
+
.wsal-setup-content {
|
72 |
+
box-shadow: 0 1px 3px rgba(0,0,0,.13);
|
73 |
+
padding: 2em;
|
74 |
+
margin: 0 0 20px;
|
75 |
+
background: #fff;
|
76 |
+
overflow: hidden;
|
77 |
+
zoom: 1;
|
78 |
+
text-align: left;
|
79 |
+
|
80 |
+
h4,
|
81 |
+
fieldset {
|
82 |
+
line-height: 1.5;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
.wsal-setup-actions {
|
87 |
+
text-align: center;
|
88 |
+
|
89 |
+
.button {
|
90 |
+
box-shadow: none;
|
91 |
+
font-size: 14px;
|
92 |
+
height: auto;
|
93 |
+
padding: 8px 20px;
|
94 |
+
min-width: 12em;
|
95 |
+
min-width: auto;
|
96 |
+
transition: 0.1s all linear;
|
97 |
+
}
|
98 |
+
|
99 |
+
.button-primary {
|
100 |
+
background-color: $color-primary;
|
101 |
+
border-color: $color-primary;
|
102 |
+
box-shadow: none;
|
103 |
+
text-shadow: none;
|
104 |
+
margin: 0;
|
105 |
+
opacity: 1;
|
106 |
+
|
107 |
+
&:hover,
|
108 |
+
&:focus {
|
109 |
+
background: lighten($color: $color-primary, $amount: 5%);
|
110 |
+
border-color: lighten($color: $color-primary, $amount: 5%);
|
111 |
+
box-shadow: none;
|
112 |
+
color: #fff;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
// Wizard footer.
|
118 |
+
.wsal-setup-footer {
|
119 |
+
text-align: center;
|
120 |
+
|
121 |
+
a {
|
122 |
+
color: $color-primary;
|
123 |
+
font-size: 14px;
|
124 |
+
text-decoration: none;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
.wsal-setup-form {
|
129 |
+
label[for="editor-users-box"],
|
130 |
+
label[for="editor-roles-box"],
|
131 |
+
label[for="exuser-query-box"],
|
132 |
+
label[for="exrole-query-box"],
|
133 |
+
label[for="ipaddr-query-box"] {
|
134 |
+
display: inline-block;
|
135 |
+
margin: 5px 0;
|
136 |
+
|
137 |
+
span {
|
138 |
+
display: inline-block;
|
139 |
+
min-width: 100px;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
.sectoken-user,
|
145 |
+
.sectoken-role,
|
146 |
+
.sectoken-ip,
|
147 |
+
.sectoken-other {
|
148 |
+
display: inline-block;
|
149 |
+
border-width: 1px;
|
150 |
+
border-style: solid;
|
151 |
+
padding: 2px 4px;
|
152 |
+
margin: 2px 0 0 2px;
|
153 |
+
border-radius: 3px;
|
154 |
+
cursor: default;
|
155 |
+
line-height: 1.3;
|
156 |
+
font-size: 14px;
|
157 |
+
|
158 |
+
a {
|
159 |
+
text-decoration: none;
|
160 |
+
font-size: 12px;
|
161 |
+
font-weight: bold;
|
162 |
+
color: #FFF;
|
163 |
+
margin-left: 2px;
|
164 |
+
background: #BBB;
|
165 |
+
border-radius: 25px;
|
166 |
+
height: 14px;
|
167 |
+
display: inline-block;
|
168 |
+
vertical-align: middle;
|
169 |
+
width: 14px;
|
170 |
+
text-align: center;
|
171 |
+
line-height: 12px;
|
172 |
+
|
173 |
+
&:hover {
|
174 |
+
background: #FB9;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
.sectoken-other { display: table; border-collapse: separate; }
|
179 |
+
.sectoken-role { background: #EFE; border-color: #5B5; }
|
180 |
+
.sectoken-user { background: #EFF; border-color: #5BE; }
|
181 |
+
.sectoken-ip { background: #FFE; border-color: #ED5; }
|
182 |
+
.sectoken-other { background: #FFE; border-color: #ED5; }
|
183 |
+
|
184 |
+
p.description {
|
185 |
+
font-size: 13px;
|
186 |
+
font-style: italic;
|
187 |
+
}
|
css/wsal-ref.css
CHANGED
@@ -1,508 +1,508 @@
|
|
1 |
Â
.ref{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
1 |
Â
.ref{
|
2 |
+
font: normal normal 12px/18px Consolas, "Liberation Mono", Menlo, "Courier New", Courier, monospace;
|
3 |
+
color: #333;
|
4 |
+
}
|
5 |
+
|
6 |
+
/* reset default styles for these elements */
|
7 |
+
.ref i,
|
8 |
+
.ref span,
|
9 |
+
.ref r,
|
10 |
+
.ref a{
|
11 |
+
font-style: inherit;
|
12 |
+
font-weight: inherit;
|
13 |
+
margin: 0;
|
14 |
+
padding: 0;
|
15 |
+
text-align: left;
|
16 |
+
display: inline;
|
17 |
+
text-decoration: inherit;
|
18 |
+
white-space: normal;
|
19 |
+
background: none;
|
20 |
+
}
|
21 |
+
|
22 |
+
/* meta content (used to generate tooltips) */
|
23 |
+
.ref > div,
|
24 |
+
.ref > t{
|
25 |
+
display: none;
|
26 |
+
}
|
27 |
+
|
28 |
+
/* show help cursor when mouse is over an entity with a tooltip */
|
29 |
+
.ref [data-tip],
|
30 |
+
.ref [h]{
|
31 |
+
cursor: help;
|
32 |
+
}
|
33 |
+
|
34 |
+
/* pointer if inside a link */
|
35 |
+
.ref a > [data-tip],
|
36 |
+
.ref a > [h]{
|
37 |
+
cursor: pointer;
|
38 |
+
}
|
39 |
+
|
40 |
+
/* links */
|
41 |
+
.ref a{
|
42 |
+
color: inherit;
|
43 |
+
border-bottom: 1px dotted transparent;
|
44 |
+
border-color: inherit;
|
45 |
+
}
|
46 |
+
|
47 |
+
/* tooltip; note that the js overrides top/left properties, this is why we use margin */
|
48 |
+
#rTip{
|
49 |
+
display: none;
|
50 |
+
position: absolute;
|
51 |
+
z-index: 99999;
|
52 |
+
font-size: 12px;
|
53 |
+
white-space: pre;
|
54 |
+
text-align: left;
|
55 |
+
text-shadow: 0 -1px 0 #191919;
|
56 |
+
line-height: 16px;
|
57 |
+
background: #222;
|
58 |
+
color: #888;
|
59 |
+
border: 0;
|
60 |
+
border-radius: 4px;
|
61 |
+
opacity: 0.90;
|
62 |
+
box-shadow:0 0 4px rgba(0,0,0, 0.25);
|
63 |
+
-webkit-transition: opacity .25s, margin .25s;
|
64 |
+
transition: opacity .25s, margin .25s;
|
65 |
+
}
|
66 |
+
|
67 |
+
#rTip.visible{
|
68 |
+
display: table;
|
69 |
+
margin: 10px 0 0 15px;
|
70 |
+
}
|
71 |
+
|
72 |
+
#rTip.visible.fadingOut{
|
73 |
+
opacity: 0;
|
74 |
+
margin: 20px 0 0 25px;
|
75 |
+
}
|
76 |
+
|
77 |
+
#rTip [data-cell],
|
78 |
+
#rTip [c]{
|
79 |
+
padding: 2px 7px;
|
80 |
+
}
|
81 |
+
|
82 |
+
#rTip [data-title], #rTip [data-desc]{
|
83 |
+
padding: 8px;
|
84 |
+
display: block;
|
85 |
+
color: #ccc;
|
86 |
+
}
|
87 |
+
|
88 |
+
#rTip [data-desc]{
|
89 |
+
padding-top: 0px;
|
90 |
+
color: #777;
|
91 |
+
}
|
92 |
+
|
93 |
+
#rTip [data-cell][data-varType],
|
94 |
+
#rTip [c][data-varType]{
|
95 |
+
padding: 10px;
|
96 |
+
background: #333;
|
97 |
+
box-shadow: inset -1px 0 0 #444;
|
98 |
+
border-right:1px solid #111;
|
99 |
+
border-top-left-radius: 4px;
|
100 |
+
border-bottom-left-radius: 4px;
|
101 |
+
}
|
102 |
+
|
103 |
+
#rTip [data-cell][data-sub],
|
104 |
+
#rTip [c][data-sub]{
|
105 |
+
padding: 8px 10px 10px 10px;
|
106 |
+
background: #333;
|
107 |
+
box-shadow: inset 0 1px 0 #444;
|
108 |
+
border-top:1px solid #111;
|
109 |
+
border-bottom-right-radius: 4px;
|
110 |
+
border-bottom-left-radius: 4px;
|
111 |
+
}
|
112 |
+
|
113 |
+
#rTip [data-table] [data-cell]:first-child,
|
114 |
+
#rTip [t] [c]:first-child{
|
115 |
+
font: bold 11px Helvetica, Arial;
|
116 |
+
color: #888;
|
117 |
+
}
|
118 |
+
|
119 |
+
#rTip [data-table] [data-cell]:nth-child(2),
|
120 |
+
#rTip [t] [c]:nth-child(2){
|
121 |
+
color: #edd078;
|
122 |
+
}
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
/* base entity - can be nested */
|
128 |
+
.ref span, .ref r{
|
129 |
+
white-space: pre;
|
130 |
+
display: inline;
|
131 |
+
}
|
132 |
+
|
133 |
+
/* key-value dividers, property & method modifiers etc. */
|
134 |
+
.ref i{
|
135 |
+
white-space: pre;
|
136 |
+
color: #aaa;
|
137 |
+
}
|
138 |
+
|
139 |
+
/* source expression (input) */
|
140 |
+
.ref [data-input]{
|
141 |
+
margin: 2px 0 0;
|
142 |
+
padding: 10px 7px;
|
143 |
+
display: block;
|
144 |
+
color: #ccc;
|
145 |
+
background-color: #333;
|
146 |
+
border-bottom: 1px solid #fff;
|
147 |
+
}
|
148 |
+
|
149 |
+
.ref [data-backtrace]{
|
150 |
+
float: right;
|
151 |
+
}
|
152 |
+
|
153 |
+
.ref [data-output]{
|
154 |
+
background: #f9f9f9;
|
155 |
+
border: 1px solid #eee;
|
156 |
+
border-top: 0;
|
157 |
+
border-radius: 0 0 4px 4px;
|
158 |
+
box-shadow: inset 0px 4px 4px #f3f3f3, inset 0px -8px 8px #fff;
|
159 |
+
padding: 2px 5px;
|
160 |
+
margin: 0 0 4px;
|
161 |
+
text-shadow: 0 1px 0 #fff;
|
162 |
+
display: block;
|
163 |
+
}
|
164 |
+
|
165 |
+
/* expand/collapse toggle link for groups */
|
166 |
+
.ref [data-toggle]{
|
167 |
+
display: inline-block;
|
168 |
+
vertical-align: -3px;
|
169 |
+
margin-left: 2px;
|
170 |
+
width: 0px;
|
171 |
+
height: 0px;
|
172 |
+
border-style: solid;
|
173 |
+
border-width: 7px 0 7px 10px;
|
174 |
+
border-color: transparent transparent transparent #CC0033;
|
175 |
+
cursor: pointer;
|
176 |
+
-webkit-transition: all ease-in .15s;
|
177 |
+
transition: all ease-in .15s;
|
178 |
+
}
|
179 |
+
|
180 |
+
/* collapse graphic */
|
181 |
+
.ref [data-toggle][data-exp]{
|
182 |
+
-webkit-transform: rotate(90deg);
|
183 |
+
-ms-transform: rotate(90deg);
|
184 |
+
transform: rotate(90deg);
|
185 |
+
}
|
186 |
+
|
187 |
+
.ref [data-group],
|
188 |
+
.ref [g]{
|
189 |
+
display: none;
|
190 |
+
}
|
191 |
+
|
192 |
+
.ref [data-toggle][data-exp] ~ [data-group],
|
193 |
+
.ref [data-toggle][data-exp] ~ [g]{
|
194 |
+
display: block;
|
195 |
+
}
|
196 |
+
|
197 |
+
/* group sections */
|
198 |
+
.ref [data-table],
|
199 |
+
.ref [t]{
|
200 |
+
display: table;
|
201 |
+
}
|
202 |
+
|
203 |
+
/* section titles */
|
204 |
+
.ref [data-tHead]{
|
205 |
+
font: bold 11px Helvetica, Arial;
|
206 |
+
color: #bcbcbc;
|
207 |
+
text-transform: lowercase;
|
208 |
+
margin: 12px 0 2px 10px;
|
209 |
+
display: block;
|
210 |
+
}
|
211 |
+
|
212 |
+
/* emulate a table for displaying array & object members */
|
213 |
+
/* section row */
|
214 |
+
.ref [data-row],
|
215 |
+
.ref [r]{
|
216 |
+
display: table-row;
|
217 |
+
}
|
218 |
+
|
219 |
+
/* zebra-like rows */
|
220 |
+
.ref [data-output] [data-row]:nth-child(odd){background: #f4f4f4;}
|
221 |
+
.ref [data-output] [data-row]:nth-child(even){background: #f9f9f9;}
|
222 |
+
.ref [data-output] [r]:nth-child(odd){background: #f4f4f4;}
|
223 |
+
.ref [data-output] [r]:nth-child(even){background: #f9f9f9;}
|
224 |
+
|
225 |
+
/* section cells */
|
226 |
+
.ref [data-cell],
|
227 |
+
.ref [c]{
|
228 |
+
display: table-cell;
|
229 |
+
width: auto;
|
230 |
+
vertical-align: top;
|
231 |
+
padding: 1px 0 1px 10px;
|
232 |
+
}
|
233 |
+
|
234 |
+
/* last cell of a row (forces table to adjust width like we want to) */
|
235 |
+
.ref [data-output] [data-table],
|
236 |
+
.ref [data-output] [t],
|
237 |
+
.ref [data-output] [data-cell]:last-child,
|
238 |
+
.ref [data-output] [c]:last-child{
|
239 |
+
width: 100%;
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
/* tag-like appearance for boolean, null and resource types */
|
245 |
+
.ref [data-true],
|
246 |
+
.ref [data-false],
|
247 |
+
.ref [data-null],
|
248 |
+
.ref [data-unknown],
|
249 |
+
.ref [data-resource],
|
250 |
+
.ref [data-match],
|
251 |
+
.ref [m]{
|
252 |
+
font: bold 11px Helvetica, Arial;
|
253 |
+
color: #fff;
|
254 |
+
padding: 1px 3px;
|
255 |
+
text-transform: lowercase;
|
256 |
+
text-shadow: none;
|
257 |
+
border-radius: 2px;
|
258 |
+
margin-right: 5px;
|
259 |
+
background-color: #eee;
|
260 |
+
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 40%,rgba(0,0,0,0.1) 100%);
|
261 |
+
background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 40%,rgba(0,0,0,0.1) 100%);
|
262 |
+
}
|
263 |
+
|
264 |
+
/* string matches */
|
265 |
+
.ref [data-match],
|
266 |
+
.ref [m]{
|
267 |
+
background-color: #d78035;
|
268 |
+
}
|
269 |
+
|
270 |
+
/* boolean true */
|
271 |
+
.ref [data-true]{
|
272 |
+
background-color: #339900;
|
273 |
+
}
|
274 |
+
|
275 |
+
/* boolean false */
|
276 |
+
.ref [data-false]{
|
277 |
+
background-color: #CC0033;
|
278 |
+
color: #fff;
|
279 |
+
}
|
280 |
+
|
281 |
+
/* null value */
|
282 |
+
.ref [data-null],
|
283 |
+
.ref [data-unknown]{
|
284 |
+
background-color: #eee;
|
285 |
+
color: #999;
|
286 |
+
text-shadow: inherit;
|
287 |
+
}
|
288 |
+
|
289 |
+
/* resources */
|
290 |
+
.ref [data-resource]{
|
291 |
+
background-color: #0057ae;
|
292 |
+
}
|
293 |
+
|
294 |
+
.ref [data-resourceProp]{
|
295 |
+
font: bold 11px Helvetica, Arial;
|
296 |
+
color: #999;
|
297 |
+
}
|
298 |
+
|
299 |
+
/* integer or double values */
|
300 |
+
.ref [data-integer],
|
301 |
+
.ref [data-double]{
|
302 |
+
color: #0099CC;
|
303 |
+
}
|
304 |
+
|
305 |
+
/* string values */
|
306 |
+
.ref [data-string]{
|
307 |
+
background: #e8f0e1;
|
308 |
+
color: #669933;
|
309 |
+
padding: 3px 1px;
|
310 |
+
|
311 |
+
/* prevent long strings from breaking the page layout */
|
312 |
+
white-space: -moz-pre-wrap; /* Mozilla */
|
313 |
+
white-space: -hp-pre-wrap; /* HP printers */
|
314 |
+
white-space: -o-pre-wrap; /* Opera 7 */
|
315 |
+
white-space: -pre-wrap; /* Opera 4-6 */
|
316 |
+
white-space: pre-wrap; /* CSS 2.1 */
|
317 |
+
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
|
318 |
+
word-wrap: break-word; /* IE */
|
319 |
+
word-break: break-all;
|
320 |
+
}
|
321 |
+
|
322 |
+
.ref [data-string][data-special]{
|
323 |
+
background: none;
|
324 |
+
padding: 0;
|
325 |
+
}
|
326 |
+
|
327 |
+
.ref [data-string][data-special] i{
|
328 |
+
background: #faf3dc;
|
329 |
+
color: #d78035;
|
330 |
+
}
|
331 |
+
|
332 |
+
/* arrays & objects */
|
333 |
+
.ref [data-array],
|
334 |
+
.ref [data-array] ~ i,
|
335 |
+
.ref [data-object],
|
336 |
+
.ref [data-object] ~ i,
|
337 |
+
.ref [data-resource] ~ i{
|
338 |
+
color:#CC0033;
|
339 |
+
}
|
340 |
+
|
341 |
+
.ref [data-method]{
|
342 |
+
font-weight: bold;
|
343 |
+
color: #0057ae;
|
344 |
+
}
|
345 |
+
|
346 |
+
.ref [data-const][data-inherited],
|
347 |
+
.ref [data-prop][data-inherited]{
|
348 |
+
color: #999;
|
349 |
+
}
|
350 |
+
|
351 |
+
.ref [data-prop][data-private],
|
352 |
+
.ref [data-method][data-private]{
|
353 |
+
color: #CC0033;
|
354 |
+
}
|
355 |
+
|
356 |
+
/* inherited methods */
|
357 |
+
.ref [data-method][data-inherited]{
|
358 |
+
font-weight: bold;
|
359 |
+
color: #6da5de;
|
360 |
+
}
|
361 |
+
|
362 |
+
/* method arguments */
|
363 |
+
.ref [data-param]{
|
364 |
+
font-weight: normal;
|
365 |
+
color: #333;
|
366 |
+
}
|
367 |
+
|
368 |
+
/* optional method arguments */
|
369 |
+
.ref [data-param][data-optional]{
|
370 |
+
font-style: italic;
|
371 |
+
font-weight: normal;
|
372 |
+
color: #aaa;
|
373 |
+
}
|
374 |
+
|
375 |
+
/* group info prefix */
|
376 |
+
.ref [data-gLabel],
|
377 |
+
.ref [gl]{
|
378 |
+
font: bold 11px Helvetica, Arial;
|
379 |
+
padding: 0 3px;
|
380 |
+
color: #333;
|
381 |
+
}
|
382 |
+
|
383 |
+
/* tiny bubbles that indicate visibility info or class features */
|
384 |
+
.ref [data-mod]{
|
385 |
+
font: bold 11px Helvetica, Arial;
|
386 |
+
text-shadow: none;
|
387 |
+
color: #fff;
|
388 |
+
}
|
389 |
+
|
390 |
+
.ref [data-input] [data-mod]{
|
391 |
+
color: #444;
|
392 |
+
}
|
393 |
+
|
394 |
+
.ref [data-mod] span,
|
395 |
+
.ref [data-mod] r{
|
396 |
+
display: inline-block;
|
397 |
+
margin: 0 2px;
|
398 |
+
width: 14px;
|
399 |
+
height: 14px;
|
400 |
+
text-align: center;
|
401 |
+
border-radius: 30px;
|
402 |
+
line-height: 15px;
|
403 |
+
}
|
404 |
+
|
405 |
+
.ref [data-mod-interface],
|
406 |
+
.ref [data-mod-abstract]{
|
407 |
+
background: #baed78;
|
408 |
+
}
|
409 |
+
|
410 |
+
.ref [data-mod-anonymous]{
|
411 |
+
background: #444;
|
412 |
+
}
|
413 |
+
|
414 |
+
.ref [data-mod-protected]{
|
415 |
+
background: #edd078;
|
416 |
+
}
|
417 |
+
|
418 |
+
.ref [data-mod-private]{
|
419 |
+
background: #eea8b9;
|
420 |
+
}
|
421 |
+
|
422 |
+
.ref [data-mod-iterateable]{
|
423 |
+
background: #d5dea5;
|
424 |
+
}
|
425 |
+
|
426 |
+
.ref [data-mod-cloneable]{
|
427 |
+
background: #bdd7d1;
|
428 |
+
}
|
429 |
+
|
430 |
+
.ref [data-mod-final]{
|
431 |
+
background: #78bded;
|
432 |
+
}
|
433 |
+
|
434 |
+
/* regular expression (colors partially match RegexBuddy and RegexPal) */
|
435 |
+
.ref [data-regex]{
|
436 |
+
font-weight: bold;
|
437 |
+
text-shadow: none;
|
438 |
+
padding: 1px 0;
|
439 |
+
background: #e6e6e6;
|
440 |
+
word-wrap: break-word;
|
441 |
+
}
|
442 |
+
|
443 |
+
/* char class */
|
444 |
+
.ref [data-regex-chr]{
|
445 |
+
background: #ffc080;
|
446 |
+
color: #694c07;
|
447 |
+
}
|
448 |
+
|
449 |
+
.ref [data-regex-chr-meta]{background: #e0a060;} /* char class: metasequence */
|
450 |
+
.ref [data-regex-chr-range]{background: #ffcf9b;} /* char class: range-hyphen */
|
451 |
+
|
452 |
+
/* metasequence */
|
453 |
+
.ref [data-regex-meta]{
|
454 |
+
background: #80c0ff;
|
455 |
+
color: #105f8c;
|
456 |
+
}
|
457 |
+
|
458 |
+
/* group: depth 1 */
|
459 |
+
.ref [data-regex-g1]{
|
460 |
+
background: #00c000;
|
461 |
+
color: #fff;
|
462 |
+
}
|
463 |
+
|
464 |
+
/* group: depth 2 */
|
465 |
+
.ref [data-regex-g2]{
|
466 |
+
background: #c3e86c;
|
467 |
+
color: #648c1c;
|
468 |
+
}
|
469 |
+
|
470 |
+
/* group: depth 3 */
|
471 |
+
.ref [data-regex-g3]{
|
472 |
+
background: #008000;
|
473 |
+
color: #fff;
|
474 |
+
}
|
475 |
+
|
476 |
+
/* group: depth 4 */
|
477 |
+
.ref [data-regex-g4]{
|
478 |
+
background: #6dcb99;
|
479 |
+
color: #fff;
|
480 |
+
}
|
481 |
+
|
482 |
+
/* group: depth 5 */
|
483 |
+
.ref [data-regex-g5]{
|
484 |
+
background: #00ff00;
|
485 |
+
color: #2c8e24;
|
486 |
+
}
|
487 |
+
|
488 |
+
.ref [data-error]{
|
489 |
+
background: #CC0033;
|
490 |
+
color: #fff;
|
491 |
+
border-radius: 0 0 4px 4px;
|
492 |
+
padding: 2px 5px;
|
493 |
+
margin: 0 0 4px;
|
494 |
+
display: block;
|
495 |
+
}
|
496 |
+
|
497 |
+
/* make labels and less-relevant text non-selectable */
|
498 |
+
.ref [data-match],
|
499 |
+
.ref [m],
|
500 |
+
.ref [data-tHead],
|
501 |
+
.ref [data-gLabel],
|
502 |
+
.ref [gl],
|
503 |
+
.ref [data-mod]{
|
504 |
+
-webkit-user-select: none;
|
505 |
+
-moz-user-select: none;
|
506 |
+
-ms-user-select: none;
|
507 |
+
user-select: none;
|
508 |
+
}
|
defaults.php
CHANGED
@@ -41,7 +41,7 @@ function load_include_custom_file( $wsal ) {
|
|
41 |
Â
* Passed through a filter so other plugins or code can add own custom
|
42 |
Â
* alerts files by adding the containing directory to this array.
|
43 |
Â
*
|
44 |
-
* @since 3.5.
|
45 |
Â
*/
|
46 |
Â
$paths = apply_filters( 'wsal_custom_alerts_dirs', array( $uploads_dir_path ) );
|
47 |
Â
foreach ( $paths as $inc_path ) {
|
@@ -154,120 +154,130 @@ function wsaldefaults_wsal_init() {
|
|
154 |
Â
)
|
155 |
Â
);
|
156 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
157 |
Â
// Create list of default alerts.
|
158 |
Â
$wsal->alerts->RegisterGroup(
|
159 |
Â
array(
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
array(
|
169 |
-
array(
|
170 |
-
array(
|
171 |
-
array(
|
172 |
-
array(
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
array(
|
179 |
-
array(
|
180 |
-
array(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
181 |
Â
),
|
182 |
Â
|
183 |
Â
/**
|
184 |
-
* Alerts:
|
185 |
Â
*/
|
186 |
-
__( '
|
187 |
-
array(
|
188 |
-
array(
|
189 |
-
array(
|
190 |
-
array(
|
191 |
-
array(
|
192 |
-
array(
|
193 |
-
array(
|
194 |
-
array(
|
195 |
-
array(
|
196 |
-
array(
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
array(
|
202 |
Â
),
|
203 |
-
),
|
204 |
Â
|
205 |
-
/**
|
206 |
-
* Section: Content & Comments
|
207 |
-
*/
|
208 |
-
__( 'Content & Comments', 'wp-security-audit-log' ) => array(
|
209 |
Â
/**
|
210 |
-
* Alerts:
|
211 |
Â
*/
|
212 |
-
__( '
|
213 |
-
array(
|
214 |
-
array(
|
215 |
-
array(
|
216 |
-
array(
|
217 |
-
array(
|
218 |
-
array( 2014, E_CRITICAL, __( 'User restored a post from trash', 'wp-security-audit-log' ), __( 'The %PostStatus% %PostType% titled %PostTitle% has been restored from trash. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
219 |
-
array( 2017, E_NOTICE, __( 'User changed post URL', 'wp-security-audit-log' ), __( 'Changed the URL of the %PostStatus% %PostType% titled %PostTitle%%ReportText%.%ChangeText% %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
220 |
-
array( 2019, E_NOTICE, __( 'User changed post author', 'wp-security-audit-log' ), __( 'Changed the author of the %PostStatus% %PostType% titled %PostTitle% from %OldAuthor% to %NewAuthor%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
221 |
-
array( 2021, E_NOTICE, __( 'User changed post status', 'wp-security-audit-log' ), __( 'Changed the status of the %PostType% titled %PostTitle% from %OldStatus% to %NewStatus%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
222 |
-
array( 2025, E_WARNING, __( 'User changed the visibility of a post', 'wp-security-audit-log' ), __( 'Changed the visibility of the %PostStatus% %PostType% titled %PostTitle% from %OldVisibility% to %NewVisibility%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
223 |
-
array( 2027, E_NOTICE, __( 'User changed the date of a post', 'wp-security-audit-log' ), __( 'Changed the date of the %PostStatus% %PostType% titled %PostTitle% from %OldDate% to %NewDate%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
224 |
-
array( 2047, E_NOTICE, __( 'User changed the parent of a page', 'wp-security-audit-log' ), __( 'Changed the parent of the %PostStatus% %PostType% titled %PostTitle% from %OldParentName% to %NewParentName%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
225 |
-
array( 2048, E_CRITICAL, __( 'User changed the template of a page', 'wp-security-audit-log' ), __( 'Changed the template of the %PostStatus% %PostType% titled %PostTitle% from %OldTemplate% to %NewTemplate%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
226 |
-
array( 2049, E_NOTICE, __( 'User set a post as sticky', 'wp-security-audit-log' ), __( 'Set the post %PostTitle% as Sticky. Post URL is %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
227 |
-
array( 2050, E_NOTICE, __( 'User removed post from sticky', 'wp-security-audit-log' ), __( 'Removed the post %PostTitle% from Sticky. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
228 |
-
array( 2065, E_WARNING, __( 'User modified the content of a post', 'wp-security-audit-log' ), __( 'Modified the content of the %PostStatus% %PostType% titled %PostTitle%. Post URL is %PostUrl%. %RevisionLink% %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
229 |
-
array( 2073, E_NOTICE, __( 'User submitted a post for review', 'wp-security-audit-log' ), __( 'Submitted the %PostType% titled %PostTitle% for review. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
230 |
-
array( 2074, E_NOTICE, __( 'User scheduled a post', 'wp-security-audit-log' ), __( 'Scheduled the %PostType% titled %PostTitle% to be published on %PublishingDate%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
231 |
-
array( 2086, E_NOTICE, __( 'User changed title of a post', 'wp-security-audit-log' ), __( 'Changed the title of the %PostStatus% %PostType% from %OldTitle% to %NewTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
232 |
-
array( 2100, E_NOTICE, __( 'User opened a post in the editor', 'wp-security-audit-log' ), __( 'Opened the %PostStatus% %PostType% titled %PostTitle% in the editor. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
233 |
-
array( 2101, E_NOTICE, __( 'User viewed a post', 'wp-security-audit-log' ), __( 'Viewed the %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
234 |
-
array( 2106, E_NOTICE, __( 'A plugin modified a post', 'wp-security-audit-log' ), __( 'Plugin modified the %PostStatus% %PostType% titled %PostTitle% of type %PostType%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
235 |
-
array( 2111, E_NOTICE, __( 'User disabled Comments/Trackbacks and Pingbacks in a post', 'wp-security-audit-log' ), __( 'Disabled %Type% on the %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
236 |
-
array( 2112, E_NOTICE, __( 'User enabled Comments/Trackbacks and Pingbacks in a post', 'wp-security-audit-log' ), __( 'Enabled %Type% on the %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
237 |
-
array( 2119, E_NOTICE, __( 'User added post tag', 'wp-security-audit-log' ), __( 'Added the tag %tag% to the %PostStatus% post titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
238 |
-
array( 2120, E_NOTICE, __( 'User removed post tag', 'wp-security-audit-log' ), __( 'Removed the tag %tag% from the %PostStatus% post titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
239 |
-
array( 2121, E_NOTICE, __( 'User created new tag', 'wp-security-audit-log' ), __( 'Created a new tag called %TagName%. %TagLink%.', 'wp-security-audit-log' ) ),
|
240 |
-
array( 2122, E_NOTICE, __( 'User deleted tag', 'wp-security-audit-log' ), __( 'Deleted the tag %TagName%.', 'wp-security-audit-log' ) ),
|
241 |
-
array( 2123, E_NOTICE, __( 'User renamed tag', 'wp-security-audit-log' ), __( 'Renamed a tag from %old_name% to %new_name%. %TagLink%.', 'wp-security-audit-log' ) ),
|
242 |
-
array( 2124, E_NOTICE, __( 'User changed tag slug', 'wp-security-audit-log' ), __( 'Changed the slug of tag %tag% from %old_slug% to %new_slug%. %TagLink%.', 'wp-security-audit-log' ) ),
|
243 |
-
array( 2125, E_NOTICE, __( 'User changed tag description', 'wp-security-audit-log' ), __( 'Changed the description of the tag %tag%%ReportText%.%ChangeText% %TagLink%.', 'wp-security-audit-log' ) ),
|
244 |
-
array( 2016, E_NOTICE, __( 'User changed post category', 'wp-security-audit-log' ), __( 'Changed the category of the %PostStatus% %PostType% titled %PostTitle% from %OldCategories% to %NewCategories%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
245 |
-
array( 2023, E_NOTICE, __( 'User created new category', 'wp-security-audit-log' ), __( 'Created a new category called %CategoryName%. Category slug is %Slug%. %CategoryLink%.', 'wp-security-audit-log' ) ),
|
246 |
-
array( 2024, E_WARNING, __( 'User deleted category', 'wp-security-audit-log' ), __( 'Deleted the %CategoryName% category. Category slug was %Slug%. %CategoryLink%.', 'wp-security-audit-log' ) ),
|
247 |
-
array( 2052, E_NOTICE, __( 'Changed the parent of a category', 'wp-security-audit-log' ), __( 'Changed the parent of the category %CategoryName% from %OldParent% to %NewParent%. %CategoryLink%.', 'wp-security-audit-log' ) ),
|
248 |
-
array( 2127, E_WARNING, __( 'User changed category name', 'wp-security-audit-log' ), __( 'Changed the name of the category %old_name% to %new_name%.', 'wp-security-audit-log' ) ),
|
249 |
-
array( 2128, E_CRITICAL, __( 'User changed category slug', 'wp-security-audit-log' ), __( 'Changed the slug of the category %CategoryName% from %old_slug% to %new_slug%.', 'wp-security-audit-log' ) ),
|
250 |
-
array( 2053, E_CRITICAL, __( 'User created a custom field for a post', 'wp-security-audit-log' ), __( 'Created a new custom field called %MetaKey% with value %MetaValue% in the %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.<br>%MetaLink%.', 'wp-security-audit-log' ) ),
|
251 |
-
array( 2054, E_CRITICAL, __( 'User updated a custom field value for a post', 'wp-security-audit-log' ), __( 'Modified the value of the custom field %MetaKey%%ReportText% in the %PostStatus% %PostType% titled %PostTitle%.%ChangeText% URL is: %PostUrl%. %EditorLinkPost%.<br>%MetaLink%.', 'wp-security-audit-log' ) ),
|
252 |
-
array( 2055, E_CRITICAL, __( 'User deleted a custom field from a post', 'wp-security-audit-log' ), __( 'Deleted the custom field %MetaKey% with value %MetaValue% from %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.', 'wp-security-audit-log' ) ),
|
253 |
-
array( 2062, E_CRITICAL, __( 'User updated a custom field name for a post', 'wp-security-audit-log' ), __( 'Changed the custom field\'s name from %MetaKeyOld% to %MetaKeyNew% in the %PostStatus% %PostType% titled %PostTitle%. URL is: %PostUrl%. %EditorLinkPost%.<br>%MetaLink%.', 'wp-security-audit-log' ) ),
|
254 |
Â
),
|
255 |
Â
|
256 |
Â
/**
|
257 |
-
* Alerts:
|
258 |
Â
*/
|
259 |
-
__( '
|
260 |
-
array(
|
261 |
-
array(
|
262 |
-
array(
|
263 |
-
array(
|
264 |
-
array(
|
265 |
-
array(
|
266 |
-
array(
|
267 |
-
array(
|
268 |
-
array(
|
269 |
-
array( 2099, E_NOTICE, __( 'User posted a comment', 'wp-security-audit-log' ), __( '%CommentMsg% on %CommentLink%.', 'wp-security-audit-log' ) ),
|
270 |
-
array( 2126, E_NOTICE, __( 'Visitor posted a comment', 'wp-security-audit-log' ), __( '%CommentMsg% on %CommentLink%.', 'wp-security-audit-log' ) ),
|
271 |
Â
),
|
272 |
Â
|
273 |
Â
/**
|
@@ -353,55 +363,77 @@ function wsaldefaults_wsal_init() {
|
|
353 |
Â
),
|
354 |
Â
),
|
355 |
Â
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
array(
|
365 |
-
array(
|
366 |
-
array(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
367 |
Â
),
|
368 |
Â
|
369 |
-
|
370 |
-
|
371 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
372 |
Â
__( 'Plugins', 'wp-security-audit-log' ) => array(
|
373 |
-
array( 5000,
|
374 |
-
array( 5001,
|
375 |
-
array( 5002,
|
376 |
-
array( 5003,
|
377 |
-
array( 5004,
|
378 |
-
array( 5010,
|
379 |
-
array( 5011,
|
380 |
-
array( 5012,
|
381 |
-
array( 5019,
|
382 |
-
array( 5025,
|
383 |
-
array( 2051,
|
384 |
Â
),
|
385 |
Â
|
386 |
-
/**
|
387 |
-
* Alerts: Themes
|
388 |
-
*/
|
389 |
Â
__( 'Themes', 'wp-security-audit-log' ) => array(
|
390 |
-
array( 5005,
|
391 |
-
array( 5006,
|
392 |
-
array( 5007,
|
393 |
-
array(
|
394 |
-
array(
|
395 |
-
array(
|
396 |
-
array(
|
397 |
-
array(
|
398 |
-
array( 5031, E_WARNING, __( 'User updated a theme', 'wp-security-audit-log' ), __( 'Updated the theme "%Theme->Name%" installed in %Theme->get_template_directory%.', 'wp-security-audit-log' ) ),
|
399 |
-
array( 2046, E_CRITICAL, __( 'User changed a file using the theme editor', 'wp-security-audit-log' ), __( 'Modified %File% with the Theme Editor.', 'wp-security-audit-log' ) ),
|
400 |
Â
),
|
401 |
Â
|
402 |
-
|
403 |
-
|
404 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
405 |
Â
__( 'System', 'wp-security-audit-log' ) => array(
|
406 |
Â
array( 0000, E_CRITICAL, __( 'Unknown Error', 'wp-security-audit-log' ), __( 'An unexpected error has occurred .', 'wp-security-audit-log' ) ),
|
407 |
Â
array( 0001, E_CRITICAL, __( 'PHP error', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
@@ -409,255 +441,248 @@ function wsaldefaults_wsal_init() {
|
|
409 |
Â
array( 0003, E_NOTICE, __( 'PHP notice', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
410 |
Â
array( 0004, E_CRITICAL, __( 'PHP exception', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
411 |
Â
array( 0005, E_CRITICAL, __( 'PHP shutdown error', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
412 |
-
array(
|
413 |
-
array( 6004, E_CRITICAL, __( 'WordPress was updated', 'wp-security-audit-log' ), __( 'Updated WordPress from version %OldVersion% to %NewVersion%.', 'wp-security-audit-log' ) ),
|
414 |
-
array( 6006, E_NOTICE, __( 'Reset plugin\'s settings to default', 'wp-security-audit-log' ), __( 'Reset plugin\'s settings to default.', 'wp-security-audit-log' ) ),
|
415 |
-
array( 6034, E_NOTICE, __( 'Purged the activity log', 'wp-security-audit-log' ), __( 'Purged the activity log.', 'wp-security-audit-log' ) ),
|
416 |
-
array( 6028, E_CRITICAL, __( 'File content has been modified', 'wp-security-audit-log' ), __( 'The content of the file %FileLocation% has been modified.', 'wp-security-audit-log' ) ),
|
417 |
-
array( 6029, E_CRITICAL, __( 'File added to the site', 'wp-security-audit-log' ), __( 'The file %FileLocation% has been added to your website.', 'wp-security-audit-log' ) ),
|
418 |
-
array( 6030, E_CRITICAL, __( 'File deleted from the site', 'wp-security-audit-log' ), __( 'The file %FileLocation% has been deleted from your website.', 'wp-security-audit-log' ) ),
|
419 |
-
array( 6031, E_CRITICAL, __( 'File not scanned because it is bigger than the maximum file size limit', 'wp-security-audit-log' ), __( 'The file %FileLocation% was not scanned because it is bigger than the maximum file size limit. If you want to include these files in the scan increase the file size limit from the %FileSettings%.', 'wp-security-audit-log' ) ),
|
420 |
-
array( 6032, E_CRITICAL, __( 'File integrity scan stopped due to the limit of 1 million files', 'wp-security-audit-log' ), __( 'The file changes scanning engine has reached the limit of 1 million files and stopped the scan. Please %ContactSupport% for more information.', 'wp-security-audit-log' ) ),
|
421 |
-
array( 6033, E_NOTICE, __( 'File integrity scan started/stopped', 'wp-security-audit-log' ), __( 'The file integrity scanner has %ScanStatus%.', 'wp-security-audit-log' ) ),
|
422 |
Â
array( 9999, E_CRITICAL, __( 'Advertising Add-ons', 'wp-security-audit-log' ), __( '%PromoName% %PromoMessage%', 'wp-security-audit-log' ) ),
|
423 |
Â
),
|
424 |
Â
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
array( 2078, E_NOTICE, __( 'User created new menu', 'wp-security-audit-log' ), __( 'Created a new menu called %MenuName%.', 'wp-security-audit-log' ) ),
|
430 |
-
array( 2079, E_WARNING, __( 'User added content to a menu', 'wp-security-audit-log' ), __( 'Added the %ContentType% called %ContentName% to menu %MenuName%.', 'wp-security-audit-log' ) ),
|
431 |
-
array( 2080, E_WARNING, __( 'User removed content from a menu', 'wp-security-audit-log' ), __( 'Removed the %ContentType% called %ContentName% from the menu %MenuName%.', 'wp-security-audit-log' ) ),
|
432 |
-
array( 2081, E_CRITICAL, __( 'User deleted menu', 'wp-security-audit-log' ), __( 'Deleted the menu %MenuName%.', 'wp-security-audit-log' ) ),
|
433 |
-
array( 2082, E_WARNING, __( 'User changed menu setting', 'wp-security-audit-log' ), __( '%Status% the menu setting %MenuSetting% in %MenuName%.', 'wp-security-audit-log' ) ),
|
434 |
-
array( 2083, E_NOTICE, __( 'User modified content in a menu', 'wp-security-audit-log' ), __( 'Modified the %ContentType% called %ContentName% in menu %MenuName%.', 'wp-security-audit-log' ) ),
|
435 |
-
array( 2084, E_WARNING, __( 'User changed name of a menu', 'wp-security-audit-log' ), __( 'Changed the name of menu %OldMenuName% to %NewMenuName%.', 'wp-security-audit-log' ) ),
|
436 |
-
array( 2085, E_NOTICE, __( 'User changed order of the objects in a menu', 'wp-security-audit-log' ), __( 'Changed the order of the %ItemName% in menu %MenuName%.', 'wp-security-audit-log' ) ),
|
437 |
-
array( 2089, E_NOTICE, __( 'User moved objects as a sub-item', 'wp-security-audit-log' ), __( 'Moved %ItemName% as a sub-item of %ParentName% in menu %MenuName%.', 'wp-security-audit-log' ) ),
|
438 |
Â
),
|
439 |
Â
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
array(
|
445 |
-
array(
|
446 |
-
array(
|
447 |
-
array( 2045, E_NOTICE, __( 'User moved widget', 'wp-security-audit-log' ), __( 'Moved the %WidgetName% widget from %OldSidebar% to %NewSidebar%.', 'wp-security-audit-log' ) ),
|
448 |
-
array( 2071, E_NOTICE, __( 'User changed widget position', 'wp-security-audit-log' ), __( 'Changed the position of the widget %WidgetName% in sidebar %Sidebar%.', 'wp-security-audit-log' ) ),
|
449 |
Â
),
|
450 |
Â
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
array(
|
458 |
-
array(
|
459 |
-
array(
|
460 |
-
array(
|
461 |
-
array(
|
462 |
-
array(
|
463 |
-
array(
|
464 |
-
array(
|
465 |
-
array(
|
466 |
-
array(
|
467 |
-
array(
|
468 |
-
array(
|
469 |
-
array(
|
470 |
-
array(
|
471 |
-
array(
|
Â
|
|
Â
|
|
472 |
Â
),
|
473 |
Â
),
|
474 |
Â
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
482 |
Â
__( 'MultiSite', 'wp-security-audit-log' ) => array(
|
483 |
-
array(
|
484 |
-
array(
|
485 |
-
array(
|
486 |
-
array(
|
487 |
-
array(
|
488 |
-
array(
|
489 |
-
array( 7001, E_CRITICAL, __( 'Existing site archived', 'wp-security-audit-log' ), __( 'Archived the site %SiteName%.', 'wp-security-audit-log' ) ),
|
490 |
-
array( 7002, E_CRITICAL, __( 'Archived site has been unarchived', 'wp-security-audit-log' ), __( 'Unarchived the site %SiteName%.', 'wp-security-audit-log' ) ),
|
491 |
-
array( 7003, E_CRITICAL, __( 'Deactivated site has been activated', 'wp-security-audit-log' ), __( 'Activated the site %SiteName%.', 'wp-security-audit-log' ) ),
|
492 |
-
array( 7004, E_CRITICAL, __( 'Site has been deactivated', 'wp-security-audit-log' ), __( 'Deactivated the site %SiteName%.', 'wp-security-audit-log' ) ),
|
493 |
-
array( 7005, E_CRITICAL, __( 'Existing site deleted from network', 'wp-security-audit-log' ), __( 'Deleted the site %SiteName%.', 'wp-security-audit-log' ) ),
|
494 |
Â
),
|
495 |
Â
),
|
496 |
Â
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
array(
|
506 |
-
array(
|
507 |
-
array(
|
508 |
-
array(
|
509 |
-
array(
|
510 |
-
array(
|
511 |
-
array(
|
512 |
-
array(
|
513 |
-
array(
|
514 |
-
array(
|
515 |
-
array(
|
516 |
-
array(
|
517 |
-
array(
|
518 |
-
array(
|
519 |
-
array(
|
520 |
-
array(
|
521 |
-
array(
|
522 |
-
array(
|
523 |
-
array(
|
524 |
-
array(
|
525 |
-
array(
|
526 |
-
array(
|
527 |
-
array(
|
528 |
-
array(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
529 |
Â
),
|
530 |
Â
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
array(
|
536 |
-
array(
|
537 |
-
array(
|
538 |
-
array(
|
539 |
-
array(
|
540 |
-
array( 9006, E_NOTICE, __( 'User changed the URL of a product', 'wp-security-audit-log' ), __( 'Changed the URL of the %ProductStatus% product %ProductTitle%%ReportText%.%ChangeText% View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
541 |
-
array( 9008, E_NOTICE, __( 'User changed the date of a product', 'wp-security-audit-log' ), __( 'Changed the date of the %ProductStatus% product %ProductTitle% from %OldDate% to %NewDate%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
542 |
-
array( 9009, E_NOTICE, __( 'User changed the visibility of a product', 'wp-security-audit-log' ), __( 'Changed the visibility of the %ProductStatus% product %ProductTitle% from %OldVisibility% to %NewVisibility%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
543 |
-
array( 9010, E_NOTICE, __( 'User modified the product', 'wp-security-audit-log' ), __( 'Modified the %ProductStatus% product %ProductTitle%. Product URL is %ProductUrl%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
544 |
-
array( 9011, E_NOTICE, __( 'User modified the draft product', 'wp-security-audit-log' ), __( 'Modified the draft product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
545 |
-
array( 9012, E_WARNING, __( 'User moved a product to trash', 'wp-security-audit-log' ), __( 'Moved the %ProductStatus% product %ProductTitle% to trash. Product URL was %ProductUrl%.', 'wp-security-audit-log' ) ),
|
546 |
-
array( 9013, E_WARNING, __( 'User permanently deleted a product', 'wp-security-audit-log' ), __( 'Permanently deleted the product %ProductTitle%.', 'wp-security-audit-log' ) ),
|
547 |
-
array( 9014, E_CRITICAL, __( 'User restored a product from the trash', 'wp-security-audit-log' ), __( 'Product %ProductTitle% has been restored from trash. View product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
548 |
-
array( 9015, E_NOTICE, __( 'User changed status of a product', 'wp-security-audit-log' ), __( 'Changed the status of the product %ProductTitle% from %OldStatus% to %NewStatus%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
549 |
-
array( 9072, E_NOTICE, __( 'User opened a product in the editor', 'wp-security-audit-log' ), __( 'Opened the %ProductStatus% product page %ProductTitle% in editor. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
550 |
-
array( 9073, E_NOTICE, __( 'User viewed a product', 'wp-security-audit-log' ), __( 'Viewed the %ProductStatus% product page %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
551 |
-
array( 9077, E_NOTICE, __( 'User renamed a product', 'wp-security-audit-log' ), __( 'Renamed the %ProductStatus% product from %OldTitle% to %NewTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
552 |
-
array( 9007, E_NOTICE, __( 'User changed the Product Data of a product', 'wp-security-audit-log' ), __( 'Changed the Product Type of the %ProductStatus% product %ProductTitle% from %OldType% to %NewType%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
553 |
-
array( 9016, E_WARNING, __( 'User changed type of a price', 'wp-security-audit-log' ), __( 'Changed the %PriceType% of the %ProductStatus% product %ProductTitle% from %OldPrice% to %NewPrice%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
554 |
-
array( 9017, E_WARNING, __( 'User changed the SKU of a product', 'wp-security-audit-log' ), __( 'Changed the SKU of the %ProductStatus% product %ProductTitle% from %OldSku% to %NewSku%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
555 |
-
array( 9018, E_CRITICAL, __( 'User changed the stock status of a product', 'wp-security-audit-log' ), __( 'Changed the stock status of the %ProductStatus% product %ProductTitle% from %OldStatus% to %NewStatus%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
556 |
-
array( 9019, E_WARNING, __( 'User changed the stock quantity', 'wp-security-audit-log' ), __( 'Changed the stock quantity of the %ProductStatus% product %ProductTitle% from %OldValue% to %NewValue%. View the product: %EditorLinkProduct%', 'wp-security-audit-log' ) ),
|
557 |
-
array( 9020, E_WARNING, __( 'User set a product type', 'wp-security-audit-log' ), __( 'Changed the type of the %ProductStatus% simple product %ProductTitle% from %OldType% to %NewType%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
558 |
-
array( 9021, E_WARNING, __( 'User changed the weight of a product', 'wp-security-audit-log' ), __( 'Changed the weight of the %ProductStatus% product %ProductTitle% from %OldWeight% to %NewWeight%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
559 |
-
array( 9022, E_WARNING, __( 'User changed the dimensions of a product', 'wp-security-audit-log' ), __( 'Changed the %DimensionType% dimensions of the %ProductStatus% product %ProductTitle% from %OldDimension% to %NewDimension%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
560 |
-
array( 9023, E_WARNING, __( 'User added the Downloadable File to a product', 'wp-security-audit-log' ), __( 'Added the Downloadable File %FileName% with File URL %FileUrl% to the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
561 |
-
array( 9024, E_WARNING, __( 'User Removed the Downloadable File from a product', 'wp-security-audit-log' ), __( 'Removed the Downloadable File %FileName% with File URL %FileUrl% from the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
562 |
-
array( 9025, E_WARNING, __( 'User changed the name of a Downloadable File in a product', 'wp-security-audit-log' ), __( 'Changed the name of a Downloadable File from %OldName% to %NewName% in %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
563 |
-
array( 9026, E_WARNING, __( 'User changed the URL of the Downloadable File in a product', 'wp-security-audit-log' ), __( 'Changed the URL of the Downloadable File %FileName% from %OldUrl% to %NewUrl% in %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
564 |
-
array( 9042, E_NOTICE, __( 'User changed the catalog visibility of a product', 'wp-security-audit-log' ), __( 'Changed the catalog visibility of the %ProductStatus% product %ProductTitle% from %OldVisibility% to %NewVisibility%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
565 |
-
array( 9043, E_NOTICE, __( 'User changed the setting Featured Product of a product', 'wp-security-audit-log' ), __( '%Status% the setting Featured Product in the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
566 |
-
array( 9044, E_WARNING, __( 'User changed the Allow Backorders setting of a product', 'wp-security-audit-log' ), __( 'Changed the Allow Backorders setting of the %ProductStatus% product %ProductTitle% from %OldStatus% to %NewStatus%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
567 |
-
array( 9045, E_NOTICE, __( 'User added/removed products to upsell of a product', 'wp-security-audit-log' ), __( '%Status% the product %UpsellTitle% to Upsells in the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
568 |
-
array( 9046, E_NOTICE, __( 'User added/removed products to cross-sells of a product', 'wp-security-audit-log' ), __( '%Status% the product %CrossSellTitle% to Cross-sells in the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
569 |
-
array( 9047, E_NOTICE, __( 'Added a new attribute of a product', 'wp-security-audit-log' ), __( 'Added a new attribute called %AttributeName% with value %AttributeValue% in the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
570 |
-
array( 9048, E_NOTICE, __( 'Modified the value of an attribute of a product', 'wp-security-audit-log' ), __( 'Modified the value of the attribute %AttributeName% from %OldValue% to %NewValue% in the %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
571 |
-
array( 9049, E_NOTICE, __( 'Changed the name of an attribute of a product', 'wp-security-audit-log' ), __( 'Changed the attribute\'s name from %OldValue% to %NewValue% in the %ProductStatus% product %ProductTitle%. URL is: %ProductUrl%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
572 |
-
array( 9050, E_NOTICE, __( 'Deleted an attribute of a product', 'wp-security-audit-log' ), __( 'Deleted the attribute %AttributeName% with value %AttributeValue% from %ProductStatus% product %ProductTitle%. URL is: %ProductUrl%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
573 |
-
array( 9051, E_WARNING, __( 'Set the attribute visibility of a product', 'wp-security-audit-log' ), __( 'Set the attribute %AttributeName% as %AttributeVisiblilty% on product page in %ProductStatus% product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ) ),
|
574 |
Â
),
|
575 |
Â
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
array( 9027, E_WARNING, __( 'User changed the Weight Unit', 'wp-security-audit-log' ), __( 'Changed the Weight Unit from %OldUnit% to %NewUnit% in WooCommerce.', 'wp-security-audit-log' ) ),
|
581 |
-
array( 9028, E_WARNING, __( 'User changed the Dimensions Unit', 'wp-security-audit-log' ), __( 'Changed the Dimensions Unit from %OldUnit% to %NewUnit% in WooCommerce.', 'wp-security-audit-log' ) ),
|
582 |
-
array( 9029, E_CRITICAL, __( 'User changed the Base Location', 'wp-security-audit-log' ), __( 'Changed the Base Location from %OldLocation% to %NewLocation% in WooCommerce.', 'wp-security-audit-log' ) ),
|
583 |
-
array( 9030, E_CRITICAL, __( 'User Enabled/Disabled taxes', 'wp-security-audit-log' ), __( '%Status% taxes in the WooCommerce store.', 'wp-security-audit-log' ) ),
|
584 |
-
array( 9031, E_CRITICAL, __( 'User changed the currency', 'wp-security-audit-log' ), __( 'Changed the currency from %OldCurrency% to %NewCurrency% in WooCommerce.', 'wp-security-audit-log' ) ),
|
585 |
-
array( 9032, E_CRITICAL, __( 'User Enabled/Disabled the use of coupons during checkout', 'wp-security-audit-log' ), __( '%Status% the use of coupons during checkout in WooCommerce.', 'wp-security-audit-log' ) ),
|
586 |
-
array( 9033, E_CRITICAL, __( 'User Enabled/Disabled guest checkout', 'wp-security-audit-log' ), __( '%Status% guest checkout in WooCommerce.', 'wp-security-audit-log' ) ),
|
587 |
-
array( 9034, E_CRITICAL, __( 'User Enabled/Disabled cash on delivery', 'wp-security-audit-log' ), __( '%Status% the option Cash on Delivery in WooCommerce.', 'wp-security-audit-log' ) ),
|
588 |
-
array( 9074, E_CRITICAL, __( 'User enabled a payment gateway', 'wp-security-audit-log' ), __( 'Enabled the payment gateway %GatewayName%.', 'wp-security-audit-log' ) ),
|
589 |
-
array( 9075, E_CRITICAL, __( 'User disabled a payment gateway', 'wp-security-audit-log' ), __( 'Disabled the payment gateway %GatewayName%.', 'wp-security-audit-log' ) ),
|
590 |
-
array( 9076, E_CRITICAL, __( 'User modified a payment gateway', 'wp-security-audit-log' ), __( 'Modified the payment gateway %GatewayName%.', 'wp-security-audit-log' ) ),
|
591 |
-
array( 9078, E_NOTICE, __( 'User modified prices with tax option', 'wp-security-audit-log' ), __( 'Set the option that prices are %TaxStatus% of tax.', 'wp-security-audit-log' ) ),
|
592 |
-
array( 9079, E_CRITICAL, __( 'User modified tax calculation base', 'wp-security-audit-log' ), __( 'Set the setting Calculate tax based on to %Setting%.', 'wp-security-audit-log' ) ),
|
593 |
-
array( 9080, E_CRITICAL, __( 'User modified shipping tax class', 'wp-security-audit-log' ), __( 'Set the Shipping tax class to %Setting%.', 'wp-security-audit-log' ) ),
|
594 |
-
array( 9081, E_CRITICAL, __( 'User enabled/disabled rounding of tax', 'wp-security-audit-log' ), __( '%Status% rounding of tax at subtotal level.', 'wp-security-audit-log' ) ),
|
595 |
-
array( 9082, E_CRITICAL, __( 'User modified a shipping zone', 'wp-security-audit-log' ), __( '%ShippingZoneStatus% the shipping zone %ShippingZoneName%.', 'wp-security-audit-log' ) ),
|
596 |
-
array( 9002, E_NOTICE, __( 'User created a new product category', 'wp-security-audit-log' ), __( 'Created a new product category called %CategoryName% in WooCommerce. Product category slug is %Slug%.', 'wp-security-audit-log' ) ),
|
597 |
-
array( 9052, E_WARNING, __( 'User deleted a product category', 'wp-security-audit-log' ), __( 'Deleted the product category called %CategoryName% in WooCommerce. Product category slug was %CategorySlug%.', 'wp-security-audit-log' ) ),
|
598 |
-
array( 9053, E_WARNING, __( 'User changed the slug of a product category', 'wp-security-audit-log' ), __( 'Changed the Slug of the product category %CategoryName% in WooCommerce from %OldSlug% to %NewSlug%.', 'wp-security-audit-log' ) ),
|
599 |
-
array( 9054, E_NOTICE, __( 'User changed the parent category of a product category', 'wp-security-audit-log' ), __( 'Changed the Parent Category of the product category %CategoryName% in WooCommerce from %OldParentCat% to %NewParentCat%.', 'wp-security-audit-log' ) ),
|
600 |
-
array( 9055, E_NOTICE, __( 'User changed the display type of a product category', 'wp-security-audit-log' ), __( 'Changed the Display Type of the product category %CategoryName% in WooCommerce from %OldDisplayType% to %NewDisplayType%.', 'wp-security-audit-log' ) ),
|
601 |
-
array( 9056, E_NOTICE, __( 'User changed the name of a product category', 'wp-security-audit-log' ), __( 'Changed the name of the product category %CategoryName% in WooCommerce from %OldName% to %NewName%.', 'wp-security-audit-log' ) ),
|
602 |
-
array( 9057, E_NOTICE, __( 'User created a new attribute', 'wp-security-audit-log' ), __( 'Created a new Attribute called %AttributeName% with slug %AttributeSlug% in WooCommerce.', 'wp-security-audit-log' ) ),
|
603 |
-
array( 9058, E_WARNING, __( 'User deleted an attribute', 'wp-security-audit-log' ), __( 'Deleted the Attribute called %AttributeName% with Slug %AttributeSlug% from WooCommerce.', 'wp-security-audit-log' ) ),
|
604 |
-
array( 9059, E_WARNING, __( 'User changed the slug of an attribute', 'wp-security-audit-log' ), __( 'Changed the Slug of the Attribute %AttributeName% in WooCommerce from %OldSlug% to %NewSlug%.', 'wp-security-audit-log' ) ),
|
605 |
-
array( 9060, E_WARNING, __( 'User changed the name of an attribute', 'wp-security-audit-log' ), __( 'Changed the Name of the Attribute %AttributeName% in WooCommerce from %OldName% to %NewName%.', 'wp-security-audit-log' ) ),
|
606 |
-
array( 9061, E_WARNING, __( 'User changed the default sort order of an attribute', 'wp-security-audit-log' ), __( 'Changed the Default Sort Order of the Attribute %AttributeName% in WooCommerce from %OldSortOrder% to %NewSortOrder%.', 'wp-security-audit-log' ) ),
|
607 |
-
array( 9062, E_WARNING, __( 'User enabled/disabled the option Enable Archives of an attribute', 'wp-security-audit-log' ), __( '%ArchivesStatus% the option Enable Archives in the Attribute %AttributeName% in WooCommerce.', 'wp-security-audit-log' ) ),
|
608 |
-
array( 9063, E_NOTICE, __( 'User published a new coupon', 'wp-security-audit-log' ), __( 'Published a new coupon called %CouponName% in WooCommerce.', 'wp-security-audit-log' ) ),
|
609 |
-
array( 9064, E_WARNING, __( 'User changed the discount type of a coupon', 'wp-security-audit-log' ), __( 'Changed the Discount Type of the %CouponStatus% WooCommerce coupon %CouponName% from %OldDiscountType% to %NewDiscountType%.', 'wp-security-audit-log' ) ),
|
610 |
-
array( 9065, E_WARNING, __( 'User changed the coupon amount of a coupon', 'wp-security-audit-log' ), __( 'Changed the Coupon Amount of the %CouponStatus% WooCommerce coupon %CouponName% from %OldAmount% to %NewAmount%.', 'wp-security-audit-log' ) ),
|
611 |
-
array( 9066, E_WARNING, __( 'User changed the coupon expire date of a coupon', 'wp-security-audit-log' ), __( 'Changed the Coupon Expire Date of the %CouponStatus% WooCommerce coupon %CouponName% from %OldDate% to %NewDate%.', 'wp-security-audit-log' ) ),
|
612 |
-
array( 9067, E_WARNING, __( 'User changed the usage restriction settings of a coupon', 'wp-security-audit-log' ), __( 'Changed the Usage Restriction settings of the %CouponStatus% WooCommerce coupon %CouponName%.', 'wp-security-audit-log' ) ),
|
613 |
-
array( 9068, E_WARNING, __( 'User changed the usage limits settings of a coupon', 'wp-security-audit-log' ), __( 'Changed the Usage Limits settings of the %CouponStatus% WooCommerce coupon %CouponName%.', 'wp-security-audit-log' ) ),
|
614 |
-
array( 9069, E_NOTICE, __( 'User changed the description of a coupon', 'wp-security-audit-log' ), __( 'Changed the Description of the %CouponStatus% WooCommerce coupon %CouponName%.', 'wp-security-audit-log' ) ),
|
615 |
-
array( 9070, E_WARNING, __( 'User changed the status of a coupon', 'wp-security-audit-log' ), __( 'Changed the Status of the WooCommerce coupon %CouponName% from %OldStatus% to %NewStatus%.', 'wp-security-audit-log' ) ),
|
616 |
-
array( 9071, E_WARNING, __( 'User renamed a WooCommerce coupon', 'wp-security-audit-log' ), __( 'Renamed the WooCommerce coupon %OldName% to %NewName%.', 'wp-security-audit-log' ) ),
|
617 |
-
array( 9035, E_NOTICE, __( 'A WooCommerce order has been placed', 'wp-security-audit-log' ), __( 'A WooCommerce order %OrderTitle% has just been placed. %EditorLinkOrder%.', 'wp-security-audit-log' ) ),
|
618 |
-
array( 9036, E_NOTICE, __( 'WooCommerce order status changed', 'wp-security-audit-log' ), __( 'Marked the WooCommerce order %OrderTitle% as %OrderStatus%. %EditorLinkOrder%.', 'wp-security-audit-log' ) ),
|
619 |
-
array( 9037, E_WARNING, __( 'User moved a WooCommerce order to trash', 'wp-security-audit-log' ), __( 'Moved the WooCommerce order %OrderTitle% to trash.', 'wp-security-audit-log' ) ),
|
620 |
-
array( 9038, E_WARNING, __( 'User moved a WooCommerce order out of trash', 'wp-security-audit-log' ), __( 'Moved the WooCommerce order %OrderTitle% out of trash. %EditorLinkOrder%.', 'wp-security-audit-log' ) ),
|
621 |
-
array( 9039, E_WARNING, __( 'User permanently deleted a WooCommerce order', 'wp-security-audit-log' ), __( 'Permanently deleted the WooCommerce order %OrderTitle%.', 'wp-security-audit-log' ) ),
|
622 |
-
array( 9040, E_NOTICE, __( 'User edited a WooCommerce order', 'wp-security-audit-log' ), __( 'Edited the WooCommerce order %OrderTitle%. %EditorLinkOrder%.', 'wp-security-audit-log' ) ),
|
623 |
-
array( 9041, E_WARNING, __( 'User refunded a WooCommerce order', 'wp-security-audit-log' ), __( 'Refunded the WooCommerce order %OrderTitle%. %EditorLinkOrder%.', 'wp-security-audit-log' ) ),
|
624 |
-
array( 9083, E_NOTICE, __( 'User changed the billing address details', 'wp-security-audit-log' ), __( 'Changed the %AddressField% in the user\'s %TargetUsername% billing address.%ChangeText%', 'wp-security-audit-log' ) ),
|
625 |
-
array( 9084, E_NOTICE, __( 'User changed the shipping address details', 'wp-security-audit-log' ), __( 'Changed the %AddressField% in the user\'s %TargetUsername% shipping address.%ChangeText%', 'wp-security-audit-log' ) ),
|
626 |
Â
),
|
627 |
Â
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
array(
|
633 |
-
array(
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
array(
|
638 |
-
array(
|
639 |
-
array(
|
640 |
-
array(
|
641 |
-
array(
|
642 |
-
array(
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
array(
|
647 |
-
array(
|
648 |
-
array(
|
649 |
-
array(
|
650 |
-
array(
|
651 |
-
array(
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
array(
|
656 |
-
array(
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
657 |
Â
),
|
658 |
Â
),
|
659 |
Â
)
|
660 |
Â
);
|
Â
|
|
661 |
Â
// Load Custom alerts.
|
662 |
Â
load_include_custom_file( $wsal );
|
663 |
Â
}
|
41 |
Â
* Passed through a filter so other plugins or code can add own custom
|
42 |
Â
* alerts files by adding the containing directory to this array.
|
43 |
Â
*
|
44 |
+
* @since 3.5.1 - Added the `wsal_custom_alerts_dirs` filter.
|
45 |
Â
*/
|
46 |
Â
$paths = apply_filters( 'wsal_custom_alerts_dirs', array( $uploads_dir_path ) );
|
47 |
Â
foreach ( $paths as $inc_path ) {
|
154 |
Â
)
|
155 |
Â
);
|
156 |
Â
|
157 |
+
$wsal->constants->AddConstant( 'WSAL_CRITICAL', 1, __( 'Critical, high-impact messages.', 'wp-security-audit-log' ) );
|
158 |
+
$wsal->constants->AddConstant( 'WSAL_HIGH', 6, __( 'High severity messages.', 'wp-security-audit-log' ) );
|
159 |
+
$wsal->constants->AddConstant( 'WSAL_MEDIUM', 10, __( 'Medium severity messages.', 'wp-security-audit-log' ) );
|
160 |
+
$wsal->constants->AddConstant( 'WSAL_LOW', 15, __( 'Low severity messages.', 'wp-security-audit-log' ) );
|
161 |
+
$wsal->constants->AddConstant( 'WSAL_INFORMATIONAL', 20, __( 'Run-time notice.', 'wp-security-audit-log' ) );
|
162 |
+
|
163 |
Â
// Create list of default alerts.
|
164 |
Â
$wsal->alerts->RegisterGroup(
|
165 |
Â
array(
|
166 |
+
__( 'Users Logins & Sessions Events', 'wp-security-audit-log' ) => array(
|
167 |
+
__( 'User Activity', 'wp-security-audit-log' ) => array(
|
168 |
+
array( 1000, WSAL_LOW, __( 'User logged in', 'wp-security-audit-log' ), '', 'user', 'login' ),
|
169 |
+
array( 1001, WSAL_LOW, __( 'User logged out', 'wp-security-audit-log' ), '', 'user', 'logout' ),
|
170 |
+
array( 1002, WSAL_MEDIUM, __( 'Login failed', 'wp-security-audit-log' ), '', 'user', 'failed-login' ),
|
171 |
+
array( 1003, WSAL_LOW, __( 'Login failed / non existing user', 'wp-security-audit-log' ), __( '%Attempts% failed login(s) %LineBreak% %LogFileText%', 'wp-security-audit-log' ), 'system', 'failed-login' ),
|
172 |
+
array( 1004, WSAL_MEDIUM, __( 'Login blocked', 'wp-security-audit-log' ), __( 'Login blocked because other session(s) already exist for this user. %LineBreak% IP address: %ClientIP%', 'wp-security-audit-log' ), 'user', 'blocked' ),
|
173 |
+
array( 1005, WSAL_LOW, __( 'User logged in with existing session(s)', 'wp-security-audit-log' ), __( 'User logged in however there are other session(s) already exist for this user. %LineBreak% IP address: %IPAddress%', 'wp-security-audit-log' ), 'user', 'login' ),
|
174 |
+
array( 1006, WSAL_MEDIUM, __( 'User logged out all other sessions with the same username', 'wp-security-audit-log' ), __( 'Logged out all other sessions with the same user.', 'wp-security-audit-log' ), 'user', 'logout' ),
|
175 |
+
array( 1007, WSAL_MEDIUM, __( 'User session destroyed and logged out', 'wp-security-audit-log' ), __( 'Terminated the session of another user. %LineBreak% User: %TargetUserName% %LineBreak% Session ID: %TargetSessionID%', 'wp-security-audit-log' ), 'user', 'logout' ),
|
176 |
+
array( 1008, WSAL_MEDIUM, __( 'Switched to another user', 'wp-security-audit-log' ), __( 'Switched to another user. %LineBreak% User: %TargetUserName% %LineBreak% Role: %TargetUserRole%', 'wp-security-audit-log' ), 'user', 'login' ),
|
177 |
+
array( 2010, WSAL_MEDIUM, __( 'User uploaded file from Uploads directory', 'wp-security-audit-log' ), __( 'Filename: %FileName% %LineBreak% Directory: %FilePath%', 'wp-security-audit-log' ), 'file', 'uploaded' ),
|
178 |
+
array( 2011, WSAL_LOW, __( 'User deleted file from Uploads directory', 'wp-security-audit-log' ), __( 'Filename: %FileName% %LineBreak% Directory: %FilePath%', 'wp-security-audit-log' ), 'file', 'deleted' ),
|
179 |
+
),
|
180 |
+
),
|
181 |
+
|
182 |
+
__( 'Content & Comments', 'wp-security-audit-log' ) => array(
|
183 |
+
__( 'Content', 'wp-security-audit-log' ) => array(
|
184 |
+
array( 2000, WSAL_INFORMATIONAL, __( 'User created a new post and saved it as draft', 'wp-security-audit-log' ), __( 'Created the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'created' ),
|
185 |
+
array( 2001, WSAL_LOW, __( 'User published a post', 'wp-security-audit-log' ), __( 'Published the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'published' ),
|
186 |
+
array( 2002, WSAL_LOW, __( 'User modified a post', 'wp-security-audit-log' ), __( 'Modified the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
187 |
+
array( 2008, WSAL_MEDIUM, __( 'User permanently deleted a post from the trash', 'wp-security-audit-log' ), __( 'Permanently deleted the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType%', 'wp-security-audit-log' ), 'post', 'deleted' ),
|
188 |
+
array( 2012, WSAL_MEDIUM, __( 'User moved a post to the trash', 'wp-security-audit-log' ), __( 'Moved the post %PostTitle% to trash %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'deleted' ),
|
189 |
+
array( 2014, WSAL_LOW, __( 'User restored a post from trash', 'wp-security-audit-log' ), __( 'Restored the post %PostTitle% from trash %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'restored' ),
|
190 |
+
array( 2017, WSAL_INFORMATIONAL, __( 'User changed post URL', 'wp-security-audit-log' ), __( 'Changed the URL of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous URL: %OldUrl% %LineBreak% New URL: %NewUrl% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
191 |
+
array( 2019, WSAL_INFORMATIONAL, __( 'User changed post author', 'wp-security-audit-log' ), __( 'Changed the author of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous author: %OldAuthor% %LineBreak% New author: %NewAuthor% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%.', 'wp-security-audit-log' ), 'post', 'modified' ),
|
192 |
+
array( 2021, WSAL_MEDIUM, __( 'User changed post status', 'wp-security-audit-log' ), __( 'Changed the status of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status was: %OldStatus% %LineBreak% New status: %NewStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
193 |
+
array( 2025, WSAL_LOW, __( 'User changed the visibility of a post', 'wp-security-audit-log' ), __( 'Changed the visibility of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Visibility was: %OldVisibility% %LineBreak% Visibility is: %NewVisibility% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
194 |
+
array( 2027, WSAL_INFORMATIONAL, __( 'User changed the date of a post', 'wp-security-audit-log' ), __( 'Changed the date of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous date: %OldDate% %LineBreak% New date: %NewDate% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
195 |
+
array( 2047, WSAL_LOW, __( 'User changed the parent of a page', 'wp-security-audit-log' ), __( 'Changed the parent of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous parent: %OldParentName% %LineBreak% New parent: %NewParentName% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
196 |
+
array( 2048, WSAL_LOW, __( 'User changed the template of a page', 'wp-security-audit-log' ), __( 'Changed the template of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous template: %OldTemplate% %LineBreak% New template: %NewTemplate% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
197 |
+
array( 2049, WSAL_INFORMATIONAL, __( 'User set a post as sticky', 'wp-security-audit-log' ), __( 'Set the post %PostTitle% as sticky %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
198 |
+
array( 2050, WSAL_INFORMATIONAL, __( 'User removed post from sticky', 'wp-security-audit-log' ), __( 'Removed the post %PostTitle% from sticky %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
199 |
+
array( 2065, WSAL_LOW, __( 'User modified the content of a post', 'wp-security-audit-log' ), __( 'Modified the content of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% %RevisionLink% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
200 |
+
array( 2073, WSAL_INFORMATIONAL, __( 'User submitted a post for review', 'wp-security-audit-log' ), __( 'Submitted the post %PostTitle% for review %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
201 |
+
array( 2074, WSAL_LOW, __( 'User scheduled a post', 'wp-security-audit-log' ), __( 'Scheduled the post %PostTitle% to be published on %PublishingDate% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
202 |
+
array( 2086, WSAL_INFORMATIONAL, __( 'User changed title of a post', 'wp-security-audit-log' ), __( 'Changed the title of the post %OldTitle% %LineBreak% New title: %NewTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
203 |
+
array( 2100, WSAL_INFORMATIONAL, __( 'User opened a post in the editor', 'wp-security-audit-log' ), __( 'Opened the post %PostTitle% in the editor %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'opened' ),
|
204 |
+
array( 2101, WSAL_INFORMATIONAL, __( 'User viewed a post', 'wp-security-audit-log' ), __( 'Viewed the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% URL: %PostUrl% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'viewed' ),
|
205 |
+
array( 2106, WSAL_MEDIUM, __( 'A plugin modified a post', 'wp-security-audit-log' ), __( 'Plugin modified the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
206 |
+
array( 2111, WSAL_LOW, __( 'User enabled/disabled comments in a post', 'wp-security-audit-log' ), __( 'The comments in the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'enabled' ),
|
207 |
+
array( 2112, WSAL_LOW, __( 'User enabled/disabled trackbacks and pingbacks in a post', 'wp-security-audit-log' ), __( 'Pingbacks and Trackbacks in the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'enabled' ),
|
208 |
+
),
|
209 |
+
|
210 |
+
__( 'Tags', 'wp-security-audit-log' ) => array(
|
211 |
+
array( 2119, WSAL_INFORMATIONAL, __( 'User added post tag', 'wp-security-audit-log' ), __( 'Added tag(s) to the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Added tag(s): %tag% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
212 |
+
array( 2120, WSAL_INFORMATIONAL, __( 'User removed post tag', 'wp-security-audit-log' ), __( 'Removed tag(s) from the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Removed tag(s): %tag% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
213 |
+
array( 2121, WSAL_INFORMATIONAL, __( 'User created new tag', 'wp-security-audit-log' ), __( 'Created the tag %TagName% %LineBreak% Slug: %Slug% %LineBreak% %TagLink%', 'wp-security-audit-log' ), 'tag', 'created' ),
|
214 |
+
array( 2122, WSAL_LOW, __( 'User deleted tag', 'wp-security-audit-log' ), __( 'Deleted the tag %TagName% %LineBreak% Slug: %Slug%', 'wp-security-audit-log' ), 'tag', 'deleted' ),
|
215 |
+
array( 2123, WSAL_INFORMATIONAL, __( 'User renamed tag', 'wp-security-audit-log' ), __( 'Renamed the tag %old_name% %LineBreak% New name: %new_name% %LineBreak% Slug: %Slug% %LineBreak% %TagLink%', 'wp-security-audit-log' ), 'tag', 'modified' ),
|
216 |
+
array( 2124, WSAL_INFORMATIONAL, __( 'User changed tag slug', 'wp-security-audit-log' ), __( 'Changed the slug of the tag %tag% %LineBreak% Previous slug: %old_slug% %LineBreak% New slug: %new_slug% %LineBreak% %TagLink%', 'wp-security-audit-log' ), 'tag', 'modified' ),
|
217 |
+
array( 2125, WSAL_INFORMATIONAL, __( 'User changed tag description', 'wp-security-audit-log' ), __( 'Changed the description of the tag %tag% %LineBreak% Slug: %Slug% %LineBreak% Previous description: %old_desc% %LineBreak% New description: %new_desc% %LineBreak% %TagLink%', 'wp-security-audit-log' ), 'tag', 'modified' ),
|
218 |
+
),
|
219 |
+
|
220 |
+
__( 'Categories', 'wp-security-audit-log' ) => array(
|
221 |
+
array( 2016, WSAL_LOW, __( 'User changed post category', 'wp-security-audit-log' ), __( 'Changed the category of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous category(ies): %OldCategories% %LineBreak% New category(ies): %NewCategories% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
222 |
+
array( 2023, WSAL_MEDIUM, __( 'User created new category', 'wp-security-audit-log' ), __( 'Created the category %CategoryName% %LineBreak% Slug: %Slug% %LineBreak% %CategoryLink%', 'wp-security-audit-log' ), 'category', 'created' ),
|
223 |
+
array( 2024, WSAL_MEDIUM, __( 'User deleted category', 'wp-security-audit-log' ), __( 'Deleted the category %CategoryName% %LineBreak% Slug: %Slug%', 'wp-security-audit-log' ), 'category', 'deleted' ),
|
224 |
+
array( 2052, WSAL_LOW, __( 'Changed the parent of a category', 'wp-security-audit-log' ), __( 'Changed the parent of the category %CategoryName% %LineBreak% Slug: %Slug% %LineBreak% Previous parent: %OldParent% %LineBreak% New parent: %NewParent% %LineBreak% %CategoryLink%', 'wp-security-audit-log' ), 'category', 'modified' ),
|
225 |
+
array( 2127, WSAL_LOW, __( 'User changed category name', 'wp-security-audit-log' ), __( 'Changed the name of the category: %new_name% %LineBreak% Slug: %Slug% %LineBreak% Previous name: %old_name% %LineBreak% %cat_link%', 'wp-security-audit-log' ), 'category', 'modified' ),
|
226 |
+
array( 2128, WSAL_LOW, __( 'User changed category slug', 'wp-security-audit-log' ), __( 'Changed the slug of the category: %CategoryName% %LineBreak% Previous slug: %old_slug% %LineBreak% New slug: %new_slug% %LineBreak% %cat_link%', 'wp-security-audit-log' ), 'category', 'modified' ),
|
227 |
+
),
|
228 |
+
|
229 |
+
__( 'Custom Fields', 'wp-security-audit-log' ) => array(
|
230 |
+
array( 2053, WSAL_LOW, __( 'User created a custom field for a post', 'wp-security-audit-log' ), __( 'Created a new custom field called %MetaKey% in the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Custom field value: %MetaValue% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost% %LineBreak% %MetaLink%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
231 |
+
array( 2054, WSAL_LOW, __( 'User updated a custom field value for a post', 'wp-security-audit-log' ), __( 'Modified the value of the custom field %MetaKey% in the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Previous custom field value: %MetaValueOld% %LineBreak% New custom field value: %MetaValueNew% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost% %LineBreak% %MetaLink%.', 'wp-security-audit-log' ), 'custom-field', 'modified' ),
|
232 |
+
array( 2055, WSAL_MEDIUM, __( 'User deleted a custom field from a post', 'wp-security-audit-log' ), __( 'Deleted the custom field %MetaKey% from the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'custom-field', 'deleted' ),
|
233 |
+
array( 2062, WSAL_LOW, __( 'User updated a custom field name for a post', 'wp-security-audit-log' ), __( 'Renamed the custom field %MetaKeyOld% in the post %PostTitle% %LineBreak% New name: %MetaKeyNew% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% %EditorLinkPost% %LineBreak% %MetaLink%', 'wp-security-audit-log' ), 'custom-field', 'modified' ),
|
234 |
Â
),
|
235 |
Â
|
236 |
Â
/**
|
237 |
+
* Alerts: Comments
|
238 |
Â
*/
|
239 |
+
__( 'Comments', 'wp-security-audit-log' ) => array(
|
240 |
+
array( 2090, WSAL_INFORMATIONAL, __( 'User approved a comment', 'wp-security-audit-log' ), __( 'Approved the comment posted by %Author% on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'approved' ),
|
241 |
+
array( 2091, WSAL_INFORMATIONAL, __( 'User unapproved a comment', 'wp-security-audit-log' ), __( 'Unapproved the comment posted by %Author% on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'unapproved' ),
|
242 |
+
array( 2092, WSAL_INFORMATIONAL, __( 'User replied to a comment', 'wp-security-audit-log' ), __( 'Replied to the comment posted by %Author% on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'created' ),
|
243 |
+
array( 2093, WSAL_LOW, __( 'User edited a comment', 'wp-security-audit-log' ), __( 'Edited the comment posted by %Author% on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'modified' ),
|
244 |
+
array( 2094, WSAL_INFORMATIONAL, __( 'User marked a comment as Spam', 'wp-security-audit-log' ), __( 'Marked the comment posted by %Author% on the post %PostTitle% as spam %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'unapproved' ),
|
245 |
+
array( 2095, WSAL_LOW, __( 'User marked a comment as Not Spam', 'wp-security-audit-log' ), __( 'Marked the comment posted by %Author% on the post %PostTitle% as not spam %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'approved' ),
|
246 |
+
array( 2096, WSAL_LOW, __( 'User moved a comment to trash', 'wp-security-audit-log' ), __( 'Moved the comment posted by %Author% on the post %PostTitle% to trash %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'deleted' ),
|
247 |
+
array( 2097, WSAL_INFORMATIONAL, __( 'User restored a comment from the trash', 'wp-security-audit-log' ), __( 'Restored the comment posted by %Author% on the post %PostTitle% from trash %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'restored' ),
|
248 |
+
array( 2098, WSAL_LOW, __( 'User permanently deleted a comment', 'wp-security-audit-log' ), __( 'Permanently deleted the comment posted by %Author% on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %PostUrlIfPlublished% %LineBreak% Comment ID: %CommentID%', 'wp-security-audit-log' ), 'comment', 'deleted' ),
|
249 |
+
array( 2099, WSAL_INFORMATIONAL, __( 'User posted a comment', 'wp-security-audit-log' ), __( 'Posted a comment on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'created' ),
|
250 |
+
/**
|
251 |
+
* IMPORTANT: This alert is depricated but should not be
|
252 |
+
* removed from the definitions for backwards compatibilty.
|
253 |
+
*/
|
254 |
+
array( 2126, WSAL_INFORMATIONAL, __( 'Visitor posted a comment', 'wp-security-audit-log' ), __( 'Posted a comment on the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Post Type: %PostType% %LineBreak% Post Status: %PostStatus% %LineBreak% Comment ID: %CommentID% %PostUrlIfPlublished% %LineBreak% %CommentLink%', 'wp-security-audit-log' ), 'comment', 'created' ),
|
255 |
Â
),
|
Â
|
|
256 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
257 |
Â
/**
|
258 |
+
* Alerts: Widgets
|
259 |
Â
*/
|
260 |
+
__( 'Widgets', 'wp-security-audit-log' ) => array(
|
261 |
+
array( 2042, WSAL_MEDIUM, __( 'User added a new widget', 'wp-security-audit-log' ), __( 'Added a new %WidgetName% widget in %Sidebar%.', 'wp-security-audit-log' ), 'widget', 'added' ),
|
262 |
+
array( 2043, WSAL_HIGH, __( 'User modified a widget', 'wp-security-audit-log' ), __( 'Modified the %WidgetName% widget in %Sidebar%.', 'wp-security-audit-log' ), 'widget', 'modified' ),
|
263 |
+
array( 2044, WSAL_MEDIUM, __( 'User deleted widget', 'wp-security-audit-log' ), __( 'Deleted the %WidgetName% widget from %Sidebar%.', 'wp-security-audit-log' ), 'widget', 'deleted' ),
|
264 |
+
array( 2045, WSAL_LOW, __( 'User moved widget', 'wp-security-audit-log' ), __( 'Moved the %WidgetName% widget %LineBreak% From: %OldSidebar% %LineBreak% To: %NewSidebar%', 'wp-security-audit-log' ), 'widget', 'modified' ),
|
265 |
+
array( 2071, WSAL_LOW, __( 'User changed widget position', 'wp-security-audit-log' ), __( 'Changed the position of the %WidgetName% widget in %Sidebar%.', 'wp-security-audit-log' ), 'widget', 'modified' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
266 |
Â
),
|
267 |
Â
|
268 |
Â
/**
|
269 |
+
* Alerts: Menus
|
270 |
Â
*/
|
271 |
+
__( 'Menus', 'wp-security-audit-log' ) => array(
|
272 |
+
array( 2078, WSAL_LOW, __( 'User created new menu', 'wp-security-audit-log' ), __( 'New menu called %MenuName%.', 'wp-security-audit-log' ), 'menu', 'created' ),
|
273 |
+
array( 2079, WSAL_LOW, __( 'User added content to a menu', 'wp-security-audit-log' ), __( 'Added new item to the menu %MenuName% %LineBreak% Item type: %ContentType% %LineBreak% Item name: %ContentName% ', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
274 |
+
array( 2080, WSAL_LOW, __( 'User removed content from a menu', 'wp-security-audit-log' ), __( 'Removed item from the menu %MenuName% %LineBreak% Item type: %ContentType% %LineBreak% Item name: %ContentName%', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
275 |
+
array( 2081, WSAL_MEDIUM, __( 'User deleted menu', 'wp-security-audit-log' ), __( 'Deleted the menu %MenuName%', 'wp-security-audit-log' ), 'menu', 'deleted' ),
|
276 |
+
array( 2082, WSAL_LOW, __( 'User changed menu setting', 'wp-security-audit-log' ), __( 'The setting in the %MenuName% %LineBreak% Setting: %MenuSetting%', 'wp-security-audit-log' ), 'menu', 'enabled' ),
|
277 |
+
array( 2083, WSAL_LOW, __( 'User modified content in a menu', 'wp-security-audit-log' ), __( 'Modified an item in the menu %MenuName% %LineBreak% Item type: %ContentType% %LineBreak% Item name: %ContentName%', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
278 |
+
array( 2084, WSAL_LOW, __( 'User changed name of a menu', 'wp-security-audit-log' ), __( 'Renamed the menu %OldMenuName% %LineBreak% New name: %NewMenuName%', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
279 |
+
array( 2085, WSAL_LOW, __( 'User changed order of the objects in a menu', 'wp-security-audit-log' ), __( 'Changed the order of the items in the menu %MenuName%', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
280 |
+
array( 2089, WSAL_LOW, __( 'User moved objects as a sub-item', 'wp-security-audit-log' ), __( 'Menu name: %MenuName% %LineBreak% Moved item %ItemName% as a sub-item of %ParentName%', 'wp-security-audit-log' ), 'menu', 'modified' ),
|
Â
|
|
Â
|
|
281 |
Â
),
|
282 |
Â
|
283 |
Â
/**
|
363 |
Â
),
|
364 |
Â
),
|
365 |
Â
|
366 |
+
__( 'User Accounts', 'wp-security-audit-log' ) => array(
|
367 |
+
__( 'User Profiles', 'wp-security-audit-log' ) => array(
|
368 |
+
array( 4000, WSAL_CRITICAL, __( 'New user was created on WordPress', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
|
369 |
+
array( 4001, WSAL_CRITICAL, __( 'User created another WordPress user', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
|
370 |
+
array( 4002, WSAL_CRITICAL, __( 'The role of a user was changed by another WordPress user', 'wp-security-audit-log' ), __( 'Changed the role of the user %TargetUsername% %LineBreak% New role: %NewRole% %LineBreak% Previous role: %OldRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
371 |
+
array( 4003, WSAL_HIGH, __( 'User has changed his or her password', 'wp-security-audit-log' ), __( 'Changed the password %LineBreak% First name: %TargetUserData->FirstName% %LineBreak% Last name: %TargetUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
372 |
+
array( 4004, WSAL_HIGH, __( 'User changed another user\'s password', 'wp-security-audit-log' ), __( 'Changed the password of the user %TargetUserData->Username% %LineBreak% Role: %TargetUserData->Roles% %LineBreak% First name: %TargetUserData->FirstName% %LineBreak% Last name: %TargetUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
373 |
+
array( 4005, WSAL_MEDIUM, __( 'User changed his or her email address', 'wp-security-audit-log' ), __( 'Changed the email address to %NewEmail% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
374 |
+
array( 4006, WSAL_MEDIUM, __( 'User changed another user\'s email address', 'wp-security-audit-log' ), __( 'Changed the email address of the user %TargetUsername% %LineBreak% New email address: %NewEmail% %LineBreak% Previous email address: %OldEmail% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
375 |
+
array( 4007, WSAL_HIGH, __( 'User was deleted by another user', 'wp-security-audit-log' ), __( 'User: %TargetUserData->Username% %LineBreak% Role: %TargetUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName%', 'wp-security-audit-log' ), 'user', 'deleted' ),
|
376 |
+
array( 4014, WSAL_INFORMATIONAL, __( 'User opened the profile page of another user', 'wp-security-audit-log' ), __( 'The profile page of the user %TargetUsername% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'opened' ),
|
377 |
+
array( 4015, WSAL_LOW, __( 'User updated a custom field value for a user', 'wp-security-audit-log' ), __( 'Changed the value of a custom field in the user profile %TargetUsername% %LineBreak% Custom field: %custom_field_name% %LineBreak% Previous value: %old_value% %LineBreak% New value: %new_value% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
378 |
+
array( 4016, WSAL_LOW, __( 'User created a custom field value for a user', 'wp-security-audit-log' ), __( 'Created a new custom field in the user profile %TargetUsername% %LineBreak% Custom field: %custom_field_name% %LineBreak% Custom field value: %new_value% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
379 |
+
array( 4017, WSAL_INFORMATIONAL, __( 'User changed first name for a user', 'wp-security-audit-log' ), __( 'Changed the first name of the user %TargetUsername% %LineBreak% Previous name: %old_firstname% %LineBreak% New name: %new_firstname% %LineBreak% Role: %Roles% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
380 |
+
array( 4018, WSAL_INFORMATIONAL, __( 'User changed last name for a user', 'wp-security-audit-log' ), __( 'Changed the last name of the user %TargetUsername% %LineBreak% Previous last name: %old_lastname% %LineBreak% New last name: %new_lastname% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
381 |
+
array( 4019, WSAL_INFORMATIONAL, __( 'User changed nickname for a user', 'wp-security-audit-log' ), __( 'Changed the nickname of the user %TargetUsername% %LineBreak% Previous nickname: %old_nickname% New nickname: %new_nickname% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
382 |
+
array( 4020, WSAL_LOW, __( 'User changed the display name for a user', 'wp-security-audit-log' ), __( 'Changed the display name of the user %TargetUsername% %LineBreak% Previous display name: %old_displayname% New display name: %new_displayname% %LineBreak% Role: %Roles% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
383 |
Â
),
|
384 |
Â
|
385 |
+
__( 'Multisite User Profiles', 'wp-security-audit-log' ) => array(
|
386 |
+
array( 4008, WSAL_CRITICAL, __( 'User granted Super Admin privileges', 'wp-security-audit-log' ), __( 'Granted Super Admin privileges to %TargetUsername% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
387 |
+
array( 4009, WSAL_CRITICAL, __( 'User revoked from Super Admin privileges', 'wp-security-audit-log' ), __( 'Revoked Super Admin privileges from %TargetUsername% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
388 |
+
array( 4010, WSAL_MEDIUM, __( 'Existing user added to a site', 'wp-security-audit-log' ), __( 'Added user %TargetUsername% to site: %SiteName% %LineBreak% Role: %TargetUserRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
389 |
+
array( 4011, WSAL_MEDIUM, __( 'User removed from site', 'wp-security-audit-log' ), __( 'Removed user %TargetUsername% from site: %SiteName% %LineBreak% Previous role: %TargetUserRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
390 |
+
array( 4012, WSAL_CRITICAL, __( 'New network user created', 'wp-security-audit-log' ), __( 'Created a new network user %NewUserData->Username% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
|
391 |
+
),
|
392 |
+
|
393 |
+
__( 'bbPress User Profiles', 'wp-security-audit-log' ) => array(
|
394 |
+
array( 4013, WSAL_LOW, __( 'The forum role of a user was changed by another WordPress user', 'wp-security-audit-log' ), __( 'Change the forum role of user %TargetUsername% %LineBreak% Previous role: %OldRole% %LineBreak% New role: %NewRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
395 |
+
),
|
396 |
+
),
|
397 |
+
|
398 |
+
__( 'Plugins & Themes', 'wp-security-audit-log' ) => array(
|
399 |
Â
__( 'Plugins', 'wp-security-audit-log' ) => array(
|
400 |
+
array( 5000, WSAL_CRITICAL, __( 'User installed a plugin', 'wp-security-audit-log' ), __( 'Name: %Plugin->Name% %LineBreak% Install location: %Plugin->plugin_dir_path%', 'wp-security-audit-log' ), 'plugin', 'installed' ),
|
401 |
+
array( 5001, WSAL_HIGH, __( 'User activated a WordPress plugin', 'wp-security-audit-log' ), __( 'Name: %PluginData->Name% %LineBreak% Install location: %PluginFile%', 'wp-security-audit-log' ), 'plugin', 'activated' ),
|
402 |
+
array( 5002, WSAL_HIGH, __( 'User deactivated a WordPress plugin', 'wp-security-audit-log' ), __( 'Name: %PluginData->Name% %LineBreak% Install location: %PluginFile%', 'wp-security-audit-log' ), 'plugin', 'deactivated' ),
|
403 |
+
array( 5003, WSAL_HIGH, __( 'User uninstalled a plugin', 'wp-security-audit-log' ), __( 'Name: %PluginData->Name% %LineBreak% Install location: %PluginFile%', 'wp-security-audit-log' ), 'plugin', 'uninstalled' ),
|
404 |
+
array( 5004, WSAL_LOW, __( 'User upgraded a plugin', 'wp-security-audit-log' ), __( 'Name: %PluginData->Name% %LineBreak% Install location: %PluginFile%', 'wp-security-audit-log' ), 'plugin', 'updated' ),
|
405 |
+
array( 5010, WSAL_LOW, __( 'Plugin created tables', 'wp-security-audit-log' ), __( 'Plugin created these tables in the database %LineBreak% Plugin: %Plugin->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'created' ),
|
406 |
+
array( 5011, WSAL_LOW, __( 'Plugin modified tables structure', 'wp-security-audit-log' ), __( 'Plugin modified the structure of these database tables %LineBreak% Plugin: %Plugin->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'modified' ),
|
407 |
+
array( 5012, WSAL_MEDIUM, __( 'Plugin deleted tables', 'wp-security-audit-log' ), __( 'Plugin deleted these tables from the database %LineBreak% Plugin: %Plugin->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'deleted' ),
|
408 |
+
array( 5019, WSAL_MEDIUM, __( 'A plugin created a post', 'wp-security-audit-log' ), __( 'Plugin %PluginName% created the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% %EditorLinkPage%', 'wp-security-audit-log' ), 'post', 'created' ),
|
409 |
+
array( 5025, WSAL_LOW, __( 'A plugin deleted a post', 'wp-security-audit-log' ), __( 'Plugin %PluginName% deleted the post %PostTitle% %LineBreak% Post ID: %PostID% %LineBreak% Type: %PostType%', 'wp-security-audit-log' ), 'post', 'deleted' ),
|
410 |
+
array( 2051, WSAL_HIGH, __( 'User changed a file using the plugin editor', 'wp-security-audit-log' ), __( 'Modified a file with the plugin editor %LineBreak% File: %File%', 'wp-security-audit-log' ), 'file', 'modified' ),
|
411 |
Â
),
|
412 |
Â
|
Â
|
|
Â
|
|
Â
|
|
413 |
Â
__( 'Themes', 'wp-security-audit-log' ) => array(
|
414 |
+
array( 5005, WSAL_CRITICAL, __( 'User installed a theme', 'wp-security-audit-log' ), __( 'Theme: "%Theme->Name%" %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'installed' ),
|
415 |
+
array( 5006, WSAL_HIGH, __( 'User activated a theme', 'wp-security-audit-log' ), __( 'Theme "%Theme->Name%" %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'activated' ),
|
416 |
+
array( 5007, WSAL_HIGH, __( 'User uninstalled a theme', 'wp-security-audit-log' ), __( 'Theme "%Theme->Name%" %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'deleted' ),
|
417 |
+
array( 5013, WSAL_LOW, __( 'Theme created tables', 'wp-security-audit-log' ), __( 'Theme created these tables in the database %LineBreak% Theme: %Theme->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'created' ),
|
418 |
+
array( 5014, WSAL_LOW, __( 'Theme modified tables structure', 'wp-security-audit-log' ), __( 'Theme modified the structure of these database tables %LineBreak% Theme: %Theme->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'modified' ),
|
419 |
+
array( 5015, WSAL_MEDIUM, __( 'Theme deleted tables', 'wp-security-audit-log' ), __( 'Theme deleted these tables from the database %LineBreak% Theme: %Theme->Name% %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'deleted' ),
|
420 |
+
array( 5031, WSAL_LOW, __( 'User updated a theme', 'wp-security-audit-log' ), __( 'Name: %Theme->Name% %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'updated' ),
|
421 |
+
array( 2046, WSAL_HIGH, __( 'User changed a file using the theme editor', 'wp-security-audit-log' ), __( 'Modified a file with the theme editor %LineBreak% File: %Theme%/%File%', 'wp-security-audit-log' ), 'file', 'modified' ),
|
Â
|
|
Â
|
|
422 |
Â
),
|
423 |
Â
|
424 |
+
__( 'Themes on Multisite', 'wp-security-audit-log' ) => array(
|
425 |
+
array( 5008, WSAL_HIGH, __( 'Activated theme on network', 'wp-security-audit-log' ), __( 'Network activated the theme %Theme->Name% %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'activated' ),
|
426 |
+
array( 5009, WSAL_MEDIUM, __( 'Deactivated theme from network', 'wp-security-audit-log' ), __( 'Network deactivated the theme %Theme->Name% %LineBreak% Install location: %Theme->get_template_directory%', 'wp-security-audit-log' ), 'theme', 'deactivated' ),
|
427 |
+
),
|
428 |
+
|
429 |
+
__( 'Database Events', 'wp-security-audit-log' ) => array(
|
430 |
+
array( 5016, WSAL_HIGH, __( 'Unknown component created tables', 'wp-security-audit-log' ), __( 'An unknown component created these tables in the database %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'created' ),
|
431 |
+
array( 5017, WSAL_HIGH, __( 'Unknown component modified tables structure', 'wp-security-audit-log' ), __( 'An unknown component modified the structure of these database tables %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'modified' ),
|
432 |
+
array( 5018, WSAL_HIGH, __( 'Unknown component deleted tables', 'wp-security-audit-log' ), __( 'An unknown component deleted these tables from the database %LineBreak% Tables: %TableNames%', 'wp-security-audit-log' ), 'database', 'deleted' ),
|
433 |
+
),
|
434 |
+
),
|
435 |
+
|
436 |
+
__( 'WordPress & System', 'wp-security-audit-log' ) => array(
|
437 |
Â
__( 'System', 'wp-security-audit-log' ) => array(
|
438 |
Â
array( 0000, E_CRITICAL, __( 'Unknown Error', 'wp-security-audit-log' ), __( 'An unexpected error has occurred .', 'wp-security-audit-log' ) ),
|
439 |
Â
array( 0001, E_CRITICAL, __( 'PHP error', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
441 |
Â
array( 0003, E_NOTICE, __( 'PHP notice', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
442 |
Â
array( 0004, E_CRITICAL, __( 'PHP exception', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
443 |
Â
array( 0005, E_CRITICAL, __( 'PHP shutdown error', 'wp-security-audit-log' ), __( '%Message%.', 'wp-security-audit-log' ) ),
|
444 |
+
array( 6004, WSAL_MEDIUM, __( 'WordPress was updated', 'wp-security-audit-log' ), __( 'Updated WordPress %LineBreak% Previous version: %OldVersion% %LineBreak% New version: %NewVersion%', 'wp-security-audit-log' ), 'system', 'updated' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
445 |
Â
array( 9999, E_CRITICAL, __( 'Advertising Add-ons', 'wp-security-audit-log' ), __( '%PromoName% %PromoMessage%', 'wp-security-audit-log' ) ),
|
446 |
Â
),
|
447 |
Â
|
448 |
+
__( 'Activity log plugin', 'wp-security-audit-log' ) => array(
|
449 |
+
array( 6000, WSAL_INFORMATIONAL, __( 'Events automatically pruned by system', 'wp-security-audit-log' ), __( 'System automatically deleted %EventCount% event(s)', 'wp-security-audit-log' ), 'activity-logs', 'deleted' ),
|
450 |
+
array( 6006, WSAL_MEDIUM, __( 'Reset plugin\'s settings to default', 'wp-security-audit-log' ), __( 'Reset the WP Security Audit Log plugin settings to default', 'wp-security-audit-log' ), 'plugin', 'modified' ),
|
451 |
+
array( 6034, WSAL_CRITICAL, __( 'Purged the activity log', 'wp-security-audit-log' ), __( 'Purged the activity log', 'wp-security-audit-log' ), 'activity-logs', 'deleted' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
452 |
Â
),
|
453 |
Â
|
454 |
+
__( 'File Changes', 'wp-security-audit-log' ) => array(
|
455 |
+
array( 6028, WSAL_HIGH, __( 'File content has been modified', 'wp-security-audit-log' ), __( 'Content of the file on site modified %LineBreak% File: %File% %LineBreak% Location: %FileLocation%', 'wp-security-audit-log' ), 'file', 'modified' ),
|
456 |
+
array( 6029, WSAL_CRITICAL, __( 'File added to the site', 'wp-security-audit-log' ), __( 'File added to site %LineBreak% File: %File% %LineBreak% Location: %FileLocation%', 'wp-security-audit-log' ), 'file', 'added' ),
|
457 |
+
array( 6030, WSAL_MEDIUM, __( 'File deleted from the site', 'wp-security-audit-log' ), __( 'File deleted from site %LineBreak% File: %File% %LineBreak% Location: %FileLocation%', 'wp-security-audit-log' ), 'file', 'deleted' ),
|
458 |
+
array( 6031, WSAL_INFORMATIONAL, __( 'File not scanned because it is bigger than the maximum file size limit', 'wp-security-audit-log' ), __( 'File not scanned because it is bigger than the maximum file size limit %LineBreak% File: %File% %LineBreak% Location: %FileLocation% %LineBreak% %FileSettings%', 'wp-security-audit-log' ), 'system', 'blocked' ),
|
459 |
+
array( 6032, WSAL_INFORMATIONAL, __( 'File integrity scan stopped due to the limit of 1 million files', 'wp-security-audit-log' ), __( 'Your website has more than 1 million files so the file integrity scanner cannot scan them all. Contact support for more information. %LineBreak% %ContactSupport%', 'wp-security-audit-log' ), 'system', 'blocked' ),
|
460 |
+
array( 6033, WSAL_INFORMATIONAL, __( 'File integrity scan started/stopped', 'wp-security-audit-log' ), __( 'The file integrity scan has %ScanStatus%.', 'wp-security-audit-log' ), 'system', 'started' ),
|
Â
|
|
Â
|
|
461 |
Â
),
|
462 |
Â
|
463 |
+
__( 'User/Visitor Actions', 'wp-security-audit-log' ) => array(
|
464 |
+
array( 6007, WSAL_INFORMATIONAL, __( 'User requests non-existing pages (404 Error Pages)', 'wp-security-audit-log' ), __( 'Has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%', 'wp-security-audit-log' ), 'system', 'opened' ),
|
465 |
+
array( 6023, WSAL_INFORMATIONAL, __( 'Website Visitor User requests non-existing pages (404 Error Pages)', 'wp-security-audit-log' ), __( 'Website visitor has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%', 'wp-security-audit-log' ), 'system', 'opened' ),
|
466 |
+
),
|
467 |
+
|
468 |
+
__( 'WordPress Site Settings', 'wp-security-audit-log' ) => array(
|
469 |
+
array( 6001, WSAL_CRITICAL, __( 'Option Anyone Can Register in WordPress settings changed', 'wp-security-audit-log' ), __( 'The option Anyone can register', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
470 |
+
array( 6002, WSAL_CRITICAL, __( 'New User Default Role changed', 'wp-security-audit-log' ), __( 'Changed the new user default role %LineBreak% Previous role: %OldRole% %LineBreak% New role: %NewRole%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
471 |
+
array( 6003, WSAL_CRITICAL, __( 'WordPress Administrator Notification email changed', 'wp-security-audit-log' ), __( 'Changed the WordPress administrator notification email address %LineBreak% Previous address %OldEmail% %LineBreak% New address: %NewEmail%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
472 |
+
array( 6005, WSAL_HIGH, __( 'User changes the WordPress Permalinks', 'wp-security-audit-log' ), __( 'Changed the WordPress permalinks %LineBreak% Previous permalinks: %OldPattern% %LineBreak% New permalinks: %NewPattern%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
473 |
+
array( 6008, WSAL_INFORMATIONAL, __( 'Enabled/Disabled the option Discourage search engines from indexing this site', 'wp-security-audit-log' ), __( 'Discourage search engines from indexing this site.', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
474 |
+
array( 6009, WSAL_MEDIUM, __( 'Enabled/Disabled comments on all the website', 'wp-security-audit-log' ), __( 'Comments on the website', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
475 |
+
array( 6010, WSAL_MEDIUM, __( 'Enabled/Disabled the option Comment author must fill out name and email', 'wp-security-audit-log' ), __( 'The option Comment author must fill out name and email', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
476 |
+
array( 6011, WSAL_MEDIUM, __( 'Enabled/Disabled the option Users must be logged in and registered to comment', 'wp-security-audit-log' ), __( 'The option Users must be logged in and registered to comment', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
477 |
+
array( 6012, WSAL_INFORMATIONAL, __( 'Enabled/Disabled the option to automatically close comments', 'wp-security-audit-log' ), __( 'The option to Automatically close comments after %Value% days', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
478 |
+
array( 6013, WSAL_INFORMATIONAL, __( 'Changed the value of the option Automatically close comments', 'wp-security-audit-log' ), __( 'Changed the value of the option to Automatically close comments after a number of days %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
479 |
+
array( 6014, WSAL_MEDIUM, __( 'Enabled/Disabled the option for comments to be manually approved', 'wp-security-audit-log' ), __( 'The option for comments to be manually approved', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
480 |
+
array( 6015, WSAL_LOW, __( 'Enabled/Disabled the option for an author to have previously approved comments for the comments to appear', 'wp-security-audit-log' ), __( 'The option for an author to have previously approved comments for the comments to appear', 'wp-security-audit-log' ), 'system-setting', 'enabled' ),
|
481 |
+
array( 6016, WSAL_LOW, __( 'Changed the number of links that a comment must have to be held in the queue', 'wp-security-audit-log' ), __( 'Changed the minimum number of links a comment must have to be held in the queue %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
482 |
+
array( 6017, WSAL_INFORMATIONAL, __( 'Modified the list of keywords for comments moderation', 'wp-security-audit-log' ), __( 'Modified the list of keywords for comments medoration', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
483 |
+
array( 6018, WSAL_INFORMATIONAL, __( 'Modified the list of keywords for comments blacklisting', 'wp-security-audit-log' ), __( 'Modified the list of keywords for comments blacklisting', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
484 |
+
array( 6024, WSAL_CRITICAL, __( 'Option WordPress Address (URL) in WordPress settings changed', 'wp-security-audit-log' ), __( 'Changed the WordPress address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
485 |
+
array( 6025, WSAL_CRITICAL, __( 'Option Site Address (URL) in WordPress settings changed', 'wp-security-audit-log' ), __( 'Changed the site address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%', 'wp-security-audit-log' ), 'system-setting', 'modified' ),
|
486 |
Â
),
|
487 |
Â
),
|
488 |
Â
|
489 |
+
__( 'bbPress Forums', 'wp-security-audit-log' ) => array(
|
490 |
+
__( 'Forums', 'wp-security-audit-log' ) => array(
|
491 |
+
array( 8000, WSAL_INFORMATIONAL, __( 'User created new forum', 'wp-security-audit-log' ), __( 'New forum called %ForumName% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'created' ),
|
492 |
+
array( 8001, WSAL_MEDIUM, __( 'User changed status of a forum', 'wp-security-audit-log' ), __( 'Changed the status of the forum %ForumName% %LineBreak% Previous Status: %OldStatus% %LineBreak% New Status: %NewStatus% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
493 |
+
array( 8002, WSAL_MEDIUM, __( 'User changed visibility of a forum', 'wp-security-audit-log' ), __( 'Changed the visibility of the forum %ForumName% %LineBreak% Previous visibility: %OldVisibility% %LineBreak% New visibility: %NewVisibility% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
494 |
+
array( 8003, WSAL_LOW, __( 'User changed the URL of a forum', 'wp-security-audit-log' ), __( 'Changed the URL of the forum %ForumName% %LineBreak% Previous URL: %OldUrl% %LineBreak% New URL: %NewUrl% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
495 |
+
array( 8004, WSAL_INFORMATIONAL, __( 'User changed order of a forum', 'wp-security-audit-log' ), __( 'Changed the sorting order of the forum %ForumName% %LineBreak% Previous sorting order: %OldOrder% %LineBreak% New sorting order: %NewOrder% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
496 |
+
array( 8005, WSAL_HIGH, __( 'User moved forum to trash', 'wp-security-audit-log' ), __( 'Moved the forum %ForumName% to trash', 'wp-security-audit-log' ), 'bbpress-forum', 'deleted' ),
|
497 |
+
array( 8006, WSAL_HIGH, __( 'User permanently deleted forum', 'wp-security-audit-log' ), __( 'Permanently deleted the forum %ForumName%', 'wp-security-audit-log' ), 'bbpress-forum', 'deleted' ),
|
498 |
+
array( 8007, WSAL_HIGH, __( 'User restored forum from trash', 'wp-security-audit-log' ), __( 'Restored the forum %ForumName% from trash', 'wp-security-audit-log' ), 'bbpress-forum', 'restored' ),
|
499 |
+
array( 8008, WSAL_LOW, __( 'User changed the parent of a forum', 'wp-security-audit-log' ), __( 'Changed the parent of the forum %ForumName% %LineBreak% Previous parent: %OldParent% %LineBreak% New parent: %NewParent% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
500 |
+
array( 8011, WSAL_LOW, __( 'User changed type of a forum', 'wp-security-audit-log' ), __( 'Changed the type of the forum %ForumName% %LineBreak% Previous type: %OldType% %LineBreak% New type: %NewType% %LineBreak% %EditorLinkForum%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
501 |
+
),
|
502 |
+
|
503 |
+
__( 'bbPress Forum Topics', 'wp-security-audit-log' ) => array(
|
504 |
+
array( 8014, WSAL_INFORMATIONAL, __( 'User created new topic', 'wp-security-audit-log' ), __( 'New topic called %TopicName% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'created' ),
|
505 |
+
array( 8015, WSAL_INFORMATIONAL, __( 'User changed status of a topic', 'wp-security-audit-log' ), __( 'Changed the status of the topic %TopicName% %LineBreak% Previous status: %OldStatus% %LineBreak% New status: %NewStatus% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
506 |
+
array( 8016, WSAL_INFORMATIONAL, __( 'User changed type of a topic', 'wp-security-audit-log' ), __( 'Changed the type of the topic %TopicName% %LineBreak% Previous type: %OldType% %LineBreak% New type: %NewType% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
507 |
+
array( 8017, WSAL_INFORMATIONAL, __( 'User changed URL of a topic', 'wp-security-audit-log' ), __( 'Changed the URL of the topic %TopicName% %LineBreak% Previous URL: %OldUrl% %LineBreak% New URL: %NewUrl% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
508 |
+
array( 8018, WSAL_INFORMATIONAL, __( 'User changed the forum of a topic', 'wp-security-audit-log' ), __( 'Changed the forum of the topic %TopicName% %LineBreak% Previous forum: %OldForum% %LineBreak% New forum: %NewForum% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
509 |
+
array( 8019, WSAL_MEDIUM, __( 'User moved topic to trash', 'wp-security-audit-log' ), __( 'Moved the %TopicName% to trash', 'wp-security-audit-log' ), 'bbpress-forum', 'deleted' ),
|
510 |
+
array( 8020, WSAL_MEDIUM, __( 'User permanently deleted topic', 'wp-security-audit-log' ), __( 'Permanently deleted the topic %TopicName%', 'wp-security-audit-log' ), 'bbpress-forum', 'deleted' ),
|
511 |
+
array( 8021, WSAL_INFORMATIONAL, __( 'User restored topic from trash', 'wp-security-audit-log' ), __( 'Restored the topic %TopicName% from trash', 'wp-security-audit-log' ), 'bbpress-forum', 'restored' ),
|
512 |
+
array( 8022, WSAL_LOW, __( 'User changed visibility of a topic', 'wp-security-audit-log' ), __( 'Changed the visibility of the topic %TopicName% %LineBreak% Previous visibility: %OldVisibility% %LineBreak% New visibility: %NewVisibility% %LineBreak% %EditorLinkTopic%', 'wp-security-audit-log' ), 'bbpress-forum', 'modified' ),
|
513 |
+
),
|
514 |
+
|
515 |
+
__( 'bbPress Settings', 'wp-security-audit-log' ) => array(
|
516 |
+
array( 8009, WSAL_HIGH, __( 'User changed forum\'s role', 'wp-security-audit-log' ), __( 'Changed the forum user\'s auto role %LineBreak% Previous role: %OldRole% %LineBreak% New role: %NewRole%', 'wp-security-audit-log' ), 'bbpress', 'modified' ),
|
517 |
+
array( 8010, WSAL_CRITICAL, __( 'User changed option of a forum', 'wp-security-audit-log' ), __( 'The option for anonymous posting on the forums', 'wp-security-audit-log' ), 'bbpress', 'enabled' ),
|
518 |
+
array( 8012, WSAL_MEDIUM, __( 'User changed time to disallow post editing', 'wp-security-audit-log' ), __( 'Changed the time to disallow post editing in the forums %LineBreak% Previous time: %OldTime% %LineBreak% New time: %NewTime%', 'wp-security-audit-log' ), 'bbpress', 'modified' ),
|
519 |
+
array( 8013, WSAL_HIGH, __( 'User changed the forum setting posting throttle time', 'wp-security-audit-log' ), __( 'Changed the posting throttle time in the forums %LineBreak% Previous time: %OldTime% %LineBreak% New time: %NewTime%', 'wp-security-audit-log' ), 'bbpress', 'modified' ),
|
520 |
+
),
|
521 |
+
),
|
522 |
+
|
523 |
+
__( 'Multisite Network Sites', 'wp-security-audit-log' ) => array(
|
524 |
Â
__( 'MultiSite', 'wp-security-audit-log' ) => array(
|
525 |
+
array( 7000, WSAL_CRITICAL, __( 'New site added on the network', 'wp-security-audit-log' ), __( 'New site on the network: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'added' ),
|
526 |
+
array( 7001, WSAL_HIGH, __( 'Existing site archived', 'wp-security-audit-log' ), __( 'Archived the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'modified' ),
|
527 |
+
array( 7002, WSAL_HIGH, __( 'Archived site has been unarchived', 'wp-security-audit-log' ), __( 'Unarchived the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'modified' ),
|
528 |
+
array( 7003, WSAL_HIGH, __( 'Deactivated site has been activated', 'wp-security-audit-log' ), __( 'Activated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'activated' ),
|
529 |
+
array( 7004, WSAL_HIGH, __( 'Site has been deactivated', 'wp-security-audit-log' ), __( 'Deactivated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deactivated' ),
|
530 |
+
array( 7005, WSAL_HIGH, __( 'Existing site deleted from network', 'wp-security-audit-log' ), __( 'The site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deleted' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
531 |
Â
),
|
532 |
Â
),
|
533 |
Â
|
534 |
+
__( 'WooCommerce', 'wp-security-audit-log' ) => array(
|
535 |
+
__( 'Products', 'wp-security-audit-log' ) => array(
|
536 |
+
array( 9000, WSAL_LOW, __( 'User created a new product', 'wp-security-audit-log' ), __( 'Created a new product called %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'created' ),
|
537 |
+
array( 9001, WSAL_MEDIUM, __( 'User published a product', 'wp-security-audit-log' ), __( 'Published the product called %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'published' ),
|
538 |
+
array( 9003, WSAL_LOW, __( 'User changed the category of a product', 'wp-security-audit-log' ), __( 'Changed the category of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous categories: %OldCategories% %LineBreak% New categories: %NewCategories% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
539 |
+
array( 9004, WSAL_INFORMATIONAL, __( 'User modified the short description of a product', 'wp-security-audit-log' ), __( 'Changed the short description of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
540 |
+
array( 9005, WSAL_LOW, __( 'User modified the text of a product', 'wp-security-audit-log' ), __( 'Changed the text of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
541 |
+
array( 9006, WSAL_LOW, __( 'User changed the URL of a product', 'wp-security-audit-log' ), __( 'Changed the URL of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous URL: %OldUrl% %LineBreak% New URL: %NewUrl% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
542 |
+
array( 9007, WSAL_MEDIUM, __( 'User changed the Product Data of a product', 'wp-security-audit-log' ), __( 'Changed the type of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous type: %OldType% %LineBreak% New type: %NewType% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
543 |
+
array( 9008, WSAL_INFORMATIONAL, __( 'User changed the date of a product', 'wp-security-audit-log' ), __( 'Changed the date of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous date: %OldDate% %LineBreak% New date: %NewDate% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
544 |
+
array( 9009, WSAL_MEDIUM, __( 'User changed the visibility of a product', 'wp-security-audit-log' ), __( 'Changed the visibility of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous visibility: %OldVisibility% %LineBreak% New visibility: %NewVisibility% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
545 |
+
array( 9010, WSAL_MEDIUM, __( 'User modified the product', 'wp-security-audit-log' ), __( 'Modified the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
546 |
+
array( 9011, E_NOTICE, __( 'User modified the draft product', 'wp-security-audit-log' ), __( 'Modified the draft product %ProductTitle%. View the product: %EditorLinkProduct%.', 'wp-security-audit-log' ), 'woocommerce-product' ),
|
547 |
+
array( 9012, WSAL_HIGH, __( 'User moved a product to trash', 'wp-security-audit-log' ), __( 'Moved the product %ProductTitle% to trash %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus%', 'wp-security-audit-log' ), 'woocommerce-product', 'deleted' ),
|
548 |
+
array( 9013, WSAL_MEDIUM, __( 'User permanently deleted a product', 'wp-security-audit-log' ), __( 'Permanently deleted the product %ProductTitle% %LineBreak% ID: %PostID%', 'wp-security-audit-log' ), 'woocommerce-product', 'deleted' ),
|
549 |
+
array( 9014, WSAL_HIGH, __( 'User restored a product from the trash', 'wp-security-audit-log' ), __( 'Restored the product %ProductTitle% from trash %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'restored' ),
|
550 |
+
array( 9015, WSAL_MEDIUM, __( 'User changed status of a product', 'wp-security-audit-log' ), __( 'Changed the status of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Previous status: %OldStatus% %LineBreak% New status: %NewStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
551 |
+
array( 9072, WSAL_INFORMATIONAL, __( 'User opened a product in the editor', 'wp-security-audit-log' ), __( 'Opened the product %ProductTitle% in the editor %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'opened' ),
|
552 |
+
array( 9073, WSAL_INFORMATIONAL, __( 'User viewed a product', 'wp-security-audit-log' ), __( 'Viewed the product %ProductTitle% page %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'viewed' ),
|
553 |
+
array( 9077, WSAL_MEDIUM, __( 'User renamed a product', 'wp-security-audit-log' ), __( 'Renamed the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous name: %OldTitle% %LineBreak% New name: %NewTitle% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
554 |
+
array( 9016, WSAL_MEDIUM, __( 'User changed type of a price', 'wp-security-audit-log' ), __( 'Changed the %PriceType% of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous price: %OldPrice% %LineBreak% New price: %NewPrice% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
555 |
+
array( 9017, WSAL_MEDIUM, __( 'User changed the SKU of a product', 'wp-security-audit-log' ), __( 'Changed the SKU of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous SKU: %OldSku% %LineBreak% New SKU: %NewSku% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
556 |
+
array( 9018, WSAL_LOW, __( 'User changed the stock status of a product', 'wp-security-audit-log' ), __( 'Changed the stock status of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous stock status: %OldStatus% %LineBreak% New stock status: %NewStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
557 |
+
array( 9019, WSAL_LOW, __( 'User changed the stock quantity', 'wp-security-audit-log' ), __( 'Changed the stock quantity of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous quantity: %OldValue% %LineBreak% New quantity: %NewValue% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
558 |
+
array( 9020, WSAL_MEDIUM, __( 'User set a product type', 'wp-security-audit-log' ), __( 'Changed the type of the %NewType% product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous type: %OldType% %LineBreak% New type: %NewType% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
559 |
+
array( 9021, WSAL_INFORMATIONAL, __( 'User changed the weight of a product', 'wp-security-audit-log' ), __( 'Changed the weight of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous weight: %OldWeight% %LineBreak% New weight: %NewWeight% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
560 |
+
array( 9022, WSAL_INFORMATIONAL, __( 'User changed the dimensions of a product', 'wp-security-audit-log' ), __( 'Changed the %DimensionType% dimensions of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous value: %OldDimension% %LineBreak% New value: %NewDimension% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
561 |
+
array( 9023, WSAL_MEDIUM, __( 'User added the Downloadable File to a product', 'wp-security-audit-log' ), __( 'Added a downloadable file to the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% File name: %FileName% %LineBreak% File URL: %FileUrl% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
562 |
+
array( 9024, WSAL_MEDIUM, __( 'User Removed the Downloadable File from a product', 'wp-security-audit-log' ), __( 'Removed the downloadable file from the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% File name: %FileName% %LineBreak% File URL: %FileUrl% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
563 |
+
array( 9025, WSAL_INFORMATIONAL, __( 'User changed the name of a Downloadable File in a product', 'wp-security-audit-log' ), __( 'Changed the name of the downloadable file to the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous file name: %OldName% %LineBreak% New file name: %NewName% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
564 |
+
array( 9026, WSAL_MEDIUM, __( 'User changed the URL of the Downloadable File in a product', 'wp-security-audit-log' ), __( 'Changed the URL of the downloadable file to the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% File name: %FileName% %LineBreak% Previous URL: %OldUrl% %LineBreak% New URL: %NewUrl% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
565 |
+
array( 9042, WSAL_INFORMATIONAL, __( 'User changed the catalog visibility of a product', 'wp-security-audit-log' ), __( 'Changed the product visibility of the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous setting: %OldVisibility% %LineBreak% New setting: %NewVisibility% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
566 |
+
array( 9043, WSAL_INFORMATIONAL, __( 'User changed the setting Featured Product of a product', 'wp-security-audit-log' ), __( 'The setting Featured Product for the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'enabled' ),
|
567 |
+
array( 9044, WSAL_INFORMATIONAL, __( 'User changed the Allow Backorders setting of a product', 'wp-security-audit-log' ), __( 'Changed the Allow Backorders setting for the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous status: %OldStatus% %LineBreak% New status: %NewStatus% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
568 |
+
array( 9045, WSAL_MEDIUM, __( 'User added/removed products to upsell of a product', 'wp-security-audit-log' ), __( 'Products to Upsell in the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Product: %UpsellTitle% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'added' ),
|
569 |
+
array( 9046, WSAL_MEDIUM, __( 'User added/removed products to cross-sells of a product', 'wp-security-audit-log' ), __( 'Product to Cross-sell in the product %ProductTitle% %LineBreak% ID: %PostID% %LineBreak% Status: %ProductStatus% %LineBreak% Product: %CrossSellTitle% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'added' ),
|
570 |
+
array( 9047, WSAL_LOW, __( 'Added a new attribute of a product', 'wp-security-audit-log' ), __( 'A new attribute to the product %ProductTitle% %LineBreak% ID: %ProductID% %LineBreak% Status: %ProductStatus% %LineBreak% Attribute name: %AttributeName% %LineBreak% Attribute value: %AttributeValue% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'added' ),
|
571 |
+
array( 9048, WSAL_LOW, __( 'Modified the value of an attribute of a product', 'wp-security-audit-log' ), __( 'Modified the value of an attribute in the product %ProductTitle% %LineBreak% ID: %ProductID% %LineBreak% Status: %ProductStatus% %LineBreak% Attribute name: %AttributeName% %LineBreak% Previous attribute value: %OldValue% %LineBreak% New attribute value: %NewValue% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
572 |
+
array( 9049, WSAL_LOW, __( 'Changed the name of an attribute of a product', 'wp-security-audit-log' ), __( 'Changed the name of an attribute in the product %ProductTitle% %LineBreak% ID: %ProductID% %LineBreak% Status: %ProductStatus% %LineBreak% Previous attribute name: %OldValue% %LineBreak% New attribute name: %NewValue% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
573 |
+
array( 9050, WSAL_LOW, __( 'Deleted an attribute of a product', 'wp-security-audit-log' ), __( 'An attribute from the product %ProductTitle% %LineBreak% ID: %ProductID% %LineBreak% Status: %ProductStatus% %LineBreak% Attribute name: %AttributeName% %LineBreak% Attribute value: %AttributeValue% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'deleted' ),
|
574 |
+
array( 9051, WSAL_LOW, __( 'Set the attribute visibility of a product', 'wp-security-audit-log' ), __( 'Changed the visibility of an attribute in the product %ProductTitle% %LineBreak% ID: %ProductID% %LineBreak% Status: %ProductStatus% %LineBreak% Attribute name: %AttributeName% %LineBreak% Attribute visibility: %AttributeVisiblilty% %LineBreak% %EditorLinkProduct%', 'wp-security-audit-log' ), 'woocommerce-product', 'modified' ),
|
575 |
Â
),
|
576 |
Â
|
577 |
+
__( 'Store', 'wp-security-audit-log' ) => array(
|
578 |
+
array( 9027, WSAL_HIGH, __( 'User changed the Weight Unit', 'wp-security-audit-log' ), __( 'Changed the weight unit of the store %LineBreak% Previous weight unit: %OldUnit% %LineBreak% New weight unit: %NewUnit%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
579 |
+
array( 9028, WSAL_HIGH, __( 'User changed the Dimensions Unit', 'wp-security-audit-log' ), __( 'Changed the dimensions unit of the store %LineBreak% Previous dimensions unit: %OldUnit% %LineBreak% New dimensions unit: %NewUnit%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
580 |
+
array( 9029, WSAL_HIGH, __( 'User changed the Base Location', 'wp-security-audit-log' ), __( 'Changed the base location %LineBreak% Previous location: %OldLocation% %LineBreak% New location: %NewLocation%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
581 |
+
array( 9030, WSAL_HIGH, __( 'User enabled/disabled taxes', 'wp-security-audit-log' ), __( 'Taxes in the WooCommerce store', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
582 |
+
array( 9031, WSAL_HIGH, __( 'User changed the currency', 'wp-security-audit-log' ), __( 'Changed the currency of the store %LineBreak% Previous currency: %OldCurrency% %LineBreak% New currency: %NewCurrency%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
583 |
+
array( 9032, WSAL_HIGH, __( 'User enabled/disabled the use of coupons during checkout', 'wp-security-audit-log' ), __( 'The use of coupons during checkout', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
584 |
+
array( 9033, WSAL_MEDIUM, __( 'User enabled/disabled guest checkout', 'wp-security-audit-log' ), __( 'Guest checkout in the store', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
585 |
+
array( 9034, WSAL_HIGH, __( 'User enabled/disabled cash on delivery', 'wp-security-audit-log' ), __( 'The option cash on delivery', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
586 |
Â
),
|
587 |
Â
|
588 |
+
__( 'Payment Gateways', 'wp-security-audit-log' ) => array(
|
589 |
+
array( 9074, WSAL_HIGH, __( 'User enabled/disabled a payment gateway', 'wp-security-audit-log' ), __( 'The payment gateway %GatewayName%', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
590 |
+
array( 9075, E_CRITICAL, __( 'User disabled a payment gateway', 'wp-security-audit-log' ), __( 'Disabled the payment gateway %GatewayName%', 'wp-security-audit-log' ), 'woocommerce-store' ),
|
591 |
+
array( 9076, WSAL_HIGH, __( 'User modified a payment gateway', 'wp-security-audit-log' ), __( 'The payment gateway %GatewayName%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
592 |
Â
),
|
593 |
Â
|
594 |
+
__( 'Tax Settings', 'wp-security-audit-log' ) => array(
|
595 |
+
array( 9078, WSAL_LOW, __( 'User modified prices with tax option', 'wp-security-audit-log' ), __( 'Set the option that prices are %TaxStatus% of tax', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
596 |
+
array( 9079, WSAL_LOW, __( 'User modified tax calculation base', 'wp-security-audit-log' ), __( 'Set the setting Calculate tax based on to %Setting%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
597 |
+
array( 9080, WSAL_MEDIUM, __( 'User modified shipping tax class', 'wp-security-audit-log' ), __( 'Set the Shipping tax class to %Setting%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
598 |
+
array( 9081, WSAL_MEDIUM, __( 'User enabled/disabled rounding of tax', 'wp-security-audit-log' ), __( 'Rounding of tax at subtotal level', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
599 |
+
array( 9082, WSAL_MEDIUM, __( 'User modified a shipping zone', 'wp-security-audit-log' ), __( 'The shipping zone %ShippingZoneName%', 'wp-security-audit-log' ), 'woocommerce-store', 'created' ),
|
600 |
+
),
|
601 |
+
|
602 |
+
__( 'WC Categories', 'wp-security-audit-log' ) => array(
|
603 |
+
array( 9002, WSAL_INFORMATIONAL, __( 'User created a new product category', 'wp-security-audit-log' ), __( 'A new product category called %CategoryName% %LineBreak% Category slug is %Slug% %LineBreak% %ProductCatLink%', 'wp-security-audit-log' ), 'woocommerce-store', 'created' ),
|
604 |
+
array( 9052, WSAL_MEDIUM, __( 'User deleted a product category', 'wp-security-audit-log' ), __( 'The product category called %CategoryName% %LineBreak% Category slug: %CategorySlug%', 'wp-security-audit-log' ), 'woocommerce-store', 'deleted' ),
|
605 |
+
array( 9053, WSAL_INFORMATIONAL, __( 'User changed the slug of a product category', 'wp-security-audit-log' ), __( 'Changed the slug of the product category called %CategoryName% %LineBreak% Previous category slug: %OldSlug% %LineBreak% New category slug: %NewSlug% %LineBreak% %ProductCatLink%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
606 |
+
array( 9054, WSAL_MEDIUM, __( 'User changed the parent category of a product category', 'wp-security-audit-log' ), __( 'Changed the parent of the product category %CategoryName% %LineBreak% Category slug: %CategorySlug% Previous parent: %OldParentCat% %LineBreak% New parent: %NewParentCat% %LineBreak% %ProductCatLink%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
607 |
+
array( 9055, WSAL_INFORMATIONAL, __( 'User changed the display type of a product category', 'wp-security-audit-log' ), __( 'Changed the display type of the product category %CategoryName% %LineBreak% %CategorySlug% %LineBreak% Previous display type: %OldDisplayType% %LineBreak% New display type: %NewDisplayType% %LineBreak% %ProductCatLink%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
608 |
+
array( 9056, WSAL_LOW, __( 'User changed the name of a product category', 'wp-security-audit-log' ), __( 'Changed the name of the product category %CategoryName% %LineBreak% %CategorySlug% %LineBreak% Previous name: %OldName% %LineBreak% New name: %NewName% %LineBreak% %ProductCatLink%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
609 |
+
),
|
610 |
+
|
611 |
+
__( 'Attributes', 'wp-security-audit-log' ) => array(
|
612 |
+
array( 9057, WSAL_MEDIUM, __( 'User created a new attribute', 'wp-security-audit-log' ), __( 'A new attribute in WooCommerce called %AttributeName% %LineBreak% Attribute slug: %AttributeSlug%', 'wp-security-audit-log' ), 'woocommerce-store', 'created' ),
|
613 |
+
array( 9058, WSAL_LOW, __( 'User deleted an attribute', 'wp-security-audit-log' ), __( 'The WooCommerce attribute called %AttributeName% %LineBreak% Attribute slug: %AttributeSlug%', 'wp-security-audit-log' ), 'woocommerce-store', 'deleted' ),
|
614 |
+
array( 9059, WSAL_LOW, __( 'User changed the slug of an attribute', 'wp-security-audit-log' ), __( 'Changed the slug of the WooCommerce attribute %AttributeName% %LineBreak% Previous slug: %OldSlug% %LineBreak% New slug: %NewSlug%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
615 |
+
array( 9060, WSAL_LOW, __( 'User changed the name of an attribute', 'wp-security-audit-log' ), __( 'Changed the name of the WooCommerce attribute %AttributeName% %LineBreak% Attribute slug: %AttributeSlug% %LineBreak% Previous name: %OldName% %LineBreak% New name: %NewName%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
616 |
+
array( 9061, WSAL_LOW, __( 'User changed the default sort order of an attribute', 'wp-security-audit-log' ), __( 'Changed the Default Sort Order of the attribute %AttributeName% in WooCommerce %LineBreak% Attribute slug: %AttributeSlug% %LineBreak% Previous sorting order: %OldSortOrder% %LineBreak% New sorting order: %NewSortOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
617 |
+
array( 9062, WSAL_LOW, __( 'User enabled/disabled the option Enable Archives of an attribute', 'wp-security-audit-log' ), __( 'The option Enable Archives in WooCommerce attribute %AttributeName%', 'wp-security-audit-log' ), 'woocommerce-store', 'enabled' ),
|
618 |
+
),
|
619 |
+
|
620 |
+
__( 'Coupons', 'wp-security-audit-log' ) => array(
|
621 |
+
array( 9063, WSAL_LOW, __( 'User published a new coupon', 'wp-security-audit-log' ), __( 'Published a new coupon called %CouponName% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'published' ),
|
622 |
+
array( 9064, WSAL_LOW, __( 'User changed the discount type of a coupon', 'wp-security-audit-log' ), __( 'Changed the Discount Type in coupon %CouponName% %LineBreak% Previous discount type: %OldDiscountType% %LineBreak% New discount type: %NewDiscountType% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
623 |
+
array( 9065, WSAL_LOW, __( 'User changed the coupon amount of a coupon', 'wp-security-audit-log' ), __( 'Changed the Coupon amount in coupon %CouponName% %LineBreak% Previous amount: %OldAmount% %LineBreak% New amount: %NewAmount% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
624 |
+
array( 9066, WSAL_LOW, __( 'User changed the coupon expire date of a coupon', 'wp-security-audit-log' ), __( 'Changed the expire date of the coupon %CouponName% %LineBreak% Previous date: %OldDate% %LineBreak% New date: %NewDate% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
625 |
+
array( 9067, WSAL_LOW, __( 'User changed the usage restriction settings of a coupon', 'wp-security-audit-log' ), __( 'Changed the Usage Restriction of the coupon %CouponName% %LineBreak% Previous usage restriction: %OldMetaValue% %LineBreak% New usage restriction: %NewMetaValue% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
626 |
+
array( 9068, WSAL_LOW, __( 'User changed the usage limits settings of a coupon', 'wp-security-audit-log' ), __( 'Changed the Usage Limits of the coupon %CouponName% %LineBreak% Previous usage limits: %OldMetaValue% %LineBreak% New usage limits: %NewMetaValue% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
627 |
+
array( 9069, WSAL_INFORMATIONAL, __( 'User changed the description of a coupon', 'wp-security-audit-log' ), __( 'Changed the description of the coupon %CouponName% %LineBreak% Previous description: %OldDescription% %LineBreak% New description: %NewDescription% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
628 |
+
array( 9070, E_WARNING, __( 'User changed the status of a coupon', 'wp-security-audit-log' ), __( 'Changed the Status of the WooCommerce coupon %CouponName% from %OldStatus% to %NewStatus%.', 'wp-security-audit-log' ), 'woocommerce-store' ),
|
629 |
+
array( 9071, WSAL_INFORMATIONAL, __( 'User renamed a WooCommerce coupon', 'wp-security-audit-log' ), __( 'Renamed the coupon %OldName% %LineBreak% New name: %NewName% %LineBreak% %LineBreak% %EditorLinkCoupon%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
630 |
+
),
|
631 |
+
|
632 |
+
__( 'Orders', 'wp-security-audit-log' ) => array(
|
633 |
+
array( 9035, WSAL_LOW, __( 'A WooCommerce order has been placed', 'wp-security-audit-log' ), __( 'A new order has been placed %LineBreak% Order name: %OrderTitle% %LineBreak% %EditorLinkOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'created' ),
|
634 |
+
array( 9036, WSAL_INFORMATIONAL, __( 'WooCommerce order status changed', 'wp-security-audit-log' ), __( 'Marked an order %OrderTitle% as %OrderStatus% %LineBreak% %EditorLinkOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
635 |
+
array( 9037, WSAL_MEDIUM, __( 'User moved a WooCommerce order to trash', 'wp-security-audit-log' ), __( 'Moved the order %OrderTitle% to trash', 'wp-security-audit-log' ), 'woocommerce-store', 'deleted' ),
|
636 |
+
array( 9038, WSAL_LOW, __( 'User moved a WooCommerce order out of trash', 'wp-security-audit-log' ), __( 'Restored the order %OrderTitle% from the trash %LineBreak% %EditorLinkOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'restored' ),
|
637 |
+
array( 9039, WSAL_LOW, __( 'User permanently deleted a WooCommerce order', 'wp-security-audit-log' ), __( 'Permanently deleted the order %OrderTitle%', 'wp-security-audit-log' ), 'woocommerce-store', 'deleted' ),
|
638 |
+
array( 9040, WSAL_MEDIUM, __( 'User edited a WooCommerce order', 'wp-security-audit-log' ), __( 'Edited the details in order %OrderTitle% %LineBreak% %EditorLinkOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
639 |
+
array( 9041, WSAL_HIGH, __( 'User refunded a WooCommerce order', 'wp-security-audit-log' ), __( 'Refunded the order %OrderTitle% %LineBreak% %EditorLinkOrder%', 'wp-security-audit-log' ), 'woocommerce-store', 'modified' ),
|
640 |
+
),
|
641 |
+
|
642 |
+
__( 'User Profile', 'wp-security-audit-log' ) => array(
|
643 |
+
array( 9083, WSAL_INFORMATIONAL, __( 'User changed the billing address details', 'wp-security-audit-log' ), __( 'Changed the billing address details of the user %TargetUsername% %LineBreak% Role: %Roles% %LineBreak% Billing address field: %AddressField% %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
644 |
+
array( 9084, WSAL_INFORMATIONAL, __( 'User changed the shipping address details', 'wp-security-audit-log' ), __( 'Changed the shipping address details of the user %TargetUsername% %LineBreak% Role: %Roles% %LineBreak% Shipping address field: %AddressField% %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
|
645 |
+
),
|
646 |
+
),
|
647 |
+
|
648 |
+
__( 'Yoast SEO', 'wp-security-audit-log' ) => array(
|
649 |
+
__( 'Post Changes', 'wp-security-audit-log' ) => array(
|
650 |
+
array( 8801, WSAL_INFORMATIONAL, __( 'User changed title of a SEO post', 'wp-security-audit-log' ), __( 'Changed the Meta title of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous title: %OldSEOTitle% %LineBreak% New title: %NewSEOTitle% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
651 |
+
array( 8802, WSAL_INFORMATIONAL, __( 'User changed the meta description of a SEO post', 'wp-security-audit-log' ), __( 'Changed the Meta Description of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous description: %old_desc% %LineBreak% New description: %new_desc% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
652 |
+
array( 8803, WSAL_INFORMATIONAL, __( 'User changed setting to allow search engines to show post in search results of a SEO post', 'wp-security-audit-log' ), __( 'Changed the setting to allow search engines to show post in search results for the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous setting: %OldStatus% %LineBreak% New setting: %NewStatus% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
653 |
+
array( 8804, WSAL_INFORMATIONAL, __( 'User Enabled/Disabled the option for search engine to follow links of a SEO post', 'wp-security-audit-log' ), __( 'The option for search engine to follow links in post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'enabled' ),
|
654 |
+
array( 8805, WSAL_LOW, __( 'User set the meta robots advanced setting of a SEO post', 'wp-security-audit-log' ), __( 'Changed the Meta Robots Advanced setting for the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous setting: %OldStatus% %LineBreak% New setting: %NewStatus% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
655 |
+
array( 8806, WSAL_INFORMATIONAL, __( 'User changed the canonical URL of a SEO post', 'wp-security-audit-log' ), __( 'Changed the Canonical URL of the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous URL: %OldCanonicalUrl% %LineBreak% New URL: %NewCanonicalUrl% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
656 |
+
array( 8807, WSAL_INFORMATIONAL, __( 'User changed the focus keyword of a SEO post', 'wp-security-audit-log' ), __( 'Changed the focus keyword for the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% Previous keyword: %old_keywords% %LineBreak% New keyword: %new_keywords% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'modified' ),
|
657 |
+
array( 8808, WSAL_INFORMATIONAL, __( 'User Enabled/Disabled the option Cornerston Content of a SEO post', 'wp-security-audit-log' ), __( 'The option Cornerstone Content in the post %PostTitle% %LineBreak% ID: %PostID% %LineBreak% Type: %PostType% %LineBreak% Status: %PostStatus% %LineBreak% %EditorLinkPost%', 'wp-security-audit-log' ), 'post', 'enabled' ),
|
658 |
+
),
|
659 |
+
|
660 |
+
__( 'Website Changes', 'wp-security-audit-log' ) => array(
|
661 |
+
array( 8809, WSAL_INFORMATIONAL, __( 'User changed the Title Separator setting', 'wp-security-audit-log' ), __( 'Changed the default title separator %LineBreak% Previous separator: %old% %LineBreak% New separator: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
662 |
+
array( 8810, WSAL_MEDIUM, __( 'User changed the Homepage Title setting', 'wp-security-audit-log' ), __( 'Changed the homepage Meta title %LineBreak% Previous title: %old% %LineBreak% New title: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
663 |
+
array( 8811, WSAL_MEDIUM, __( 'User changed the Homepage Meta description setting', 'wp-security-audit-log' ), __( 'Changed the homepage Meta description %LineBreak% Previous description: %old% %LineBreak% New description: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
664 |
+
array( 8812, WSAL_INFORMATIONAL, __( 'User changed the Company or Person setting', 'wp-security-audit-log' ), __( 'Changed the Company or Person setting %LineBreak% Previous setting: %old% %LineBreak% New setting: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
665 |
+
),
|
666 |
+
|
667 |
+
__( 'Plugin Settings Changes', 'wp-security-audit-log' ) => array(
|
668 |
+
array( 8813, WSAL_MEDIUM, __( 'User Enabled/Disabled the option Show Posts/Pages in Search Results in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The option to show %SEOPostType% in search results', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
669 |
+
array( 8814, WSAL_INFORMATIONAL, __( 'User changed the Posts/Pages title template in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'Changed the %SEOPostType% Meta (SEO) title template %LineBreak% Previous template: %old% %LineBreak% New template: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
670 |
+
array( 8815, WSAL_MEDIUM, __( 'User Enabled/Disabled SEO analysis in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The SEO Analysis feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
671 |
+
array( 8816, WSAL_MEDIUM, __( 'User Enabled/Disabled readability analysis in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Readability Analysis feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
672 |
+
array( 8817, WSAL_MEDIUM, __( 'User Enabled/Disabled cornerstone content in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Cornerstone content feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
673 |
+
array( 8818, WSAL_MEDIUM, __( 'User Enabled/Disabled the text link counter in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Text link counter feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
674 |
+
array( 8819, WSAL_MEDIUM, __( 'User Enabled/Disabled XML sitemaps in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The XML sitemap feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
675 |
+
array( 8820, WSAL_MEDIUM, __( 'User Enabled/Disabled ryte integration in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Ryte integration feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
676 |
+
array( 8821, WSAL_MEDIUM, __( 'User Enabled/Disabled the admin bar menu in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Admin bar menu feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
677 |
+
array( 8822, WSAL_INFORMATIONAL, __( 'User changed the Posts/Pages meta description template in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'Changed the %SEOPostType% Meta description template %LineBreak% Previous template: %old% New template: %new%', 'wp-security-audit-log' ), 'yoast-seo', 'modified' ),
|
678 |
+
array( 8823, WSAL_LOW, __( 'User set the option Date in Snippet Preview for Posts/Pages in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The option Date in Snippet Preview for %SEOPostType%', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
679 |
+
array( 8824, WSAL_LOW, __( 'User set the option Yoast SEO Meta Box for Posts/Pages in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The option Yoast SEO Meta Box for %SEOPostType%', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
680 |
+
array( 8825, WSAL_LOW, __( 'User Enabled/Disabled the advanced settings for authors in the Yoast SEO plugin settings', 'wp-security-audit-log' ), __( 'The Security: no advanced settings for authors feature', 'wp-security-audit-log' ), 'yoast-seo', 'enabled' ),
|
681 |
Â
),
|
682 |
Â
),
|
683 |
Â
)
|
684 |
Â
);
|
685 |
+
|
686 |
Â
// Load Custom alerts.
|
687 |
Â
load_include_custom_file( $wsal );
|
688 |
Â
}
|
img/icons/audit-log-inverted.svg
ADDED
@@ -0,0 +1,17 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="110px" viewBox="0 0 112 110" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>A6AD2452-FDD2-420A-9833-47BBC99AB137</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
7 |
+
<g id="Custom-icons" transform="translate(-1024.000000, -461.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
8 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
9 |
+
<g id="Logo" transform="translate(807.000000, 204.666667)">
|
10 |
+
<g id="Atoms-/-icons-/-custom-reversed-audit-log" transform="translate(52.000000, 15.000000)">
|
11 |
+
<path d="M70.0848745,78.3655002 C77.8000942,78.3655002 84.0549161,72.1106781 84.0549161,64.3945192 C84.0549161,56.1195586 76.8768975,49.596136 68.5531006,50.5118195 C69.0311343,51.9215023 69.3025522,53.4260406 69.3025522,54.9972594 C69.3025522,62.1950007 63.8572883,68.1173593 56.8624063,68.8799592 C58.7332179,74.3928429 63.9399346,78.3655002 70.0848745,78.3655002 Z M70.0407322,25.5770557 L108.273095,29.6990398 C124.82959,63.7709155 106.045402,102.819413 69.9881391,111.52451 C69.5410978,111.415567 69.1194138,111.283145 68.6780075,111.167628 L68.6761292,93.8720122 C68.6723725,93.8720122 68.669555,93.8720122 68.6657984,93.8720122 C53.0747629,93.1291346 40.6186516,80.2118939 40.6186516,64.43866 C40.6186516,54.9080391 47.582541,36.0092725 68.6657984,35.006247 C68.669555,35.006247 68.6723725,35.0053078 68.6761292,35.0053078 L68.6817641,25.7292 C69.7317477,25.6108655 69.8575955,25.5948998 70.0407322,25.5770557 Z M114.429119,81.5746154 C122.612041,63.7680958 122.070145,43.0745908 112.988444,24.5665168 L70.0001611,19.826564 L27.0109392,24.5665168 C17.9292384,43.0736516 17.3873416,63.7671566 25.5712032,81.5746154 C33.7823005,99.4421807 49.9509212,112.474938 70.0001611,117.41775 C90.049401,112.474938 106.218022,99.4431198 114.429119,81.5746154 Z M117.441014,20.5309357 C128.00753,40.9802592 128.828358,64.1108914 119.692186,83.9929607 C110.639599,103.690015 92.7710942,117.985946 70.6669667,123.215203 L70.0001614,123.372043 L69.333356,123.215203 C47.2292285,117.985946 29.3597845,103.690015 20.3081368,83.9929607 C11.1719645,64.1108914 11.9918533,40.97932 22.5593092,20.5309357 L23.2721335,19.1522453 L70.0001614,14 L116.728189,19.1522453 L117.441014,20.5309357 Z" id="custom-reversed-audit-log"></path>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</g>
|
15 |
+
</g>
|
16 |
+
</g>
|
17 |
+
</svg>
|
img/icons/critical.svg
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="112px" viewBox="0 0 112 112" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>BF106194-673C-455E-8A5C-7554CD09CE92</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<defs>
|
7 |
+
<path d="M70,126 C39.072054,126 14,100.927946 14,70 C14,39.072054 39.072054,14 70,14 C100.927946,14 126,39.072054 126,70 C126,100.927946 100.927946,126 70,126 Z M71.513513,77.5675664 C74.8570748,77.5675664 77.5675672,74.8570742 77.5675672,71.5135126 L77.5675672,47.2972975 C77.5675672,43.9537359 74.8570748,41.2432437 71.513513,41.2432437 C68.1699512,41.2432437 65.4594588,43.9537359 65.4594588,47.2972975 L65.4594588,71.5135126 C65.4594588,74.8570742 68.1699512,77.5675664 71.513513,77.5675664 Z M71.513513,86.6486454 C68.1699512,86.6486454 65.4594588,89.3591378 65.4594588,92.7026996 C65.4594588,96.0462614 68.1699512,98.7567538 71.513513,98.7567538 C74.8570748,98.7567538 77.5675672,96.0462614 77.5675672,92.7026996 C77.5675672,89.3591378 74.8570748,86.6486454 71.513513,86.6486454 Z" id="path-1"></path>
|
8 |
+
</defs>
|
9 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10 |
+
<g id="Custom-icons" transform="translate(-165.000000, -242.000000)">
|
11 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
12 |
+
<g id="Critical">
|
13 |
+
<g id="Atoms-/-icons-/-custom-danger-alt">
|
14 |
+
<mask id="mask-2" fill="white">
|
15 |
+
<use xlink:href="#path-1"></use>
|
16 |
+
</mask>
|
17 |
+
<use id="custom-danger" fill="#C52F2E" fill-rule="nonzero" xlink:href="#path-1"></use>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</g>
|
23 |
+
</svg>
|
img/icons/high.svg
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="113px" viewBox="0 0 112 113" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>FA61959F-7AD3-4382-BDB0-EDAF23D3BF8A</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<defs>
|
7 |
+
<path d="M71.513513,77.5675664 C68.1699512,77.5675664 65.4594588,74.8570742 65.4594588,71.5135126 L65.4594588,47.2972975 C65.4594588,43.9537359 68.1699512,41.2432437 71.513513,41.2432437 C74.8570748,41.2432437 77.5675672,43.9537359 77.5675672,47.2972975 L77.5675672,71.5135126 C77.5675672,74.8570742 74.8570748,77.5675664 71.513513,77.5675664 Z M71.513513,86.6486454 C74.8570748,86.6486454 77.5675672,89.3591378 77.5675672,92.7026996 C77.5675672,96.0462614 74.8570748,98.7567538 71.513513,98.7567538 C68.1699512,98.7567538 65.4594588,96.0462614 65.4594588,92.7026996 C65.4594588,89.3591378 68.1699512,86.6486454 71.513513,86.6486454 Z M70,126 C39.072054,126 14,100.927946 14,70 C14,39.072054 39.072054,14 70,14 C100.927946,14 126,39.072054 126,70 C126,100.927946 100.927946,126 70,126 Z M70.0000008,113.891893 C94.2408237,113.891893 113.891893,94.2408237 113.891893,70.0000008 C113.891893,45.759178 94.2408237,26.1081084 70.0000008,26.1081084 C45.759178,26.1081084 26.1081084,45.759178 26.1081084,70.0000008 C26.1081084,94.2408237 45.759178,113.891893 70.0000008,113.891893 Z" id="path-1"></path>
|
8 |
+
</defs>
|
9 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10 |
+
<g id="Custom-icons" transform="translate(-165.000000, -461.000000)">
|
11 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
12 |
+
<g id="High" transform="translate(0.000000, 219.750000)">
|
13 |
+
<g id="Atoms-/-icons-/-custom-danger">
|
14 |
+
<mask id="mask-2" fill="white">
|
15 |
+
<use xlink:href="#path-1"></use>
|
16 |
+
</mask>
|
17 |
+
<use id="custom-danger" fill="#F57823" fill-rule="nonzero" xlink:href="#path-1"></use>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</g>
|
23 |
+
</svg>
|
img/icons/info.svg
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="112px" viewBox="0 0 112 112" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>E659F055-705B-4618-8717-0BFB150F927A</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<defs>
|
7 |
+
<path d="M65.4594588,77.5675664 L65.4594588,41.2432437 L77.5675672,41.2432437 L77.5675672,77.5675664 L65.4594588,77.5675664 Z M71.513513,86.6486454 C74.8570748,86.6486454 77.5675672,89.3591378 77.5675672,92.7026996 C77.5675672,96.0462614 74.8570748,98.7567538 71.513513,98.7567538 C68.1699512,98.7567538 65.4594588,96.0462614 65.4594588,92.7026996 C65.4594588,89.3591378 68.1699512,86.6486454 71.513513,86.6486454 Z M70,126 C39.072054,126 14,100.927946 14,70 C14,39.072054 39.072054,14 70,14 C100.927946,14 126,39.072054 126,70 C126,100.927946 100.927946,126 70,126 Z M70.0000008,113.891893 C94.2408237,113.891893 113.891893,94.2408237 113.891893,70.0000008 C113.891893,45.759178 94.2408237,26.1081084 70.0000008,26.1081084 C45.759178,26.1081084 26.1081084,45.759178 26.1081084,70.0000008 C26.1081084,94.2408237 45.759178,113.891893 70.0000008,113.891893 Z" id="path-1"></path>
|
8 |
+
</defs>
|
9 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10 |
+
<g id="Custom-icons" transform="translate(-165.000000, -1121.000000)">
|
11 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
12 |
+
<g id="Informational" transform="translate(0.000000, 879.000000)">
|
13 |
+
<g id="Atoms-/-icons-/-custom-info-outline">
|
14 |
+
<mask id="mask-2" fill="white">
|
15 |
+
<use xlink:href="#path-1"></use>
|
16 |
+
</mask>
|
17 |
+
<use id="custom-info-outline" fill="#8B572A" fill-rule="nonzero" transform="translate(70.000000, 70.000000) rotate(-180.000000) translate(-70.000000, -70.000000) " xlink:href="#path-1"></use>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</g>
|
23 |
+
</svg>
|
img/icons/low.svg
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="104px" viewBox="0 0 112 104" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>3EB8F7E5-4D4F-4755-9904-71ABB23CACA5</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<defs>
|
7 |
+
<path d="M69.9999987,82.6000013 C66.9072041,82.6000013 64.3999987,80.0927958 64.3999987,77.0000011 L64.3999987,54.6000002 C64.3999987,51.5072055 66.9072041,49 69.9999987,49 C73.0927934,49 75.5999988,51.5072055 75.5999988,54.6000002 L75.5999988,77.0000011 C75.5999988,80.0927958 73.0927934,82.6000013 69.9999987,82.6000013 Z M69.9999987,91 C73.0927934,91 75.5999988,93.5072054 75.5999988,96.6000001 C75.5999988,99.6927947 73.0927934,102.2 69.9999987,102.2 C66.9072041,102.2 64.3999987,99.6927947 64.3999987,96.6000001 C64.3999987,93.5072054 66.9072041,91 69.9999987,91 Z M74.6349647,34.7259119 C74.1950409,34.0340691 73.6005941,33.4497864 72.8967161,33.0173846 C70.3366942,31.4447287 66.964319,32.2096624 65.3643053,34.7259119 L26.0308721,105.179719 C25.487902,106.033617 25.2000002,107.020308 25.2000002,108.027265 C25.2000002,110.994546 27.647302,113.400003 30.6662018,113.400003 L109.333068,113.400003 C110.357542,113.400003 111.361397,113.117024 112.230149,112.583338 C114.790171,111.010682 115.568412,107.695969 113.968398,105.179719 L74.6349647,34.7259119 Z M83.9714718,28.6447081 L123.493243,99.7211955 C128.316268,107.336661 125.970368,117.368686 118.253528,122.128352 C115.634792,123.743561 112.608807,124.600001 109.520669,124.600001 L30.4771256,124.600001 C21.3770604,124.600001 14,117.319852 14,108.339333 C14,105.291763 14.8678411,102.30553 16.504551,99.7211955 L56.0263227,28.6447081 C60.8493476,21.0292429 71.0149165,18.7141601 78.7317563,23.4738258 C80.8535015,24.7824959 82.645381,26.5508359 83.9714718,28.6447081 Z" id="path-1"></path>
|
8 |
+
</defs>
|
9 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10 |
+
<g id="Custom-icons" transform="translate(-165.000000, -908.000000)">
|
11 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
12 |
+
<g id="Low" transform="translate(0.000000, 659.250000)">
|
13 |
+
<g id="Atoms-/-icons-/-custom-warning">
|
14 |
+
<mask id="mask-2" fill="white">
|
15 |
+
<use xlink:href="#path-1"></use>
|
16 |
+
</mask>
|
17 |
+
<use id="custom-warning" fill="#1BC31A" fill-rule="nonzero" xlink:href="#path-1"></use>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</g>
|
23 |
+
</svg>
|
img/icons/medium.svg
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="112px" height="105px" viewBox="0 0 112 105" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>E4B37E3B-064C-4032-931B-E8A714E8E889</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<defs>
|
7 |
+
<path d="M83.9714718,28.6447081 L123.493243,99.7211955 C128.316268,107.336661 125.970368,117.368686 118.253528,122.128352 C115.634792,123.743561 112.608807,124.600001 109.520669,124.600001 L30.4771256,124.600001 C21.3770604,124.600001 14,117.319852 14,108.339333 C14,105.291763 14.8678411,102.30553 16.504551,99.7211955 L56.0263227,28.6447081 C60.8493476,21.0292429 71.0149165,18.7141601 78.7317563,23.4738258 C80.8535015,24.7824959 82.645381,26.5508359 83.9714718,28.6447081 Z M69.9999987,91 C66.9072041,91 64.3999987,93.5072054 64.3999987,96.6000001 C64.3999987,99.6927947 66.9072041,102.2 69.9999987,102.2 C73.0927934,102.2 75.5999988,99.6927947 75.5999988,96.6000001 C75.5999988,93.5072054 73.0927934,91 69.9999987,91 Z M69.9999987,82.6000013 C73.0927934,82.6000013 75.5999988,80.0927958 75.5999988,77.0000011 L75.5999988,54.6000002 C75.5999988,51.5072055 73.0927934,49 69.9999987,49 C66.9072041,49 64.3999987,51.5072055 64.3999987,54.6000002 L64.3999987,77.0000011 C64.3999987,80.0927958 66.9072041,82.6000013 69.9999987,82.6000013 Z" id="path-1"></path>
|
8 |
+
</defs>
|
9 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10 |
+
<g id="Custom-icons" transform="translate(-165.000000, -688.000000)">
|
11 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
12 |
+
<g id="Medium" transform="translate(0.000000, 439.500000)">
|
13 |
+
<g id="Atoms-/-icons-/-custom-warning-alt">
|
14 |
+
<mask id="mask-2" fill="white">
|
15 |
+
<use xlink:href="#path-1"></use>
|
16 |
+
</mask>
|
17 |
+
<use id="custom-warning-alt" fill="#F5A623" fill-rule="nonzero" xlink:href="#path-1"></use>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</g>
|
23 |
+
</svg>
|
img/icons/save-search.svg
ADDED
@@ -0,0 +1,17 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="102px" height="105px" viewBox="0 0 102 105" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: sketchtool 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>129C6FBB-62B3-4446-BA0D-832CC5382A20</title>
|
5 |
+
<desc>Created with sketchtool.</desc>
|
6 |
+
<g id="WPSAL-Screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
7 |
+
<g id="Custom-icons" transform="translate(-1031.000000, -688.000000)" fill="#1C73A9" fill-rule="nonzero">
|
8 |
+
<g id="Custom-Icons" transform="translate(151.000000, 228.000000)">
|
9 |
+
<g id="Save-Search" transform="translate(859.000000, 439.333333)">
|
10 |
+
<g id="Atoms-/-icons-/-custom-save-search">
|
11 |
+
<path d="M96.5260623,69.9165725 C95.4906026,73.6159887 93.8935816,77.1942159 91.7349992,80.5175011 C92.5749992,81.2175011 93.2749992,81.9875011 94.2549992,82.6875011 C95.6549992,83.8075011 97.5449991,85.2075012 99.9249991,86.8175012 C102.304999,88.4975012 103.844999,89.5475012 104.544999,90.1075013 C107.484999,92.2775013 109.654999,94.0975013 111.124999,95.5675014 C113.364999,97.8075014 115.324999,100.117501 117.004999,102.567501 C118.754999,105.017502 120.084999,107.397502 121.134999,109.847502 C122.114999,112.297502 122.604999,114.607502 122.394999,116.847502 C122.254999,119.087502 121.414999,120.977502 119.874999,122.517502 C118.334999,124.057502 116.444999,124.897502 114.204999,125.037502 C112.034999,125.177502 109.654999,124.757502 107.274999,123.707502 C104.824999,122.727502 102.374999,121.327502 99.9949991,119.577502 C97.5449991,117.897502 95.2349992,115.937502 92.9949992,113.697502 C91.5249992,112.227502 89.7049992,110.057502 87.6049993,107.187502 C86.9049993,106.277502 85.8549993,104.737502 84.3149993,102.567501 C82.7749993,100.327501 81.5149993,98.5775014 80.3949993,97.1075014 C79.2749993,95.7075014 78.3649994,94.6575013 77.3149994,93.6075013 C62.8249995,101.237501 44.4849997,98.9275014 32.2349999,86.7475012 C17.255,71.6975009 17.255,47.2675005 32.2349999,32.2875002 C44.9660687,19.556431 64.3591651,17.594805 79.1432283,26.4026223 C78.4623469,26.9503455 77.80372,27.5397153 77.1707317,28.1707317 C74.3379601,31.0123557 72.3444956,34.3706782 71.1903383,37.9395193 C61.8802613,32.8729133 49.9960846,34.2789069 42.1749995,42.1575002 C32.5849996,51.7475003 32.5849996,67.2175006 42.1749995,76.8075007 C51.6949995,86.3975009 67.2349993,86.3975009 76.8249993,76.8075007 C79.6496051,73.9621257 81.6361439,70.5991209 82.7846157,67.0256504 C87.0378123,69.3406429 91.8268044,70.3042836 96.5260623,69.9165725 Z M99.2727273,63 L89.7272727,63 L89.7272727,50.2727273 L77,50.2727273 L77,40.7272727 L89.7272727,40.7272727 L89.7272727,28 L99.2727273,28 L99.2727273,40.7272727 L112,40.7272727 L112,50.2727273 L99.2727273,50.2727273 L99.2727273,63 Z" id="custom-save-search"></path>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</g>
|
15 |
+
</g>
|
16 |
+
</g>
|
17 |
+
</svg>
|
js/auditlog.js
CHANGED
@@ -423,7 +423,14 @@ function wsal_dismiss_advert(element) {
|
|
423 |
Â
*/
|
424 |
Â
function wsalLoadEvents( pageNumber ) {
|
425 |
Â
jQuery( '#wsal-event-loader' ).show( 'fast' );
|
426 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
427 |
Â
jQuery.ajax( {
|
428 |
Â
type:'POST',
|
429 |
Â
url: ajaxurl,
|
@@ -437,6 +444,7 @@ function wsalLoadEvents( pageNumber ) {
|
|
437 |
Â
order : wsalAuditLogArgs.order,
|
438 |
Â
s : wsalAuditLogArgs.searchTerm,
|
439 |
Â
filters : wsalAuditLogArgs.searchFilters,
|
Â
|
|
440 |
Â
},
|
441 |
Â
success: function( html ) {
|
442 |
Â
jQuery( '#wsal-event-loader' ).hide( '1000' );
|
423 |
Â
*/
|
424 |
Â
function wsalLoadEvents( pageNumber ) {
|
425 |
Â
jQuery( '#wsal-event-loader' ).show( 'fast' );
|
426 |
+
/*
|
427 |
+
* Gets the view type. Defaults to 'list' but could be 'grid'. Only those 2
|
428 |
+
* types are supported. Validation handled server side.
|
429 |
+
*/
|
430 |
+
var view = wsalAuditLogArgs.userView;
|
431 |
+
if ( null === view || view.length < 1 ) {
|
432 |
+
view = 'list';
|
433 |
+
}
|
434 |
Â
jQuery.ajax( {
|
435 |
Â
type:'POST',
|
436 |
Â
url: ajaxurl,
|
444 |
Â
order : wsalAuditLogArgs.order,
|
445 |
Â
s : wsalAuditLogArgs.searchTerm,
|
446 |
Â
filters : wsalAuditLogArgs.searchFilters,
|
447 |
+
view: view,
|
448 |
Â
},
|
449 |
Â
success: function( html ) {
|
450 |
Â
jQuery( '#wsal-event-loader' ).hide( '1000' );
|
js/common.js
CHANGED
@@ -44,7 +44,7 @@ jQuery( document ).ready( function() {
|
|
44 |
Â
var nfn = nfe.attr( 'data-notice-name' );
|
45 |
Â
jQuery.ajax({
|
46 |
Â
type: 'POST',
|
47 |
-
url:
|
48 |
Â
async: false,
|
49 |
Â
data: { action: 'AjaxDismissNotice', notice: nfn }
|
50 |
Â
});
|
44 |
Â
var nfn = nfe.attr( 'data-notice-name' );
|
45 |
Â
jQuery.ajax({
|
46 |
Â
type: 'POST',
|
47 |
+
url: wsalCommonData.ajaxURL,
|
48 |
Â
async: false,
|
49 |
Â
data: { action: 'AjaxDismissNotice', notice: nfn }
|
50 |
Â
});
|
js/dist/wsal-wizard.js
CHANGED
@@ -104,1921 +104,1950 @@
|
|
104 |
Â
/*! no static exports found */
|
105 |
Â
/***/ (function(module, exports, __webpack_require__) {
|
106 |
Â
|
107 |
-
|
Â
|
|
108 |
Â
|
Â
|
|
109 |
Â
|
110 |
-
|
111 |
Â
|
112 |
-
|
113 |
Â
|
114 |
-
|
115 |
Â
|
116 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
117 |
Â
|
118 |
Â
/**
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
125 |
Â
|
126 |
-
|
127 |
-
|
Â
|
|
128 |
Â
|
129 |
-
|
130 |
-
|
131 |
-
*
|
132 |
-
* Usernames & roles access setting.
|
133 |
-
*/
|
134 |
-
(0, _jquery2.default)('#editor-users-add, #editor-roles-add, #exuser-query-add, #exrole-query-add, #ipaddr-query-add').click(function () {
|
135 |
-
var type = (0, _jquery2.default)(this).attr('id').substr(0, 6);
|
136 |
-
var tokenType = (0, _jquery2.default)(this).attr('id').substr(7, 5);
|
137 |
-
var tokenValue = _jquery2.default.trim((0, _jquery2.default)('#' + type + '-' + tokenType + '-box').val());
|
138 |
-
var existing = (0, _jquery2.default)('#' + type + '-list input').filter(function () {
|
139 |
-
return this.value === tokenValue;
|
140 |
-
});
|
141 |
Â
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
data: {
|
154 |
-
action: 'setup_check_security_token',
|
155 |
-
token: tokenValue,
|
156 |
-
nonce: wsalData.nonce
|
157 |
-
},
|
158 |
-
dataType: 'json',
|
159 |
-
success: function success(data) {
|
160 |
-
|
161 |
-
// Remove disabled attribute.
|
162 |
-
(0, _jquery2.default)('#' + type + '-' + tokenType + '-box, #' + type + '-' + tokenType + '-add').removeAttr('disabled');
|
163 |
-
(0, _jquery2.default)('#' + type + '-' + tokenType + '-box').val('');
|
164 |
-
|
165 |
-
if (data.success) {
|
166 |
-
|
167 |
-
// Error handling.
|
168 |
-
if ('other' === data.tokenType && ('users' === tokenType || 'exuser' === type)) {
|
169 |
-
alert(wsalData.usersError);
|
170 |
-
return;
|
171 |
-
} else if ('other' === data.tokenType && ('roles' === tokenType || 'exrole' === type)) {
|
172 |
-
alert(wsalData.rolesError);
|
173 |
-
return;
|
174 |
-
} else if ('other' === data.tokenType && ('ip' === tokenType || 'ipaddr' === type)) {
|
175 |
-
alert(wsalData.ipError);
|
176 |
-
return;
|
177 |
-
}
|
178 |
Â
|
179 |
-
|
180 |
-
|
181 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
182 |
Â
}
|
183 |
-
},
|
184 |
-
error: function error(xhr, textStatus, _error) {
|
185 |
-
console.log(xhr.statusText);
|
186 |
-
console.log(textStatus);
|
187 |
-
console.log(_error);
|
188 |
-
}
|
189 |
-
});
|
190 |
-
});
|
191 |
Â
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
Â
|
|
Â
|
|
Â
|
|
198 |
Â
}
|
199 |
Â
});
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Remove access settings token.
|
203 |
-
*/
|
204 |
-
(0, _jquery2.default)('#editor-list>span>a, #exuser-list>span>a, #exrole-list>span>a, #ipaddr-list>span>a').click(removeSecToken);
|
205 |
-
function removeSecToken() {
|
206 |
-
var token = (0, _jquery2.default)(this).parents('span:first');
|
207 |
-
token.addClass('sectoken-del').fadeOut('fast', function () {
|
208 |
-
token.remove();
|
209 |
-
});
|
210 |
-
};
|
211 |
Â
});
|
212 |
Â
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
/*! no static exports found */
|
220 |
-
/***/ (function(module, exports, __webpack_require__) {
|
221 |
-
|
222 |
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
223 |
-
* jQuery JavaScript Library v3.3.1
|
224 |
-
* https://jquery.com/
|
225 |
-
*
|
226 |
-
* Includes Sizzle.js
|
227 |
-
* https://sizzlejs.com/
|
228 |
-
*
|
229 |
-
* Copyright JS Foundation and other contributors
|
230 |
-
* Released under the MIT license
|
231 |
-
* https://jquery.org/license
|
232 |
-
*
|
233 |
-
* Date: 2018-01-20T17:24Z
|
234 |
-
*/
|
235 |
-
( function( global, factory ) {
|
236 |
-
|
237 |
-
"use strict";
|
238 |
-
|
239 |
-
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
240 |
-
|
241 |
-
// For CommonJS and CommonJS-like environments where a proper `window`
|
242 |
-
// is present, execute the factory and get jQuery.
|
243 |
-
// For environments that do not have a `window` with a `document`
|
244 |
-
// (such as Node.js), expose a factory as module.exports.
|
245 |
-
// This accentuates the need for the creation of a real `window`.
|
246 |
-
// e.g. var jQuery = require("jquery")(window);
|
247 |
-
// See ticket #14549 for more info.
|
248 |
-
module.exports = global.document ?
|
249 |
-
factory( global, true ) :
|
250 |
-
function( w ) {
|
251 |
-
if ( !w.document ) {
|
252 |
-
throw new Error( "jQuery requires a window with a document" );
|
253 |
-
}
|
254 |
-
return factory( w );
|
255 |
-
};
|
256 |
-
} else {
|
257 |
-
factory( global );
|
258 |
Â
}
|
Â
|
|
259 |
Â
|
260 |
-
|
261 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
262 |
Â
|
263 |
-
|
264 |
-
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
|
265 |
-
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
|
266 |
-
// enough that all such attempts are guarded in a try block.
|
267 |
-
"use strict";
|
268 |
Â
|
269 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
270 |
Â
|
271 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
272 |
Â
|
273 |
-
|
274 |
Â
|
275 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
276 |
Â
|
277 |
-
|
Â
|
|
278 |
Â
|
279 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
280 |
Â
|
281 |
-
|
282 |
Â
|
283 |
-
|
284 |
Â
|
285 |
-
|
286 |
Â
|
287 |
-
|
288 |
Â
|
289 |
-
|
290 |
Â
|
291 |
-
|
292 |
Â
|
293 |
-
|
294 |
Â
|
295 |
-
|
296 |
Â
|
297 |
-
|
298 |
-
// In some browsers, typeof returns "function" for HTML <object> elements
|
299 |
-
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
300 |
-
// We don't want to classify *any* DOM node as a function.
|
301 |
-
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
302 |
-
};
|
303 |
Â
|
Â
|
|
304 |
Â
|
305 |
-
|
306 |
-
return obj != null && obj === obj.window;
|
307 |
-
};
|
308 |
Â
|
Â
|
|
309 |
Â
|
Â
|
|
310 |
Â
|
Â
|
|
311 |
Â
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
Â
|
|
317 |
Â
|
318 |
-
function DOMEval( code, doc, node ) {
|
319 |
-
doc = doc || document;
|
320 |
Â
|
321 |
-
|
322 |
-
|
Â
|
|
323 |
Â
|
324 |
-
script.text = code;
|
325 |
-
if ( node ) {
|
326 |
-
for ( i in preservedScriptAttributes ) {
|
327 |
-
if ( node[ i ] ) {
|
328 |
-
script[ i ] = node[ i ];
|
329 |
-
}
|
330 |
-
}
|
331 |
-
}
|
332 |
-
doc.head.appendChild( script ).parentNode.removeChild( script );
|
333 |
-
}
|
334 |
Â
|
335 |
Â
|
336 |
-
function toType( obj ) {
|
337 |
-
if ( obj == null ) {
|
338 |
-
return obj + "";
|
339 |
-
}
|
340 |
Â
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
}
|
346 |
-
/* global Symbol */
|
347 |
-
// Defining this global in .eslintrc.json would create a danger of using the global
|
348 |
-
// unguarded in another place, it seems safer to define global only for this module
|
349 |
Â
|
Â
|
|
Â
|
|
350 |
Â
|
Â
|
|
Â
|
|
351 |
Â
|
352 |
-
|
353 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
354 |
Â
|
355 |
-
// Define a local copy of jQuery
|
356 |
-
jQuery = function( selector, context ) {
|
357 |
Â
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
Â
|
363 |
-
|
364 |
-
|
365 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
366 |
Â
|
367 |
-
jQuery.fn = jQuery.prototype = {
|
368 |
Â
|
369 |
-
// The current version of jQuery being used
|
370 |
-
jquery: version,
|
371 |
Â
|
372 |
-
|
Â
|
|
373 |
Â
|
374 |
-
|
375 |
-
|
376 |
Â
|
377 |
-
|
378 |
-
|
379 |
-
|
Â
|
|
380 |
Â
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
Â
|
385 |
-
|
386 |
-
if ( num == null ) {
|
387 |
-
return slice.call( this );
|
388 |
-
}
|
389 |
Â
|
390 |
-
|
391 |
-
|
392 |
-
},
|
393 |
Â
|
394 |
-
|
395 |
-
// (returning the new matched element set)
|
396 |
-
pushStack: function( elems ) {
|
397 |
Â
|
398 |
-
|
399 |
-
|
400 |
Â
|
401 |
-
|
402 |
-
|
Â
|
|
403 |
Â
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
Â
|
408 |
-
//
|
409 |
-
|
410 |
-
return
|
411 |
-
}
|
412 |
Â
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
} ) );
|
417 |
-
},
|
418 |
Â
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
Â
|
423 |
-
|
424 |
-
|
425 |
-
},
|
426 |
Â
|
427 |
-
|
428 |
-
|
429 |
-
},
|
430 |
Â
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
435 |
-
},
|
436 |
Â
|
437 |
-
|
438 |
-
|
439 |
-
|
Â
|
|
440 |
Â
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
447 |
Â
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
length = arguments.length,
|
453 |
-
deep = false;
|
454 |
Â
|
455 |
-
|
456 |
-
|
457 |
-
|
Â
|
|
Â
|
|
458 |
Â
|
459 |
-
|
460 |
-
target = arguments[ i ] || {};
|
461 |
-
i++;
|
462 |
-
}
|
463 |
Â
|
464 |
-
//
|
465 |
-
if (
|
466 |
-
target = {};
|
467 |
-
}
|
468 |
Â
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
}
|
474 |
Â
|
475 |
-
|
Â
|
|
Â
|
|
Â
|
|
476 |
Â
|
477 |
-
|
478 |
-
|
Â
|
|
479 |
Â
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
copy = options[ name ];
|
484 |
Â
|
485 |
-
|
486 |
-
|
487 |
-
continue;
|
488 |
Â
}
|
489 |
Â
|
490 |
-
//
|
491 |
-
|
492 |
-
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
493 |
-
|
494 |
-
if ( copyIsArray ) {
|
495 |
-
copyIsArray = false;
|
496 |
-
clone = src && Array.isArray( src ) ? src : [];
|
497 |
-
|
498 |
-
} else {
|
499 |
-
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
500 |
-
}
|
501 |
Â
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
// Don't bring in undefined values
|
506 |
-
} else if ( copy !== undefined ) {
|
507 |
-
target[ name ] = copy;
|
508 |
-
}
|
509 |
Â
}
|
510 |
Â
}
|
511 |
Â
}
|
Â
|
|
512 |
Â
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
Â
|
517 |
-
|
518 |
Â
|
519 |
-
|
520 |
-
|
521 |
Â
|
522 |
-
|
523 |
-
|
524 |
Â
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
Â
|
529 |
-
|
530 |
Â
|
531 |
-
|
532 |
-
|
533 |
Â
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
Â
|
540 |
-
|
541 |
Â
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
Â
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
Â
|
552 |
-
|
553 |
Â
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
Â
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
Â
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
Â
|
569 |
-
|
570 |
-
|
571 |
Â
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
}
|
578 |
Â
}
|
579 |
-
}
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
Â
}
|
585 |
Â
}
|
Â
|
|
586 |
Â
|
587 |
-
|
588 |
-
|
589 |
Â
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
Â
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
Â
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
}
|
610 |
Â
}
|
Â
|
|
611 |
Â
|
612 |
-
|
613 |
-
|
614 |
Â
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
Â
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
Â
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
Â
|
630 |
-
|
631 |
Â
|
632 |
-
|
633 |
-
|
634 |
Â
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
Â
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
}
|
649 |
Â
}
|
Â
|
|
650 |
Â
|
651 |
-
|
652 |
-
|
653 |
Â
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
Â
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
Â
|
666 |
-
|
667 |
-
|
668 |
-
}
|
669 |
Â
}
|
Â
|
|
670 |
Â
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
Â
|
676 |
-
|
677 |
-
|
678 |
-
}
|
679 |
Â
}
|
680 |
Â
}
|
Â
|
|
681 |
Â
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
// A global GUID counter for objects
|
687 |
-
guid: 1,
|
688 |
Â
|
689 |
-
|
690 |
-
|
691 |
-
support: support
|
692 |
-
} );
|
693 |
Â
|
694 |
-
|
695 |
-
|
696 |
-
|
Â
|
|
697 |
Â
|
698 |
-
|
699 |
-
jQuery.
|
700 |
-
|
701 |
-
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
702 |
-
} );
|
703 |
Â
|
704 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
705 |
Â
|
706 |
-
|
707 |
-
// `in` check used to prevent JIT error (gh-2145)
|
708 |
-
// hasOwn isn't used here due to false negatives
|
709 |
-
// regarding Nodelist length in IE
|
710 |
-
var length = !!obj && "length" in obj && obj.length,
|
711 |
-
type = toType( obj );
|
712 |
Â
|
713 |
-
|
714 |
-
|
715 |
-
|
Â
|
|
Â
|
|
Â
|
|
716 |
Â
|
717 |
-
|
718 |
-
|
719 |
Â
}
|
720 |
-
var Sizzle =
|
721 |
-
/*!
|
722 |
-
* Sizzle CSS Selector Engine v2.3.3
|
723 |
-
* https://sizzlejs.com/
|
724 |
-
*
|
725 |
-
* Copyright jQuery Foundation and other contributors
|
726 |
-
* Released under the MIT license
|
727 |
-
* http://jquery.org/license
|
728 |
-
*
|
729 |
-
* Date: 2016-08-08
|
730 |
-
*/
|
731 |
-
(function( window ) {
|
732 |
-
|
733 |
-
var i,
|
734 |
-
support,
|
735 |
-
Expr,
|
736 |
-
getText,
|
737 |
-
isXML,
|
738 |
-
tokenize,
|
739 |
-
compile,
|
740 |
-
select,
|
741 |
-
outermostContext,
|
742 |
-
sortInput,
|
743 |
-
hasDuplicate,
|
744 |
-
|
745 |
-
// Local document vars
|
746 |
-
setDocument,
|
747 |
-
document,
|
748 |
-
docElem,
|
749 |
-
documentIsHTML,
|
750 |
-
rbuggyQSA,
|
751 |
-
rbuggyMatches,
|
752 |
-
matches,
|
753 |
-
contains,
|
754 |
-
|
755 |
-
// Instance-specific data
|
756 |
-
expando = "sizzle" + 1 * new Date(),
|
757 |
-
preferredDoc = window.document,
|
758 |
-
dirruns = 0,
|
759 |
-
done = 0,
|
760 |
-
classCache = createCache(),
|
761 |
-
tokenCache = createCache(),
|
762 |
-
compilerCache = createCache(),
|
763 |
-
sortOrder = function( a, b ) {
|
764 |
-
if ( a === b ) {
|
765 |
-
hasDuplicate = true;
|
766 |
-
}
|
767 |
-
return 0;
|
768 |
-
},
|
769 |
-
|
770 |
-
// Instance methods
|
771 |
-
hasOwn = ({}).hasOwnProperty,
|
772 |
-
arr = [],
|
773 |
-
pop = arr.pop,
|
774 |
-
push_native = arr.push,
|
775 |
-
push = arr.push,
|
776 |
-
slice = arr.slice,
|
777 |
-
// Use a stripped-down indexOf as it's faster than native
|
778 |
-
// https://jsperf.com/thor-indexof-vs-for/5
|
779 |
-
indexOf = function( list, elem ) {
|
780 |
-
var i = 0,
|
781 |
-
len = list.length;
|
782 |
-
for ( ; i < len; i++ ) {
|
783 |
-
if ( list[i] === elem ) {
|
784 |
-
return i;
|
785 |
-
}
|
786 |
-
}
|
787 |
-
return -1;
|
788 |
-
},
|
789 |
-
|
790 |
-
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
791 |
-
|
792 |
-
// Regular expressions
|
793 |
-
|
794 |
-
// http://www.w3.org/TR/css3-selectors/#whitespace
|
795 |
-
whitespace = "[\\x20\\t\\r\\n\\f]",
|
796 |
-
|
797 |
-
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
798 |
-
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
|
799 |
-
|
800 |
-
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
801 |
-
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
802 |
-
// Operator (capture 2)
|
803 |
-
"*([*^$|!~]?=)" + whitespace +
|
804 |
-
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
805 |
-
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
806 |
-
"*\\]",
|
807 |
-
|
808 |
-
pseudos = ":(" + identifier + ")(?:\\((" +
|
809 |
-
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
810 |
-
// 1. quoted (capture 3; capture 4 or capture 5)
|
811 |
-
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
812 |
-
// 2. simple (capture 6)
|
813 |
-
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
814 |
-
// 3. anything else (capture 2)
|
815 |
-
".*" +
|
816 |
-
")\\)|)",
|
817 |
-
|
818 |
-
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
819 |
-
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
820 |
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
821 |
-
|
822 |
-
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
823 |
-
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
824 |
-
|
825 |
-
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
826 |
-
|
827 |
-
rpseudo = new RegExp( pseudos ),
|
828 |
-
ridentifier = new RegExp( "^" + identifier + "$" ),
|
829 |
-
|
830 |
-
matchExpr = {
|
831 |
-
"ID": new RegExp( "^#(" + identifier + ")" ),
|
832 |
-
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
833 |
-
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
834 |
-
"ATTR": new RegExp( "^" + attributes ),
|
835 |
-
"PSEUDO": new RegExp( "^" + pseudos ),
|
836 |
-
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
837 |
-
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
838 |
-
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
839 |
-
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
840 |
-
// For use in libraries implementing .is()
|
841 |
-
// We use this for POS matching in `select`
|
842 |
-
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
|
843 |
-
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
844 |
-
},
|
845 |
Â
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
883 |
Â
|
884 |
-
|
885 |
-
|
886 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
887 |
Â
|
888 |
-
|
889 |
-
|
890 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
891 |
Â
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
// error in IE
|
896 |
-
unloadHandler = function() {
|
897 |
-
setDocument();
|
898 |
-
},
|
899 |
Â
|
900 |
-
|
901 |
-
|
902 |
-
return elem.disabled === true && ("form" in elem || "label" in elem);
|
903 |
-
},
|
904 |
-
{ dir: "parentNode", next: "legend" }
|
905 |
-
);
|
906 |
Â
|
907 |
-
|
908 |
-
try {
|
909 |
-
push.apply(
|
910 |
-
(arr = slice.call( preferredDoc.childNodes )),
|
911 |
-
preferredDoc.childNodes
|
912 |
-
);
|
913 |
-
// Support: Android<4.0
|
914 |
-
// Detect silently failing push.apply
|
915 |
-
arr[ preferredDoc.childNodes.length ].nodeType;
|
916 |
-
} catch ( e ) {
|
917 |
-
push = { apply: arr.length ?
|
918 |
Â
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
} :
|
923 |
Â
|
924 |
-
|
925 |
-
// Otherwise append directly
|
926 |
-
function( target, els ) {
|
927 |
-
var j = target.length,
|
928 |
-
i = 0;
|
929 |
-
// Can't trust NodeList.length
|
930 |
-
while ( (target[j++] = els[i++]) ) {}
|
931 |
-
target.length = j - 1;
|
932 |
-
}
|
933 |
-
};
|
934 |
Â
}
|
935 |
Â
|
936 |
-
|
937 |
-
|
938 |
-
newContext = context && context.ownerDocument,
|
939 |
-
|
940 |
-
// nodeType defaults to 9, since context defaults to document
|
941 |
-
nodeType = context ? context.nodeType : 9;
|
942 |
-
|
943 |
-
results = results || [];
|
944 |
Â
|
945 |
-
|
946 |
-
|
947 |
-
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
948 |
-
|
949 |
-
return results;
|
950 |
Â
}
|
Â
|
|
951 |
Â
|
952 |
-
|
953 |
-
if ( !seed ) {
|
954 |
-
|
955 |
-
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
956 |
-
setDocument( context );
|
957 |
-
}
|
958 |
-
context = context || document;
|
959 |
-
|
960 |
-
if ( documentIsHTML ) {
|
961 |
-
|
962 |
-
// If the selector is sufficiently simple, try using a "get*By*" DOM method
|
963 |
-
// (excepting DocumentFragment context, where the methods don't exist)
|
964 |
-
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
965 |
-
|
966 |
-
// ID selector
|
967 |
-
if ( (m = match[1]) ) {
|
968 |
Â
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
Â
|
973 |
-
|
974 |
-
|
975 |
-
// getElementById can match elements by name instead of ID
|
976 |
-
if ( elem.id === m ) {
|
977 |
-
results.push( elem );
|
978 |
-
return results;
|
979 |
-
}
|
980 |
-
} else {
|
981 |
-
return results;
|
982 |
-
}
|
983 |
Â
|
984 |
-
|
985 |
-
|
Â
|
|
986 |
Â
|
987 |
Â
// Support: IE, Opera, Webkit
|
988 |
Â
// TODO: identify versions
|
989 |
Â
// getElementById can match elements by name instead of ID
|
990 |
-
if (
|
991 |
-
contains( context, elem ) &&
|
992 |
-
elem.id === m ) {
|
993 |
-
|
994 |
Â
results.push( elem );
|
995 |
Â
return results;
|
996 |
Â
}
|
Â
|
|
Â
|
|
997 |
Â
}
|
998 |
Â
|
999 |
-
//
|
1000 |
-
} else
|
1001 |
-
push.apply( results, context.getElementsByTagName( selector ) );
|
1002 |
-
return results;
|
1003 |
Â
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
Â
|
|
Â
|
|
Â
|
|
1007 |
Â
|
1008 |
-
|
1009 |
-
|
Â
|
|
1010 |
Â
}
|
1011 |
-
}
|
1012 |
Â
|
1013 |
-
//
|
1014 |
-
if (
|
1015 |
-
|
1016 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1017 |
Â
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
Â
|
|
1021 |
Â
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
} else if ( context.nodeName.toLowerCase() !== "object" ) {
|
1027 |
Â
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
} else {
|
1032 |
-
context.setAttribute( "id", (nid = expando) );
|
1033 |
-
}
|
1034 |
Â
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
}
|
1041 |
-
newSelector = groups.join( "," );
|
1042 |
Â
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
Â
|
|
Â
|
|
1046 |
Â
}
|
1047 |
Â
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
return results;
|
1054 |
-
} catch ( qsaError ) {
|
1055 |
-
} finally {
|
1056 |
-
if ( nid === expando ) {
|
1057 |
-
context.removeAttribute( "id" );
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1061 |
Â
}
|
1062 |
-
}
|
1063 |
-
}
|
1064 |
Â
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
function cache( key, value ) {
|
1079 |
-
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
|
1080 |
-
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
1081 |
-
// Only keep the most recent entries
|
1082 |
-
delete cache[ keys.shift() ];
|
1083 |
Â
}
|
1084 |
-
return (cache[ key + " " ] = value);
|
1085 |
Â
}
|
1086 |
-
return cache;
|
1087 |
Â
}
|
1088 |
Â
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1096 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1097 |
Â
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
return !!fn( el );
|
1107 |
-
} catch (e) {
|
1108 |
-
return false;
|
1109 |
-
} finally {
|
1110 |
-
// Remove from its parent by default
|
1111 |
-
if ( el.parentNode ) {
|
1112 |
-
el.parentNode.removeChild( el );
|
1113 |
-
}
|
1114 |
-
// release memory in IE
|
1115 |
-
el = null;
|
1116 |
Â
}
|
Â
|
|
Â
|
|
1117 |
Â
}
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1131 |
Â
}
|
1132 |
Â
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
*/
|
1139 |
-
function siblingCheck( a, b ) {
|
1140 |
-
var cur = b && a,
|
1141 |
-
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
1142 |
-
a.sourceIndex - b.sourceIndex;
|
1143 |
-
|
1144 |
-
// Use IE sourceIndex if available on both nodes
|
1145 |
-
if ( diff ) {
|
1146 |
-
return diff;
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
// Check if b follows a
|
1150 |
-
if ( cur ) {
|
1151 |
-
while ( (cur = cur.nextSibling) ) {
|
1152 |
-
if ( cur === b ) {
|
1153 |
-
return -1;
|
1154 |
-
}
|
1155 |
Â
}
|
1156 |
Â
}
|
1157 |
-
|
1158 |
-
return a ? 1 : -1;
|
1159 |
-
}
|
1160 |
-
|
1161 |
-
/**
|
1162 |
-
* Returns a function to use in pseudos for input types
|
1163 |
-
* @param {String} type
|
1164 |
-
*/
|
1165 |
-
function createInputPseudo( type ) {
|
1166 |
-
return function( elem ) {
|
1167 |
-
var name = elem.nodeName.toLowerCase();
|
1168 |
-
return name === "input" && elem.type === type;
|
1169 |
-
};
|
1170 |
Â
}
|
1171 |
Â
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1213 |
Â
}
|
1214 |
-
|
1215 |
-
// Support: IE 6 - 11
|
1216 |
-
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
1217 |
-
return elem.isDisabled === disabled ||
|
1218 |
-
|
1219 |
-
// Where there is no isDisabled, check manually
|
1220 |
-
/* jshint -W018 */
|
1221 |
-
elem.isDisabled !== !disabled &&
|
1222 |
-
disabledAncestor( elem ) === disabled;
|
1223 |
Â
}
|
1224 |
Â
|
1225 |
-
|
Â
|
|
Â
|
|
1226 |
Â
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
return elem.disabled === disabled;
|
1232 |
Â
}
|
1233 |
Â
|
1234 |
-
|
1235 |
-
return false;
|
1236 |
-
};
|
1237 |
-
}
|
1238 |
Â
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1256 |
Â
}
|
1257 |
-
}
|
1258 |
Â
});
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1259 |
Â
}
|
1260 |
Â
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
*/
|
1266 |
-
function testContext( context ) {
|
1267 |
-
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
1268 |
-
}
|
1269 |
-
|
1270 |
-
// Expose support vars for convenience
|
1271 |
-
support = Sizzle.support = {};
|
1272 |
Â
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
*/
|
1278 |
-
isXML = Sizzle.isXML = function( elem ) {
|
1279 |
-
// documentElement is verified for cases where it doesn't yet exist
|
1280 |
-
// (such as loading iframes in IE - #4833)
|
1281 |
-
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
1282 |
-
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
1283 |
-
};
|
1284 |
Â
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
* @returns {Object} Returns the current document
|
1289 |
-
*/
|
1290 |
-
setDocument = Sizzle.setDocument = function( node ) {
|
1291 |
-
var hasCompare, subWindow,
|
1292 |
-
doc = node ? node.ownerDocument || node : preferredDoc;
|
1293 |
Â
|
1294 |
-
//
|
1295 |
-
if (
|
1296 |
-
|
1297 |
-
}
|
1298 |
-
|
1299 |
-
// Update global variables
|
1300 |
-
document = doc;
|
1301 |
-
docElem = document.documentElement;
|
1302 |
-
documentIsHTML = !isXML( document );
|
1303 |
-
|
1304 |
-
// Support: IE 9-11, Edge
|
1305 |
-
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
|
1306 |
-
if ( preferredDoc !== document &&
|
1307 |
-
(subWindow = document.defaultView) && subWindow.top !== subWindow ) {
|
1308 |
-
|
1309 |
-
// Support: IE 11, Edge
|
1310 |
-
if ( subWindow.addEventListener ) {
|
1311 |
-
subWindow.addEventListener( "unload", unloadHandler, false );
|
1312 |
-
|
1313 |
-
// Support: IE 9 - 10 only
|
1314 |
-
} else if ( subWindow.attachEvent ) {
|
1315 |
-
subWindow.attachEvent( "onunload", unloadHandler );
|
1316 |
-
}
|
1317 |
Â
}
|
Â
|
|
1318 |
Â
|
1319 |
-
|
1320 |
-
|
1321 |
Â
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
Â
|
1330 |
-
|
1331 |
-
|
1332 |
Â
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
Â
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
Â
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
};
|
1358 |
-
};
|
1359 |
-
Expr.find["ID"] = function( id, context ) {
|
1360 |
-
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1361 |
-
var elem = context.getElementById( id );
|
1362 |
-
return elem ? [ elem ] : [];
|
1363 |
-
}
|
1364 |
Â
};
|
1365 |
-
}
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1373 |
Â
};
|
Â
|
|
1374 |
Â
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
Â
|
1382 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1383 |
Â
|
1384 |
-
|
Â
|
|
Â
|
|
Â
|
|
1385 |
Â
node = elem.getAttributeNode("id");
|
1386 |
Â
if ( node && node.value === id ) {
|
1387 |
Â
return [ elem ];
|
1388 |
Â
}
|
1389 |
-
|
1390 |
-
// Fall back on getElementsByName
|
1391 |
-
elems = context.getElementsByName( id );
|
1392 |
-
i = 0;
|
1393 |
-
while ( (elem = elems[i++]) ) {
|
1394 |
-
node = elem.getAttributeNode("id");
|
1395 |
-
if ( node && node.value === id ) {
|
1396 |
-
return [ elem ];
|
1397 |
-
}
|
1398 |
-
}
|
1399 |
Â
}
|
1400 |
-
|
1401 |
-
return [];
|
1402 |
Â
}
|
1403 |
-
};
|
1404 |
-
}
|
1405 |
Â
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
return context.getElementsByTagName( tag );
|
1411 |
Â
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
Â
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
results = context.getElementsByTagName( tag );
|
1424 |
Â
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
}
|
1432 |
Â
|
1433 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1434 |
Â
}
|
1435 |
-
return results;
|
1436 |
-
};
|
1437 |
Â
|
1438 |
-
|
1439 |
-
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1440 |
-
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
1441 |
-
return context.getElementsByClassName( className );
|
1442 |
Â
}
|
Â
|
|
1443 |
Â
};
|
1444 |
Â
|
1445 |
-
|
1446 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1447 |
Â
|
1448 |
-
|
Â
|
|
1449 |
Â
|
1450 |
-
|
1451 |
-
rbuggyMatches = [];
|
1452 |
Â
|
1453 |
-
|
1454 |
-
|
1455 |
-
// whenever `document.activeElement` is accessed on an iframe
|
1456 |
-
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
1457 |
-
// See https://bugs.jquery.com/ticket/13378
|
1458 |
-
rbuggyQSA = [];
|
1459 |
Â
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
// setting a boolean content attribute,
|
1467 |
-
// since its presence should be enough
|
1468 |
-
// https://bugs.jquery.com/ticket/12359
|
1469 |
-
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
1470 |
-
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
1471 |
-
"<option selected=''></option></select>";
|
1472 |
Â
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1480 |
Â
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1489 |
-
rbuggyQSA.push("~=");
|
1490 |
-
}
|
1491 |
Â
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
}
|
1498 |
Â
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
rbuggyQSA.push(".#.+[+~]");
|
1504 |
-
}
|
1505 |
-
});
|
1506 |
Â
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
Â
|
|
Â
|
|
Â
|
|
1510 |
Â
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
Â
|
|
Â
|
|
1516 |
Â
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
1521 |
-
}
|
1522 |
Â
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
Â
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
}
|
1535 |
Â
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
Â
|
1542 |
-
|
1543 |
-
|
1544 |
-
docElem.
|
1545 |
-
|
1546 |
-
|
Â
|
|
1547 |
Â
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
Â
|
|
1552 |
Â
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1559 |
Â
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
/* Contains
|
1564 |
-
---------------------------------------------------------------------- */
|
1565 |
-
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
1566 |
-
|
1567 |
-
// Element contains another
|
1568 |
-
// Purposefully self-exclusive
|
1569 |
-
// As in, an element does not contain itself
|
1570 |
-
contains = hasCompare || rnative.test( docElem.contains ) ?
|
1571 |
-
function( a, b ) {
|
1572 |
-
var adown = a.nodeType === 9 ? a.documentElement : a,
|
1573 |
-
bup = b && b.parentNode;
|
1574 |
-
return a === bup || !!( bup && bup.nodeType === 1 && (
|
1575 |
-
adown.contains ?
|
1576 |
-
adown.contains( bup ) :
|
1577 |
-
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
1578 |
-
));
|
1579 |
-
} :
|
1580 |
-
function( a, b ) {
|
1581 |
-
if ( b ) {
|
1582 |
-
while ( (b = b.parentNode) ) {
|
1583 |
-
if ( b === a ) {
|
1584 |
-
return true;
|
1585 |
-
}
|
1586 |
-
}
|
1587 |
-
}
|
1588 |
-
return false;
|
1589 |
-
};
|
1590 |
Â
|
1591 |
-
|
1592 |
-
|
Â
|
|
1593 |
Â
|
1594 |
-
|
1595 |
-
|
Â
|
|
Â
|
|
1596 |
Â
function( a, b ) {
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
if (
|
1607 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1608 |
Â
}
|
Â
|
|
Â
|
|
1609 |
Â
|
1610 |
-
|
1611 |
-
|
1612 |
-
a.compareDocumentPosition( b ) :
|
1613 |
-
|
1614 |
-
// Otherwise we know they are disconnected
|
1615 |
-
1;
|
1616 |
-
|
1617 |
-
// Disconnected nodes
|
1618 |
-
if ( compare & 1 ||
|
1619 |
-
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
1620 |
Â
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
}
|
1625 |
-
if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
1626 |
-
return 1;
|
1627 |
-
}
|
1628 |
Â
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
Â
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
hasDuplicate = true;
|
1641 |
-
return 0;
|
1642 |
-
}
|
1643 |
Â
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
bup = b.parentNode,
|
1648 |
-
ap = [ a ],
|
1649 |
-
bp = [ b ];
|
1650 |
Â
|
1651 |
-
//
|
1652 |
-
|
1653 |
-
return a === document ? -1 :
|
1654 |
-
b === document ? 1 :
|
1655 |
-
aup ? -1 :
|
1656 |
-
bup ? 1 :
|
1657 |
-
sortInput ?
|
1658 |
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1659 |
-
0;
|
1660 |
Â
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
}
|
1665 |
Â
|
1666 |
-
//
|
1667 |
-
|
1668 |
-
|
1669 |
-
ap.unshift( cur );
|
1670 |
Â
}
|
1671 |
-
|
1672 |
-
|
1673 |
-
bp.unshift( cur );
|
1674 |
Â
}
|
1675 |
Â
|
1676 |
-
//
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
Â
|
|
1680 |
Â
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1684 |
Â
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1688 |
Â
0;
|
1689 |
-
};
|
1690 |
Â
|
1691 |
-
|
1692 |
-
|
Â
|
|
Â
|
|
1693 |
Â
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1697 |
Â
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
setDocument( elem );
|
1702 |
Â
}
|
1703 |
Â
|
1704 |
-
|
1705 |
-
|
Â
|
|
1706 |
Â
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
Â
|
|
1711 |
Â
|
1712 |
-
|
1713 |
-
|
1714 |
Â
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
// fragment in IE 9
|
1719 |
-
elem.document && elem.document.nodeType !== 11 ) {
|
1720 |
-
return ret;
|
1721 |
-
}
|
1722 |
-
} catch (e) {}
|
1723 |
-
}
|
1724 |
Â
|
1725 |
-
|
1726 |
-
|
Â
|
|
Â
|
|
Â
|
|
1727 |
Â
|
1728 |
-
|
1729 |
-
|
1730 |
-
if ( ( context.ownerDocument || context ) !== document ) {
|
1731 |
-
setDocument( context );
|
1732 |
-
}
|
1733 |
-
return contains( context, elem );
|
1734 |
-
};
|
1735 |
Â
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
}
|
1741 |
Â
|
1742 |
-
|
1743 |
-
|
1744 |
-
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
1745 |
-
fn( elem, name, !documentIsHTML ) :
|
1746 |
-
undefined;
|
1747 |
Â
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
Â
|
|
1756 |
Â
|
1757 |
-
Sizzle
|
1758 |
-
|
1759 |
-
};
|
1760 |
Â
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1764 |
Â
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
var elem,
|
1771 |
-
duplicates = [],
|
1772 |
-
j = 0,
|
1773 |
-
i = 0;
|
1774 |
Â
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1779 |
Â
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
Â
|
|
1788 |
Â
}
|
1789 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1790 |
Â
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
}
|
1824 |
Â
}
|
1825 |
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
1826 |
-
return elem.nodeValue;
|
1827 |
Â
}
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
Â
|
1833 |
-
|
Â
|
|
1834 |
Â
|
1835 |
-
|
1836 |
-
cacheLength: 50,
|
1837 |
Â
|
1838 |
-
|
Â
|
|
1839 |
Â
|
1840 |
-
|
1841 |
Â
|
1842 |
-
|
1843 |
Â
|
1844 |
-
|
1845 |
Â
|
1846 |
-
|
1847 |
-
">": { dir: "parentNode", first: true },
|
1848 |
-
" ": { dir: "parentNode" },
|
1849 |
-
"+": { dir: "previousSibling", first: true },
|
1850 |
-
"~": { dir: "previousSibling" }
|
1851 |
-
},
|
1852 |
Â
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
Â
|
|
Â
|
|
Â
|
|
1856 |
Â
|
1857 |
-
|
1858 |
-
|
Â
|
|
1859 |
Â
|
1860 |
-
|
1861 |
-
|
1862 |
-
}
|
1863 |
Â
|
1864 |
-
|
1865 |
-
|
Â
|
|
1866 |
Â
|
1867 |
-
|
1868 |
-
|
1869 |
-
1 type (only|nth|...)
|
1870 |
-
2 what (child|of-type)
|
1871 |
-
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
|
1872 |
-
4 xn-component of xn+y argument ([+-]?\d*n|)
|
1873 |
-
5 sign of xn-component
|
1874 |
-
6 x of xn-component
|
1875 |
-
7 sign of y-component
|
1876 |
-
8 y of y-component
|
1877 |
-
*/
|
1878 |
-
match[1] = match[1].toLowerCase();
|
1879 |
-
|
1880 |
-
if ( match[1].slice( 0, 3 ) === "nth" ) {
|
1881 |
-
// nth-* requires argument
|
1882 |
-
if ( !match[3] ) {
|
1883 |
-
Sizzle.error( match[0] );
|
1884 |
-
}
|
1885 |
Â
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1890 |
Â
|
1891 |
-
|
1892 |
-
|
Â
|
|
1893 |
Â
Sizzle.error( match[0] );
|
1894 |
Â
}
|
1895 |
Â
|
1896 |
-
|
1897 |
-
|
Â
|
|
Â
|
|
1898 |
Â
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
Â
|
|
1902 |
Â
|
1903 |
-
|
1904 |
-
|
1905 |
-
}
|
1906 |
Â
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
Â
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
(excess = tokenize( unquoted, true )) &&
|
1915 |
-
// advance to the next closing parenthesis
|
1916 |
-
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
1917 |
Â
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
}
|
1922 |
Â
|
1923 |
-
|
1924 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1925 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1926 |
Â
},
|
1927 |
Â
|
1928 |
-
|
Â
|
|
1929 |
Â
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
};
|
1937 |
-
},
|
1938 |
Â
|
1939 |
-
|
1940 |
-
|
Â
|
|
1941 |
Â
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
Â
|
1949 |
-
|
1950 |
-
return function( elem ) {
|
1951 |
-
var result = Sizzle.attr( elem, name );
|
1952 |
Â
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1959 |
Â
|
1960 |
-
|
Â
|
|
Â
|
|
Â
|
|
1961 |
Â
|
1962 |
-
|
1963 |
-
operator === "!=" ? result !== check :
|
1964 |
-
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
1965 |
-
operator === "*=" ? check && result.indexOf( check ) > -1 :
|
1966 |
-
operator === "$=" ? check && result.slice( -check.length ) === check :
|
1967 |
-
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1968 |
-
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1969 |
-
false;
|
1970 |
-
};
|
1971 |
-
},
|
1972 |
Â
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
Â
|
1978 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1979 |
Â
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
if ( parent ) {
|
1994 |
-
|
1995 |
-
// :(first|last|only)-(child|of-type)
|
1996 |
-
if ( simple ) {
|
1997 |
-
while ( dir ) {
|
1998 |
-
node = elem;
|
1999 |
-
while ( (node = node[ dir ]) ) {
|
2000 |
-
if ( ofType ?
|
2001 |
-
node.nodeName.toLowerCase() === name :
|
2002 |
-
node.nodeType === 1 ) {
|
2003 |
-
|
2004 |
-
return false;
|
2005 |
-
}
|
2006 |
Â
}
|
2007 |
-
// Reverse direction for :only-* (if we haven't yet done so)
|
2008 |
-
start = dir = type === "only" && !start && "nextSibling";
|
2009 |
Â
}
|
2010 |
-
|
Â
|
|
2011 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2012 |
Â
|
2013 |
-
|
Â
|
|
Â
|
|
Â
|
|
2014 |
Â
|
2015 |
-
|
2016 |
-
if ( forward && useCache ) {
|
2017 |
Â
|
2018 |
-
//
|
Â
|
|
2019 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2020 |
Â
// ...in a gzip-friendly way
|
2021 |
-
node =
|
2022 |
Â
outerCache = node[ expando ] || (node[ expando ] = {});
|
2023 |
Â
|
2024 |
Â
// Support: IE <9 only
|
@@ -2028,8565 +2057,8536 @@
|
|
2028 |
Â
|
2029 |
Â
cache = uniqueCache[ type ] || [];
|
2030 |
Â
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
2031 |
-
diff = nodeIndex
|
2032 |
-
|
2033 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2034 |
Â
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
2035 |
-
|
2036 |
-
// Fallback to seeking `elem` from the start
|
2037 |
Â
(diff = nodeIndex = 0) || start.pop()) ) {
|
2038 |
Â
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
}
|
2044 |
-
}
|
2045 |
-
|
2046 |
-
} else {
|
2047 |
-
// Use previously-cached element index if available
|
2048 |
-
if ( useCache ) {
|
2049 |
-
// ...in a gzip-friendly way
|
2050 |
-
node = elem;
|
2051 |
-
outerCache = node[ expando ] || (node[ expando ] = {});
|
2052 |
-
|
2053 |
-
// Support: IE <9 only
|
2054 |
-
// Defend against cloned attroperties (jQuery gh-1709)
|
2055 |
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
2056 |
-
(outerCache[ node.uniqueID ] = {});
|
2057 |
-
|
2058 |
-
cache = uniqueCache[ type ] || [];
|
2059 |
-
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
2060 |
-
diff = nodeIndex;
|
2061 |
-
}
|
2062 |
-
|
2063 |
-
// xml :nth-child(...)
|
2064 |
-
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
2065 |
-
if ( diff === false ) {
|
2066 |
-
// Use the same loop as above to seek `elem` from the start
|
2067 |
-
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
2068 |
-
(diff = nodeIndex = 0) || start.pop()) ) {
|
2069 |
Â
|
2070 |
-
|
2071 |
-
|
2072 |
-
node
|
2073 |
-
++diff ) {
|
2074 |
Â
|
2075 |
-
//
|
2076 |
-
|
2077 |
-
|
Â
|
|
2078 |
Â
|
2079 |
-
|
2080 |
-
|
2081 |
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
2082 |
-
(outerCache[ node.uniqueID ] = {});
|
2083 |
-
|
2084 |
-
uniqueCache[ type ] = [ dirruns, diff ];
|
2085 |
-
}
|
2086 |
Â
|
2087 |
-
|
2088 |
-
|
2089 |
-
}
|
2090 |
Â
}
|
2091 |
Â
}
|
2092 |
Â
}
|
2093 |
Â
}
|
2094 |
-
|
2095 |
-
// Incorporate the offset, then check against cycle size
|
2096 |
-
diff -= last;
|
2097 |
-
return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
2098 |
Â
}
|
2099 |
-
};
|
2100 |
-
},
|
2101 |
Â
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
var args,
|
2108 |
-
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
2109 |
-
Sizzle.error( "unsupported pseudo: " + pseudo );
|
2110 |
-
|
2111 |
-
// The user may use createPseudo to indicate that
|
2112 |
-
// arguments are needed to create the filter function
|
2113 |
-
// just as Sizzle does
|
2114 |
-
if ( fn[ expando ] ) {
|
2115 |
-
return fn( argument );
|
2116 |
-
}
|
2117 |
-
|
2118 |
-
// But maintain support for old signatures
|
2119 |
-
if ( fn.length > 1 ) {
|
2120 |
-
args = [ pseudo, pseudo, "", argument ];
|
2121 |
-
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
2122 |
-
markFunction(function( seed, matches ) {
|
2123 |
-
var idx,
|
2124 |
-
matched = fn( seed, argument ),
|
2125 |
-
i = matched.length;
|
2126 |
-
while ( i-- ) {
|
2127 |
-
idx = indexOf( seed, matched[i] );
|
2128 |
-
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
2129 |
-
}
|
2130 |
-
}) :
|
2131 |
-
function( elem ) {
|
2132 |
-
return fn( elem, 0, args );
|
2133 |
-
};
|
2134 |
-
}
|
2135 |
-
|
2136 |
-
return fn;
|
2137 |
-
}
|
2138 |
Â
},
|
2139 |
Â
|
2140 |
-
|
2141 |
-
//
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2157 |
Â
while ( i-- ) {
|
2158 |
-
|
2159 |
-
|
2160 |
-
}
|
2161 |
Â
}
|
2162 |
Â
}) :
|
2163 |
-
function( elem
|
2164 |
-
|
2165 |
-
matcher( input, null, xml, results );
|
2166 |
-
// Don't keep the element (issue #299)
|
2167 |
-
input[0] = null;
|
2168 |
-
return !results.pop();
|
2169 |
Â
};
|
2170 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2171 |
Â
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2177 |
Â
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
// or beginning with the identifier C immediately followed by "-".
|
2189 |
-
// The matching of C against the element's language value is performed case-insensitively.
|
2190 |
-
// The identifier C does not have to be a valid language name."
|
2191 |
-
// http://www.w3.org/TR/selectors/#lang-pseudo
|
2192 |
-
"lang": markFunction( function( lang ) {
|
2193 |
-
// lang value must be a valid identifier
|
2194 |
-
if ( !ridentifier.test(lang || "") ) {
|
2195 |
-
Sizzle.error( "unsupported lang: " + lang );
|
2196 |
-
}
|
2197 |
-
lang = lang.replace( runescape, funescape ).toLowerCase();
|
2198 |
-
return function( elem ) {
|
2199 |
-
var elemLang;
|
2200 |
-
do {
|
2201 |
-
if ( (elemLang = documentIsHTML ?
|
2202 |
-
elem.lang :
|
2203 |
-
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
|
2204 |
-
|
2205 |
-
elemLang = elemLang.toLowerCase();
|
2206 |
-
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
2207 |
Â
}
|
2208 |
-
}
|
2209 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2210 |
Â
};
|
2211 |
-
|
2212 |
Â
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
Â
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2222 |
Â
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
Â
|
|
Â
|
|
2226 |
Â
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
Â
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
var nodeName = elem.nodeName.toLowerCase();
|
2235 |
-
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
2236 |
-
},
|
2237 |
Â
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
if ( elem.parentNode ) {
|
2242 |
-
elem.parentNode.selectedIndex;
|
2243 |
-
}
|
2244 |
Â
|
2245 |
-
|
2246 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2247 |
Â
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
2255 |
-
if ( elem.nodeType < 6 ) {
|
2256 |
-
return false;
|
2257 |
-
}
|
2258 |
-
}
|
2259 |
-
return true;
|
2260 |
-
},
|
2261 |
Â
|
2262 |
-
|
2263 |
-
|
2264 |
-
},
|
2265 |
Â
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2270 |
Â
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
Â
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
Â
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
elem.type === "text" &&
|
2284 |
Â
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
Â
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
Â
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
Â
|
|
2298 |
Â
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
Â
|
|
2302 |
Â
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
matchIndexes.push( i );
|
2307 |
-
}
|
2308 |
-
return matchIndexes;
|
2309 |
-
}),
|
2310 |
Â
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
matchIndexes.push( i );
|
2315 |
-
}
|
2316 |
-
return matchIndexes;
|
2317 |
-
}),
|
2318 |
Â
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
Â
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
}
|
2335 |
-
};
|
2336 |
Â
|
2337 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2338 |
Â
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2342 |
Â
}
|
2343 |
-
|
2344 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2345 |
Â
}
|
2346 |
Â
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
Expr.setFilters = new setFilters();
|
2351 |
Â
|
2352 |
-
|
2353 |
-
var matched, match, tokens, type,
|
2354 |
-
soFar, groups, preFilters,
|
2355 |
-
cached = tokenCache[ selector + " " ];
|
2356 |
Â
|
2357 |
-
|
2358 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2359 |
Â
}
|
2360 |
Â
|
2361 |
-
|
2362 |
-
groups = [];
|
2363 |
-
preFilters = Expr.preFilter;
|
2364 |
-
|
2365 |
-
while ( soFar ) {
|
2366 |
-
|
2367 |
-
// Comma and first run
|
2368 |
-
if ( !matched || (match = rcomma.exec( soFar )) ) {
|
2369 |
-
if ( match ) {
|
2370 |
-
// Don't consume trailing commas as valid
|
2371 |
-
soFar = soFar.slice( match[0].length ) || soFar;
|
2372 |
-
}
|
2373 |
-
groups.push( (tokens = []) );
|
2374 |
-
}
|
2375 |
Â
|
2376 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2377 |
Â
|
2378 |
-
|
2379 |
-
|
Â
|
|
Â
|
|
2380 |
Â
matched = match.shift();
|
2381 |
Â
tokens.push({
|
2382 |
Â
value: matched,
|
2383 |
-
|
2384 |
-
|
2385 |
Â
});
|
2386 |
Â
soFar = soFar.slice( matched.length );
|
2387 |
Â
}
|
2388 |
-
|
2389 |
-
// Filters
|
2390 |
-
for ( type in Expr.filter ) {
|
2391 |
-
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
2392 |
-
(match = preFilters[ type ]( match ))) ) {
|
2393 |
-
matched = match.shift();
|
2394 |
-
tokens.push({
|
2395 |
-
value: matched,
|
2396 |
-
type: type,
|
2397 |
-
matches: match
|
2398 |
-
});
|
2399 |
-
soFar = soFar.slice( matched.length );
|
2400 |
-
}
|
2401 |
-
}
|
2402 |
-
|
2403 |
-
if ( !matched ) {
|
2404 |
-
break;
|
2405 |
-
}
|
2406 |
Â
}
|
2407 |
Â
|
2408 |
-
|
2409 |
-
|
2410 |
-
// Otherwise, throw an error or return tokens
|
2411 |
-
return parseOnly ?
|
2412 |
-
soFar.length :
|
2413 |
-
soFar ?
|
2414 |
-
Sizzle.error( selector ) :
|
2415 |
-
// Cache the tokens
|
2416 |
-
tokenCache( selector, groups ).slice( 0 );
|
2417 |
-
};
|
2418 |
-
|
2419 |
-
function toSelector( tokens ) {
|
2420 |
-
var i = 0,
|
2421 |
-
len = tokens.length,
|
2422 |
-
selector = "";
|
2423 |
-
for ( ; i < len; i++ ) {
|
2424 |
-
selector += tokens[i].value;
|
2425 |
Â
}
|
2426 |
-
return selector;
|
2427 |
Â
}
|
2428 |
Â
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2435 |
Â
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2443 |
Â
}
|
2444 |
-
|
2445 |
-
|
Â
|
|
2446 |
Â
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
Â
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
}
|
2459 |
Â
}
|
2460 |
Â
}
|
2461 |
-
}
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
Â
|
|
2465 |
Â
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
Â
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
Â
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
Â
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
}
|
2485 |
Â
}
|
2486 |
Â
}
|
2487 |
Â
}
|
2488 |
Â
}
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
Â
|
|
2492 |
Â
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
}
|
2501 |
Â
}
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
return results;
|
2514 |
Â
}
|
Â
|
|
Â
|
|
2515 |
Â
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
Â
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
}
|
2530 |
Â
}
|
2531 |
Â
}
|
2532 |
Â
}
|
2533 |
-
|
2534 |
-
return newUnmatched;
|
2535 |
Â
}
|
2536 |
Â
|
2537 |
-
|
2538 |
-
|
2539 |
-
postFilter = setMatcher( postFilter );
|
2540 |
-
}
|
2541 |
-
if ( postFinder && !postFinder[ expando ] ) {
|
2542 |
-
postFinder = setMatcher( postFinder, postSelector );
|
2543 |
-
}
|
2544 |
-
return markFunction(function( seed, results, context, xml ) {
|
2545 |
-
var temp, i, elem,
|
2546 |
-
preMap = [],
|
2547 |
-
postMap = [],
|
2548 |
-
preexisting = results.length,
|
2549 |
Â
|
2550 |
-
|
2551 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2552 |
Â
|
2553 |
-
|
2554 |
-
|
2555 |
-
condense( elems, preMap, preFilter, context, xml ) :
|
2556 |
-
elems,
|
2557 |
Â
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
Â
|
|
2561 |
Â
|
2562 |
-
|
2563 |
-
|
Â
|
|
2564 |
Â
|
2565 |
-
|
2566 |
-
|
2567 |
-
matcherIn;
|
2568 |
Â
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
}
|
2573 |
Â
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
Â
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2585 |
Â
}
|
2586 |
Â
}
|
Â
|
|
2587 |
Â
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
i = matcherOut.length;
|
2594 |
-
while ( i-- ) {
|
2595 |
-
if ( (elem = matcherOut[i]) ) {
|
2596 |
-
// Restore matcherIn since elem is not yet a final match
|
2597 |
-
temp.push( (matcherIn[i] = elem) );
|
2598 |
-
}
|
2599 |
-
}
|
2600 |
-
postFinder( null, (matcherOut = []), temp, xml );
|
2601 |
-
}
|
2602 |
-
|
2603 |
-
// Move matched elements from seed to results to keep them synchronized
|
2604 |
Â
i = matcherOut.length;
|
2605 |
Â
while ( i-- ) {
|
2606 |
-
if ( (elem = matcherOut[i])
|
2607 |
-
|
2608 |
-
|
2609 |
-
seed[temp] = !(results[temp] = elem);
|
2610 |
Â
}
|
2611 |
Â
}
|
Â
|
|
2612 |
Â
}
|
2613 |
Â
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
postFinder( null, results, matcherOut, xml );
|
2623 |
-
} else {
|
2624 |
-
push.apply( results, matcherOut );
|
2625 |
Â
}
|
2626 |
Â
}
|
2627 |
-
});
|
2628 |
-
}
|
2629 |
Â
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
return elem === checkContext;
|
2640 |
-
}, implicitRelative, true ),
|
2641 |
-
matchAnyContext = addCombinator( function( elem ) {
|
2642 |
-
return indexOf( checkContext, elem ) > -1;
|
2643 |
-
}, implicitRelative, true ),
|
2644 |
-
matchers = [ function( elem, context, xml ) {
|
2645 |
-
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2646 |
-
(checkContext = context).nodeType ?
|
2647 |
-
matchContext( elem, context, xml ) :
|
2648 |
-
matchAnyContext( elem, context, xml ) );
|
2649 |
-
// Avoid hanging onto element (issue #299)
|
2650 |
-
checkContext = null;
|
2651 |
-
return ret;
|
2652 |
-
} ];
|
2653 |
-
|
2654 |
-
for ( ; i < len; i++ ) {
|
2655 |
-
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
2656 |
-
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
|
2657 |
Â
} else {
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2668 |
Â
}
|
2669 |
-
return setMatcher(
|
2670 |
-
i > 1 && elementMatcher( matchers ),
|
2671 |
-
i > 1 && toSelector(
|
2672 |
-
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
2673 |
-
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
|
2674 |
-
).replace( rtrim, "$1" ),
|
2675 |
-
matcher,
|
2676 |
-
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
2677 |
-
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
2678 |
-
j < len && toSelector( tokens )
|
2679 |
-
);
|
2680 |
Â
}
|
2681 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2682 |
Â
}
|
Â
|
|
2683 |
Â
}
|
2684 |
-
|
2685 |
-
return elementMatcher( matchers );
|
2686 |
Â
}
|
2687 |
Â
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
results.push( elem );
|
2721 |
-
break;
|
2722 |
-
}
|
2723 |
-
}
|
2724 |
-
if ( outermost ) {
|
2725 |
-
dirruns = dirrunsUnique;
|
2726 |
-
}
|
2727 |
Â
}
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
if ( (elem = !matcher && elem) ) {
|
2733 |
-
matchedCount--;
|
2734 |
-
}
|
2735 |
-
|
2736 |
-
// Lengthen the array for every element, matched or not
|
2737 |
-
if ( seed ) {
|
2738 |
-
unmatched.push( elem );
|
2739 |
Â
}
|
2740 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
2741 |
Â
}
|
2742 |
Â
|
2743 |
-
//
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
|
2749 |
-
// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
|
2750 |
-
// no element matchers and no seed.
|
2751 |
-
// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
|
2752 |
-
// case, which will result in a "00" `matchedCount` that differs from `i` but is also
|
2753 |
-
// numerically zero.
|
2754 |
-
if ( bySet && i !== matchedCount ) {
|
2755 |
-
j = 0;
|
2756 |
-
while ( (matcher = setMatchers[j++]) ) {
|
2757 |
-
matcher( unmatched, setMatched, context, xml );
|
2758 |
Â
}
|
2759 |
Â
|
Â
|
|
2760 |
Â
if ( seed ) {
|
2761 |
-
|
2762 |
-
if ( matchedCount > 0 ) {
|
2763 |
-
while ( i-- ) {
|
2764 |
-
if ( !(unmatched[i] || setMatched[i]) ) {
|
2765 |
-
setMatched[i] = pop.call( results );
|
2766 |
-
}
|
2767 |
-
}
|
2768 |
-
}
|
2769 |
-
|
2770 |
-
// Discard index placeholder values to get only actual matches
|
2771 |
-
setMatched = condense( setMatched );
|
2772 |
Â
}
|
Â
|
|
Â
|
|
2773 |
Â
|
2774 |
-
|
2775 |
-
|
Â
|
|
2776 |
Â
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2780 |
Â
|
2781 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2782 |
Â
}
|
2783 |
-
}
|
2784 |
Â
|
2785 |
-
|
2786 |
-
|
2787 |
-
dirruns = dirrunsUnique;
|
2788 |
-
outermostContext = contextBackup;
|
2789 |
Â
}
|
2790 |
Â
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
return bySet ?
|
2795 |
-
markFunction( superMatcher ) :
|
2796 |
-
superMatcher;
|
2797 |
-
}
|
2798 |
Â
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
elementMatchers = [],
|
2803 |
-
cached = compilerCache[ selector + " " ];
|
2804 |
Â
|
2805 |
-
|
2806 |
-
// Generate a function of recursive functions that can be used to check each element
|
2807 |
-
if ( !match ) {
|
2808 |
-
match = tokenize( selector );
|
2809 |
-
}
|
2810 |
-
i = match.length;
|
2811 |
-
while ( i-- ) {
|
2812 |
-
cached = matcherFromTokens( match[i] );
|
2813 |
-
if ( cached[ expando ] ) {
|
2814 |
-
setMatchers.push( cached );
|
2815 |
-
} else {
|
2816 |
-
elementMatchers.push( cached );
|
2817 |
Â
}
|
2818 |
Â
}
|
2819 |
Â
|
2820 |
-
//
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
cached.selector = selector;
|
2825 |
-
}
|
2826 |
-
return cached;
|
2827 |
-
};
|
2828 |
-
|
2829 |
-
/**
|
2830 |
-
* A low-level selection function that works with Sizzle's compiled
|
2831 |
-
* selector functions
|
2832 |
-
* @param {String|Function} selector A selector or a pre-compiled
|
2833 |
-
* selector function built with Sizzle.compile
|
2834 |
-
* @param {Element} context
|
2835 |
-
* @param {Array} [results]
|
2836 |
-
* @param {Array} [seed] A set of elements to match against
|
2837 |
-
*/
|
2838 |
-
select = Sizzle.select = function( selector, context, results, seed ) {
|
2839 |
-
var i, tokens, token, type, find,
|
2840 |
-
compiled = typeof selector === "function" && selector,
|
2841 |
-
match = !seed && tokenize( (selector = compiled.selector || selector) );
|
2842 |
-
|
2843 |
-
results = results || [];
|
2844 |
-
|
2845 |
-
// Try to minimize operations if there is only one selector in the list and no seed
|
2846 |
-
// (the latter of which guarantees us context)
|
2847 |
-
if ( match.length === 1 ) {
|
2848 |
-
|
2849 |
-
// Reduce context if the leading compound selector is an ID
|
2850 |
-
tokens = match[0] = match[0].slice( 0 );
|
2851 |
-
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2852 |
-
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
|
2853 |
-
|
2854 |
-
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
2855 |
-
if ( !context ) {
|
2856 |
-
return results;
|
2857 |
-
|
2858 |
-
// Precompiled matchers will still verify ancestry, so step up a level
|
2859 |
-
} else if ( compiled ) {
|
2860 |
-
context = context.parentNode;
|
2861 |
-
}
|
2862 |
-
|
2863 |
-
selector = selector.slice( tokens.shift().value.length );
|
2864 |
Â
}
|
2865 |
Â
|
2866 |
-
|
2867 |
-
|
2868 |
-
while ( i-- ) {
|
2869 |
-
token = tokens[i];
|
2870 |
Â
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
if ( (find = Expr.find[ type ]) ) {
|
2876 |
-
// Search, expanding context for leading sibling combinators
|
2877 |
-
if ( (seed = find(
|
2878 |
-
token.matches[0].replace( runescape, funescape ),
|
2879 |
-
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
|
2880 |
-
)) ) {
|
2881 |
-
|
2882 |
-
// If seed is empty or no tokens remain, we can return early
|
2883 |
-
tokens.splice( i, 1 );
|
2884 |
-
selector = seed.length && toSelector( tokens );
|
2885 |
-
if ( !selector ) {
|
2886 |
-
push.apply( results, seed );
|
2887 |
-
return results;
|
2888 |
-
}
|
2889 |
Â
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2893 |
Â
}
|
2894 |
Â
}
|
2895 |
Â
|
2896 |
-
//
|
2897 |
-
|
2898 |
-
( compiled || compile( selector, match ) )(
|
2899 |
-
seed,
|
2900 |
-
context,
|
2901 |
-
!documentIsHTML,
|
2902 |
-
results,
|
2903 |
-
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
2904 |
-
);
|
2905 |
-
return results;
|
2906 |
-
};
|
2907 |
-
|
2908 |
-
// One-time assignments
|
2909 |
Â
|
2910 |
-
|
2911 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2912 |
Â
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
Â
|
|
2916 |
Â
|
2917 |
-
|
2918 |
-
|
2919 |
Â
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
|
2925 |
-
});
|
2926 |
Â
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
if ( !assert(function( el ) {
|
2931 |
-
el.innerHTML = "<a href='#'></a>";
|
2932 |
-
return el.firstChild.getAttribute("href") === "#" ;
|
2933 |
-
}) ) {
|
2934 |
-
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
2935 |
-
if ( !isXML ) {
|
2936 |
-
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
2937 |
Â
}
|
2938 |
-
|
2939 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2940 |
Â
|
2941 |
-
|
2942 |
-
|
2943 |
-
if ( !support.attributes || !assert(function( el ) {
|
2944 |
-
el.innerHTML = "<input/>";
|
2945 |
-
el.firstChild.setAttribute( "value", "" );
|
2946 |
-
return el.firstChild.getAttribute( "value" ) === "";
|
2947 |
-
}) ) {
|
2948 |
-
addHandle( "value", function( elem, name, isXML ) {
|
2949 |
-
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
2950 |
-
return elem.defaultValue;
|
2951 |
Â
}
|
2952 |
-
}
|
2953 |
Â
}
|
2954 |
Â
|
2955 |
-
//
|
2956 |
-
//
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2970 |
Â
|
2971 |
-
|
2972 |
Â
|
2973 |
-
|
2974 |
Â
|
2975 |
Â
|
2976 |
Â
|
2977 |
-
|
2978 |
-
|
2979 |
Â
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
Â
|
2988 |
Â
|
2989 |
Â
|
2990 |
Â
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
Â
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
}
|
3000 |
-
matched.push( elem );
|
3001 |
Â
}
|
Â
|
|
3002 |
Â
}
|
3003 |
-
|
3004 |
-
|
Â
|
|
3005 |
Â
|
3006 |
Â
|
3007 |
-
|
3008 |
-
|
3009 |
Â
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
}
|
3014 |
Â
}
|
Â
|
|
3015 |
Â
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
var rneedsContext = jQuery.expr.match.needsContext;
|
3021 |
Â
|
3022 |
Â
|
Â
|
|
3023 |
Â
|
3024 |
-
function nodeName( elem, name ) {
|
3025 |
Â
|
3026 |
-
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
3027 |
Â
|
3028 |
-
|
3029 |
-
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
3030 |
Â
|
Â
|
|
3031 |
Â
|
Â
|
|
Â
|
|
3032 |
Â
|
3033 |
-
// Implement the identical functionality for filter and not
|
3034 |
-
function winnow( elements, qualifier, not ) {
|
3035 |
-
if ( isFunction( qualifier ) ) {
|
3036 |
-
return jQuery.grep( elements, function( elem, i ) {
|
3037 |
-
return !!qualifier.call( elem, i, elem ) !== not;
|
3038 |
-
} );
|
3039 |
-
}
|
3040 |
Â
|
3041 |
-
// Single element
|
3042 |
-
if ( qualifier.nodeType ) {
|
3043 |
-
return jQuery.grep( elements, function( elem ) {
|
3044 |
-
return ( elem === qualifier ) !== not;
|
3045 |
-
} );
|
3046 |
-
}
|
3047 |
Â
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
}
|
Â
|
|
3054 |
Â
|
3055 |
-
|
3056 |
-
|
Â
|
|
Â
|
|
Â
|
|
3057 |
Â
}
|
3058 |
Â
|
3059 |
-
|
3060 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3061 |
Â
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
Â
|
3066 |
-
|
3067 |
-
|
3068 |
-
}
|
3069 |
Â
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
};
|
3074 |
Â
|
3075 |
-
|
3076 |
-
find
|
3077 |
-
|
3078 |
-
len = this.length,
|
3079 |
-
self = this;
|
3080 |
Â
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3087 |
Â
}
|
3088 |
-
}
|
3089 |
-
}
|
3090 |
-
|
3091 |
-
ret = this.pushStack( [] );
|
3092 |
Â
|
3093 |
-
|
3094 |
-
jQuery.find( selector, self[ i ], ret );
|
3095 |
-
}
|
3096 |
Â
|
3097 |
-
|
3098 |
-
|
3099 |
-
filter: function( selector ) {
|
3100 |
-
return this.pushStack( winnow( this, selector || [], false ) );
|
3101 |
-
},
|
3102 |
-
not: function( selector ) {
|
3103 |
-
return this.pushStack( winnow( this, selector || [], true ) );
|
3104 |
-
},
|
3105 |
-
is: function( selector ) {
|
3106 |
-
return !!winnow(
|
3107 |
-
this,
|
3108 |
-
|
3109 |
-
// If this is a positional/relative selector, check membership in the returned set
|
3110 |
-
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
3111 |
-
typeof selector === "string" && rneedsContext.test( selector ) ?
|
3112 |
-
jQuery( selector ) :
|
3113 |
-
selector || [],
|
3114 |
-
false
|
3115 |
-
).length;
|
3116 |
Â
}
|
3117 |
-
} );
|
3118 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3119 |
Â
|
3120 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3121 |
Â
|
3122 |
Â
|
3123 |
-
|
3124 |
-
var rootjQuery,
|
3125 |
Â
|
3126 |
-
// A simple way to check for HTML strings
|
3127 |
-
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
3128 |
-
// Strict HTML recognition (#11290: must start with <)
|
3129 |
-
// Shortcut simple #id case for speed
|
3130 |
-
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
3131 |
Â
|
3132 |
-
|
3133 |
-
|
3134 |
Â
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
Â
|
|
3139 |
Â
|
3140 |
-
|
3141 |
-
|
3142 |
-
root = root || rootjQuery;
|
3143 |
Â
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
selector.length >= 3 ) {
|
3149 |
Â
|
3150 |
-
|
3151 |
-
|
Â
|
|
3152 |
Â
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
Â
|
|
Â
|
|
3156 |
Â
|
3157 |
-
//
|
3158 |
-
|
3159 |
Â
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
Â
|
3164 |
-
|
3165 |
-
|
3166 |
-
jQuery.merge( this, jQuery.parseHTML(
|
3167 |
-
match[ 1 ],
|
3168 |
-
context && context.nodeType ? context.ownerDocument || context : document,
|
3169 |
-
true
|
3170 |
-
) );
|
3171 |
Â
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
Â
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3179 |
Â
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3184 |
Â
}
|
3185 |
Â
}
|
Â
|
|
3186 |
Â
|
3187 |
-
|
3188 |
Â
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
Â
|
3193 |
-
|
3194 |
Â
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
}
|
3199 |
-
return this;
|
3200 |
Â
}
|
Â
|
|
Â
|
|
3201 |
Â
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
Â
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
Â
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
Â
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
Â
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
Â
|
3228 |
-
|
3229 |
-
|
3230 |
Â
|
3231 |
-
|
3232 |
-
|
3233 |
Â
|
3234 |
-
|
3235 |
-
|
3236 |
Â
|
3237 |
Â
|
3238 |
-
|
3239 |
Â
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
Â
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
Â
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
}
|
3259 |
Â
}
|
3260 |
-
}
|
3261 |
-
}
|
Â
|
|
3262 |
Â
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
Â
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
Â
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
Â
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
Â
|
3283 |
-
|
3284 |
-
|
3285 |
-
}
|
3286 |
Â
}
|
3287 |
Â
}
|
3288 |
Â
}
|
Â
|
|
3289 |
Â
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
// Determine the position of an element within the set
|
3294 |
-
index: function( elem ) {
|
3295 |
Â
|
3296 |
-
|
3297 |
-
|
3298 |
-
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
3299 |
-
}
|
3300 |
Â
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
Â
|
3306 |
-
|
3307 |
-
|
Â
|
|
Â
|
|
3308 |
Â
|
3309 |
-
|
3310 |
-
|
3311 |
-
);
|
3312 |
-
},
|
3313 |
Â
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
)
|
3319 |
-
);
|
3320 |
-
},
|
3321 |
Â
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
Â
|
|
3328 |
Â
|
3329 |
-
function
|
3330 |
-
|
3331 |
-
|
Â
|
|
3332 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3333 |
Â
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
return parent && parent.nodeType !== 11 ? parent : null;
|
3338 |
-
},
|
3339 |
-
parents: function( elem ) {
|
3340 |
-
return dir( elem, "parentNode" );
|
3341 |
-
},
|
3342 |
-
parentsUntil: function( elem, i, until ) {
|
3343 |
-
return dir( elem, "parentNode", until );
|
3344 |
-
},
|
3345 |
-
next: function( elem ) {
|
3346 |
-
return sibling( elem, "nextSibling" );
|
3347 |
-
},
|
3348 |
-
prev: function( elem ) {
|
3349 |
-
return sibling( elem, "previousSibling" );
|
3350 |
-
},
|
3351 |
-
nextAll: function( elem ) {
|
3352 |
-
return dir( elem, "nextSibling" );
|
3353 |
-
},
|
3354 |
-
prevAll: function( elem ) {
|
3355 |
-
return dir( elem, "previousSibling" );
|
3356 |
-
},
|
3357 |
-
nextUntil: function( elem, i, until ) {
|
3358 |
-
return dir( elem, "nextSibling", until );
|
3359 |
-
},
|
3360 |
-
prevUntil: function( elem, i, until ) {
|
3361 |
-
return dir( elem, "previousSibling", until );
|
3362 |
-
},
|
3363 |
-
siblings: function( elem ) {
|
3364 |
-
return siblings( ( elem.parentNode || {} ).firstChild, elem );
|
3365 |
-
},
|
3366 |
-
children: function( elem ) {
|
3367 |
-
return siblings( elem.firstChild );
|
3368 |
-
},
|
3369 |
-
contents: function( elem ) {
|
3370 |
-
if ( nodeName( elem, "iframe" ) ) {
|
3371 |
-
return elem.contentDocument;
|
3372 |
-
}
|
3373 |
-
|
3374 |
-
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
3375 |
-
// Treat the template element as a regular one in browsers that
|
3376 |
-
// don't support it.
|
3377 |
-
if ( nodeName( elem, "template" ) ) {
|
3378 |
-
elem = elem.content || elem;
|
3379 |
-
}
|
3380 |
Â
|
3381 |
-
|
Â
|
|
3382 |
Â
}
|
3383 |
-
}, function( name, fn ) {
|
3384 |
-
jQuery.fn[ name ] = function( until, selector ) {
|
3385 |
-
var matched = jQuery.map( this, fn, until );
|
3386 |
Â
|
3387 |
-
|
3388 |
-
|
Â
|
|
Â
|
|
Â
|
|
3389 |
Â
}
|
3390 |
Â
|
3391 |
-
|
3392 |
-
|
Â
|
|
3393 |
Â
}
|
Â
|
|
3394 |
Â
|
3395 |
-
|
Â
|
|
Â
|
|
Â
|
|
3396 |
Â
|
3397 |
-
// Remove duplicates
|
3398 |
-
if ( !guaranteedUnique[ name ] ) {
|
3399 |
-
jQuery.uniqueSort( matched );
|
3400 |
-
}
|
3401 |
Â
|
3402 |
-
// Reverse order for parents* and prev-derivatives
|
3403 |
-
if ( rparentsprev.test( name ) ) {
|
3404 |
-
matched.reverse();
|
3405 |
-
}
|
3406 |
-
}
|
3407 |
Â
|
3408 |
-
|
3409 |
-
|
Â
|
|
Â
|
|
Â
|
|
3410 |
Â
} );
|
3411 |
-
|
3412 |
-
|
3413 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3414 |
Â
|
3415 |
-
// Convert String-formatted
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
} );
|
3421 |
-
return object;
|
3422 |
-
}
|
3423 |
-
|
3424 |
-
/*
|
3425 |
-
* Create a callback list using the following parameters:
|
3426 |
-
*
|
3427 |
-
* options: an optional list of space-separated options that will change how
|
3428 |
-
* the callback list behaves or a more traditional option object
|
3429 |
-
*
|
3430 |
-
* By default a callback list will act like an event callback list and can be
|
3431 |
-
* "fired" multiple times.
|
3432 |
-
*
|
3433 |
-
* Possible options:
|
3434 |
-
*
|
3435 |
-
* once: will ensure the callback list can only be fired once (like a Deferred)
|
3436 |
-
*
|
3437 |
-
* memory: will keep track of previous values and will call any callback added
|
3438 |
-
* after the list has been fired right away with the latest "memorized"
|
3439 |
-
* values (like a Deferred)
|
3440 |
-
*
|
3441 |
-
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
3442 |
-
*
|
3443 |
-
* stopOnFalse: interrupt callings when a callback returns false
|
3444 |
-
*
|
3445 |
-
*/
|
3446 |
-
jQuery.Callbacks = function( options ) {
|
3447 |
-
|
3448 |
-
// Convert options from String-formatted to Object-formatted if needed
|
3449 |
-
// (we check in cache first)
|
3450 |
-
options = typeof options === "string" ?
|
3451 |
-
createOptions( options ) :
|
3452 |
-
jQuery.extend( {}, options );
|
3453 |
Â
|
3454 |
-
|
3455 |
-
|
3456 |
Â
|
3457 |
-
|
3458 |
-
|
3459 |
Â
|
3460 |
-
|
3461 |
-
|
3462 |
Â
|
3463 |
-
|
3464 |
-
|
3465 |
Â
|
3466 |
-
|
3467 |
-
|
3468 |
Â
|
3469 |
-
|
3470 |
-
|
3471 |
Â
|
3472 |
-
|
3473 |
-
|
3474 |
Â
|
3475 |
-
|
3476 |
-
|
3477 |
Â
|
3478 |
-
|
3479 |
-
|
3480 |
Â
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
Â
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
Â
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
}
|
3496 |
Â
}
|
3497 |
Â
}
|
Â
|
|
3498 |
Â
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
Â
|
3504 |
-
|
3505 |
Â
|
3506 |
-
|
3507 |
-
|
3508 |
Â
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
Â
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
}
|
3517 |
Â
}
|
3518 |
-
}
|
3519 |
-
|
3520 |
-
// Actual Callbacks object
|
3521 |
-
self = {
|
3522 |
Â
|
3523 |
-
|
3524 |
-
|
3525 |
-
if ( list ) {
|
3526 |
Â
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
queue.push( memory );
|
3531 |
-
}
|
3532 |
Â
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
}
|
3539 |
-
} else if ( arg && arg.length && toType( arg ) !== "string" ) {
|
3540 |
Â
|
3541 |
-
|
3542 |
-
|
Â
|
|
Â
|
|
Â
|
|
3543 |
Â
}
|
3544 |
-
} )
|
3545 |
-
} )( arguments );
|
3546 |
Â
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3550 |
Â
}
|
3551 |
-
|
3552 |
-
|
Â
|
|
3553 |
Â
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
Â
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
}
|
3565 |
Â
}
|
3566 |
-
} );
|
3567 |
-
return this;
|
3568 |
-
},
|
3569 |
-
|
3570 |
-
// Check if a given callback is in the list.
|
3571 |
-
// If no argument is given, return whether or not list has callbacks attached.
|
3572 |
-
has: function( fn ) {
|
3573 |
-
return fn ?
|
3574 |
-
jQuery.inArray( fn, list ) > -1 :
|
3575 |
-
list.length > 0;
|
3576 |
-
},
|
3577 |
-
|
3578 |
-
// Remove all callbacks from the list
|
3579 |
-
empty: function() {
|
3580 |
-
if ( list ) {
|
3581 |
-
list = [];
|
3582 |
Â
}
|
3583 |
-
|
3584 |
-
|
Â
|
|
3585 |
Â
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
list
|
3592 |
-
|
3593 |
-
},
|
3594 |
-
disabled: function() {
|
3595 |
-
return !list;
|
3596 |
-
},
|
3597 |
Â
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
}
|
3606 |
-
return this;
|
3607 |
-
},
|
3608 |
-
locked: function() {
|
3609 |
-
return !!locked;
|
3610 |
-
},
|
3611 |
Â
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
},
|
3624 |
Â
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3630 |
Â
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3634 |
Â
}
|
3635 |
-
|
Â
|
|
3636 |
Â
|
3637 |
-
|
3638 |
-
|
Â
|
|
Â
|
|
Â
|
|
3639 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3640 |
Â
|
3641 |
-
|
3642 |
-
|
3643 |
-
}
|
3644 |
-
function Thrower( ex ) {
|
3645 |
-
throw ex;
|
3646 |
-
}
|
3647 |
Â
|
3648 |
-
function adoptValue( value, resolve, reject, noValue ) {
|
3649 |
-
var method;
|
3650 |
Â
|
3651 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3652 |
Â
|
3653 |
-
|
3654 |
-
|
3655 |
-
method.call( value ).done( resolve ).fail( reject );
|
3656 |
Â
|
3657 |
-
|
3658 |
-
} else if ( value && isFunction( ( method = value.then ) ) ) {
|
3659 |
-
method.call( value, resolve, reject );
|
3660 |
Â
|
3661 |
-
|
3662 |
-
|
Â
|
|
3663 |
Â
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
resolve.apply( undefined, [ value ].slice( noValue ) );
|
3668 |
-
}
|
3669 |
Â
|
3670 |
-
//
|
3671 |
-
|
3672 |
-
// Deferred#then to conditionally suppress rejection.
|
3673 |
-
} catch ( value ) {
|
3674 |
Â
|
3675 |
-
//
|
3676 |
-
//
|
3677 |
-
|
Â
|
|
3678 |
Â
}
|
3679 |
-
}
|
3680 |
Â
|
3681 |
-
|
Â
|
|
Â
|
|
Â
|
|
3682 |
Â
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3707 |
Â
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
3716 |
-
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
} );
|
3735 |
Â
} );
|
3736 |
-
|
3737 |
-
|
3738 |
-
}
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
3755 |
-
returned = handler.apply( that, args );
|
3756 |
Â
|
3757 |
-
|
3758 |
-
// https://promisesaplus.com/#point-48
|
3759 |
-
if ( returned === deferred.promise() ) {
|
3760 |
-
throw new TypeError( "Thenable self-resolution" );
|
3761 |
-
}
|
3762 |
Â
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
|
3767 |
-
|
3768 |
-
|
3769 |
-
// Support: Promises/A+ section 2.3.4
|
3770 |
-
// https://promisesaplus.com/#point-64
|
3771 |
-
// Only check objects and functions for thenability
|
3772 |
-
( typeof returned === "object" ||
|
3773 |
-
typeof returned === "function" ) &&
|
3774 |
-
returned.then;
|
3775 |
-
|
3776 |
-
// Handle a returned thenable
|
3777 |
-
if ( isFunction( then ) ) {
|
3778 |
-
|
3779 |
-
// Special processors (notify) just wait for resolution
|
3780 |
-
if ( special ) {
|
3781 |
-
then.call(
|
3782 |
-
returned,
|
3783 |
-
resolve( maxDepth, deferred, Identity, special ),
|
3784 |
-
resolve( maxDepth, deferred, Thrower, special )
|
3785 |
-
);
|
3786 |
-
|
3787 |
-
// Normal processors (resolve) also hook into progress
|
3788 |
-
} else {
|
3789 |
-
|
3790 |
-
// ...and disregard older resolution values
|
3791 |
-
maxDepth++;
|
3792 |
-
|
3793 |
-
then.call(
|
3794 |
-
returned,
|
3795 |
-
resolve( maxDepth, deferred, Identity, special ),
|
3796 |
-
resolve( maxDepth, deferred, Thrower, special ),
|
3797 |
-
resolve( maxDepth, deferred, Identity,
|
3798 |
-
deferred.notifyWith )
|
3799 |
-
);
|
3800 |
-
}
|
3801 |
Â
|
3802 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3803 |
Â
} else {
|
3804 |
Â
|
3805 |
-
//
|
3806 |
-
|
3807 |
-
if ( handler !== Identity ) {
|
3808 |
-
that = undefined;
|
3809 |
-
args = [ returned ];
|
3810 |
-
}
|
3811 |
Â
|
3812 |
-
|
3813 |
-
|
3814 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3815 |
Â
}
|
3816 |
-
},
|
3817 |
-
|
3818 |
-
// Only normal processors (resolve) catch and reject exceptions
|
3819 |
-
process = special ?
|
3820 |
-
mightThrow :
|
3821 |
-
function() {
|
3822 |
-
try {
|
3823 |
-
mightThrow();
|
3824 |
-
} catch ( e ) {
|
3825 |
-
|
3826 |
-
if ( jQuery.Deferred.exceptionHook ) {
|
3827 |
-
jQuery.Deferred.exceptionHook( e,
|
3828 |
-
process.stackTrace );
|
3829 |
-
}
|
3830 |
Â
|
3831 |
-
|
3832 |
-
|
3833 |
-
|
3834 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3835 |
Â
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
|
3840 |
-
args = [ e ];
|
3841 |
-
}
|
3842 |
Â
|
3843 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3844 |
Â
}
|
Â
|
|
Â
|
|
3845 |
Â
}
|
3846 |
-
}
|
3847 |
-
|
3848 |
-
|
3849 |
-
|
3850 |
-
|
3851 |
-
|
3852 |
-
|
3853 |
-
|
3854 |
-
|
Â
|
|
3855 |
Â
|
3856 |
-
|
3857 |
-
|
3858 |
-
|
3859 |
-
|
3860 |
-
}
|
3861 |
-
window.setTimeout( process );
|
3862 |
Â
}
|
3863 |
-
|
3864 |
-
|
Â
|
|
Â
|
|
3865 |
Â
|
3866 |
-
|
3867 |
-
|
3868 |
-
// progress_handlers.add( ... )
|
3869 |
-
tuples[ 0 ][ 3 ].add(
|
3870 |
-
resolve(
|
3871 |
-
0,
|
3872 |
-
newDefer,
|
3873 |
-
isFunction( onProgress ) ?
|
3874 |
-
onProgress :
|
3875 |
-
Identity,
|
3876 |
-
newDefer.notifyWith
|
3877 |
-
)
|
3878 |
-
);
|
3879 |
-
|
3880 |
-
// fulfilled_handlers.add( ... )
|
3881 |
-
tuples[ 1 ][ 3 ].add(
|
3882 |
-
resolve(
|
3883 |
-
0,
|
3884 |
-
newDefer,
|
3885 |
-
isFunction( onFulfilled ) ?
|
3886 |
-
onFulfilled :
|
3887 |
-
Identity
|
3888 |
-
)
|
3889 |
-
);
|
3890 |
-
|
3891 |
-
// rejected_handlers.add( ... )
|
3892 |
-
tuples[ 2 ][ 3 ].add(
|
3893 |
-
resolve(
|
3894 |
-
0,
|
3895 |
-
newDefer,
|
3896 |
-
isFunction( onRejected ) ?
|
3897 |
-
onRejected :
|
3898 |
-
Thrower
|
3899 |
-
)
|
3900 |
-
);
|
3901 |
-
} ).promise();
|
3902 |
-
},
|
3903 |
Â
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3909 |
Â
},
|
3910 |
-
deferred = {};
|
3911 |
Â
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
Â
|
|
Â
|
|
Â
|
|
3916 |
Â
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
Â
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
Â
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
Â
|
3932 |
-
//
|
3933 |
-
//
|
3934 |
-
|
Â
|
|
3935 |
Â
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
Â
|
3940 |
-
|
3941 |
-
|
Â
|
|
3942 |
Â
|
3943 |
-
|
3944 |
-
|
3945 |
-
);
|
3946 |
-
}
|
3947 |
Â
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
Â
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
-
|
3957 |
-
deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
|
3958 |
-
return this;
|
3959 |
-
};
|
3960 |
Â
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
Â
|
|
Â
|
|
3966 |
Â
|
3967 |
-
//
|
3968 |
-
|
Â
|
|
Â
|
|
Â
|
|
3969 |
Â
|
3970 |
-
|
3971 |
-
|
3972 |
-
func.call( deferred, deferred );
|
3973 |
-
}
|
3974 |
Â
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
Â
|
|
3978 |
Â
|
3979 |
-
//
|
3980 |
-
|
3981 |
-
|
3982 |
Â
|
3983 |
-
|
3984 |
-
|
Â
|
|
3985 |
Â
|
3986 |
-
|
3987 |
-
|
3988 |
Â
|
3989 |
-
|
3990 |
-
|
3991 |
-
resolveValues = slice.call( arguments ),
|
3992 |
Â
|
3993 |
-
|
3994 |
-
|
Â
|
|
3995 |
Â
|
3996 |
-
|
3997 |
-
|
3998 |
-
return function( value ) {
|
3999 |
-
resolveContexts[ i ] = this;
|
4000 |
-
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
4001 |
-
if ( !( --remaining ) ) {
|
4002 |
-
master.resolveWith( resolveContexts, resolveValues );
|
4003 |
-
}
|
4004 |
-
};
|
4005 |
-
};
|
4006 |
Â
|
4007 |
-
//
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4011 |
Â
|
4012 |
-
|
4013 |
-
|
4014 |
-
|
Â
|
|
4015 |
Â
|
4016 |
-
|
4017 |
-
|
4018 |
-
|
4019 |
Â
|
4020 |
-
|
4021 |
-
while ( i-- ) {
|
4022 |
-
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
4023 |
Â
}
|
Â
|
|
4024 |
Â
|
4025 |
-
|
Â
|
|
Â
|
|
4026 |
Â
}
|
4027 |
-
} );
|
4028 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4029 |
Â
|
4030 |
-
// These usually indicate a programmer mistake during development,
|
4031 |
-
// warn about them ASAP rather than swallowing them by default.
|
4032 |
-
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
4033 |
Â
|
4034 |
-
|
Â
|
|
Â
|
|
4035 |
Â
|
4036 |
-
|
4037 |
-
// Console exists when dev tools are open, which can happen at any time
|
4038 |
-
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
4039 |
-
window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
|
4040 |
-
}
|
4041 |
-
};
|
4042 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4043 |
Â
|
4044 |
Â
|
4045 |
Â
|
4046 |
-
jQuery.readyException = function( error ) {
|
4047 |
-
window.setTimeout( function() {
|
4048 |
-
throw error;
|
4049 |
-
} );
|
4050 |
-
};
|
4051 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4052 |
Â
|
4053 |
Â
|
4054 |
Â
|
4055 |
-
// The deferred used on DOM ready
|
4056 |
-
var readyList = jQuery.Deferred();
|
4057 |
Â
|
4058 |
-
|
Â
|
|
4059 |
Â
|
4060 |
-
|
4061 |
-
.then( fn )
|
4062 |
Â
|
4063 |
-
|
4064 |
-
|
4065 |
-
// registration.
|
4066 |
-
.catch( function( error ) {
|
4067 |
-
jQuery.readyException( error );
|
4068 |
-
} );
|
4069 |
Â
|
4070 |
-
|
4071 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4072 |
Â
|
4073 |
-
|
Â
|
|
4074 |
Â
|
4075 |
-
|
4076 |
-
isReady: false,
|
4077 |
Â
|
4078 |
-
|
4079 |
-
|
4080 |
-
readyWait: 1,
|
4081 |
Â
|
4082 |
-
|
4083 |
-
|
Â
|
|
4084 |
Â
|
4085 |
-
|
4086 |
-
|
4087 |
-
return;
|
4088 |
-
}
|
4089 |
Â
|
4090 |
-
|
4091 |
-
|
Â
|
|
Â
|
|
4092 |
Â
|
4093 |
-
|
4094 |
-
|
4095 |
-
return;
|
4096 |
-
}
|
4097 |
Â
|
4098 |
-
|
4099 |
-
|
Â
|
|
4100 |
Â
}
|
4101 |
-
} );
|
4102 |
-
|
4103 |
-
jQuery.ready.then = readyList.then;
|
4104 |
Â
|
4105 |
-
|
4106 |
-
|
4107 |
-
document.removeEventListener( "DOMContentLoaded", completed );
|
4108 |
-
window.removeEventListener( "load", completed );
|
4109 |
-
jQuery.ready();
|
4110 |
Â
}
|
Â
|
|
4111 |
Â
|
4112 |
-
|
4113 |
-
// after the browser event has already occurred.
|
4114 |
-
// Support: IE <=9 - 10 only
|
4115 |
-
// Older IE sometimes signals "interactive" too soon
|
4116 |
-
if ( document.readyState === "complete" ||
|
4117 |
-
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
4118 |
Â
|
4119 |
-
|
4120 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4121 |
Â
|
4122 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4123 |
Â
|
4124 |
-
|
4125 |
-
|
4126 |
Â
|
4127 |
-
|
4128 |
-
window.addEventListener( "load", completed );
|
4129 |
-
}
|
4130 |
Â
|
Â
|
|
Â
|
|
4131 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4132 |
Â
|
4133 |
Â
|
4134 |
-
// Multifunctional method to get and set values of a collection
|
4135 |
-
// The value/s can optionally be executed if it's a function
|
4136 |
-
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
4137 |
-
var i = 0,
|
4138 |
-
len = elems.length,
|
4139 |
-
bulk = key == null;
|
4140 |
Â
|
4141 |
-
// Sets many values
|
4142 |
-
if ( toType( key ) === "object" ) {
|
4143 |
-
chainable = true;
|
4144 |
-
for ( i in key ) {
|
4145 |
-
access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
4146 |
-
}
|
4147 |
Â
|
4148 |
-
|
4149 |
-
|
4150 |
-
|
Â
|
|
Â
|
|
Â
|
|
4151 |
Â
|
4152 |
-
|
4153 |
-
|
4154 |
-
|
Â
|
|
Â
|
|
Â
|
|
4155 |
Â
|
4156 |
-
|
Â
|
|
Â
|
|
4157 |
Â
|
4158 |
-
|
4159 |
-
|
4160 |
-
|
4161 |
-
fn = null;
|
4162 |
Â
|
4163 |
-
|
4164 |
-
} else {
|
4165 |
-
bulk = fn;
|
4166 |
-
fn = function( elem, key, value ) {
|
4167 |
-
return bulk.call( jQuery( elem ), value );
|
4168 |
-
};
|
4169 |
-
}
|
4170 |
-
}
|
4171 |
Â
|
4172 |
-
|
4173 |
-
|
4174 |
-
|
4175 |
-
|
4176 |
-
|
4177 |
-
|
4178 |
-
|
4179 |
-
|
Â
|
|
Â
|
|
Â
|
|
4180 |
Â
}
|
4181 |
Â
}
|
4182 |
Â
|
4183 |
-
if (
|
4184 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4185 |
Â
}
|
Â
|
|
4186 |
Â
|
4187 |
-
|
4188 |
-
|
4189 |
-
|
4190 |
-
}
|
4191 |
Â
|
4192 |
-
|
4193 |
-
|
Â
|
|
Â
|
|
4194 |
Â
|
Â
|
|
Â
|
|
4195 |
Â
|
4196 |
-
// Matches dashed string for camelizing
|
4197 |
-
var rmsPrefix = /^-ms-/,
|
4198 |
-
rdashAlpha = /-([a-z])/g;
|
4199 |
Â
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
4203 |
-
}
|
4204 |
Â
|
4205 |
-
|
4206 |
-
|
4207 |
-
|
4208 |
-
|
4209 |
-
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
4210 |
-
}
|
4211 |
-
var acceptData = function( owner ) {
|
4212 |
Â
|
4213 |
-
|
4214 |
-
|
4215 |
-
|
4216 |
-
|
4217 |
-
|
4218 |
-
|
4219 |
-
|
4220 |
-
};
|
4221 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4222 |
Â
|
4223 |
Â
|
4224 |
Â
|
4225 |
-
function Data() {
|
4226 |
-
this.expando = jQuery.expando + Data.uid++;
|
4227 |
-
}
|
4228 |
Â
|
4229 |
-
|
Â
|
|
Â
|
|
4230 |
Â
|
4231 |
-
|
4232 |
Â
|
4233 |
-
|
4234 |
Â
|
4235 |
-
|
4236 |
-
var value = owner[ this.expando ];
|
4237 |
Â
|
4238 |
-
|
4239 |
-
|
4240 |
-
value = {};
|
4241 |
Â
|
4242 |
-
|
4243 |
-
|
4244 |
-
|
4245 |
-
if ( acceptData( owner ) ) {
|
4246 |
Â
|
4247 |
-
|
4248 |
-
|
4249 |
-
|
4250 |
-
|
4251 |
Â
|
4252 |
-
|
4253 |
-
|
4254 |
-
|
4255 |
-
|
4256 |
-
|
4257 |
-
|
4258 |
-
|
4259 |
-
|
4260 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4261 |
Â
}
|
4262 |
Â
}
|
Â
|
|
4263 |
Â
|
4264 |
-
|
4265 |
-
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
Â
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
|
4274 |
Â
|
4275 |
-
|
4276 |
-
|
4277 |
Â
|
4278 |
-
|
4279 |
-
|
4280 |
-
|
4281 |
-
}
|
4282 |
Â
}
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
Â
|
|
4288 |
Â
|
4289 |
-
|
4290 |
-
|
4291 |
-
|
4292 |
-
|
4293 |
-
|
4294 |
-
// In cases where either:
|
4295 |
-
//
|
4296 |
-
// 1. No key was specified
|
4297 |
-
// 2. A string key was specified, but no value provided
|
4298 |
-
//
|
4299 |
-
// Take the "read" path and allow the get method to determine
|
4300 |
-
// which value to return, respectively either:
|
4301 |
-
//
|
4302 |
-
// 1. The entire cache object
|
4303 |
-
// 2. The data stored at the key
|
4304 |
-
//
|
4305 |
-
if ( key === undefined ||
|
4306 |
-
( ( key && typeof key === "string" ) && value === undefined ) ) {
|
4307 |
-
|
4308 |
-
return this.get( owner, key );
|
4309 |
-
}
|
4310 |
-
|
4311 |
-
// When the key is not a string, or both a key and value
|
4312 |
-
// are specified, set or extend (existing objects) with either:
|
4313 |
-
//
|
4314 |
-
// 1. An object of properties
|
4315 |
-
// 2. A key and value
|
4316 |
-
//
|
4317 |
-
this.set( owner, key, value );
|
4318 |
-
|
4319 |
-
// Since the "set" path can have two possible entry points
|
4320 |
-
// return the expected data based on which path was taken[*]
|
4321 |
-
return value !== undefined ? value : key;
|
4322 |
-
},
|
4323 |
-
remove: function( owner, key ) {
|
4324 |
-
var i,
|
4325 |
-
cache = owner[ this.expando ];
|
4326 |
Â
|
4327 |
-
|
4328 |
-
|
4329 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4330 |
Â
|
4331 |
-
|
Â
|
|
4332 |
Â
|
4333 |
-
|
4334 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4335 |
Â
|
4336 |
-
|
4337 |
-
|
4338 |
-
|
4339 |
-
|
4340 |
-
|
Â
|
|
Â
|
|
4341 |
Â
|
4342 |
-
|
4343 |
-
|
4344 |
-
|
4345 |
-
[ key ] :
|
4346 |
-
( key.match( rnothtmlwhite ) || [] );
|
4347 |
-
}
|
4348 |
Â
|
4349 |
-
|
4350 |
Â
|
4351 |
-
|
4352 |
-
|
4353 |
-
}
|
4354 |
-
}
|
4355 |
Â
|
4356 |
-
|
4357 |
-
|
Â
|
|
Â
|
|
Â
|
|
4358 |
Â
|
4359 |
-
//
|
4360 |
-
//
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
owner[ this.expando ] = undefined;
|
4365 |
-
} else {
|
4366 |
-
delete owner[ this.expando ];
|
4367 |
-
}
|
4368 |
Â
}
|
4369 |
-
},
|
4370 |
-
hasData: function( owner ) {
|
4371 |
-
var cache = owner[ this.expando ];
|
4372 |
-
return cache !== undefined && !jQuery.isEmptyObject( cache );
|
4373 |
-
}
|
4374 |
-
};
|
4375 |
-
var dataPriv = new Data();
|
4376 |
Â
|
4377 |
-
|
4378 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4379 |
Â
|
Â
|
|
Â
|
|
4380 |
Â
|
4381 |
-
|
4382 |
-
|
4383 |
-
|
4384 |
-
|
4385 |
-
|
4386 |
-
|
4387 |
-
|
4388 |
-
|
4389 |
-
|
4390 |
-
|
4391 |
-
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
4392 |
-
rmultiDash = /[A-Z]/g;
|
4393 |
-
|
4394 |
-
function getData( data ) {
|
4395 |
-
if ( data === "true" ) {
|
4396 |
-
return true;
|
4397 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4398 |
Â
|
4399 |
-
|
4400 |
-
return false;
|
4401 |
-
}
|
4402 |
Â
|
4403 |
-
if ( data === "null" ) {
|
4404 |
-
return null;
|
4405 |
-
}
|
4406 |
Â
|
4407 |
-
// Only convert to a number if it doesn't change the string
|
4408 |
-
if ( data === +data + "" ) {
|
4409 |
-
return +data;
|
4410 |
-
}
|
4411 |
Â
|
4412 |
-
|
4413 |
-
|
4414 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4415 |
Â
|
4416 |
-
|
Â
|
|
Â
|
|
4417 |
Â
}
|
4418 |
Â
|
4419 |
-
|
4420 |
-
|
Â
|
|
4421 |
Â
|
4422 |
-
|
4423 |
-
|
4424 |
-
|
4425 |
-
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
4426 |
-
data = elem.getAttribute( name );
|
4427 |
Â
|
4428 |
-
|
4429 |
-
|
4430 |
-
|
4431 |
-
|
4432 |
Â
|
4433 |
-
|
4434 |
-
|
4435 |
-
} else {
|
4436 |
-
data = undefined;
|
4437 |
-
}
|
4438 |
-
}
|
4439 |
-
return data;
|
4440 |
Â
}
|
4441 |
Â
|
4442 |
-
|
4443 |
-
|
4444 |
-
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
4445 |
-
},
|
4446 |
Â
|
4447 |
-
|
4448 |
-
|
4449 |
-
},
|
4450 |
Â
|
4451 |
-
|
4452 |
-
|
4453 |
-
|
Â
|
|
Â
|
|
4454 |
Â
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
|
4459 |
-
},
|
4460 |
Â
|
4461 |
-
|
4462 |
-
|
Â
|
|
Â
|
|
4463 |
Â
}
|
4464 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4465 |
Â
|
4466 |
-
|
4467 |
-
|
4468 |
-
|
4469 |
-
|
4470 |
-
|
4471 |
Â
|
4472 |
-
|
4473 |
-
|
4474 |
-
|
4475 |
-
|
4476 |
Â
|
4477 |
-
|
4478 |
-
|
4479 |
-
|
4480 |
Â
|
4481 |
-
|
4482 |
-
|
4483 |
-
|
4484 |
-
|
4485 |
-
|
4486 |
-
|
4487 |
-
|
4488 |
-
}
|
4489 |
Â
}
|
4490 |
Â
}
|
4491 |
-
dataPriv.set( elem, "hasDataAttrs", true );
|
4492 |
Â
}
|
Â
|
|
4493 |
Â
}
|
4494 |
-
|
4495 |
-
return data;
|
4496 |
Â
}
|
4497 |
Â
|
4498 |
-
|
4499 |
-
|
4500 |
-
return this.each( function() {
|
4501 |
-
dataUser.set( this, key );
|
4502 |
-
} );
|
4503 |
-
}
|
4504 |
Â
|
4505 |
-
|
4506 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4507 |
Â
|
4508 |
-
|
4509 |
-
|
4510 |
-
// `value` parameter was not undefined. An empty jQuery object
|
4511 |
-
// will result in `undefined` for elem = this[ 0 ] which will
|
4512 |
-
// throw an exception if an attempt to read a data cache is made.
|
4513 |
-
if ( elem && value === undefined ) {
|
4514 |
Â
|
4515 |
-
|
4516 |
-
|
4517 |
-
|
4518 |
-
|
4519 |
-
|
4520 |
-
|
4521 |
Â
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
|
4527 |
-
|
4528 |
Â
|
4529 |
-
|
4530 |
-
|
Â
|
|
Â
|
|
Â
|
|
4531 |
Â
}
|
4532 |
Â
|
4533 |
-
//
|
4534 |
-
|
Â
|
|
4535 |
Â
|
4536 |
-
|
4537 |
-
|
4538 |
-
} );
|
4539 |
-
}, null, value, arguments.length > 1, null, true );
|
4540 |
-
},
|
4541 |
Â
|
4542 |
-
|
4543 |
-
|
4544 |
-
dataUser.remove( this, key );
|
4545 |
Â
} );
|
4546 |
-
}
|
4547 |
-
}
|
4548 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4549 |
Â
|
4550 |
-
jQuery.extend( {
|
4551 |
-
queue: function( elem, type, data ) {
|
4552 |
-
var queue;
|
4553 |
Â
|
4554 |
-
|
4555 |
-
|
4556 |
-
|
4557 |
Â
|
4558 |
-
|
4559 |
-
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
4564 |
-
|
Â
|
|
Â
|
|
Â
|
|
4565 |
Â
}
|
4566 |
-
return queue || [];
|
4567 |
Â
}
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
4571 |
-
type = type || "fx";
|
4572 |
Â
|
4573 |
-
|
4574 |
-
|
4575 |
-
fn = queue.shift(),
|
4576 |
-
hooks = jQuery._queueHooks( elem, type ),
|
4577 |
-
next = function() {
|
4578 |
-
jQuery.dequeue( elem, type );
|
4579 |
-
};
|
4580 |
Â
|
4581 |
-
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
Â
|
|
Â
|
|
4586 |
Â
|
4587 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4588 |
Â
|
4589 |
-
|
4590 |
-
// automatically dequeued
|
4591 |
-
if ( type === "fx" ) {
|
4592 |
-
queue.unshift( "inprogress" );
|
4593 |
-
}
|
4594 |
Â
|
4595 |
-
|
4596 |
-
|
4597 |
-
|
Â
|
|
4598 |
Â
}
|
4599 |
Â
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
}
|
4604 |
Â
|
4605 |
-
|
4606 |
-
|
4607 |
-
var key = type + "queueHooks";
|
4608 |
-
return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
|
4609 |
-
empty: jQuery.Callbacks( "once memory" ).add( function() {
|
4610 |
-
dataPriv.remove( elem, [ type + "queue", key ] );
|
4611 |
-
} )
|
4612 |
-
} );
|
4613 |
Â
}
|
4614 |
-
}
|
4615 |
Â
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4619 |
Â
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
setter--;
|
4624 |
-
}
|
4625 |
Â
|
4626 |
-
|
4627 |
-
|
4628 |
-
|
Â
|
|
Â
|
|
4629 |
Â
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
4633 |
-
var queue = jQuery.queue( this, type, data );
|
4634 |
Â
|
4635 |
-
|
4636 |
-
|
Â
|
|
Â
|
|
4637 |
Â
|
4638 |
-
|
4639 |
-
|
4640 |
-
}
|
4641 |
-
} );
|
4642 |
-
},
|
4643 |
-
dequeue: function( type ) {
|
4644 |
-
return this.each( function() {
|
4645 |
-
jQuery.dequeue( this, type );
|
4646 |
-
} );
|
4647 |
-
},
|
4648 |
-
clearQueue: function( type ) {
|
4649 |
-
return this.queue( type || "fx", [] );
|
4650 |
-
},
|
4651 |
Â
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
4656 |
-
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
|
4662 |
-
|
4663 |
-
|
4664 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4665 |
Â
|
4666 |
-
|
4667 |
-
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
4671 |
Â
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
}
|
4678 |
Â
}
|
4679 |
-
resolve();
|
4680 |
-
return defer.promise( obj );
|
4681 |
Â
}
|
4682 |
-
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
|
4687 |
Â
|
4688 |
-
|
4689 |
Â
|
4690 |
-
var isHiddenWithinTree = function( elem, el ) {
|
4691 |
Â
|
4692 |
-
|
4693 |
-
// in that case, element will be second argument
|
4694 |
-
elem = el || elem;
|
4695 |
Â
|
4696 |
-
|
4697 |
-
return elem.style.display === "none" ||
|
4698 |
-
elem.style.display === "" &&
|
4699 |
Â
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
// in the document.
|
4704 |
-
jQuery.contains( elem.ownerDocument, elem ) &&
|
4705 |
Â
|
4706 |
-
|
4707 |
-
|
Â
|
|
4708 |
Â
|
4709 |
-
|
4710 |
-
|
4711 |
-
|
Â
|
|
Â
|
|
4712 |
Â
|
4713 |
-
|
4714 |
-
|
4715 |
-
old[ name ] = elem.style[ name ];
|
4716 |
-
elem.style[ name ] = options[ name ];
|
4717 |
-
}
|
4718 |
Â
|
4719 |
-
|
Â
|
|
Â
|
|
4720 |
Â
|
4721 |
-
|
4722 |
-
|
4723 |
-
|
4724 |
-
|
Â
|
|
4725 |
Â
|
4726 |
-
|
4727 |
-
};
|
4728 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4729 |
Â
|
Â
|
|
Â
|
|
4730 |
Â
|
4731 |
Â
|
4732 |
-
function adjustCSS( elem, prop, valueParts, tween ) {
|
4733 |
-
var adjusted, scale,
|
4734 |
-
maxIterations = 20,
|
4735 |
-
currentValue = tween ?
|
4736 |
-
function() {
|
4737 |
-
return tween.cur();
|
4738 |
-
} :
|
4739 |
-
function() {
|
4740 |
-
return jQuery.css( elem, prop, "" );
|
4741 |
-
},
|
4742 |
-
initial = currentValue(),
|
4743 |
-
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
4744 |
Â
|
4745 |
-
// Starting value computation is required for potential unit mismatches
|
4746 |
-
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
4747 |
-
rcssNum.exec( jQuery.css( elem, prop ) );
|
4748 |
Â
|
4749 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4750 |
Â
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
Â
|
4755 |
-
|
4756 |
-
unit = unit || initialInUnit[ 3 ];
|
4757 |
Â
|
4758 |
-
|
4759 |
-
|
Â
|
|
4760 |
Â
|
4761 |
-
|
Â
|
|
4762 |
Â
|
4763 |
-
|
4764 |
-
|
4765 |
-
jQuery.style( elem, prop, initialInUnit + unit );
|
4766 |
-
if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
|
4767 |
-
maxIterations = 0;
|
4768 |
-
}
|
4769 |
-
initialInUnit = initialInUnit / scale;
|
4770 |
Â
|
4771 |
-
|
4772 |
Â
|
4773 |
-
|
Â
|
|
4774 |
Â
jQuery.style( elem, prop, initialInUnit + unit );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4775 |
Â
|
4776 |
-
// Make sure we update the tween properties later on
|
4777 |
-
valueParts = valueParts || [];
|
4778 |
Â
}
|
4779 |
Â
|
4780 |
-
|
4781 |
-
|
4782 |
Â
|
4783 |
-
|
4784 |
-
|
4785 |
-
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
4786 |
-
+valueParts[ 2 ];
|
4787 |
-
if ( tween ) {
|
4788 |
-
tween.unit = unit;
|
4789 |
-
tween.start = initialInUnit;
|
4790 |
-
tween.end = adjusted;
|
4791 |
-
}
|
4792 |
-
}
|
4793 |
-
return adjusted;
|
4794 |
Â
}
|
4795 |
Â
|
Â
|
|
Â
|
|
4796 |
Â
|
4797 |
-
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
|
4803 |
-
|
4804 |
-
|
4805 |
-
if ( display ) {
|
4806 |
-
return display;
|
4807 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
4808 |
Â
|
4809 |
-
temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
4810 |
-
display = jQuery.css( temp, "display" );
|
4811 |
Â
|
4812 |
-
|
4813 |
Â
|
4814 |
-
|
4815 |
-
|
4816 |
-
|
4817 |
-
|
Â
|
|
4818 |
Â
|
Â
|
|
4819 |
Â
return display;
|
4820 |
Â
}
|
4821 |
Â
|
4822 |
-
|
4823 |
-
|
4824 |
-
values = [],
|
4825 |
-
index = 0,
|
4826 |
-
length = elements.length;
|
4827 |
Â
|
4828 |
-
|
4829 |
-
for ( ; index < length; index++ ) {
|
4830 |
-
elem = elements[ index ];
|
4831 |
-
if ( !elem.style ) {
|
4832 |
-
continue;
|
4833 |
-
}
|
4834 |
Â
|
4835 |
-
|
4836 |
-
|
Â
|
|
Â
|
|
4837 |
Â
|
4838 |
-
|
4839 |
-
|
4840 |
-
|
4841 |
-
|
4842 |
-
|
4843 |
-
|
4844 |
-
|
4845 |
-
|
4846 |
-
}
|
4847 |
-
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
|
4848 |
-
values[ index ] = getDefaultDisplay( elem );
|
4849 |
-
}
|
4850 |
-
} else {
|
4851 |
-
if ( display !== "none" ) {
|
4852 |
-
values[ index ] = "none";
|
4853 |
Â
|
4854 |
-
|
4855 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4856 |
Â
}
|
4857 |
Â
}
|
4858 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4859 |
Â
|
4860 |
-
|
4861 |
-
|
4862 |
-
if ( values[ index ] != null ) {
|
4863 |
-
elements[ index ].style.display = values[ index ];
|
4864 |
Â
}
|
4865 |
Â
}
|
Â
|
|
4866 |
Â
|
4867 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4868 |
Â
}
|
4869 |
Â
|
4870 |
-
|
4871 |
-
|
4872 |
-
return showHide( this, true );
|
4873 |
-
},
|
4874 |
-
hide: function() {
|
4875 |
-
return showHide( this );
|
4876 |
-
},
|
4877 |
-
toggle: function( state ) {
|
4878 |
-
if ( typeof state === "boolean" ) {
|
4879 |
-
return state ? this.show() : this.hide();
|
4880 |
-
}
|
4881 |
Â
|
4882 |
-
|
4883 |
-
|
4884 |
-
|
4885 |
-
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
Â
|
|
Â
|
|
Â
|
|
4889 |
Â
}
|
4890 |
-
} );
|
4891 |
-
var rcheckableType = ( /^(?:checkbox|radio)$/i );
|
4892 |
Â
|
4893 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4894 |
Â
|
4895 |
-
|
4896 |
Â
|
Â
|
|
4897 |
Â
|
4898 |
Â
|
4899 |
-
// We have to close these tags to support XHTML (#13200)
|
4900 |
-
var wrapMap = {
|
4901 |
Â
|
4902 |
-
|
4903 |
-
|
4904 |
Â
|
4905 |
-
|
4906 |
-
|
4907 |
-
// this by omitting <tbody> or other required elements.
|
4908 |
-
thead: [ 1, "<table>", "</table>" ],
|
4909 |
-
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
4910 |
-
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
4911 |
-
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
4912 |
Â
|
4913 |
-
|
4914 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4915 |
Â
|
4916 |
-
|
4917 |
-
|
4918 |
Â
|
4919 |
-
|
4920 |
-
|
4921 |
Â
|
Â
|
|
Â
|
|
4922 |
Â
|
4923 |
-
function getAll( context, tag ) {
|
4924 |
Â
|
4925 |
-
|
4926 |
-
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
4927 |
-
var ret;
|
4928 |
Â
|
4929 |
-
|
4930 |
-
|
Â
|
|
4931 |
Â
|
4932 |
-
|
4933 |
-
|
4934 |
Â
|
4935 |
-
|
4936 |
-
|
4937 |
-
}
|
4938 |
Â
|
4939 |
-
|
4940 |
-
|
4941 |
-
|
4942 |
Â
|
4943 |
-
|
Â
|
|
4944 |
Â
}
|
4945 |
Â
|
Â
|
|
Â
|
|
4946 |
Â
|
4947 |
-
// Mark scripts as having already been evaluated
|
4948 |
-
function setGlobalEval( elems, refElements ) {
|
4949 |
-
var i = 0,
|
4950 |
-
l = elems.length;
|
4951 |
Â
|
4952 |
-
|
4953 |
-
|
4954 |
-
|
4955 |
-
|
4956 |
-
|
4957 |
-
|
4958 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4959 |
Â
}
|
Â
|
|
4960 |
Â
|
4961 |
Â
|
4962 |
-
|
4963 |
Â
|
4964 |
-
|
4965 |
-
|
4966 |
-
|
4967 |
-
|
4968 |
-
|
4969 |
-
|
4970 |
Â
|
4971 |
-
|
4972 |
-
|
4973 |
Â
|
4974 |
-
|
4975 |
Â
|
4976 |
-
|
4977 |
-
|
4978 |
Â
|
4979 |
-
|
4980 |
-
|
4981 |
-
|
4982 |
Â
|
4983 |
-
|
4984 |
-
|
4985 |
-
|
4986 |
Â
|
4987 |
-
|
4988 |
-
|
4989 |
-
|
4990 |
Â
|
4991 |
-
|
4992 |
-
|
4993 |
-
|
4994 |
-
|
4995 |
Â
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
|
5000 |
-
|
5001 |
Â
|
5002 |
-
|
5003 |
-
|
5004 |
-
|
5005 |
Â
|
5006 |
-
|
5007 |
-
|
5008 |
Â
|
5009 |
-
|
5010 |
-
|
5011 |
-
}
|
5012 |
Â
}
|
5013 |
Â
}
|
Â
|
|
5014 |
Â
|
5015 |
-
|
5016 |
-
|
5017 |
Â
|
5018 |
-
|
5019 |
-
|
5020 |
Â
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
-
|
5025 |
-
}
|
5026 |
-
continue;
|
5027 |
Â
}
|
Â
|
|
Â
|
|
5028 |
Â
|
5029 |
-
|
5030 |
Â
|
5031 |
-
|
5032 |
-
|
5033 |
Â
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
|
5038 |
Â
|
5039 |
-
|
5040 |
-
|
5041 |
-
|
5042 |
-
|
5043 |
-
|
5044 |
-
|
5045 |
-
}
|
5046 |
Â
}
|
5047 |
Â
}
|
5048 |
Â
}
|
5049 |
-
|
5050 |
-
return fragment;
|
5051 |
Â
}
|
5052 |
Â
|
Â
|
|
Â
|
|
Â
|
|
5053 |
Â
|
5054 |
-
|
5055 |
-
|
5056 |
-
|
5057 |
-
|
5058 |
Â
|
5059 |
-
|
5060 |
-
|
5061 |
-
|
5062 |
-
|
5063 |
-
|
5064 |
-
|
5065 |
-
|
5066 |
Â
|
5067 |
-
|
5068 |
Â
|
5069 |
-
|
5070 |
-
|
5071 |
-
|
5072 |
Â
|
5073 |
-
|
5074 |
-
|
5075 |
-
|
5076 |
-
|
5077 |
-
|
5078 |
-
|
5079 |
Â
|
5080 |
Â
|
5081 |
Â
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
5085 |
-
|
5086 |
Â
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
5090 |
Â
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
Â
|
5095 |
-
|
5096 |
-
|
5097 |
-
|
5098 |
-
|
5099 |
-
|
5100 |
-
|
5101 |
-
|
5102 |
Â
|
5103 |
-
|
5104 |
-
|
5105 |
Â
|
5106 |
-
|
5107 |
-
|
5108 |
Â
|
5109 |
-
|
5110 |
-
|
5111 |
Â
|
5112 |
-
|
5113 |
-
|
5114 |
-
|
5115 |
-
|
5116 |
-
|
5117 |
-
|
5118 |
-
}
|
5119 |
-
return elem;
|
5120 |
Â
}
|
Â
|
|
Â
|
|
5121 |
Â
|
5122 |
-
|
5123 |
Â
|
5124 |
-
|
5125 |
-
|
5126 |
-
|
5127 |
-
|
5128 |
-
|
5129 |
Â
|
5130 |
-
|
5131 |
-
|
5132 |
-
|
5133 |
-
|
5134 |
Â
|
5135 |
-
|
5136 |
-
|
5137 |
-
|
5138 |
-
|
5139 |
-
}
|
5140 |
-
}
|
5141 |
-
if ( fn === false ) {
|
5142 |
-
fn = returnFalse;
|
5143 |
-
} else if ( !fn ) {
|
5144 |
-
return elem;
|
5145 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5146 |
Â
|
5147 |
-
|
5148 |
-
|
5149 |
-
|
5150 |
Â
|
5151 |
-
|
5152 |
-
|
5153 |
-
|
5154 |
-
|
5155 |
Â
|
5156 |
-
|
5157 |
-
|
5158 |
-
}
|
5159 |
-
return elem.each( function() {
|
5160 |
-
jQuery.event.add( this, types, fn, data, selector );
|
5161 |
-
} );
|
5162 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5163 |
Â
|
5164 |
-
|
5165 |
-
|
5166 |
-
|
5167 |
-
|
5168 |
-
|
5169 |
Â
|
5170 |
-
|
5171 |
Â
|
5172 |
-
|
5173 |
Â
|
5174 |
-
|
5175 |
-
|
5176 |
-
|
5177 |
-
|
5178 |
Â
|
5179 |
-
|
5180 |
-
|
5181 |
-
|
5182 |
-
|
5183 |
Â
|
5184 |
-
|
5185 |
-
|
5186 |
-
|
5187 |
-
|
5188 |
-
|
5189 |
-
|
5190 |
Â
|
5191 |
-
|
5192 |
-
|
5193 |
-
|
5194 |
-
|
5195 |
-
|
5196 |
Â
|
5197 |
-
|
5198 |
-
|
5199 |
-
|
5200 |
-
|
5201 |
Â
|
5202 |
-
|
5203 |
-
|
5204 |
-
|
5205 |
-
|
5206 |
-
|
5207 |
-
|
5208 |
Â
|
5209 |
-
|
5210 |
-
|
5211 |
-
|
5212 |
-
|
5213 |
-
|
5214 |
-
|
5215 |
Â
|
5216 |
-
|
5217 |
-
|
5218 |
-
|
5219 |
-
|
5220 |
-
|
5221 |
-
|
5222 |
-
|
5223 |
Â
|
5224 |
-
|
5225 |
-
|
5226 |
-
|
5227 |
-
|
5228 |
Â
|
5229 |
-
|
5230 |
-
|
5231 |
Â
|
5232 |
-
|
5233 |
-
|
5234 |
Â
|
5235 |
-
|
5236 |
-
|
5237 |
Â
|
5238 |
-
|
5239 |
-
|
5240 |
-
|
5241 |
-
|
5242 |
-
|
5243 |
-
|
5244 |
-
|
5245 |
-
|
5246 |
-
|
5247 |
-
|
5248 |
-
|
5249 |
-
|
5250 |
-
// Init the event handler queue if we're the first
|
5251 |
-
if ( !( handlers = events[ type ] ) ) {
|
5252 |
-
handlers = events[ type ] = [];
|
5253 |
-
handlers.delegateCount = 0;
|
5254 |
-
|
5255 |
-
// Only use addEventListener if the special events handler returns false
|
5256 |
-
if ( !special.setup ||
|
5257 |
-
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
5258 |
-
|
5259 |
-
if ( elem.addEventListener ) {
|
5260 |
-
elem.addEventListener( type, eventHandle );
|
5261 |
-
}
|
5262 |
-
}
|
5263 |
-
}
|
5264 |
Â
|
5265 |
-
|
5266 |
-
|
Â
|
|
Â
|
|
5267 |
Â
|
5268 |
-
|
5269 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5270 |
Â
}
|
5271 |
Â
}
|
Â
|
|
5272 |
Â
|
5273 |
-
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
|
5278 |
Â
}
|
Â
|
|
5279 |
Â
|
5280 |
-
|
5281 |
-
|
Â
|
|
Â
|
|
Â
|
|
5282 |
Â
}
|
5283 |
Â
|
5284 |
-
|
Â
|
|
Â
|
|
5285 |
Â
|
5286 |
-
|
5287 |
-
remove: function( elem, types, handler, selector, mappedTypes ) {
|
5288 |
Â
|
5289 |
-
|
5290 |
-
|
5291 |
-
special, handlers, type, namespaces, origType,
|
5292 |
-
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
|
5293 |
Â
|
5294 |
-
|
5295 |
-
|
5296 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5297 |
Â
|
5298 |
-
|
5299 |
-
|
5300 |
-
|
5301 |
-
|
5302 |
-
|
5303 |
-
|
5304 |
-
|
5305 |
Â
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
5309 |
-
|
5310 |
-
}
|
5311 |
-
continue;
|
5312 |
Â
}
|
Â
|
|
Â
|
|
5313 |
Â
|
5314 |
-
|
5315 |
-
|
5316 |
-
|
5317 |
-
|
5318 |
-
|
5319 |
Â
|
5320 |
-
|
5321 |
-
|
5322 |
-
|
5323 |
-
|
5324 |
Â
|
5325 |
-
|
5326 |
-
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
Â
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
}
|
5338 |
Â
}
|
5339 |
Â
}
|
Â
|
|
5340 |
Â
|
5341 |
-
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
5345 |
-
|
5346 |
-
|
5347 |
-
jQuery.removeEvent( elem, type, elemData.handle );
|
5348 |
-
}
|
5349 |
Â
|
5350 |
-
|
5351 |
Â
}
|
5352 |
-
}
|
5353 |
Â
|
5354 |
-
|
5355 |
-
if ( jQuery.isEmptyObject( events ) ) {
|
5356 |
-
dataPriv.remove( elem, "handle events" );
|
5357 |
Â
}
|
5358 |
-
}
|
5359 |
Â
|
5360 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5361 |
Â
|
5362 |
-
|
5363 |
-
var event = jQuery.event.fix( nativeEvent );
|
5364 |
Â
|
5365 |
-
|
5366 |
-
|
5367 |
-
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
|
5368 |
-
special = jQuery.event.special[ event.type ] || {};
|
5369 |
Â
|
5370 |
-
|
5371 |
-
args
|
Â
|
|
Â
|
|
5372 |
Â
|
5373 |
-
|
5374 |
-
|
5375 |
-
}
|
5376 |
Â
|
5377 |
-
|
Â
|
|
Â
|
|
5378 |
Â
|
5379 |
-
|
5380 |
-
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
|
5381 |
-
return;
|
5382 |
-
}
|
5383 |
Â
|
5384 |
-
|
5385 |
-
|
Â
|
|
Â
|
|
5386 |
Â
|
5387 |
-
|
5388 |
-
|
5389 |
-
while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
|
5390 |
-
event.currentTarget = matched.elem;
|
5391 |
Â
|
5392 |
-
|
5393 |
-
|
5394 |
-
|
Â
|
|
5395 |
Â
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
Â
|
5400 |
-
|
5401 |
-
|
Â
|
|
5402 |
Â
|
5403 |
-
|
5404 |
-
|
5405 |
Â
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
5409 |
-
|
5410 |
-
|
Â
|
|
Â
|
|
5411 |
Â
}
|
5412 |
Â
}
|
5413 |
Â
}
|
5414 |
Â
}
|
Â
|
|
5415 |
Â
|
5416 |
-
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
5420 |
Â
|
5421 |
-
|
5422 |
-
|
5423 |
Â
|
5424 |
-
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
|
5429 |
-
|
5430 |
-
|
5431 |
-
|
5432 |
-
|
5433 |
-
|
5434 |
-
|
5435 |
-
|
5436 |
-
|
5437 |
-
|
5438 |
-
|
5439 |
-
|
5440 |
-
|
5441 |
-
|
5442 |
-
|
5443 |
-
|
5444 |
-
|
5445 |
-
|
5446 |
-
|
5447 |
-
|
5448 |
-
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
5452 |
-
|
5453 |
-
|
5454 |
-
|
5455 |
-
|
5456 |
-
|
5457 |
-
|
5458 |
-
|
5459 |
-
|
5460 |
-
|
5461 |
-
}
|
5462 |
-
if ( matchedSelectors[ sel ] ) {
|
5463 |
-
matchedHandlers.push( handleObj );
|
5464 |
-
}
|
5465 |
Â
}
|
5466 |
-
if (
|
5467 |
-
|
5468 |
Â
}
|
5469 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
5470 |
Â
}
|
5471 |
Â
}
|
Â
|
|
5472 |
Â
|
5473 |
-
|
5474 |
-
|
5475 |
-
|
5476 |
-
|
5477 |
-
|
5478 |
Â
|
5479 |
-
|
5480 |
-
|
5481 |
Â
|
5482 |
-
|
5483 |
-
|
5484 |
-
|
5485 |
-
|
5486 |
Â
|
5487 |
-
|
5488 |
-
|
5489 |
-
|
5490 |
-
|
5491 |
-
|
5492 |
-
|
5493 |
-
|
5494 |
-
|
5495 |
-
|
5496 |
-
|
5497 |
-
|
5498 |
Â
|
5499 |
-
|
5500 |
-
|
5501 |
-
|
5502 |
-
|
5503 |
-
|
5504 |
-
|
5505 |
-
|
5506 |
-
|
5507 |
-
|
5508 |
-
|
5509 |
Â
|
5510 |
-
|
5511 |
-
|
5512 |
-
|
5513 |
-
|
5514 |
-
|
5515 |
Â
|
5516 |
-
|
5517 |
-
|
5518 |
Â
|
5519 |
-
|
5520 |
-
|
5521 |
-
|
5522 |
-
|
5523 |
Â
|
5524 |
-
|
5525 |
-
|
5526 |
-
|
5527 |
-
|
5528 |
-
|
5529 |
-
|
5530 |
-
},
|
5531 |
-
delegateType: "focusin"
|
5532 |
Â
},
|
5533 |
-
|
5534 |
-
|
5535 |
-
|
5536 |
-
|
5537 |
-
|
5538 |
-
|
5539 |
-
|
5540 |
-
|
5541 |
Â
},
|
5542 |
-
|
5543 |
-
|
5544 |
-
|
5545 |
-
trigger: function() {
|
5546 |
-
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
5547 |
-
this.click();
|
5548 |
-
return false;
|
5549 |
-
}
|
5550 |
-
},
|
5551 |
Â
|
5552 |
-
|
5553 |
-
|
5554 |
-
|
Â
|
|
Â
|
|
5555 |
Â
}
|
5556 |
Â
},
|
5557 |
Â
|
5558 |
-
|
5559 |
-
|
Â
|
|
Â
|
|
Â
|
|
5560 |
Â
|
5561 |
-
|
5562 |
-
|
5563 |
-
|
5564 |
-
|
5565 |
-
|
Â
|
|
Â
|
|
5566 |
Â
}
|
5567 |
Â
}
|
5568 |
Â
}
|
5569 |
-
}
|
5570 |
-
|
5571 |
-
jQuery.removeEvent = function( elem, type, handle ) {
|
5572 |
Â
|
5573 |
-
|
5574 |
-
if ( elem.removeEventListener ) {
|
5575 |
-
elem.removeEventListener( type, handle );
|
5576 |
-
}
|
5577 |
-
};
|
5578 |
Â
|
5579 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5580 |
Â
|
5581 |
-
|
5582 |
-
if ( !( this instanceof jQuery.Event ) ) {
|
5583 |
-
return new jQuery.Event( src, props );
|
5584 |
-
}
|
5585 |
Â
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
|
5590 |
Â
|
5591 |
-
|
5592 |
-
|
5593 |
-
|
5594 |
-
|
5595 |
Â
|
5596 |
-
|
5597 |
-
|
5598 |
-
|
5599 |
-
|
5600 |
Â
|
5601 |
-
|
5602 |
-
|
5603 |
-
|
5604 |
-
|
5605 |
-
src.target.parentNode :
|
5606 |
-
src.target;
|
5607 |
Â
|
5608 |
-
|
5609 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5610 |
Â
|
5611 |
-
|
5612 |
-
|
5613 |
-
this.type = src;
|
5614 |
-
}
|
5615 |
Â
|
5616 |
-
|
5617 |
-
|
5618 |
-
|
5619 |
-
|
5620 |
Â
|
5621 |
-
|
5622 |
-
|
Â
|
|
Â
|
|
5623 |
Â
|
5624 |
-
|
5625 |
-
|
5626 |
-
};
|
5627 |
Â
|
5628 |
-
//
|
5629 |
-
|
5630 |
-
|
5631 |
-
constructor: jQuery.Event,
|
5632 |
-
isDefaultPrevented: returnFalse,
|
5633 |
-
isPropagationStopped: returnFalse,
|
5634 |
-
isImmediatePropagationStopped: returnFalse,
|
5635 |
-
isSimulated: false,
|
5636 |
Â
|
5637 |
-
|
5638 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5639 |
Â
|
5640 |
-
|
Â
|
|
5641 |
Â
|
5642 |
-
|
5643 |
-
e.preventDefault();
|
5644 |
-
}
|
5645 |
-
},
|
5646 |
-
stopPropagation: function() {
|
5647 |
-
var e = this.originalEvent;
|
5648 |
Â
|
5649 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5650 |
Â
|
5651 |
-
|
5652 |
-
e.stopPropagation();
|
5653 |
-
}
|
5654 |
-
},
|
5655 |
-
stopImmediatePropagation: function() {
|
5656 |
-
var e = this.originalEvent;
|
5657 |
Â
|
5658 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5659 |
Â
|
5660 |
-
|
5661 |
-
e.stopImmediatePropagation();
|
5662 |
-
}
|
5663 |
Â
|
5664 |
-
|
Â
|
|
5665 |
Â
}
|
5666 |
-
};
|
5667 |
Â
|
5668 |
-
|
5669 |
-
|
5670 |
-
|
5671 |
-
|
5672 |
-
|
5673 |
-
|
5674 |
-
|
5675 |
-
|
5676 |
-
|
5677 |
-
|
5678 |
-
|
5679 |
-
|
5680 |
-
|
5681 |
-
|
5682 |
-
|
5683 |
-
|
5684 |
-
|
5685 |
-
|
5686 |
-
|
5687 |
-
|
5688 |
-
|
5689 |
-
|
5690 |
-
|
5691 |
-
|
5692 |
-
|
5693 |
-
|
5694 |
-
|
5695 |
-
|
5696 |
-
|
5697 |
-
|
5698 |
-
|
5699 |
-
|
5700 |
-
|
5701 |
-
|
5702 |
-
|
5703 |
-
|
5704 |
-
|
5705 |
-
|
5706 |
-
|
5707 |
-
|
5708 |
-
|
5709 |
-
|
5710 |
-
|
5711 |
-
|
5712 |
-
|
5713 |
-
|
5714 |
-
|
5715 |
-
|
5716 |
-
|
5717 |
-
|
5718 |
-
|
5719 |
-
|
5720 |
-
|
5721 |
-
|
5722 |
-
|
5723 |
-
|
5724 |
-
|
5725 |
-
return event.which;
|
5726 |
-
}
|
5727 |
-
}, jQuery.event.addProp );
|
5728 |
-
|
5729 |
-
// Create mouseenter/leave events using mouseover/out and event-time checks
|
5730 |
-
// so that event delegation works in jQuery.
|
5731 |
-
// Do the same for pointerenter/pointerleave and pointerover/pointerout
|
5732 |
-
//
|
5733 |
-
// Support: Safari 7 only
|
5734 |
-
// Safari sends mouseenter too often; see:
|
5735 |
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
|
5736 |
-
// for the description of the bug (it existed in older Chrome versions as well).
|
5737 |
-
jQuery.each( {
|
5738 |
-
mouseenter: "mouseover",
|
5739 |
-
mouseleave: "mouseout",
|
5740 |
-
pointerenter: "pointerover",
|
5741 |
-
pointerleave: "pointerout"
|
5742 |
-
}, function( orig, fix ) {
|
5743 |
-
jQuery.event.special[ orig ] = {
|
5744 |
-
delegateType: fix,
|
5745 |
-
bindType: fix,
|
5746 |
-
|
5747 |
-
handle: function( event ) {
|
5748 |
-
var ret,
|
5749 |
-
target = this,
|
5750 |
-
related = event.relatedTarget,
|
5751 |
-
handleObj = event.handleObj;
|
5752 |
-
|
5753 |
-
// For mouseenter/leave call the handler if related is outside the target.
|
5754 |
-
// NB: No relatedTarget if the mouse left/entered the browser window
|
5755 |
-
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
5756 |
-
event.type = handleObj.origType;
|
5757 |
-
ret = handleObj.handler.apply( this, arguments );
|
5758 |
-
event.type = fix;
|
5759 |
-
}
|
5760 |
-
return ret;
|
5761 |
Â
}
|
5762 |
-
};
|
5763 |
-
} );
|
5764 |
Â
|
5765 |
-
|
5766 |
-
|
5767 |
-
on: function( types, selector, data, fn ) {
|
5768 |
-
return on( this, types, selector, data, fn );
|
5769 |
-
},
|
5770 |
-
one: function( types, selector, data, fn ) {
|
5771 |
-
return on( this, types, selector, data, fn, 1 );
|
5772 |
-
},
|
5773 |
-
off: function( types, selector, fn ) {
|
5774 |
-
var handleObj, type;
|
5775 |
-
if ( types && types.preventDefault && types.handleObj ) {
|
5776 |
-
|
5777 |
-
// ( event ) dispatched jQuery.Event
|
5778 |
-
handleObj = types.handleObj;
|
5779 |
-
jQuery( types.delegateTarget ).off(
|
5780 |
-
handleObj.namespace ?
|
5781 |
-
handleObj.origType + "." + handleObj.namespace :
|
5782 |
-
handleObj.origType,
|
5783 |
-
handleObj.selector,
|
5784 |
-
handleObj.handler
|
5785 |
-
);
|
5786 |
-
return this;
|
5787 |
-
}
|
5788 |
-
if ( typeof types === "object" ) {
|
5789 |
Â
|
5790 |
-
|
5791 |
-
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5795 |
Â
}
|
5796 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5797 |
Â
|
5798 |
-
|
5799 |
-
|
5800 |
-
selector
|
5801 |
-
}
|
5802 |
-
if ( fn === false ) {
|
5803 |
-
fn = returnFalse;
|
5804 |
Â
}
|
5805 |
-
return this
|
5806 |
-
jQuery.event.remove( this, types, fn, selector );
|
5807 |
-
} );
|
5808 |
Â
}
|
5809 |
-
|
5810 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5811 |
Â
|
5812 |
-
var
|
5813 |
Â
|
5814 |
-
|
5815 |
Â
|
5816 |
-
|
5817 |
-
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
5818 |
Â
|
5819 |
-
|
Â
|
|
5820 |
Â
|
5821 |
-
|
5822 |
-
// In IE/Edge using regex groups here causes severe slowdowns.
|
5823 |
-
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
5824 |
-
rnoInnerhtml = /<script|<style|<link/i,
|
5825 |
Â
|
5826 |
-
|
5827 |
-
|
5828 |
-
|
Â
|
|
5829 |
Â
|
5830 |
-
//
|
5831 |
-
|
5832 |
-
|
5833 |
-
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
5834 |
Â
|
5835 |
-
|
5836 |
-
|
Â
|
|
Â
|
|
5837 |
Â
|
5838 |
-
return elem;
|
5839 |
Â
}
|
5840 |
Â
|
5841 |
-
|
5842 |
-
|
5843 |
-
|
5844 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5845 |
Â
}
|
5846 |
-
function restoreScript( elem ) {
|
5847 |
-
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
|
5848 |
-
elem.type = elem.type.slice( 5 );
|
5849 |
-
} else {
|
5850 |
-
elem.removeAttribute( "type" );
|
5851 |
-
}
|
5852 |
Â
|
5853 |
-
|
5854 |
-
|
5855 |
Â
|
5856 |
-
|
5857 |
-
|
5858 |
Â
|
5859 |
-
|
5860 |
-
|
5861 |
-
|
5862 |
Â
|
5863 |
-
|
5864 |
-
|
5865 |
-
|
5866 |
-
|
5867 |
-
|
5868 |
Â
|
5869 |
-
|
5870 |
-
|
5871 |
-
|
5872 |
Â
|
5873 |
-
|
5874 |
-
|
5875 |
-
|
5876 |
-
}
|
5877 |
Â
}
|
5878 |
Â
}
|
5879 |
Â
}
|
Â
|
|
5880 |
Â
|
5881 |
-
|
5882 |
-
|
5883 |
-
|
5884 |
-
|
5885 |
Â
|
5886 |
-
|
5887 |
-
}
|
5888 |
Â
}
|
Â
|
|
5889 |
Â
|
5890 |
-
|
5891 |
-
|
5892 |
-
|
5893 |
Â
|
5894 |
-
|
5895 |
-
|
5896 |
-
|
5897 |
Â
|
5898 |
-
|
5899 |
-
|
5900 |
-
|
5901 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5902 |
Â
}
|
5903 |
Â
|
5904 |
-
|
5905 |
-
|
5906 |
-
|
5907 |
-
args = concat.apply( [], args );
|
5908 |
Â
|
5909 |
-
|
5910 |
-
|
5911 |
-
l = collection.length,
|
5912 |
-
iNoClone = l - 1,
|
5913 |
-
value = args[ 0 ],
|
5914 |
-
valueIsFunction = isFunction( value );
|
5915 |
-
|
5916 |
-
// We can't cloneNode fragments that contain checked, in WebKit
|
5917 |
-
if ( valueIsFunction ||
|
5918 |
-
( l > 1 && typeof value === "string" &&
|
5919 |
-
!support.checkClone && rchecked.test( value ) ) ) {
|
5920 |
-
return collection.each( function( index ) {
|
5921 |
-
var self = collection.eq( index );
|
5922 |
-
if ( valueIsFunction ) {
|
5923 |
-
args[ 0 ] = value.call( this, index, self.html() );
|
5924 |
-
}
|
5925 |
-
domManip( self, args, callback, ignored );
|
5926 |
-
} );
|
5927 |
Â
}
|
5928 |
Â
|
5929 |
-
|
5930 |
-
|
5931 |
-
|
5932 |
-
|
5933 |
-
if ( fragment.childNodes.length === 1 ) {
|
5934 |
-
fragment = first;
|
5935 |
-
}
|
5936 |
-
|
5937 |
-
// Require either new content or an interest in ignored elements to invoke the callback
|
5938 |
-
if ( first || ignored ) {
|
5939 |
-
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
5940 |
-
hasScripts = scripts.length;
|
5941 |
Â
|
5942 |
-
|
5943 |
-
|
5944 |
-
|
5945 |
-
|
5946 |
-
|
5947 |
Â
|
5948 |
-
|
5949 |
-
|
5950 |
Â
|
5951 |
-
|
5952 |
-
|
5953 |
Â
|
5954 |
-
|
5955 |
-
|
5956 |
-
|
5957 |
-
}
|
5958 |
Â
}
|
5959 |
-
|
5960 |
-
callback.call( collection[ i ], node, i );
|
5961 |
Â
}
|
5962 |
Â
|
5963 |
-
|
5964 |
-
|
5965 |
Â
|
5966 |
-
|
5967 |
-
|
5968 |
Â
|
5969 |
-
|
5970 |
-
|
5971 |
-
node = scripts[ i ];
|
5972 |
-
if ( rscriptType.test( node.type || "" ) &&
|
5973 |
-
!dataPriv.access( node, "globalEval" ) &&
|
5974 |
-
jQuery.contains( doc, node ) ) {
|
5975 |
Â
|
5976 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5977 |
Â
|
5978 |
-
|
5979 |
-
|
5980 |
-
|
5981 |
-
|
5982 |
-
|
5983 |
-
DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node );
|
5984 |
Â
}
|
Â
|
|
Â
|
|
5985 |
Â
}
|
5986 |
Â
}
|
5987 |
Â
}
|
5988 |
Â
}
|
5989 |
Â
}
|
5990 |
-
|
5991 |
-
return collection;
|
5992 |
Â
}
|
5993 |
Â
|
5994 |
-
|
5995 |
-
|
5996 |
-
nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
5997 |
-
i = 0;
|
5998 |
Â
|
5999 |
-
|
6000 |
-
|
6001 |
-
|
6002 |
-
|
6003 |
Â
|
6004 |
-
|
6005 |
-
|
6006 |
-
|
6007 |
-
}
|
6008 |
-
node.parentNode.removeChild( node );
|
6009 |
-
}
|
6010 |
Â
}
|
6011 |
Â
|
6012 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6013 |
Â
}
|
6014 |
Â
|
6015 |
-
|
6016 |
-
|
6017 |
-
return html.replace( rxhtmlTag, "<$1></$2>" );
|
6018 |
-
},
|
6019 |
Â
|
6020 |
-
|
6021 |
-
|
6022 |
-
|
6023 |
-
|
6024 |
Â
|
6025 |
-
|
6026 |
-
|
6027 |
-
|
Â
|
|
6028 |
Â
|
6029 |
-
|
6030 |
-
|
6031 |
-
|
6032 |
Â
|
6033 |
-
|
6034 |
-
|
6035 |
-
|
Â
|
|
Â
|
|
Â
|
|
6036 |
Â
}
|
Â
|
|
6037 |
Â
|
6038 |
-
|
6039 |
-
|
6040 |
-
|
6041 |
-
|
6042 |
-
|
6043 |
Â
|
6044 |
-
|
6045 |
-
|
6046 |
-
}
|
6047 |
-
} else {
|
6048 |
-
cloneCopyEvent( elem, clone );
|
6049 |
Â
}
|
Â
|
|
Â
|
|
6050 |
Â
}
|
Â
|
|
6051 |
Â
|
6052 |
-
|
6053 |
-
|
6054 |
-
|
6055 |
-
|
6056 |
-
|
6057 |
Â
|
6058 |
-
|
6059 |
-
|
6060 |
-
|
6061 |
Â
|
6062 |
-
|
6063 |
-
|
6064 |
-
|
6065 |
-
|
6066 |
Â
|
6067 |
-
|
6068 |
-
|
6069 |
-
|
6070 |
-
|
6071 |
-
|
6072 |
-
|
6073 |
-
|
6074 |
Â
|
6075 |
-
|
6076 |
-
|
6077 |
-
|
6078 |
-
}
|
6079 |
Â
}
|
6080 |
Â
}
|
6081 |
-
|
6082 |
-
// Support: Chrome <=35 - 45+
|
6083 |
-
// Assign undefined instead of using delete, see Data#remove
|
6084 |
-
elem[ dataPriv.expando ] = undefined;
|
6085 |
Â
}
|
6086 |
-
if ( elem[ dataUser.expando ] ) {
|
6087 |
Â
|
6088 |
-
|
6089 |
-
|
6090 |
-
|
6091 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6092 |
Â
}
|
6093 |
Â
}
|
6094 |
Â
}
|
6095 |
-
}
|
Â
|
|
6096 |
Â
|
6097 |
-
|
6098 |
-
|
6099 |
-
|
6100 |
-
|
6101 |
Â
|
6102 |
-
|
6103 |
-
|
6104 |
-
|
6105 |
Â
|
6106 |
-
|
6107 |
-
|
6108 |
-
|
6109 |
-
|
6110 |
-
|
6111 |
-
|
6112 |
-
|
6113 |
-
|
6114 |
-
|
6115 |
-
|
6116 |
-
|
6117 |
Â
|
6118 |
-
|
6119 |
-
|
6120 |
-
|
6121 |
-
|
6122 |
-
|
6123 |
-
|
6124 |
-
|
6125 |
-
|
6126 |
Â
|
6127 |
-
|
6128 |
-
|
6129 |
-
|
6130 |
-
|
6131 |
-
|
6132 |
-
|
6133 |
-
|
6134 |
-
|
6135 |
Â
|
6136 |
-
|
6137 |
-
|
6138 |
-
|
6139 |
-
|
6140 |
-
|
6141 |
-
|
6142 |
-
|
6143 |
Â
|
6144 |
-
|
6145 |
-
|
6146 |
-
|
6147 |
-
|
6148 |
-
|
6149 |
-
|
6150 |
-
|
6151 |
Â
|
6152 |
-
|
6153 |
-
|
6154 |
-
|
6155 |
Â
|
6156 |
-
|
6157 |
-
|
6158 |
Â
|
6159 |
-
|
6160 |
-
|
6161 |
Â
|
6162 |
-
|
6163 |
-
|
6164 |
-
}
|
6165 |
Â
}
|
Â
|
|
6166 |
Â
|
6167 |
-
|
6168 |
-
|
6169 |
Â
|
6170 |
-
|
6171 |
-
|
6172 |
-
|
6173 |
Â
|
6174 |
-
|
6175 |
-
|
6176 |
-
|
6177 |
-
|
6178 |
Â
|
6179 |
-
|
6180 |
-
|
6181 |
-
|
6182 |
-
|
6183 |
-
|
6184 |
Â
|
6185 |
-
|
6186 |
-
|
6187 |
-
|
6188 |
Â
|
6189 |
-
|
6190 |
-
|
6191 |
-
|
6192 |
Â
|
6193 |
-
|
6194 |
Â
|
6195 |
-
|
6196 |
-
|
6197 |
-
|
6198 |
Â
|
6199 |
-
|
6200 |
-
|
6201 |
-
|
6202 |
-
|
6203 |
-
}
|
6204 |
Â
}
|
6205 |
-
|
6206 |
-
elem = 0;
|
6207 |
-
|
6208 |
-
// If using innerHTML throws an exception, use the fallback method
|
6209 |
-
} catch ( e ) {}
|
6210 |
-
}
|
6211 |
-
|
6212 |
-
if ( elem ) {
|
6213 |
-
this.empty().append( value );
|
6214 |
-
}
|
6215 |
-
}, null, value, arguments.length );
|
6216 |
-
},
|
6217 |
-
|
6218 |
-
replaceWith: function() {
|
6219 |
-
var ignored = [];
|
6220 |
-
|
6221 |
-
// Make the changes, replacing each non-ignored context element with the new content
|
6222 |
-
return domManip( this, arguments, function( elem ) {
|
6223 |
-
var parent = this.parentNode;
|
6224 |
-
|
6225 |
-
if ( jQuery.inArray( this, ignored ) < 0 ) {
|
6226 |
-
jQuery.cleanData( getAll( this ) );
|
6227 |
-
if ( parent ) {
|
6228 |
-
parent.replaceChild( elem, this );
|
6229 |
Â
}
|
6230 |
-
}
|
6231 |
-
|
6232 |
-
// Force callback invocation
|
6233 |
-
}, ignored );
|
6234 |
-
}
|
6235 |
-
} );
|
6236 |
-
|
6237 |
-
jQuery.each( {
|
6238 |
-
appendTo: "append",
|
6239 |
-
prependTo: "prepend",
|
6240 |
-
insertBefore: "before",
|
6241 |
-
insertAfter: "after",
|
6242 |
-
replaceAll: "replaceWith"
|
6243 |
-
}, function( name, original ) {
|
6244 |
-
jQuery.fn[ name ] = function( selector ) {
|
6245 |
-
var elems,
|
6246 |
-
ret = [],
|
6247 |
-
insert = jQuery( selector ),
|
6248 |
-
last = insert.length - 1,
|
6249 |
-
i = 0;
|
6250 |
Â
|
6251 |
-
|
6252 |
-
elems = i === last ? this : this.clone( true );
|
6253 |
-
jQuery( insert[ i ] )[ original ]( elems );
|
6254 |
Â
|
6255 |
-
//
|
6256 |
-
|
6257 |
-
push.apply( ret, elems.get() );
|
6258 |
Â
}
|
6259 |
Â
|
6260 |
-
|
6261 |
-
|
6262 |
-
} );
|
6263 |
-
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
6264 |
-
|
6265 |
-
var getStyles = function( elem ) {
|
6266 |
-
|
6267 |
-
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
|
6268 |
-
// IE throws on elements created in popups
|
6269 |
-
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
6270 |
-
var view = elem.ownerDocument.defaultView;
|
6271 |
-
|
6272 |
-
if ( !view || !view.opener ) {
|
6273 |
-
view = window;
|
6274 |
Â
}
|
Â
|
|
Â
|
|
6275 |
Â
|
6276 |
-
|
6277 |
-
|
6278 |
-
|
6279 |
-
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
6280 |
-
|
6281 |
-
|
6282 |
-
|
6283 |
-
( function() {
|
6284 |
Â
|
6285 |
-
//
|
6286 |
-
|
6287 |
-
|
6288 |
Â
|
6289 |
-
|
6290 |
-
|
6291 |
-
|
Â
|
|
Â
|
|
6292 |
Â
}
|
6293 |
Â
|
6294 |
-
|
6295 |
-
|
6296 |
-
|
6297 |
-
|
6298 |
-
|
6299 |
-
|
6300 |
-
|
6301 |
-
|
6302 |
-
|
6303 |
-
|
6304 |
-
|
6305 |
-
|
6306 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6307 |
Â
|
6308 |
-
|
6309 |
-
|
6310 |
-
|
6311 |
-
pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
|
6312 |
Â
|
6313 |
-
// Support:
|
6314 |
-
//
|
6315 |
-
|
Â
|
|
6316 |
Â
|
6317 |
-
|
6318 |
-
|
6319 |
-
|
6320 |
-
|
6321 |
Â
|
6322 |
-
|
6323 |
Â
|
6324 |
-
|
6325 |
-
|
6326 |
-
|
6327 |
-
|
6328 |
Â
|
6329 |
-
|
6330 |
-
|
6331 |
Â
}
|
6332 |
Â
|
6333 |
-
|
6334 |
-
|
6335 |
-
container = document.createElement( "div" ),
|
6336 |
-
div = document.createElement( "div" );
|
6337 |
Â
|
6338 |
-
|
6339 |
-
if ( !div.style ) {
|
6340 |
-
return;
|
6341 |
-
}
|
6342 |
Â
|
6343 |
-
// Support: IE <=9 - 11 only
|
6344 |
-
// Style of cloned element affects source element cloned (#8908)
|
6345 |
-
div.style.backgroundClip = "content-box";
|
6346 |
-
div.cloneNode( true ).style.backgroundClip = "";
|
6347 |
-
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
6348 |
-
|
6349 |
-
jQuery.extend( support, {
|
6350 |
-
boxSizingReliable: function() {
|
6351 |
-
computeStyleTests();
|
6352 |
-
return boxSizingReliableVal;
|
6353 |
-
},
|
6354 |
-
pixelBoxStyles: function() {
|
6355 |
-
computeStyleTests();
|
6356 |
-
return pixelBoxStylesVal;
|
6357 |
-
},
|
6358 |
-
pixelPosition: function() {
|
6359 |
-
computeStyleTests();
|
6360 |
-
return pixelPositionVal;
|
6361 |
-
},
|
6362 |
-
reliableMarginLeft: function() {
|
6363 |
-
computeStyleTests();
|
6364 |
-
return reliableMarginLeftVal;
|
6365 |
-
},
|
6366 |
-
scrollboxSize: function() {
|
6367 |
-
computeStyleTests();
|
6368 |
-
return scrollboxSizeVal;
|
6369 |
-
}
|
6370 |
-
} );
|
6371 |
-
} )();
|
6372 |
Â
|
6373 |
Â
|
6374 |
-
|
6375 |
-
var width, minWidth, maxWidth, ret,
|
6376 |
Â
|
6377 |
-
|
6378 |
-
|
6379 |
-
|
6380 |
-
// on detached elements
|
6381 |
-
style = elem.style;
|
6382 |
Â
|
6383 |
-
|
Â
|
|
Â
|
|
Â
|
|
6384 |
Â
|
6385 |
-
|
6386 |
-
|
6387 |
-
|
6388 |
-
|
6389 |
-
|
Â
|
|
Â
|
|
6390 |
Â
|
6391 |
-
|
6392 |
-
|
6393 |
-
}
|
6394 |
Â
|
6395 |
-
|
6396 |
-
|
6397 |
-
// but width seems to be reliably pixels.
|
6398 |
-
// This is against the CSSOM draft spec:
|
6399 |
-
// https://drafts.csswg.org/cssom/#resolved-values
|
6400 |
-
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
|
6401 |
Â
|
6402 |
-
|
6403 |
-
|
6404 |
-
|
6405 |
-
|
6406 |
Â
|
6407 |
-
|
6408 |
-
|
6409 |
-
|
6410 |
Â
|
6411 |
-
|
6412 |
-
|
6413 |
-
|
6414 |
-
|
6415 |
-
}
|
6416 |
-
}
|
6417 |
Â
|
6418 |
-
|
6419 |
Â
|
6420 |
-
|
6421 |
-
|
6422 |
-
|
6423 |
-
ret;
|
6424 |
Â
}
|
6425 |
Â
|
Â
|
|
Â
|
|
Â
|
|
6426 |
Â
|
6427 |
-
|
Â
|
|
Â
|
|
Â
|
|
6428 |
Â
|
6429 |
-
|
6430 |
-
|
6431 |
-
|
6432 |
-
|
6433 |
Â
|
6434 |
-
|
6435 |
-
|
6436 |
-
|
6437 |
-
|
6438 |
-
|
6439 |
Â
|
6440 |
-
|
6441 |
-
|
6442 |
-
|
6443 |
-
|
6444 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6445 |
Â
|
6446 |
Â
|
6447 |
-
|
Â
|
|
6448 |
Â
|
6449 |
-
//
|
6450 |
-
//
|
6451 |
-
//
|
6452 |
-
|
6453 |
-
|
6454 |
-
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6455 |
-
cssNormalTransform = {
|
6456 |
-
letterSpacing: "0",
|
6457 |
-
fontWeight: "400"
|
6458 |
-
},
|
6459 |
Â
|
6460 |
-
|
6461 |
-
emptyStyle = document.createElement( "div" ).style;
|
6462 |
Â
|
6463 |
-
//
|
6464 |
-
|
Â
|
|
Â
|
|
Â
|
|
6465 |
Â
|
6466 |
-
|
6467 |
-
|
6468 |
-
return name;
|
6469 |
Â
}
|
6470 |
Â
|
6471 |
-
//
|
6472 |
-
|
6473 |
-
|
Â
|
|
Â
|
|
Â
|
|
6474 |
Â
|
6475 |
-
|
6476 |
-
|
6477 |
-
|
6478 |
-
|
6479 |
-
}
|
6480 |
-
}
|
6481 |
-
}
|
6482 |
Â
|
6483 |
-
|
6484 |
-
|
6485 |
-
|
6486 |
-
|
6487 |
-
|
6488 |
-
|
Â
|
|
Â
|
|
6489 |
Â
}
|
6490 |
-
return ret;
|
6491 |
Â
}
|
6492 |
Â
|
6493 |
-
|
6494 |
Â
|
6495 |
-
//
|
6496 |
-
//
|
6497 |
-
|
6498 |
-
|
6499 |
-
|
6500 |
-
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
6501 |
-
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
6502 |
-
value;
|
6503 |
-
}
|
6504 |
Â
|
6505 |
-
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
6506 |
-
var i = dimension === "width" ? 1 : 0,
|
6507 |
-
extra = 0,
|
6508 |
-
delta = 0;
|
6509 |
Â
|
6510 |
-
|
6511 |
-
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
6512 |
-
return 0;
|
6513 |
-
}
|
6514 |
Â
|
6515 |
-
|
Â
|
|
Â
|
|
Â
|
|
6516 |
Â
|
6517 |
-
|
6518 |
-
|
6519 |
-
|
Â
|
|
6520 |
Â
}
|
6521 |
Â
|
6522 |
-
//
|
6523 |
-
|
Â
|
|
Â
|
|
Â
|
|
6524 |
Â
|
6525 |
-
// Add padding
|
6526 |
-
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6527 |
Â
|
6528 |
-
|
6529 |
-
if ( box !== "padding" ) {
|
6530 |
-
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6531 |
Â
|
6532 |
-
|
6533 |
-
|
6534 |
-
|
6535 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6536 |
Â
|
6537 |
-
|
6538 |
-
|
6539 |
-
} else {
|
6540 |
Â
|
6541 |
-
|
6542 |
-
|
6543 |
-
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6544 |
-
}
|
6545 |
Â
|
6546 |
-
|
6547 |
-
|
6548 |
-
|
6549 |
-
|
6550 |
-
}
|
6551 |
-
}
|
6552 |
Â
|
6553 |
-
|
6554 |
-
|
Â
|
|
6555 |
Â
|
6556 |
-
|
6557 |
-
|
6558 |
-
|
6559 |
-
|
6560 |
-
computedVal -
|
6561 |
-
delta -
|
6562 |
-
extra -
|
6563 |
-
0.5
|
6564 |
-
) );
|
6565 |
Â
}
|
6566 |
-
|
6567 |
-
return delta;
|
6568 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6569 |
Â
|
6570 |
-
|
6571 |
Â
|
6572 |
-
|
6573 |
-
|
6574 |
-
|
6575 |
-
|
6576 |
-
valueIsBorderBox = isBorderBox;
|
6577 |
Â
|
6578 |
-
//
|
6579 |
-
|
6580 |
-
|
6581 |
-
|
6582 |
-
return val;
|
6583 |
-
}
|
6584 |
-
val = "auto";
|
6585 |
-
}
|
6586 |
Â
|
6587 |
-
|
6588 |
-
|
6589 |
-
|
6590 |
-
|
6591 |
Â
|
6592 |
-
|
6593 |
-
|
6594 |
-
|
6595 |
-
|
6596 |
-
if ( val === "auto" ||
|
6597 |
-
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) {
|
6598 |
Â
|
6599 |
-
|
6600 |
Â
|
6601 |
-
|
6602 |
-
|
Â
|
|
6603 |
Â
}
|
6604 |
Â
|
6605 |
-
//
|
6606 |
-
|
6607 |
Â
|
6608 |
-
|
6609 |
-
|
6610 |
-
boxModelAdjustment(
|
6611 |
-
elem,
|
6612 |
-
dimension,
|
6613 |
-
extra || ( isBorderBox ? "border" : "content" ),
|
6614 |
-
valueIsBorderBox,
|
6615 |
-
styles,
|
6616 |
Â
|
6617 |
-
|
6618 |
-
|
6619 |
-
|
6620 |
-
) + "px";
|
6621 |
-
}
|
6622 |
Â
|
6623 |
-
|
Â
|
|
Â
|
|
Â
|
|
6624 |
Â
|
6625 |
-
//
|
6626 |
-
//
|
6627 |
-
|
6628 |
-
opacity: {
|
6629 |
-
get: function( elem, computed ) {
|
6630 |
-
if ( computed ) {
|
6631 |
Â
|
6632 |
-
|
6633 |
-
|
6634 |
-
|
6635 |
-
}
|
6636 |
-
}
|
6637 |
Â
}
|
6638 |
-
},
|
6639 |
Â
|
6640 |
-
|
6641 |
-
|
6642 |
-
|
6643 |
-
|
6644 |
-
|
6645 |
-
|
6646 |
-
"flexShrink": true,
|
6647 |
-
"fontWeight": true,
|
6648 |
-
"lineHeight": true,
|
6649 |
-
"opacity": true,
|
6650 |
-
"order": true,
|
6651 |
-
"orphans": true,
|
6652 |
-
"widows": true,
|
6653 |
-
"zIndex": true,
|
6654 |
-
"zoom": true
|
6655 |
-
},
|
6656 |
Â
|
6657 |
-
|
6658 |
-
|
6659 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6660 |
Â
|
6661 |
-
|
6662 |
-
|
6663 |
Â
|
6664 |
-
|
6665 |
-
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6666 |
-
return;
|
6667 |
-
}
|
6668 |
Â
|
6669 |
-
|
6670 |
-
|
6671 |
-
|
6672 |
-
|
6673 |
-
|
6674 |
Â
|
6675 |
-
|
6676 |
-
|
6677 |
-
|
6678 |
-
|
6679 |
-
|
6680 |
-
|
Â
|
|
Â
|
|
6681 |
Â
|
6682 |
-
|
6683 |
-
|
Â
|
|
Â
|
|
6684 |
Â
|
6685 |
-
|
6686 |
-
|
6687 |
-
|
Â
|
|
Â
|
|
Â
|
|
6688 |
Â
|
6689 |
-
|
6690 |
-
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
6691 |
-
value = adjustCSS( elem, name, ret );
|
6692 |
Â
|
6693 |
-
|
6694 |
-
|
6695 |
-
|
6696 |
Â
|
6697 |
-
|
6698 |
-
|
6699 |
-
|
6700 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6701 |
Â
|
6702 |
-
|
6703 |
-
|
6704 |
-
|
6705 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
6706 |
Â
|
6707 |
-
|
6708 |
-
|
6709 |
-
|
6710 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6711 |
Â
|
6712 |
-
|
6713 |
-
|
6714 |
-
|
6715 |
Â
|
6716 |
-
|
6717 |
-
|
6718 |
-
} else {
|
6719 |
-
style[ name ] = value;
|
6720 |
-
}
|
6721 |
-
}
|
6722 |
Â
|
6723 |
-
|
Â
|
|
Â
|
|
Â
|
|
6724 |
Â
|
6725 |
-
|
6726 |
-
|
6727 |
-
|
Â
|
|
Â
|
|
6728 |
Â
|
6729 |
-
|
6730 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6731 |
Â
|
6732 |
-
|
6733 |
-
|
6734 |
-
}
|
6735 |
-
},
|
6736 |
Â
|
6737 |
-
|
6738 |
-
|
6739 |
-
|
6740 |
-
isCustomProp = rcustomProp.test( name );
|
6741 |
Â
|
6742 |
-
//
|
6743 |
-
|
6744 |
-
|
6745 |
-
|
6746 |
-
|
Â
|
|
6747 |
Â
}
|
6748 |
Â
|
6749 |
-
//
|
6750 |
-
|
Â
|
|
Â
|
|
6751 |
Â
|
6752 |
-
// If a
|
6753 |
-
if (
|
6754 |
-
|
6755 |
Â
}
|
6756 |
Â
|
6757 |
-
//
|
6758 |
-
if (
|
6759 |
-
|
6760 |
Â
}
|
6761 |
Â
|
6762 |
-
//
|
6763 |
-
if (
|
6764 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6765 |
Â
}
|
6766 |
Â
|
6767 |
-
|
6768 |
-
|
6769 |
-
|
6770 |
-
|
Â
|
|
Â
|
|
Â
|
|
6771 |
Â
}
|
6772 |
Â
|
6773 |
-
|
Â
|
|
6774 |
Â
}
|
6775 |
-
}
|
6776 |
Â
|
6777 |
-
|
6778 |
-
|
6779 |
-
|
6780 |
-
|
6781 |
Â
|
6782 |
-
|
6783 |
-
|
6784 |
-
|
6785 |
-
|
6786 |
-
|
6787 |
-
|
6788 |
-
// getBoundingClientRect().width unless display is changed.
|
6789 |
-
// Support: IE <=11 only
|
6790 |
-
// Running getBoundingClientRect on a disconnected node
|
6791 |
-
// in IE throws an error.
|
6792 |
-
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
6793 |
-
swap( elem, cssShow, function() {
|
6794 |
-
return getWidthOrHeight( elem, dimension, extra );
|
6795 |
-
} ) :
|
6796 |
-
getWidthOrHeight( elem, dimension, extra );
|
6797 |
-
}
|
6798 |
-
},
|
6799 |
Â
|
6800 |
-
|
6801 |
-
|
6802 |
-
styles = getStyles( elem ),
|
6803 |
-
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6804 |
-
subtract = extra && boxModelAdjustment(
|
6805 |
-
elem,
|
6806 |
-
dimension,
|
6807 |
-
extra,
|
6808 |
-
isBorderBox,
|
6809 |
-
styles
|
6810 |
-
);
|
6811 |
Â
|
6812 |
-
|
6813 |
-
|
6814 |
-
|
6815 |
-
|
6816 |
-
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
6817 |
-
parseFloat( styles[ dimension ] ) -
|
6818 |
-
boxModelAdjustment( elem, dimension, "border", false, styles ) -
|
6819 |
-
0.5
|
6820 |
-
);
|
6821 |
-
}
|
6822 |
Â
|
6823 |
-
|
6824 |
-
|
6825 |
-
|
Â
|
|
6826 |
Â
|
6827 |
-
|
6828 |
-
|
6829 |
-
|
Â
|
|
6830 |
Â
|
6831 |
-
|
6832 |
-
|
6833 |
-
|
6834 |
-
|
Â
|
|
6835 |
Â
|
6836 |
-
|
6837 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6838 |
Â
if ( computed ) {
|
6839 |
-
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
6840 |
-
elem.getBoundingClientRect().left -
|
6841 |
-
swap( elem, { marginLeft: 0 }, function() {
|
6842 |
-
return elem.getBoundingClientRect().left;
|
6843 |
-
} )
|
6844 |
-
) + "px";
|
6845 |
-
}
|
6846 |
-
}
|
6847 |
-
);
|
6848 |
Â
|
6849 |
-
|
6850 |
-
|
6851 |
-
|
6852 |
-
|
6853 |
-
|
6854 |
-
|
6855 |
-
|
6856 |
-
|
6857 |
-
|
6858 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6859 |
Â
|
6860 |
-
|
6861 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6862 |
Â
|
6863 |
-
|
6864 |
-
|
6865 |
-
|
6866 |
-
}
|
6867 |
Â
|
6868 |
-
|
Â
|
|
6869 |
Â
}
|
6870 |
-
};
|
6871 |
Â
|
6872 |
-
|
6873 |
-
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
6874 |
Â
}
|
6875 |
-
}
|
6876 |
-
|
6877 |
-
jQuery.fn.extend( {
|
6878 |
-
css: function( name, value ) {
|
6879 |
-
return access( this, function( elem, name, value ) {
|
6880 |
-
var styles, len,
|
6881 |
-
map = {},
|
6882 |
-
i = 0;
|
6883 |
Â
|
6884 |
-
|
6885 |
-
|
6886 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6887 |
Â
|
6888 |
-
|
6889 |
-
|
6890 |
-
}
|
6891 |
Â
|
6892 |
-
|
6893 |
-
|
Â
|
|
Â
|
|
6894 |
Â
|
6895 |
-
|
6896 |
-
jQuery.style( elem, name, value ) :
|
6897 |
-
jQuery.css( elem, name );
|
6898 |
-
}, name, value, arguments.length > 1 );
|
6899 |
Â
}
|
6900 |
-
}
|
6901 |
-
|
6902 |
Â
|
6903 |
-
|
6904 |
-
|
6905 |
Â
}
|
6906 |
-
|
6907 |
Â
|
6908 |
-
|
6909 |
-
|
6910 |
-
|
6911 |
-
|
6912 |
-
|
6913 |
-
|
6914 |
-
this.options = options;
|
6915 |
-
this.start = this.now = this.cur();
|
6916 |
-
this.end = end;
|
6917 |
-
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
6918 |
-
},
|
6919 |
-
cur: function() {
|
6920 |
-
var hooks = Tween.propHooks[ this.prop ];
|
6921 |
Â
|
6922 |
-
|
6923 |
-
|
6924 |
-
|
6925 |
-
},
|
6926 |
-
run: function( percent ) {
|
6927 |
-
var eased,
|
6928 |
-
hooks = Tween.propHooks[ this.prop ];
|
6929 |
Â
|
6930 |
-
|
6931 |
-
|
6932 |
-
|
6933 |
-
);
|
6934 |
-
} else {
|
6935 |
-
this.pos = eased = percent;
|
6936 |
-
}
|
6937 |
-
this.now = ( this.end - this.start ) * eased + this.start;
|
6938 |
Â
|
6939 |
-
|
6940 |
-
this.options.step.call( this.elem, this.now, this );
|
6941 |
Â
}
|
6942 |
Â
|
6943 |
-
|
6944 |
-
|
6945 |
-
|
6946 |
-
|
6947 |
-
|
6948 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6949 |
Â
}
|
6950 |
-
|
6951 |
Â
|
6952 |
-
|
Â
|
|
Â
|
|
6953 |
Â
|
6954 |
-
|
6955 |
-
|
6956 |
-
|
6957 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6958 |
Â
|
6959 |
-
|
6960 |
-
// or when there is no matching style property that exists.
|
6961 |
-
if ( tween.elem.nodeType !== 1 ||
|
6962 |
-
tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
6963 |
-
return tween.elem[ tween.prop ];
|
6964 |
-
}
|
6965 |
Â
|
6966 |
-
|
6967 |
-
|
6968 |
-
|
6969 |
-
|
6970 |
-
result = jQuery.css( tween.elem, tween.prop, "" );
|
6971 |
Â
|
6972 |
-
|
6973 |
-
|
6974 |
-
|
6975 |
-
|
6976 |
-
|
6977 |
-
// Use step hook for back compat.
|
6978 |
-
// Use cssHook if its there.
|
6979 |
-
// Use .style if available and use plain properties where available.
|
6980 |
-
if ( jQuery.fx.step[ tween.prop ] ) {
|
6981 |
-
jQuery.fx.step[ tween.prop ]( tween );
|
6982 |
-
} else if ( tween.elem.nodeType === 1 &&
|
6983 |
-
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
|
6984 |
-
jQuery.cssHooks[ tween.prop ] ) ) {
|
6985 |
-
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
6986 |
-
} else {
|
6987 |
-
tween.elem[ tween.prop ] = tween.now;
|
6988 |
-
}
|
6989 |
Â
}
|
6990 |
-
}
|
6991 |
-
};
|
6992 |
Â
|
6993 |
-
|
6994 |
-
|
6995 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6996 |
Â
set: function( tween ) {
|
6997 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6998 |
Â
tween.elem[ tween.prop ] = tween.now;
|
6999 |
Â
}
|
7000 |
Â
}
|
7001 |
-
}
|
Â
|
|
7002 |
Â
|
7003 |
-
|
7004 |
-
|
7005 |
-
|
7006 |
-
|
7007 |
-
|
7008 |
-
|
7009 |
-
}
|
7010 |
-
|
7011 |
-
|
7012 |
Â
|
7013 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7014 |
Â
|
7015 |
-
|
7016 |
-
jQuery.fx.step = {};
|
7017 |
Â
|
Â
|
|
Â
|
|
7018 |
Â
|
7019 |
Â
|
7020 |
Â
|
7021 |
-
var
|
7022 |
-
fxNow, inProgress,
|
7023 |
-
rfxtypes = /^(?:toggle|show|hide)$/,
|
7024 |
-
rrun = /queueHooks$/;
|
7025 |
Â
|
7026 |
-
|
7027 |
-
|
7028 |
-
|
7029 |
-
|
7030 |
-
} else {
|
7031 |
-
window.setTimeout( schedule, jQuery.fx.interval );
|
7032 |
-
}
|
7033 |
Â
|
7034 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7035 |
Â
}
|
7036 |
-
}
|
7037 |
Â
|
7038 |
-
|
7039 |
-
function createFxNow() {
|
7040 |
-
window.setTimeout( function() {
|
7041 |
-
fxNow = undefined;
|
7042 |
-
} );
|
7043 |
-
return ( fxNow = Date.now() );
|
7044 |
Â
}
|
Â
|
|
7045 |
Â
|
7046 |
-
|
7047 |
-
|
7048 |
-
|
7049 |
-
|
7050 |
-
|
7051 |
-
|
7052 |
-
|
7053 |
-
|
7054 |
-
|
7055 |
-
|
7056 |
-
|
7057 |
-
|
7058 |
-
}
|
7059 |
-
|
7060 |
-
|
7061 |
-
|
7062 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7063 |
Â
|
7064 |
-
|
Â
|
|
7065 |
Â
}
|
7066 |
Â
|
7067 |
-
|
7068 |
-
|
7069 |
-
collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
|
7070 |
-
index = 0,
|
7071 |
-
length = collection.length;
|
7072 |
-
for ( ; index < length; index++ ) {
|
7073 |
-
if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
|
7074 |
Â
|
7075 |
-
|
7076 |
-
|
7077 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7078 |
Â
}
|
7079 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7080 |
Â
|
7081 |
-
|
7082 |
-
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
|
7083 |
-
isBox = "width" in props || "height" in props,
|
7084 |
-
anim = this,
|
7085 |
-
orig = {},
|
7086 |
-
style = elem.style,
|
7087 |
-
hidden = elem.nodeType && isHiddenWithinTree( elem ),
|
7088 |
-
dataShow = dataPriv.get( elem, "fxshow" );
|
7089 |
-
|
7090 |
-
// Queue-skipping animations hijack the fx hooks
|
7091 |
-
if ( !opts.queue ) {
|
7092 |
-
hooks = jQuery._queueHooks( elem, "fx" );
|
7093 |
-
if ( hooks.unqueued == null ) {
|
7094 |
-
hooks.unqueued = 0;
|
7095 |
-
oldfire = hooks.empty.fire;
|
7096 |
-
hooks.empty.fire = function() {
|
7097 |
-
if ( !hooks.unqueued ) {
|
7098 |
-
oldfire();
|
7099 |
-
}
|
7100 |
-
};
|
7101 |
-
}
|
7102 |
-
hooks.unqueued++;
|
7103 |
Â
|
Â
|
|
7104 |
Â
anim.always( function() {
|
7105 |
-
|
7106 |
-
|
7107 |
-
|
7108 |
-
|
7109 |
-
if ( !jQuery.queue( elem, "fx" ).length ) {
|
7110 |
-
hooks.empty.fire();
|
7111 |
-
}
|
7112 |
-
} );
|
7113 |
Â
} );
|
7114 |
-
}
|
Â
|
|
7115 |
Â
|
7116 |
-
|
7117 |
-
|
7118 |
-
|
7119 |
-
|
7120 |
-
|
7121 |
-
|
7122 |
-
|
7123 |
Â
|
7124 |
-
|
7125 |
-
|
7126 |
-
|
7127 |
-
|
7128 |
Â
|
7129 |
-
|
7130 |
-
|
7131 |
-
|
7132 |
-
}
|
7133 |
Â
}
|
7134 |
-
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
|
7135 |
Â
}
|
Â
|
|
7136 |
Â
}
|
Â
|
|
7137 |
Â
|
7138 |
-
|
7139 |
-
|
7140 |
-
|
7141 |
-
|
7142 |
-
|
7143 |
Â
|
7144 |
-
|
7145 |
-
|
7146 |
Â
|
7147 |
-
|
7148 |
-
|
7149 |
-
|
7150 |
-
|
7151 |
-
|
7152 |
Â
|
7153 |
-
|
7154 |
-
|
7155 |
-
|
7156 |
-
|
7157 |
-
|
7158 |
-
|
7159 |
-
|
7160 |
-
|
7161 |
-
|
7162 |
-
|
7163 |
Â
|
7164 |
-
|
7165 |
-
|
7166 |
-
|
7167 |
-
|
7168 |
-
|
7169 |
-
}
|
7170 |
Â
}
|
Â
|
|
7171 |
Â
|
7172 |
-
|
7173 |
-
|
7174 |
-
|
7175 |
Â
|
7176 |
-
|
7177 |
-
|
7178 |
-
|
7179 |
-
|
7180 |
-
|
7181 |
-
|
7182 |
-
|
7183 |
-
|
7184 |
-
}
|
7185 |
Â
}
|
7186 |
-
style.display = "inline-block";
|
7187 |
Â
}
|
Â
|
|
7188 |
Â
}
|
7189 |
Â
}
|
Â
|
|
7190 |
Â
|
7191 |
-
|
7192 |
-
|
7193 |
-
|
7194 |
-
|
7195 |
-
|
7196 |
-
|
7197 |
-
|
7198 |
-
|
7199 |
-
|
7200 |
-
// Implement show/hide animations
|
7201 |
-
propTween = false;
|
7202 |
-
for ( prop in orig ) {
|
7203 |
Â
|
7204 |
-
|
7205 |
-
|
7206 |
-
|
7207 |
-
if ( "hidden" in dataShow ) {
|
7208 |
-
hidden = dataShow.hidden;
|
7209 |
-
}
|
7210 |
-
} else {
|
7211 |
-
dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
|
7212 |
-
}
|
7213 |
Â
|
7214 |
-
|
7215 |
-
|
7216 |
-
|
Â
|
|
Â
|
|
7217 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
7218 |
Â
|
7219 |
-
|
7220 |
-
|
7221 |
-
|
7222 |
-
|
7223 |
Â
|
7224 |
-
|
Â
|
|
Â
|
|
Â
|
|
7225 |
Â
|
7226 |
-
|
7227 |
Â
|
7228 |
-
|
7229 |
Â
|
7230 |
-
|
7231 |
-
if ( !hidden ) {
|
7232 |
-
showHide( [ elem ] );
|
7233 |
-
}
|
7234 |
-
dataPriv.remove( elem, "fxshow" );
|
7235 |
-
for ( prop in orig ) {
|
7236 |
-
jQuery.style( elem, prop, orig[ prop ] );
|
7237 |
-
}
|
7238 |
-
} );
|
7239 |
-
}
|
7240 |
Â
|
7241 |
-
|
7242 |
-
|
7243 |
-
|
7244 |
-
|
7245 |
-
|
7246 |
-
|
7247 |
-
|
7248 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7249 |
Â
}
|
7250 |
Â
}
|
7251 |
Â
}
|
Â
|
|
7252 |
Â
|
7253 |
-
|
7254 |
-
|
7255 |
Â
|
7256 |
-
|
7257 |
-
|
7258 |
-
|
7259 |
-
|
7260 |
-
|
7261 |
-
|
7262 |
-
|
7263 |
-
|
7264 |
-
|
7265 |
Â
|
7266 |
-
|
7267 |
-
|
7268 |
-
|
7269 |
-
|
7270 |
Â
|
7271 |
-
|
7272 |
-
|
7273 |
-
|
7274 |
-
|
7275 |
Â
|
7276 |
-
|
7277 |
-
|
7278 |
-
|
7279 |
-
|
7280 |
-
|
7281 |
-
|
7282 |
-
}
|
7283 |
Â
}
|
7284 |
-
} else {
|
7285 |
-
specialEasing[ name ] = easing;
|
7286 |
Â
}
|
Â
|
|
Â
|
|
7287 |
Â
}
|
7288 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7289 |
Â
|
7290 |
-
|
7291 |
-
|
7292 |
-
|
7293 |
-
|
7294 |
-
|
7295 |
-
|
7296 |
-
|
7297 |
-
// Don't match elem in the :animated selector
|
7298 |
-
delete tick.elem;
|
7299 |
-
} ),
|
7300 |
-
tick = function() {
|
7301 |
-
if ( stopped ) {
|
7302 |
-
return false;
|
7303 |
-
}
|
7304 |
-
var currentTime = fxNow || createFxNow(),
|
7305 |
-
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
7306 |
-
|
7307 |
-
// Support: Android 2.3 only
|
7308 |
-
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
|
7309 |
-
temp = remaining / animation.duration || 0,
|
7310 |
-
percent = 1 - temp,
|
7311 |
-
index = 0,
|
7312 |
-
length = animation.tweens.length;
|
7313 |
Â
|
7314 |
-
|
7315 |
-
|
7316 |
-
|
7317 |
Â
|
7318 |
-
|
7319 |
Â
|
7320 |
-
|
7321 |
-
|
7322 |
-
|
7323 |
-
|
7324 |
Â
|
7325 |
-
|
7326 |
-
|
7327 |
-
|
7328 |
-
|
7329 |
Â
|
7330 |
-
|
7331 |
-
|
7332 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7333 |
Â
},
|
7334 |
-
|
7335 |
-
|
7336 |
-
|
7337 |
-
|
7338 |
-
|
7339 |
-
|
7340 |
-
|
7341 |
-
originalProperties: properties,
|
7342 |
-
originalOptions: options,
|
7343 |
-
startTime: fxNow || createFxNow(),
|
7344 |
-
duration: options.duration,
|
7345 |
-
tweens: [],
|
7346 |
-
createTween: function( prop, end ) {
|
7347 |
-
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
7348 |
-
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
7349 |
-
animation.tweens.push( tween );
|
7350 |
-
return tween;
|
7351 |
-
},
|
7352 |
-
stop: function( gotoEnd ) {
|
7353 |
-
var index = 0,
|
7354 |
-
|
7355 |
-
// If we are going to the end, we want to run all the tweens
|
7356 |
-
// otherwise we skip this part
|
7357 |
-
length = gotoEnd ? animation.tweens.length : 0;
|
7358 |
-
if ( stopped ) {
|
7359 |
-
return this;
|
7360 |
-
}
|
7361 |
-
stopped = true;
|
7362 |
-
for ( ; index < length; index++ ) {
|
7363 |
-
animation.tweens[ index ].run( 1 );
|
7364 |
-
}
|
7365 |
-
|
7366 |
-
// Resolve when we played the last frame; otherwise, reject
|
7367 |
-
if ( gotoEnd ) {
|
7368 |
-
deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
7369 |
-
deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
7370 |
-
} else {
|
7371 |
-
deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
7372 |
-
}
|
7373 |
Â
return this;
|
7374 |
Â
}
|
7375 |
-
|
7376 |
-
|
7377 |
-
|
7378 |
-
|
7379 |
Â
|
7380 |
-
|
7381 |
-
|
7382 |
-
|
7383 |
-
|
7384 |
-
|
7385 |
-
|
7386 |
Â
}
|
7387 |
-
return
|
7388 |
Â
}
|
7389 |
-
}
|
Â
|
|
7390 |
Â
|
7391 |
-
|
7392 |
Â
|
7393 |
-
|
7394 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7395 |
Â
}
|
Â
|
|
7396 |
Â
|
7397 |
-
|
7398 |
-
animation
|
7399 |
-
.progress( animation.opts.progress )
|
7400 |
-
.done( animation.opts.done, animation.opts.complete )
|
7401 |
-
.fail( animation.opts.fail )
|
7402 |
-
.always( animation.opts.always );
|
7403 |
-
|
7404 |
-
jQuery.fx.timer(
|
7405 |
-
jQuery.extend( tick, {
|
7406 |
-
elem: elem,
|
7407 |
-
anim: animation,
|
7408 |
-
queue: animation.opts.queue
|
7409 |
-
} )
|
7410 |
-
);
|
7411 |
Â
|
7412 |
-
|
Â
|
|
7413 |
Â
}
|
7414 |
Â
|
7415 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7416 |
Â
|
7417 |
-
|
7418 |
-
|
7419 |
-
var tween = this.createTween( prop, value );
|
7420 |
-
adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
|
7421 |
-
return tween;
|
7422 |
-
} ]
|
7423 |
-
},
|
7424 |
Â
|
7425 |
-
|
7426 |
-
if ( isFunction( props ) ) {
|
7427 |
-
callback = props;
|
7428 |
-
props = [ "*" ];
|
7429 |
-
} else {
|
7430 |
-
props = props.match( rnothtmlwhite );
|
7431 |
-
}
|
7432 |
Â
|
7433 |
-
|
7434 |
-
|
7435 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7436 |
Â
|
7437 |
-
|
7438 |
-
|
7439 |
-
|
7440 |
-
|
7441 |
-
|
7442 |
-
|
Â
|
|
7443 |
Â
|
7444 |
-
|
Â
|
|
Â
|
|
7445 |
Â
|
7446 |
-
|
7447 |
-
|
7448 |
-
|
7449 |
-
|
7450 |
-
Animation.prefilters.push( callback );
|
7451 |
-
}
|
7452 |
Â
}
|
7453 |
-
}
|
7454 |
-
|
7455 |
-
jQuery.speed = function( speed, easing, fn ) {
|
7456 |
-
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
7457 |
-
complete: fn || !fn && easing ||
|
7458 |
-
isFunction( speed ) && speed,
|
7459 |
-
duration: speed,
|
7460 |
-
easing: fn && easing || easing && !isFunction( easing ) && easing
|
7461 |
-
};
|
7462 |
Â
|
7463 |
-
|
7464 |
-
if ( jQuery.fx.off ) {
|
7465 |
-
opt.duration = 0;
|
7466 |
Â
|
Â
|
|
Â
|
|
Â
|
|
7467 |
Â
} else {
|
7468 |
-
|
7469 |
-
if ( opt.duration in jQuery.fx.speeds ) {
|
7470 |
-
opt.duration = jQuery.fx.speeds[ opt.duration ];
|
7471 |
-
|
7472 |
-
} else {
|
7473 |
-
opt.duration = jQuery.fx.speeds._default;
|
7474 |
-
}
|
7475 |
-
}
|
7476 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7477 |
Â
|
7478 |
-
|
7479 |
-
|
7480 |
-
|
7481 |
-
}
|
7482 |
Â
|
7483 |
-
|
7484 |
-
opt.
|
Â
|
|
Â
|
|
7485 |
Â
|
7486 |
-
|
7487 |
-
|
7488 |
-
opt.old.call( this );
|
7489 |
Â
}
|
Â
|
|
Â
|
|
7490 |
Â
|
7491 |
-
|
7492 |
-
|
7493 |
-
|
7494 |
-
|
Â
|
|
Â
|
|
Â
|
|
7495 |
Â
|
7496 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7497 |
Â
};
|
7498 |
Â
|
7499 |
-
|
7500 |
-
|
7501 |
Â
|
7502 |
-
|
7503 |
-
|
7504 |
Â
|
7505 |
-
|
7506 |
-
|
7507 |
-
},
|
7508 |
-
animate: function( prop, speed, easing, callback ) {
|
7509 |
-
var empty = jQuery.isEmptyObject( prop ),
|
7510 |
-
optall = jQuery.speed( speed, easing, callback ),
|
7511 |
-
doAnimation = function() {
|
7512 |
Â
|
7513 |
-
|
7514 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7515 |
Â
|
7516 |
-
|
7517 |
-
|
7518 |
-
anim.stop( true );
|
7519 |
-
}
|
7520 |
-
};
|
7521 |
-
doAnimation.finish = doAnimation;
|
7522 |
Â
|
7523 |
-
|
7524 |
-
|
7525 |
-
|
7526 |
-
|
7527 |
-
stop: function( type, clearQueue, gotoEnd ) {
|
7528 |
-
var stopQueue = function( hooks ) {
|
7529 |
-
var stop = hooks.stop;
|
7530 |
-
delete hooks.stop;
|
7531 |
-
stop( gotoEnd );
|
7532 |
Â
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7533 |
Â
|
7534 |
-
|
7535 |
-
|
7536 |
-
|
7537 |
-
|
7538 |
-
|
7539 |
-
|
7540 |
-
|
7541 |
-
|
7542 |
Â
|
7543 |
-
|
7544 |
-
|
7545 |
-
|
7546 |
-
|
7547 |
-
|
7548 |
Â
|
7549 |
-
|
7550 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7551 |
Â
stopQueue( data[ index ] );
|
7552 |
Â
}
|
7553 |
-
} else {
|
7554 |
-
for ( index in data ) {
|
7555 |
-
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
7556 |
-
stopQueue( data[ index ] );
|
7557 |
-
}
|
7558 |
-
}
|
7559 |
Â
}
|
Â
|
|
7560 |
Â
|
7561 |
-
|
7562 |
-
|
7563 |
-
|
7564 |
Â
|
7565 |
-
|
7566 |
-
|
7567 |
-
|
7568 |
-
}
|
7569 |
Â
}
|
Â
|
|
7570 |
Â
|
7571 |
-
|
7572 |
-
|
7573 |
-
|
7574 |
-
|
7575 |
-
|
7576 |
-
}
|
7577 |
-
} );
|
7578 |
-
},
|
7579 |
-
finish: function( type ) {
|
7580 |
-
if ( type !== false ) {
|
7581 |
-
type = type || "fx";
|
7582 |
Â
}
|
7583 |
-
|
7584 |
-
|
7585 |
-
|
7586 |
-
|
7587 |
-
|
7588 |
-
|
7589 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7590 |
Â
|
7591 |
-
|
7592 |
-
|
7593 |
Â
|
7594 |
-
|
7595 |
-
|
7596 |
Â
|
7597 |
-
|
7598 |
-
|
7599 |
-
|
7600 |
Â
|
7601 |
-
|
7602 |
-
|
7603 |
-
|
7604 |
-
|
7605 |
-
|
7606 |
-
}
|
7607 |
Â
}
|
Â
|
|
7608 |
Â
|
7609 |
-
|
7610 |
-
|
7611 |
-
|
7612 |
-
|
7613 |
-
}
|
7614 |
Â
}
|
Â
|
|
7615 |
Â
|
7616 |
-
|
7617 |
-
|
7618 |
-
|
7619 |
-
|
7620 |
-
|
7621 |
-
|
7622 |
-
|
7623 |
-
|
7624 |
-
|
7625 |
-
|
7626 |
-
|
7627 |
-
|
7628 |
-
|
7629 |
-
|
7630 |
-
|
7631 |
-
|
7632 |
-
|
7633 |
-
|
7634 |
-
|
7635 |
-
|
7636 |
-
|
7637 |
-
|
7638 |
-
|
7639 |
-
|
7640 |
-
|
7641 |
-
|
7642 |
-
|
7643 |
-
|
7644 |
Â
|
7645 |
-
|
7646 |
-
|
7647 |
-
|
7648 |
-
|
7649 |
-
|
7650 |
Â
|
7651 |
-
|
7652 |
Â
|
7653 |
-
|
7654 |
-
|
7655 |
Â
|
7656 |
-
|
7657 |
-
|
7658 |
-
|
7659 |
-
}
|
7660 |
Â
}
|
Â
|
|
7661 |
Â
|
7662 |
-
|
7663 |
-
|
7664 |
-
|
7665 |
-
|
7666 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7667 |
Â
|
7668 |
-
|
7669 |
-
|
7670 |
-
|
7671 |
-
};
|
7672 |
Â
|
7673 |
-
|
7674 |
-
|
7675 |
-
|
7676 |
-
return;
|
7677 |
-
}
|
7678 |
Â
|
7679 |
-
|
7680 |
-
|
7681 |
-
|
7682 |
Â
|
7683 |
-
|
7684 |
-
|
7685 |
-
|
7686 |
Â
|
7687 |
-
jQuery.fx.speeds = {
|
7688 |
-
slow: 600,
|
7689 |
-
fast: 200,
|
7690 |
Â
|
7691 |
-
|
7692 |
-
|
7693 |
-
|
Â
|
|
Â
|
|
7694 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7695 |
Â
|
7696 |
-
// Based off of the plugin by Clint Helfers, with permission.
|
7697 |
-
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
|
7698 |
-
jQuery.fn.delay = function( time, type ) {
|
7699 |
-
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
7700 |
-
type = type || "fx";
|
7701 |
Â
|
7702 |
-
|
7703 |
-
|
7704 |
-
|
7705 |
-
|
7706 |
-
};
|
7707 |
-
} );
|
7708 |
-
};
|
7709 |
Â
|
Â
|
|
7710 |
Â
|
7711 |
-
|
7712 |
-
|
7713 |
-
|
7714 |
-
opt = select.appendChild( document.createElement( "option" ) );
|
7715 |
Â
|
7716 |
-
|
Â
|
|
Â
|
|
7717 |
Â
|
7718 |
-
|
7719 |
-
|
7720 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7721 |
Â
|
7722 |
-
// Support: IE <=11 only
|
7723 |
-
// Must access selectedIndex to make default options select
|
7724 |
-
support.optSelected = opt.selected;
|
7725 |
Â
|
7726 |
-
|
7727 |
-
|
7728 |
-
input = document.createElement( "input" );
|
7729 |
-
input.value = "t";
|
7730 |
-
input.type = "radio";
|
7731 |
-
support.radioValue = input.value === "t";
|
7732 |
-
} )();
|
7733 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7734 |
Â
|
7735 |
-
|
7736 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7737 |
Â
|
7738 |
-
|
7739 |
-
|
7740 |
-
|
7741 |
-
|
7742 |
Â
|
7743 |
-
|
7744 |
-
|
7745 |
-
|
7746 |
-
} );
|
7747 |
Â
}
|
7748 |
-
} );
|
7749 |
Â
|
7750 |
-
|
7751 |
-
|
7752 |
-
|
7753 |
-
|
7754 |
Â
|
7755 |
-
|
7756 |
-
|
7757 |
-
|
7758 |
-
|
Â
|
|
Â
|
|
7759 |
Â
|
7760 |
-
|
7761 |
-
if (
|
7762 |
-
|
Â
|
|
7763 |
Â
}
|
7764 |
Â
|
7765 |
-
|
7766 |
-
|
7767 |
-
|
7768 |
-
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
7769 |
-
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
7770 |
Â
}
|
7771 |
Â
|
7772 |
-
|
7773 |
-
|
7774 |
-
|
7775 |
-
return;
|
7776 |
-
}
|
7777 |
-
|
7778 |
-
if ( hooks && "set" in hooks &&
|
7779 |
-
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7780 |
-
return ret;
|
7781 |
-
}
|
7782 |
-
|
7783 |
-
elem.setAttribute( name, value + "" );
|
7784 |
-
return value;
|
7785 |
-
}
|
7786 |
Â
|
7787 |
-
|
7788 |
-
|
7789 |
-
|
7790 |
Â
|
7791 |
-
|
7792 |
Â
|
7793 |
-
|
7794 |
-
|
7795 |
-
|
7796 |
Â
|
7797 |
-
|
7798 |
-
|
7799 |
-
|
7800 |
-
|
7801 |
-
|
7802 |
-
|
7803 |
-
|
7804 |
-
|
7805 |
-
|
7806 |
-
}
|
7807 |
-
return value;
|
7808 |
Â
}
|
Â
|
|
7809 |
Â
}
|
7810 |
Â
}
|
7811 |
-
}
|
Â
|
|
7812 |
Â
|
7813 |
-
|
7814 |
-
|
7815 |
-
|
7816 |
Â
|
7817 |
-
|
7818 |
-
|
7819 |
-
|
7820 |
Â
|
7821 |
-
|
7822 |
-
|
7823 |
-
|
7824 |
-
}
|
7825 |
Â
}
|
7826 |
Â
}
|
7827 |
-
}
|
Â
|
|
7828 |
Â
|
7829 |
-
|
7830 |
-
|
7831 |
-
|
7832 |
-
|
7833 |
Â
|
7834 |
-
|
7835 |
-
|
7836 |
-
|
7837 |
-
|
7838 |
-
}
|
7839 |
-
return name;
|
7840 |
Â
}
|
7841 |
-
|
7842 |
-
|
7843 |
-
|
7844 |
-
var getter = attrHandle[ name ] || jQuery.find.attr;
|
7845 |
-
|
7846 |
-
attrHandle[ name ] = function( elem, name, isXML ) {
|
7847 |
-
var ret, handle,
|
7848 |
-
lowercaseName = name.toLowerCase();
|
7849 |
Â
|
7850 |
-
|
Â
|
|
7851 |
Â
|
7852 |
-
|
7853 |
-
|
7854 |
-
|
7855 |
-
ret = getter( elem, name, isXML ) != null ?
|
7856 |
-
lowercaseName :
|
7857 |
-
null;
|
7858 |
-
attrHandle[ lowercaseName ] = handle;
|
7859 |
-
}
|
7860 |
-
return ret;
|
7861 |
-
};
|
7862 |
-
} );
|
7863 |
Â
|
Â
|
|
7864 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7865 |
Â
|
7866 |
Â
|
7867 |
-
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
7868 |
-
rclickable = /^(?:a|area)$/i;
|
7869 |
Â
|
7870 |
-
jQuery.fn.extend( {
|
7871 |
-
prop: function( name, value ) {
|
7872 |
-
return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
7873 |
-
},
|
7874 |
Â
|
7875 |
-
|
7876 |
-
|
7877 |
-
delete this[ jQuery.propFix[ name ] || name ];
|
7878 |
-
} );
|
7879 |
-
}
|
7880 |
-
} );
|
7881 |
Â
|
7882 |
-
|
7883 |
-
|
7884 |
-
|
7885 |
-
|
7886 |
Â
|
7887 |
-
|
7888 |
-
|
7889 |
-
|
7890 |
-
|
Â
|
|
Â
|
|
7891 |
Â
|
7892 |
-
|
Â
|
|
Â
|
|
Â
|
|
7893 |
Â
|
7894 |
-
|
7895 |
-
|
7896 |
-
|
7897 |
-
|
7898 |
Â
|
7899 |
-
|
7900 |
-
if ( hooks && "set" in hooks &&
|
7901 |
-
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7902 |
-
return ret;
|
7903 |
-
}
|
7904 |
Â
|
7905 |
-
|
7906 |
-
|
Â
|
|
Â
|
|
7907 |
Â
|
7908 |
-
|
Â
|
|
Â
|
|
7909 |
Â
return ret;
|
7910 |
Â
}
|
7911 |
Â
|
7912 |
-
return elem[ name ];
|
7913 |
-
}
|
7914 |
Â
|
7915 |
-
|
7916 |
-
|
7917 |
-
|
7918 |
Â
|
7919 |
-
|
7920 |
-
|
7921 |
-
// correct value when it hasn't been explicitly set
|
7922 |
-
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
7923 |
-
// Use proper attribute retrieval(#12072)
|
7924 |
-
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
7925 |
Â
|
7926 |
-
|
7927 |
-
|
7928 |
-
|
7929 |
Â
|
7930 |
-
|
7931 |
-
|
7932 |
-
|
7933 |
-
|
7934 |
-
|
7935 |
-
|
7936 |
-
}
|
7937 |
Â
|
7938 |
-
|
Â
|
|
7939 |
Â
}
|
7940 |
-
}
|
7941 |
-
},
|
7942 |
Â
|
7943 |
-
|
7944 |
-
|
7945 |
-
|
7946 |
-
|
7947 |
-
|
Â
|
|
Â
|
|
7948 |
Â
|
7949 |
-
|
7950 |
-
|
7951 |
-
|
7952 |
-
|
7953 |
-
// The getter ensures a default option is selected
|
7954 |
-
// when in an optgroup
|
7955 |
-
// eslint rule "no-unused-expressions" is disabled for this code
|
7956 |
-
// since it considers such accessions noop
|
7957 |
-
if ( !support.optSelected ) {
|
7958 |
-
jQuery.propHooks.selected = {
|
7959 |
-
get: function( elem ) {
|
7960 |
Â
|
7961 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7962 |
Â
|
7963 |
-
|
7964 |
-
|
7965 |
-
|
7966 |
-
|
7967 |
-
|
7968 |
-
|
7969 |
-
|
7970 |
Â
|
7971 |
-
|
7972 |
Â
|
7973 |
-
|
7974 |
-
|
7975 |
-
|
7976 |
Â
|
7977 |
-
|
7978 |
-
|
7979 |
-
}
|
7980 |
Â
}
|
7981 |
Â
}
|
7982 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7983 |
Â
}
|
7984 |
Â
|
7985 |
-
jQuery.each( [
|
7986 |
-
"tabIndex",
|
7987 |
-
"readOnly",
|
7988 |
-
"maxLength",
|
7989 |
-
"cellSpacing",
|
7990 |
-
"cellPadding",
|
7991 |
-
"rowSpan",
|
7992 |
-
"colSpan",
|
7993 |
-
"useMap",
|
7994 |
-
"frameBorder",
|
7995 |
-
"contentEditable"
|
7996 |
-
], function() {
|
7997 |
-
jQuery.propFix[ this.toLowerCase() ] = this;
|
7998 |
-
} );
|
7999 |
-
|
8000 |
-
|
8001 |
Â
|
Â
|
|
Â
|
|
Â
|
|
8002 |
Â
|
8003 |
-
|
8004 |
-
|
8005 |
-
|
8006 |
-
var tokens = value.match( rnothtmlwhite ) || [];
|
8007 |
-
return tokens.join( " " );
|
8008 |
-
}
|
8009 |
-
|
8010 |
-
|
8011 |
-
function getClass( elem ) {
|
8012 |
-
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
8013 |
Â
}
|
8014 |
-
|
8015 |
-
|
8016 |
-
if ( Array.isArray( value ) ) {
|
8017 |
-
return value;
|
8018 |
-
}
|
8019 |
-
if ( typeof value === "string" ) {
|
8020 |
-
return value.match( rnothtmlwhite ) || [];
|
8021 |
-
}
|
8022 |
-
return [];
|
8023 |
Â
}
|
Â
|
|
Â
|
|
8024 |
Â
|
8025 |
-
|
8026 |
-
|
8027 |
-
|
8028 |
-
|
8029 |
Â
|
8030 |
-
|
8031 |
-
|
8032 |
-
|
8033 |
-
|
8034 |
-
|
8035 |
Â
|
8036 |
-
|
8037 |
Â
|
8038 |
-
|
8039 |
-
|
8040 |
-
|
8041 |
-
|
8042 |
Â
|
8043 |
-
|
8044 |
-
|
8045 |
-
|
8046 |
-
|
8047 |
-
|
8048 |
-
}
|
8049 |
Â
}
|
Â
|
|
8050 |
Â
|
8051 |
-
|
8052 |
-
|
8053 |
-
|
8054 |
-
|
8055 |
-
}
|
8056 |
Â
}
|
8057 |
Â
}
|
8058 |
Â
}
|
Â
|
|
8059 |
Â
|
8060 |
-
|
8061 |
-
|
8062 |
Â
|
8063 |
-
|
8064 |
-
|
8065 |
-
|
8066 |
Â
|
8067 |
-
|
8068 |
-
|
8069 |
-
|
8070 |
-
|
8071 |
-
|
8072 |
Â
|
8073 |
-
|
8074 |
-
|
8075 |
-
|
8076 |
Â
|
8077 |
-
|
8078 |
Â
|
8079 |
-
|
8080 |
-
|
8081 |
-
|
8082 |
Â
|
8083 |
-
|
8084 |
-
|
8085 |
Â
|
8086 |
-
|
8087 |
-
|
8088 |
-
|
8089 |
Â
|
8090 |
-
|
8091 |
-
|
8092 |
-
|
8093 |
-
}
|
8094 |
Â
}
|
Â
|
|
8095 |
Â
|
8096 |
-
|
8097 |
-
|
8098 |
-
|
8099 |
-
|
8100 |
-
}
|
8101 |
Â
}
|
8102 |
Â
}
|
8103 |
Â
}
|
Â
|
|
8104 |
Â
|
8105 |
-
|
8106 |
-
|
8107 |
Â
|
8108 |
-
|
8109 |
-
|
8110 |
-
|
8111 |
Â
|
8112 |
-
|
8113 |
-
|
8114 |
-
|
8115 |
Â
|
8116 |
-
|
8117 |
-
|
8118 |
-
|
8119 |
-
|
8120 |
-
|
8121 |
-
|
8122 |
-
|
8123 |
-
|
8124 |
Â
|
8125 |
-
|
8126 |
-
|
8127 |
Â
|
8128 |
-
|
8129 |
Â
|
8130 |
-
|
8131 |
-
|
8132 |
-
|
8133 |
-
|
8134 |
Â
|
8135 |
-
|
8136 |
Â
|
8137 |
-
|
8138 |
-
|
8139 |
-
|
8140 |
-
|
8141 |
-
|
8142 |
-
}
|
8143 |
Â
}
|
Â
|
|
8144 |
Â
|
8145 |
-
|
8146 |
-
|
8147 |
-
|
8148 |
-
|
8149 |
-
|
8150 |
-
// Store className if set
|
8151 |
-
dataPriv.set( this, "__className__", className );
|
8152 |
-
}
|
8153 |
Â
|
8154 |
-
//
|
8155 |
-
|
8156 |
-
// Otherwise bring back whatever was previously saved (if anything),
|
8157 |
-
// falling back to the empty string if nothing was stored.
|
8158 |
-
if ( this.setAttribute ) {
|
8159 |
-
this.setAttribute( "class",
|
8160 |
-
className || value === false ?
|
8161 |
-
"" :
|
8162 |
-
dataPriv.get( this, "__className__" ) || ""
|
8163 |
-
);
|
8164 |
-
}
|
8165 |
Â
}
|
8166 |
-
} );
|
8167 |
-
},
|
8168 |
-
|
8169 |
-
hasClass: function( selector ) {
|
8170 |
-
var className, elem,
|
8171 |
-
i = 0;
|
8172 |
Â
|
8173 |
-
|
8174 |
-
|
8175 |
-
|
8176 |
-
|
8177 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8178 |
Â
}
|
8179 |
Â
}
|
Â
|
|
Â
|
|
8180 |
Â
|
8181 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8182 |
Â
}
|
8183 |
-
} );
|
8184 |
Â
|
Â
|
|
Â
|
|
Â
|
|
8185 |
Â
|
8186 |
Â
|
8187 |
Â
|
8188 |
-
var rreturn = /\r/g;
|
8189 |
Â
|
8190 |
-
|
8191 |
-
val: function( value ) {
|
8192 |
-
var hooks, ret, valueIsFunction,
|
8193 |
-
elem = this[ 0 ];
|
8194 |
Â
|
8195 |
-
|
8196 |
-
|
8197 |
-
|
8198 |
-
|
8199 |
Â
|
8200 |
-
|
8201 |
-
|
8202 |
-
|
8203 |
-
)
|
8204 |
-
return ret;
|
8205 |
-
}
|
8206 |
Â
|
8207 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8208 |
Â
|
8209 |
-
|
8210 |
-
if ( typeof ret === "string" ) {
|
8211 |
-
return ret.replace( rreturn, "" );
|
8212 |
-
}
|
8213 |
Â
|
8214 |
-
|
8215 |
-
|
Â
|
|
8216 |
Â
}
|
8217 |
Â
|
8218 |
-
|
Â
|
|
8219 |
Â
}
|
8220 |
Â
|
8221 |
-
|
Â
|
|
8222 |
Â
|
8223 |
-
|
8224 |
-
var val;
|
8225 |
Â
|
8226 |
-
|
8227 |
-
|
8228 |
-
}
|
8229 |
Â
|
8230 |
-
|
8231 |
-
|
8232 |
-
|
8233 |
-
val = value;
|
8234 |
-
}
|
8235 |
Â
|
8236 |
-
|
8237 |
-
|
8238 |
-
|
Â
|
|
Â
|
|
8239 |
Â
|
8240 |
-
|
8241 |
-
|
Â
|
|
8242 |
Â
|
8243 |
-
|
8244 |
-
|
8245 |
-
return value == null ? "" : value + "";
|
8246 |
-
} );
|
8247 |
-
}
|
8248 |
Â
|
8249 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8250 |
Â
|
8251 |
-
|
8252 |
-
if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
8253 |
-
this.value = val;
|
8254 |
-
}
|
8255 |
-
} );
|
8256 |
-
}
|
8257 |
-
} );
|
8258 |
Â
|
8259 |
-
|
8260 |
-
|
8261 |
-
|
8262 |
-
|
Â
|
|
Â
|
|
Â
|
|
8263 |
Â
|
8264 |
-
|
8265 |
-
|
8266 |
-
|
Â
|
|
8267 |
Â
|
8268 |
-
|
8269 |
-
|
8270 |
-
|
8271 |
-
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
8272 |
-
stripAndCollapse( jQuery.text( elem ) );
|
8273 |
-
}
|
8274 |
-
},
|
8275 |
-
select: {
|
8276 |
-
get: function( elem ) {
|
8277 |
-
var value, option, i,
|
8278 |
-
options = elem.options,
|
8279 |
-
index = elem.selectedIndex,
|
8280 |
-
one = elem.type === "select-one",
|
8281 |
-
values = one ? null : [],
|
8282 |
-
max = one ? index + 1 : options.length;
|
8283 |
-
|
8284 |
-
if ( index < 0 ) {
|
8285 |
-
i = max;
|
8286 |
Â
|
8287 |
-
|
8288 |
-
|
8289 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8290 |
Â
|
8291 |
-
|
8292 |
-
|
8293 |
-
|
Â
|
|
Â
|
|
Â
|
|
8294 |
Â
|
8295 |
-
|
8296 |
-
|
8297 |
-
|
8298 |
Â
|
8299 |
-
|
8300 |
-
|
8301 |
-
|
8302 |
-
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
8303 |
Â
|
8304 |
-
//
|
8305 |
-
|
Â
|
|
Â
|
|
8306 |
Â
|
8307 |
-
|
8308 |
-
|
8309 |
-
return value;
|
8310 |
-
}
|
8311 |
Â
|
8312 |
-
|
8313 |
-
|
Â
|
|
8314 |
Â
}
|
8315 |
-
}
|
8316 |
Â
|
8317 |
-
|
8318 |
-
|
Â
|
|
Â
|
|
8319 |
Â
|
8320 |
-
|
8321 |
-
|
8322 |
-
options = elem.options,
|
8323 |
-
values = jQuery.makeArray( value ),
|
8324 |
-
i = options.length;
|
8325 |
Â
|
8326 |
-
|
8327 |
-
|
Â
|
|
Â
|
|
Â
|
|
8328 |
Â
|
8329 |
-
|
Â
|
|
8330 |
Â
|
8331 |
-
|
8332 |
-
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
8333 |
-
) {
|
8334 |
-
optionSet = true;
|
8335 |
-
}
|
8336 |
Â
|
8337 |
-
|
Â
|
|
Â
|
|
Â
|
|
8338 |
Â
}
|
8339 |
Â
|
8340 |
-
|
8341 |
-
|
8342 |
-
|
8343 |
-
|
8344 |
-
|
Â
|
|
8345 |
Â
}
|
Â
|
|
8346 |
Â
}
|
8347 |
Â
}
|
8348 |
-
}
|
Â
|
|
8349 |
Â
|
8350 |
-
|
8351 |
-
|
8352 |
-
|
8353 |
-
|
8354 |
-
|
8355 |
-
|
8356 |
-
}
|
8357 |
Â
}
|
8358 |
-
};
|
8359 |
-
if ( !support.checkOn ) {
|
8360 |
-
jQuery.valHooks[ this ].get = function( elem ) {
|
8361 |
-
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
8362 |
-
};
|
8363 |
Â
}
|
8364 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8365 |
Â
|
8366 |
Â
|
8367 |
Â
|
8368 |
Â
|
8369 |
-
|
8370 |
Â
|
8371 |
Â
|
8372 |
-
|
8373 |
Â
|
8374 |
Â
|
8375 |
-
|
8376 |
-
|
8377 |
-
|
8378 |
-
|
8379 |
Â
|
8380 |
-
|
8381 |
Â
|
8382 |
-
|
8383 |
Â
|
8384 |
-
|
8385 |
-
|
8386 |
-
|
8387 |
-
|
8388 |
Â
|
8389 |
-
|
8390 |
Â
|
8391 |
-
|
8392 |
-
|
8393 |
-
|
8394 |
-
|
8395 |
Â
|
8396 |
-
|
8397 |
-
|
8398 |
-
|
8399 |
-
|
8400 |
Â
|
8401 |
-
|
8402 |
Â
|
8403 |
-
|
8404 |
-
|
8405 |
-
|
8406 |
-
|
8407 |
-
|
8408 |
-
|
8409 |
Â
|
8410 |
-
|
8411 |
-
|
8412 |
-
|
8413 |
-
|
8414 |
Â
|
8415 |
-
|
8416 |
-
|
8417 |
-
|
8418 |
-
|
8419 |
-
|
8420 |
-
|
8421 |
Â
|
8422 |
-
|
8423 |
-
|
8424 |
-
|
8425 |
-
|
8426 |
-
|
8427 |
Â
|
8428 |
-
|
8429 |
-
|
8430 |
-
|
8431 |
-
|
8432 |
Â
|
8433 |
-
|
8434 |
-
|
8435 |
-
|
8436 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8437 |
Â
}
|
8438 |
Â
|
8439 |
-
//
|
8440 |
-
|
8441 |
-
|
Â
|
|
Â
|
|
8442 |
Â
|
8443 |
-
|
8444 |
-
|
8445 |
-
|
8446 |
-
|
8447 |
-
|
8448 |
-
|
8449 |
-
|
8450 |
-
}
|
8451 |
Â
|
8452 |
-
|
8453 |
-
|
8454 |
-
|
8455 |
-
|
Â
|
|
8456 |
Â
}
|
8457 |
Â
|
8458 |
-
//
|
8459 |
-
|
8460 |
-
|
8461 |
-
|
8462 |
-
event.
|
8463 |
-
|
8464 |
-
special.bindType || type;
|
8465 |
-
|
8466 |
-
// jQuery handler
|
8467 |
-
handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
|
8468 |
-
dataPriv.get( cur, "handle" );
|
8469 |
-
if ( handle ) {
|
8470 |
-
handle.apply( cur, data );
|
8471 |
-
}
|
8472 |
-
|
8473 |
-
// Native handler
|
8474 |
-
handle = ontype && cur[ ontype ];
|
8475 |
-
if ( handle && handle.apply && acceptData( cur ) ) {
|
8476 |
-
event.result = handle.apply( cur, data );
|
8477 |
-
if ( event.result === false ) {
|
8478 |
-
event.preventDefault();
|
8479 |
-
}
|
8480 |
Â
}
|
8481 |
Â
}
|
8482 |
-
|
Â
|
|
8483 |
Â
|
8484 |
-
|
8485 |
-
|
8486 |
Â
|
8487 |
-
|
8488 |
-
|
8489 |
-
|
8490 |
Â
|
8491 |
-
|
8492 |
-
|
8493 |
-
|
8494 |
Â
|
8495 |
-
|
8496 |
-
|
8497 |
Â
|
8498 |
-
|
8499 |
-
|
8500 |
-
|
8501 |
Â
|
8502 |
-
|
8503 |
-
|
8504 |
Â
|
8505 |
-
|
8506 |
-
|
8507 |
-
|
8508 |
Â
|
8509 |
-
|
8510 |
Â
|
8511 |
-
|
8512 |
-
|
8513 |
-
|
8514 |
Â
|
8515 |
-
|
8516 |
Â
|
8517 |
-
|
8518 |
-
|
8519 |
-
}
|
8520 |
Â
}
|
8521 |
Â
}
|
8522 |
Â
}
|
8523 |
-
|
8524 |
-
return event.result;
|
8525 |
-
},
|
8526 |
-
|
8527 |
-
// Piggyback on a donor event to simulate a different one
|
8528 |
-
// Used only for `focus(in | out)` events
|
8529 |
-
simulate: function( type, elem, event ) {
|
8530 |
-
var e = jQuery.extend(
|
8531 |
-
new jQuery.Event(),
|
8532 |
-
event,
|
8533 |
-
{
|
8534 |
-
type: type,
|
8535 |
-
isSimulated: true
|
8536 |
-
}
|
8537 |
-
);
|
8538 |
-
|
8539 |
-
jQuery.event.trigger( e, null, elem );
|
8540 |
Â
}
|
8541 |
Â
|
8542 |
-
|
8543 |
-
|
8544 |
-
jQuery.fn.extend( {
|
8545 |
Â
|
8546 |
-
|
8547 |
-
|
8548 |
-
|
8549 |
-
|
8550 |
-
|
8551 |
-
|
8552 |
-
|
8553 |
-
|
8554 |
-
|
8555 |
Â
}
|
8556 |
-
|
8557 |
-
} );
|
8558 |
-
|
8559 |
-
|
8560 |
-
// Support: Firefox <=44
|
8561 |
-
// Firefox doesn't have focus(in | out) events
|
8562 |
-
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
8563 |
-
//
|
8564 |
-
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
8565 |
-
// focus(in | out) events fire after focus & blur events,
|
8566 |
-
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
8567 |
-
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
8568 |
-
if ( !support.focusin ) {
|
8569 |
-
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
8570 |
-
|
8571 |
-
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
8572 |
-
var handler = function( event ) {
|
8573 |
-
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
8574 |
-
};
|
8575 |
-
|
8576 |
-
jQuery.event.special[ fix ] = {
|
8577 |
-
setup: function() {
|
8578 |
-
var doc = this.ownerDocument || this,
|
8579 |
-
attaches = dataPriv.access( doc, fix );
|
8580 |
-
|
8581 |
-
if ( !attaches ) {
|
8582 |
-
doc.addEventListener( orig, handler, true );
|
8583 |
-
}
|
8584 |
-
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
8585 |
-
},
|
8586 |
-
teardown: function() {
|
8587 |
-
var doc = this.ownerDocument || this,
|
8588 |
-
attaches = dataPriv.access( doc, fix ) - 1;
|
8589 |
-
|
8590 |
-
if ( !attaches ) {
|
8591 |
-
doc.removeEventListener( orig, handler, true );
|
8592 |
-
dataPriv.remove( doc, fix );
|
8593 |
Â
|
8594 |
-
|
8595 |
-
dataPriv.access( doc, fix, attaches );
|
8596 |
-
}
|
8597 |
-
}
|
8598 |
-
};
|
8599 |
-
} );
|
8600 |
Â
}
|
8601 |
-
var location = window.location;
|
8602 |
-
|
8603 |
-
var nonce = Date.now();
|
8604 |
Â
|
8605 |
-
|
8606 |
Â
|
Â
|
|
8607 |
Â
|
8608 |
-
|
8609 |
-
|
8610 |
-
|
8611 |
-
|
8612 |
-
|
8613 |
-
|
Â
|
|
Â
|
|
Â
|
|
8614 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8615 |
Â
|
8616 |
-
|
8617 |
-
|
8618 |
-
|
8619 |
-
|
8620 |
-
} catch ( e ) {
|
8621 |
-
xml = undefined;
|
8622 |
-
}
|
8623 |
Â
|
8624 |
-
|
8625 |
-
|
8626 |
-
|
8627 |
-
|
8628 |
-
|
Â
|
|
Â
|
|
Â
|
|
8629 |
Â
|
Â
|
|
Â
|
|
Â
|
|
8630 |
Â
|
8631 |
-
|
8632 |
-
|
8633 |
-
|
8634 |
-
|
8635 |
-
|
Â
|
|
Â
|
|
Â
|
|
8636 |
Â
|
8637 |
-
|
8638 |
-
var name;
|
8639 |
Â
|
8640 |
-
|
8641 |
Â
|
8642 |
-
// Serialize array item.
|
8643 |
-
jQuery.each( obj, function( i, v ) {
|
8644 |
-
if ( traditional || rbracket.test( prefix ) ) {
|
8645 |
Â
|
8646 |
-
// Treat each array item as a scalar.
|
8647 |
-
add( prefix, v );
|
8648 |
Â
|
8649 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8650 |
Â
|
8651 |
-
|
8652 |
-
|
8653 |
-
|
8654 |
-
|
8655 |
-
|
8656 |
-
|
8657 |
-
|
8658 |
-
}
|
8659 |
-
} );
|
8660 |
Â
|
8661 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8662 |
Â
|
8663 |
-
// Serialize object item.
|
8664 |
-
for ( name in obj ) {
|
8665 |
-
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
8666 |
-
}
|
8667 |
Â
|
8668 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8669 |
Â
|
8670 |
-
|
8671 |
-
|
8672 |
-
}
|
8673 |
-
}
|
8674 |
Â
|
8675 |
-
|
8676 |
-
// key/values into a query string
|
8677 |
-
jQuery.param = function( a, traditional ) {
|
8678 |
-
var prefix,
|
8679 |
-
s = [],
|
8680 |
-
add = function( key, valueOrFunction ) {
|
8681 |
Â
|
8682 |
-
|
8683 |
-
|
8684 |
-
|
8685 |
-
valueOrFunction;
|
8686 |
Â
|
8687 |
-
|
8688 |
-
|
8689 |
-
};
|
8690 |
Â
|
8691 |
-
|
8692 |
-
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
8693 |
Â
|
8694 |
-
|
8695 |
-
|
8696 |
-
|
8697 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8698 |
Â
|
8699 |
-
|
8700 |
Â
|
8701 |
-
|
8702 |
-
|
8703 |
-
|
8704 |
-
buildParams( prefix, a[ prefix ], traditional, add );
|
8705 |
-
}
|
8706 |
Â
}
|
8707 |
Â
|
8708 |
-
|
8709 |
-
return s.join( "&" );
|
8710 |
-
};
|
8711 |
-
|
8712 |
-
jQuery.fn.extend( {
|
8713 |
-
serialize: function() {
|
8714 |
-
return jQuery.param( this.serializeArray() );
|
8715 |
-
},
|
8716 |
-
serializeArray: function() {
|
8717 |
-
return this.map( function() {
|
8718 |
Â
|
8719 |
-
|
8720 |
-
|
8721 |
-
|
8722 |
-
|
8723 |
-
|
8724 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8725 |
Â
|
8726 |
-
|
8727 |
-
|
8728 |
-
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
8729 |
-
( this.checked || !rcheckableType.test( type ) );
|
8730 |
-
} )
|
8731 |
-
.map( function( i, elem ) {
|
8732 |
-
var val = jQuery( this ).val();
|
8733 |
Â
|
8734 |
-
|
8735 |
-
|
8736 |
-
|
Â
|
|
8737 |
Â
|
8738 |
-
|
8739 |
-
return jQuery.map( val, function( val ) {
|
8740 |
-
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8741 |
-
} );
|
8742 |
-
}
|
8743 |
Â
|
8744 |
-
|
8745 |
-
|
Â
|
|
Â
|
|
8746 |
Â
}
|
8747 |
-
}
|
8748 |
-
|
8749 |
Â
|
8750 |
-
|
8751 |
-
|
8752 |
-
|
8753 |
-
|
8754 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8755 |
Â
|
8756 |
-
|
8757 |
-
|
8758 |
-
|
8759 |
-
|
Â
|
|
8760 |
Â
|
8761 |
-
|
8762 |
-
|
8763 |
-
|
8764 |
-
|
8765 |
-
|
8766 |
-
|
8767 |
-
|
8768 |
-
|
8769 |
-
|
8770 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8771 |
Â
|
8772 |
-
|
8773 |
-
|
8774 |
-
|
8775 |
-
|
8776 |
-
|
8777 |
-
|
8778 |
Â
|
8779 |
-
|
8780 |
-
|
8781 |
Â
|
8782 |
-
|
8783 |
-
|
8784 |
-
|
8785 |
Â
|
8786 |
-
|
8787 |
-
|
8788 |
Â
|
8789 |
-
|
8790 |
-
|
8791 |
Â
|
8792 |
-
|
8793 |
-
|
8794 |
-
|
8795 |
-
|
8796 |
Â
|
8797 |
-
|
8798 |
-
|
8799 |
-
|
8800 |
Â
|
8801 |
-
|
8802 |
Â
|
8803 |
-
|
8804 |
-
|
8805 |
Â
|
8806 |
-
|
8807 |
-
|
8808 |
-
|
8809 |
-
|
8810 |
Â
|
8811 |
-
|
8812 |
-
|
8813 |
-
|
8814 |
-
}
|
8815 |
Â
}
|
8816 |
Â
}
|
8817 |
-
}
|
8818 |
-
}
|
8819 |
-
|
8820 |
-
// Base inspection function for prefilters and transports
|
8821 |
-
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
8822 |
Â
|
8823 |
-
|
8824 |
-
|
8825 |
Â
|
8826 |
-
|
8827 |
-
|
8828 |
-
inspected[ dataType ] = true;
|
8829 |
-
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
8830 |
-
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
8831 |
-
if ( typeof dataTypeOrTransport === "string" &&
|
8832 |
-
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
8833 |
Â
|
8834 |
-
|
8835 |
-
|
8836 |
-
|
8837 |
-
|
8838 |
-
|
8839 |
-
|
8840 |
-
|
8841 |
-
return selected;
|
8842 |
-
}
|
8843 |
Â
|
8844 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8845 |
Â
}
|
8846 |
Â
|
8847 |
-
|
8848 |
-
|
8849 |
-
// Fixes #9887
|
8850 |
-
function ajaxExtend( target, src ) {
|
8851 |
-
var key, deep,
|
8852 |
-
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
8853 |
Â
|
8854 |
-
|
8855 |
-
|
8856 |
-
|
8857 |
-
|
8858 |
-
|
8859 |
-
|
8860 |
-
jQuery.extend( true, target, deep );
|
8861 |
-
}
|
8862 |
Â
|
8863 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8864 |
Â
}
|
8865 |
Â
|
8866 |
-
|
8867 |
-
|
8868 |
-
* - returns the corresponding response
|
8869 |
-
*/
|
8870 |
-
function ajaxHandleResponses( s, jqXHR, responses ) {
|
8871 |
Â
|
8872 |
-
|
8873 |
-
|
8874 |
-
|
Â
|
|
Â
|
|
8875 |
Â
|
8876 |
-
|
8877 |
-
|
8878 |
-
|
8879 |
-
|
8880 |
-
|
8881 |
-
|
Â
|
|
Â
|
|
Â
|
|
8882 |
Â
}
|
Â
|
|
8883 |
Â
|
8884 |
-
|
8885 |
-
|
8886 |
-
|
8887 |
-
|
8888 |
-
|
8889 |
-
|
8890 |
-
}
|
8891 |
Â
}
|
8892 |
Â
}
|
Â
|
|
8893 |
Â
|
8894 |
-
|
8895 |
-
|
8896 |
-
|
8897 |
-
|
8898 |
Â
|
8899 |
-
|
8900 |
-
|
8901 |
-
|
8902 |
-
|
8903 |
-
|
8904 |
-
|
8905 |
-
|
8906 |
-
|
8907 |
-
}
|
8908 |
Â
}
|
8909 |
-
|
8910 |
-
// Or just use first one
|
8911 |
-
finalDataType = finalDataType || firstDataType;
|
8912 |
Â
}
|
8913 |
Â
|
8914 |
-
//
|
8915 |
-
|
8916 |
-
|
8917 |
-
|
8918 |
-
|
8919 |
-
|
8920 |
-
|
8921 |
-
|
Â
|
|
Â
|
|
8922 |
Â
}
|
Â
|
|
8923 |
Â
}
|
Â
|
|
8924 |
Â
|
8925 |
-
|
8926 |
-
|
8927 |
-
|
8928 |
-
|
8929 |
-
|
8930 |
-
|
8931 |
Â
|
8932 |
-
|
8933 |
-
|
8934 |
Â
|
8935 |
-
|
8936 |
-
|
8937 |
-
|
8938 |
-
|
8939 |
-
}
|
8940 |
Â
}
|
Â
|
|
8941 |
Â
|
8942 |
-
|
8943 |
Â
|
8944 |
-
|
8945 |
-
|
8946 |
Â
|
8947 |
-
|
8948 |
-
|
8949 |
-
|
8950 |
Â
|
8951 |
-
|
8952 |
-
|
8953 |
-
|
8954 |
-
|
8955 |
Â
|
8956 |
-
|
8957 |
-
|
8958 |
Â
|
8959 |
-
|
8960 |
Â
|
8961 |
-
|
8962 |
-
|
8963 |
Â
|
8964 |
-
|
8965 |
Â
|
8966 |
-
|
8967 |
-
|
8968 |
Â
|
8969 |
-
|
8970 |
-
|
8971 |
Â
|
8972 |
-
|
8973 |
-
|
8974 |
-
|
8975 |
Â
|
8976 |
-
|
8977 |
-
|
8978 |
-
|
8979 |
Â
|
8980 |
-
|
8981 |
-
|
8982 |
-
|
8983 |
-
|
8984 |
Â
|
8985 |
-
|
8986 |
-
|
8987 |
-
|
8988 |
Â
|
8989 |
-
|
8990 |
-
|
8991 |
-
|
8992 |
-
|
8993 |
-
}
|
8994 |
-
break;
|
8995 |
Â
}
|
Â
|
|
8996 |
Â
}
|
8997 |
Â
}
|
8998 |
Â
}
|
Â
|
|
8999 |
Â
|
9000 |
-
|
9001 |
-
|
9002 |
Â
|
9003 |
-
|
9004 |
-
|
Â
|
|
Â
|
|
Â
|
|
9005 |
Â
response = conv( response );
|
9006 |
-
}
|
9007 |
-
|
9008 |
-
|
9009 |
-
|
9010 |
-
|
9011 |
-
state: "parsererror",
|
9012 |
-
error: conv ? e : "No conversion from " + prev + " to " + current
|
9013 |
-
};
|
9014 |
-
}
|
9015 |
Â
}
|
9016 |
Â
}
|
9017 |
Â
}
|
9018 |
Â
}
|
9019 |
Â
}
|
9020 |
-
|
9021 |
-
return { state: "success", data: response };
|
9022 |
Â
}
|
9023 |
Â
|
9024 |
-
|
9025 |
-
|
9026 |
-
|
9027 |
-
|
9028 |
-
|
9029 |
-
|
9030 |
-
|
9031 |
-
|
9032 |
-
|
9033 |
-
|
9034 |
-
|
9035 |
-
|
9036 |
-
|
9037 |
-
|
9038 |
-
|
9039 |
-
|
9040 |
-
|
9041 |
-
|
9042 |
-
|
9043 |
-
|
9044 |
-
|
9045 |
-
|
9046 |
-
|
9047 |
-
|
9048 |
-
|
9049 |
-
|
9050 |
-
|
9051 |
-
|
9052 |
-
|
9053 |
-
|
9054 |
-
|
9055 |
-
|
9056 |
-
text: "text/plain",
|
9057 |
-
html: "text/html",
|
9058 |
-
xml: "application/xml, text/xml",
|
9059 |
-
json: "application/json, text/javascript"
|
9060 |
-
},
|
9061 |
Â
|
9062 |
-
|
9063 |
-
|
9064 |
-
|
9065 |
-
|
9066 |
-
|
Â
|
|
Â
|
|
9067 |
Â
|
9068 |
-
|
9069 |
-
|
9070 |
-
|
9071 |
-
|
9072 |
-
|
9073 |
Â
|
9074 |
-
|
9075 |
-
|
9076 |
-
|
Â
|
|
Â
|
|
9077 |
Â
|
9078 |
-
|
9079 |
-
|
Â
|
|
9080 |
Â
|
9081 |
-
|
9082 |
-
|
9083 |
Â
|
9084 |
-
|
9085 |
-
|
9086 |
Â
|
9087 |
-
|
9088 |
-
|
9089 |
-
},
|
9090 |
Â
|
9091 |
-
//
|
9092 |
-
|
9093 |
-
// and when you create one that shouldn't be
|
9094 |
-
// deep extended (see ajaxExtend)
|
9095 |
-
flatOptions: {
|
9096 |
-
url: true,
|
9097 |
-
context: true
|
9098 |
-
}
|
9099 |
Â
},
|
9100 |
Â
|
9101 |
-
//
|
9102 |
-
//
|
9103 |
-
//
|
9104 |
-
|
9105 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9106 |
Â
|
9107 |
-
|
9108 |
-
|
Â
|
|
Â
|
|
Â
|
|
9109 |
Â
|
9110 |
-
|
9111 |
-
|
9112 |
-
},
|
9113 |
Â
|
9114 |
-
|
9115 |
-
|
Â
|
|
9116 |
Â
|
9117 |
-
|
9118 |
-
|
9119 |
Â
|
9120 |
-
|
9121 |
-
|
9122 |
-
options = url;
|
9123 |
-
url = undefined;
|
9124 |
-
}
|
9125 |
Â
|
9126 |
-
|
9127 |
-
|
Â
|
|
Â
|
|
Â
|
|
9128 |
Â
|
9129 |
-
|
Â
|
|
9130 |
Â
|
9131 |
-
|
9132 |
-
cacheURL,
|
9133 |
Â
|
9134 |
-
|
9135 |
-
|
9136 |
-
responseHeaders,
|
9137 |
Â
|
9138 |
-
|
9139 |
-
|
Â
|
|
9140 |
Â
|
9141 |
-
|
9142 |
-
|
9143 |
Â
|
9144 |
-
|
9145 |
-
|
9146 |
Â
|
9147 |
-
|
9148 |
-
|
9149 |
Â
|
9150 |
-
|
9151 |
-
|
9152 |
Â
|
9153 |
-
|
9154 |
-
|
9155 |
Â
|
9156 |
-
|
9157 |
-
|
9158 |
Â
|
9159 |
-
|
9160 |
-
|
9161 |
Â
|
9162 |
-
|
9163 |
-
|
9164 |
-
( callbackContext.nodeType || callbackContext.jquery ) ?
|
9165 |
-
jQuery( callbackContext ) :
|
9166 |
-
jQuery.event,
|
9167 |
Â
|
9168 |
-
|
9169 |
-
|
9170 |
-
|
Â
|
|
Â
|
|
9171 |
Â
|
9172 |
-
|
9173 |
-
|
Â
|
|
9174 |
Â
|
9175 |
-
|
9176 |
-
|
9177 |
-
requestHeadersNames = {},
|
9178 |
Â
|
9179 |
-
|
9180 |
-
|
Â
|
|
9181 |
Â
|
9182 |
-
|
9183 |
-
|
9184 |
-
readyState: 0,
|
9185 |
Â
|
9186 |
-
|
9187 |
-
|
9188 |
-
|
9189 |
-
|
9190 |
-
|
9191 |
-
|
9192 |
-
|
9193 |
-
|
9194 |
-
|
Â
|
|
Â
|
|
Â
|
|
9195 |
Â
}
|
9196 |
-
match = responseHeaders[ key.toLowerCase() ];
|
9197 |
Â
}
|
9198 |
-
|
9199 |
-
}
|
Â
|
|
Â
|
|
9200 |
Â
|
9201 |
-
|
9202 |
-
|
9203 |
-
|
9204 |
-
|
9205 |
Â
|
9206 |
-
|
9207 |
-
|
9208 |
-
|
9209 |
-
|
9210 |
-
|
9211 |
-
|
9212 |
-
|
9213 |
-
|
9214 |
-
|
9215 |
Â
|
9216 |
-
|
9217 |
-
|
9218 |
-
|
9219 |
-
|
9220 |
-
|
9221 |
-
|
9222 |
-
|
9223 |
Â
|
9224 |
-
|
9225 |
-
|
9226 |
-
|
9227 |
-
|
9228 |
-
|
9229 |
Â
|
9230 |
-
|
9231 |
-
|
9232 |
-
|
9233 |
Â
|
9234 |
-
|
9235 |
-
|
9236 |
-
|
9237 |
-
}
|
9238 |
Â
}
|
9239 |
Â
}
|
9240 |
-
return this;
|
9241 |
-
},
|
9242 |
-
|
9243 |
-
// Cancel the request
|
9244 |
-
abort: function( statusText ) {
|
9245 |
-
var finalText = statusText || strAbort;
|
9246 |
-
if ( transport ) {
|
9247 |
-
transport.abort( finalText );
|
9248 |
-
}
|
9249 |
-
done( 0, finalText );
|
9250 |
-
return this;
|
9251 |
Â
}
|
9252 |
-
|
9253 |
-
|
9254 |
-
// Attach deferreds
|
9255 |
-
deferred.promise( jqXHR );
|
9256 |
-
|
9257 |
-
// Add protocol if not provided (prefilters might expect it)
|
9258 |
-
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
9259 |
-
// We also use the url parameter if available
|
9260 |
-
s.url = ( ( url || s.url || location.href ) + "" )
|
9261 |
-
.replace( rprotocol, location.protocol + "//" );
|
9262 |
Â
|
9263 |
-
|
9264 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9265 |
Â
|
9266 |
-
|
9267 |
-
|
9268 |
Â
|
9269 |
-
|
9270 |
-
|
9271 |
-
|
Â
|
|
Â
|
|
9272 |
Â
|
9273 |
-
|
9274 |
-
|
9275 |
-
// e.g. http://example.com:80x/
|
9276 |
-
try {
|
9277 |
-
urlAnchor.href = s.url;
|
9278 |
Â
|
9279 |
-
|
9280 |
-
|
9281 |
-
urlAnchor.href = urlAnchor.href;
|
9282 |
-
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
9283 |
-
urlAnchor.protocol + "//" + urlAnchor.host;
|
9284 |
-
} catch ( e ) {
|
9285 |
Â
|
9286 |
-
|
9287 |
-
|
9288 |
-
|
9289 |
-
}
|
9290 |
-
}
|
9291 |
Â
|
9292 |
-
//
|
9293 |
-
|
9294 |
-
|
9295 |
-
|
Â
|
|
9296 |
Â
|
9297 |
-
|
9298 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9299 |
Â
|
9300 |
-
|
9301 |
-
|
9302 |
-
|
9303 |
Â
}
|
Â
|
|
9304 |
Â
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
Â
|
|
9308 |
Â
|
9309 |
-
|
9310 |
-
|
9311 |
-
jQuery.event.trigger( "ajaxStart" );
|
9312 |
-
}
|
9313 |
Â
|
9314 |
-
|
9315 |
-
|
Â
|
|
Â
|
|
9316 |
Â
|
9317 |
-
|
9318 |
-
|
Â
|
|
9319 |
Â
|
9320 |
-
|
9321 |
-
|
9322 |
-
|
9323 |
-
|
9324 |
Â
|
9325 |
-
|
9326 |
-
|
9327 |
Â
|
9328 |
-
|
9329 |
-
|
9330 |
Â
|
9331 |
-
|
9332 |
-
|
9333 |
-
|
Â
|
|
9334 |
Â
|
9335 |
-
|
9336 |
-
|
9337 |
-
}
|
9338 |
Â
|
9339 |
-
|
9340 |
-
|
9341 |
-
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
9342 |
-
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
9343 |
-
}
|
9344 |
Â
|
9345 |
-
|
9346 |
-
|
Â
|
|
9347 |
Â
|
9348 |
-
|
9349 |
-
|
9350 |
-
( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
|
9351 |
-
s.data = s.data.replace( r20, "+" );
|
9352 |
Â
}
|
9353 |
Â
|
9354 |
-
//
|
9355 |
-
if ( s.
|
9356 |
-
|
9357 |
-
|
9358 |
-
}
|
9359 |
-
if ( jQuery.etag[ cacheURL ] ) {
|
9360 |
-
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
9361 |
-
}
|
9362 |
Â
}
|
9363 |
Â
|
9364 |
-
//
|
9365 |
-
|
9366 |
-
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
9367 |
-
}
|
9368 |
Â
|
9369 |
-
|
9370 |
-
|
9371 |
-
|
9372 |
-
|
9373 |
-
|
9374 |
-
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
9375 |
-
s.accepts[ "*" ]
|
9376 |
-
);
|
9377 |
Â
|
9378 |
-
|
9379 |
-
|
9380 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9381 |
Â
}
|
Â
|
|
9382 |
Â
|
9383 |
-
|
9384 |
-
|
9385 |
-
|
Â
|
|
9386 |
Â
|
9387 |
-
|
9388 |
-
|
9389 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9390 |
Â
|
9391 |
-
|
9392 |
-
|
Â
|
|
Â
|
|
9393 |
Â
|
9394 |
-
|
9395 |
-
|
9396 |
-
|
9397 |
-
jqXHR.fail( s.error );
|
9398 |
Â
|
9399 |
-
//
|
9400 |
-
|
Â
|
|
9401 |
Â
|
9402 |
-
|
9403 |
-
|
9404 |
-
done( -1, "No Transport" );
|
9405 |
-
} else {
|
9406 |
-
jqXHR.readyState = 1;
|
9407 |
Â
|
9408 |
-
|
9409 |
-
|
9410 |
-
|
9411 |
-
|
9412 |
Â
|
9413 |
-
|
9414 |
-
|
9415 |
-
return jqXHR;
|
9416 |
-
}
|
9417 |
Â
|
9418 |
-
|
9419 |
-
|
9420 |
-
|
9421 |
-
|
9422 |
-
|
9423 |
-
}
|
9424 |
Â
|
9425 |
-
|
9426 |
-
|
9427 |
-
|
9428 |
-
|
9429 |
Â
|
9430 |
-
|
9431 |
-
|
9432 |
-
|
9433 |
-
|
9434 |
Â
|
9435 |
-
|
9436 |
-
|
9437 |
-
|
Â
|
|
Â
|
|
9438 |
Â
}
|
9439 |
Â
|
9440 |
-
|
9441 |
-
|
9442 |
-
|
9443 |
-
|
9444 |
Â
|
9445 |
-
//
|
9446 |
Â
if ( completed ) {
|
9447 |
-
|
9448 |
Â
}
|
9449 |
Â
|
9450 |
-
|
Â
|
|
Â
|
|
Â
|
|
9451 |
Â
|
9452 |
-
|
9453 |
-
|
9454 |
-
|
9455 |
-
|
9456 |
Â
|
9457 |
-
|
9458 |
-
|
9459 |
-
|
Â
|
|
9460 |
Â
|
9461 |
-
|
9462 |
-
responseHeadersString = headers || "";
|
9463 |
Â
|
9464 |
-
|
9465 |
-
|
Â
|
|
Â
|
|
9466 |
Â
|
9467 |
-
|
9468 |
-
|
Â
|
|
9469 |
Â
|
9470 |
-
|
9471 |
-
|
9472 |
-
response = ajaxHandleResponses( s, jqXHR, responses );
|
9473 |
-
}
|
9474 |
Â
|
9475 |
-
|
9476 |
-
|
9477 |
Â
|
9478 |
-
|
9479 |
-
|
9480 |
Â
|
9481 |
-
|
9482 |
-
|
9483 |
-
|
9484 |
-
|
9485 |
-
jQuery.lastModified[ cacheURL ] = modified;
|
9486 |
-
}
|
9487 |
-
modified = jqXHR.getResponseHeader( "etag" );
|
9488 |
-
if ( modified ) {
|
9489 |
-
jQuery.etag[ cacheURL ] = modified;
|
9490 |
-
}
|
9491 |
-
}
|
9492 |
Â
|
9493 |
-
|
9494 |
-
|
9495 |
-
statusText = "nocontent";
|
9496 |
Â
|
9497 |
-
|
9498 |
-
|
9499 |
-
statusText = "notmodified";
|
9500 |
Â
|
9501 |
-
|
9502 |
-
|
9503 |
-
|
9504 |
-
|
9505 |
-
|
9506 |
-
isSuccess = !error;
|
9507 |
Â
}
|
9508 |
-
|
9509 |
-
|
9510 |
-
|
9511 |
-
error = statusText;
|
9512 |
-
if ( status || !statusText ) {
|
9513 |
-
statusText = "error";
|
9514 |
-
if ( status < 0 ) {
|
9515 |
-
status = 0;
|
9516 |
-
}
|
9517 |
Â
}
|
9518 |
Â
}
|
9519 |
Â
|
9520 |
-
//
|
9521 |
-
|
9522 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9523 |
Â
|
9524 |
-
//
|
9525 |
-
if ( isSuccess ) {
|
9526 |
-
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
9527 |
Â
} else {
|
9528 |
-
|
Â
|
|
Â
|
|
Â
|
|
9529 |
Â
}
|
Â
|
|
9530 |
Â
|
9531 |
-
//
|
9532 |
-
|
9533 |
-
|
9534 |
-
|
9535 |
-
|
9536 |
-
|
9537 |
-
|
9538 |
Â
}
|
Â
|
|
9539 |
Â
|
9540 |
-
|
9541 |
-
|
9542 |
-
|
9543 |
-
if ( fireGlobals ) {
|
9544 |
-
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
9545 |
Â
|
9546 |
-
|
9547 |
-
|
9548 |
-
|
9549 |
-
|
9550 |
-
|
9551 |
Â
}
|
9552 |
Â
|
9553 |
-
|
9554 |
-
|
Â
|
|
9555 |
Â
|
9556 |
-
|
9557 |
-
|
9558 |
-
|
Â
|
|
9559 |
Â
|
9560 |
-
|
9561 |
-
|
9562 |
-
}
|
9563 |
-
} );
|
9564 |
Â
|
9565 |
-
|
9566 |
-
|
9567 |
Â
|
9568 |
-
|
9569 |
-
|
9570 |
-
|
9571 |
-
|
9572 |
-
data = undefined;
|
9573 |
Â
}
|
Â
|
|
9574 |
Â
|
9575 |
-
|
9576 |
-
|
9577 |
-
url: url,
|
9578 |
-
type: method,
|
9579 |
-
dataType: type,
|
9580 |
-
data: data,
|
9581 |
-
success: callback
|
9582 |
-
}, jQuery.isPlainObject( url ) && url ) );
|
9583 |
-
};
|
9584 |
-
} );
|
9585 |
Â
|
Â
|
|
Â
|
|
Â
|
|
9586 |
Â
|
9587 |
-
|
9588 |
-
return jQuery.
|
9589 |
-
|
Â
|
|
9590 |
Â
|
9591 |
-
|
9592 |
-
|
9593 |
-
dataType: "script",
|
9594 |
-
cache: true,
|
9595 |
-
async: false,
|
9596 |
-
global: false,
|
9597 |
-
"throws": true
|
9598 |
-
} );
|
9599 |
-
};
|
9600 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9601 |
Â
|
9602 |
-
|
9603 |
-
|
9604 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9605 |
Â
|
9606 |
-
if ( this[ 0 ] ) {
|
9607 |
-
if ( isFunction( html ) ) {
|
9608 |
-
html = html.call( this[ 0 ] );
|
9609 |
-
}
|
9610 |
Â
|
9611 |
-
|
9612 |
-
|
Â
|
|
9613 |
Â
|
9614 |
-
|
9615 |
-
|
9616 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9617 |
Â
|
9618 |
-
wrap.map( function() {
|
9619 |
-
var elem = this;
|
9620 |
Â
|
9621 |
-
|
9622 |
-
|
9623 |
-
|
9624 |
Â
|
9625 |
-
|
9626 |
-
|
Â
|
|
9627 |
Â
}
|
9628 |
Â
|
9629 |
-
|
9630 |
-
|
9631 |
Â
|
9632 |
-
|
9633 |
-
|
9634 |
-
return this.each( function( i ) {
|
9635 |
-
jQuery( this ).wrapInner( html.call( this, i ) );
|
9636 |
-
} );
|
9637 |
Â
}
|
9638 |
Â
|
9639 |
-
|
9640 |
-
var
|
9641 |
-
contents = self.contents();
|
9642 |
-
|
9643 |
-
if ( contents.length ) {
|
9644 |
-
contents.wrapAll( html );
|
9645 |
Â
|
9646 |
-
|
9647 |
-
|
9648 |
Â
}
|
9649 |
-
} );
|
9650 |
-
},
|
9651 |
Â
|
9652 |
-
|
9653 |
-
|
Â
|
|
9654 |
Â
|
9655 |
-
|
9656 |
-
|
9657 |
-
} );
|
9658 |
-
},
|
9659 |
Â
|
9660 |
-
|
9661 |
-
|
9662 |
-
|
Â
|
|
9663 |
Â
} );
|
9664 |
-
return this;
|
9665 |
Â
}
|
9666 |
-
} );
|
9667 |
Â
|
Â
|
|
Â
|
|
Â
|
|
9668 |
Â
|
9669 |
-
|
9670 |
-
|
9671 |
-
|
9672 |
-
|
9673 |
-
|
9674 |
-
|
Â
|
|
Â
|
|
9675 |
Â
|
Â
|
|
Â
|
|
9676 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9677 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9678 |
Â
|
9679 |
-
jQuery.ajaxSettings.xhr = function() {
|
9680 |
-
try {
|
9681 |
-
return new window.XMLHttpRequest();
|
9682 |
-
} catch ( e ) {}
|
9683 |
-
};
|
9684 |
Â
|
9685 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9686 |
Â
|
9687 |
-
// File protocol always yields status code 0, assume 200
|
9688 |
-
0: 200,
|
9689 |
Â
|
9690 |
-
// Support: IE <=9 only
|
9691 |
-
// #1450: sometimes IE returns 1223 when it should be 204
|
9692 |
-
1223: 204
|
9693 |
-
},
|
9694 |
-
xhrSupported = jQuery.ajaxSettings.xhr();
|
9695 |
-
|
9696 |
-
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
9697 |
-
support.ajax = xhrSupported = !!xhrSupported;
|
9698 |
-
|
9699 |
-
jQuery.ajaxTransport( function( options ) {
|
9700 |
-
var callback, errorCallback;
|
9701 |
-
|
9702 |
-
// Cross domain only allowed if supported through XMLHttpRequest
|
9703 |
-
if ( support.cors || xhrSupported && !options.crossDomain ) {
|
9704 |
-
return {
|
9705 |
-
send: function( headers, complete ) {
|
9706 |
-
var i,
|
9707 |
-
xhr = options.xhr();
|
9708 |
-
|
9709 |
-
xhr.open(
|
9710 |
-
options.type,
|
9711 |
-
options.url,
|
9712 |
-
options.async,
|
9713 |
-
options.username,
|
9714 |
-
options.password
|
9715 |
-
);
|
9716 |
Â
|
9717 |
-
// Apply custom fields if provided
|
9718 |
-
if ( options.xhrFields ) {
|
9719 |
-
for ( i in options.xhrFields ) {
|
9720 |
-
xhr[ i ] = options.xhrFields[ i ];
|
9721 |
-
}
|
9722 |
-
}
|
9723 |
Â
|
9724 |
-
|
9725 |
-
|
9726 |
-
|
9727 |
-
|
Â
|
|
9728 |
Â
|
9729 |
-
|
9730 |
-
// For cross-domain requests, seeing as conditions for a preflight are
|
9731 |
-
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
9732 |
-
// (it can always be set on a per-request basis or even using ajaxSetup)
|
9733 |
-
// For same-domain requests, won't change header if already provided.
|
9734 |
-
if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
|
9735 |
-
headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
9736 |
-
}
|
9737 |
Â
|
9738 |
-
|
9739 |
-
|
9740 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9741 |
Â
}
|
Â
|
|
9742 |
Â
|
9743 |
-
|
9744 |
-
|
9745 |
-
|
9746 |
-
|
9747 |
-
callback = errorCallback = xhr.onload =
|
9748 |
-
xhr.onerror = xhr.onabort = xhr.ontimeout =
|
9749 |
-
xhr.onreadystatechange = null;
|
9750 |
Â
|
9751 |
-
|
9752 |
-
|
9753 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9754 |
Â
|
9755 |
-
|
9756 |
-
|
9757 |
-
|
9758 |
-
|
9759 |
-
complete( 0, "error" );
|
9760 |
-
} else {
|
9761 |
-
complete(
|
9762 |
Â
|
9763 |
-
|
9764 |
-
|
9765 |
-
|
9766 |
-
|
9767 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9768 |
Â
} else {
|
9769 |
Â
complete(
|
9770 |
-
|
9771 |
-
|
9772 |
-
|
9773 |
-
|
9774 |
-
// IE9 has no XHR2 but throws on binary (trac-11426)
|
9775 |
-
// For XHR2 non-text, let the caller handle it (gh-2498)
|
9776 |
-
( xhr.responseType || "text" ) !== "text" ||
|
9777 |
-
typeof xhr.responseText !== "string" ?
|
9778 |
-
{ binary: xhr.response } :
|
9779 |
-
{ text: xhr.responseText },
|
9780 |
-
xhr.getAllResponseHeaders()
|
9781 |
Â
);
|
9782 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9783 |
Â
}
|
9784 |
-
}
|
9785 |
Â
};
|
Â
|
|
9786 |
Â
|
9787 |
-
|
9788 |
-
|
9789 |
-
|
9790 |
-
|
9791 |
-
// Support: IE 9 only
|
9792 |
-
// Use onreadystatechange to replace onabort
|
9793 |
-
// to handle uncaught aborts
|
9794 |
-
if ( xhr.onabort !== undefined ) {
|
9795 |
-
xhr.onabort = errorCallback;
|
9796 |
-
} else {
|
9797 |
-
xhr.onreadystatechange = function() {
|
9798 |
-
|
9799 |
-
// Check readyState before timeout as it changes
|
9800 |
-
if ( xhr.readyState === 4 ) {
|
9801 |
-
|
9802 |
-
// Allow onerror to be called first,
|
9803 |
-
// but that will not handle a native abort
|
9804 |
-
// Also, save errorCallback to a variable
|
9805 |
-
// as xhr.onerror cannot be accessed
|
9806 |
-
window.setTimeout( function() {
|
9807 |
-
if ( callback ) {
|
9808 |
-
errorCallback();
|
9809 |
-
}
|
9810 |
-
} );
|
9811 |
-
}
|
9812 |
-
};
|
9813 |
-
}
|
9814 |
Â
|
9815 |
-
|
9816 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9817 |
Â
|
9818 |
-
|
Â
|
|
9819 |
Â
|
9820 |
-
|
9821 |
-
xhr.send( options.hasContent && options.data || null );
|
9822 |
-
} catch ( e ) {
|
9823 |
Â
|
9824 |
-
|
9825 |
-
|
9826 |
-
|
9827 |
-
}
|
9828 |
-
}
|
9829 |
-
},
|
9830 |
Â
|
9831 |
-
|
9832 |
Â
if ( callback ) {
|
9833 |
-
|
9834 |
Â
}
|
9835 |
Â
}
|
9836 |
-
}
|
9837 |
-
}
|
9838 |
-
} );
|
9839 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9840 |
Â
|
9841 |
Â
|
9842 |
Â
|
9843 |
-
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
|
9844 |
-
jQuery.ajaxPrefilter( function( s ) {
|
9845 |
-
if ( s.crossDomain ) {
|
9846 |
-
s.contents.script = false;
|
9847 |
-
}
|
9848 |
-
} );
|
9849 |
Â
|
9850 |
-
|
9851 |
-
|
9852 |
-
|
9853 |
-
|
9854 |
-
|
9855 |
-
|
9856 |
-
|
9857 |
-
|
9858 |
-
|
9859 |
-
|
9860 |
-
|
9861 |
-
|
9862 |
-
|
9863 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9864 |
Â
}
|
9865 |
-
}
|
Â
|
|
9866 |
Â
|
9867 |
-
|
9868 |
-
|
9869 |
-
|
9870 |
-
|
9871 |
-
|
9872 |
-
|
9873 |
-
|
9874 |
-
|
9875 |
-
|
9876 |
Â
|
9877 |
-
|
9878 |
-
|
9879 |
-
|
9880 |
-
// This transport only deals with cross domain requests
|
9881 |
-
if ( s.crossDomain ) {
|
9882 |
-
var script, callback;
|
9883 |
-
return {
|
9884 |
-
send: function( _, complete ) {
|
9885 |
-
script = jQuery( "<script>" ).prop( {
|
9886 |
-
charset: s.scriptCharset,
|
9887 |
-
src: s.url
|
9888 |
-
} ).on(
|
9889 |
-
"load error",
|
9890 |
-
callback = function( evt ) {
|
9891 |
-
script.remove();
|
9892 |
-
callback = null;
|
9893 |
-
if ( evt ) {
|
9894 |
-
complete( evt.type === "error" ? 404 : 200, evt.type );
|
9895 |
-
}
|
9896 |
-
}
|
9897 |
-
);
|
9898 |
Â
|
9899 |
-
|
9900 |
-
|
9901 |
-
|
9902 |
-
|
9903 |
-
|
9904 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9905 |
Â
}
|
9906 |
-
|
9907 |
-
};
|
9908 |
-
}
|
9909 |
-
} );
|
9910 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9911 |
Â
|
9912 |
Â
|
9913 |
Â
|
9914 |
-
var oldCallbacks = [],
|
9915 |
-
rjsonp = /(=)\?(?=&|$)|\?\?/;
|
9916 |
Â
|
9917 |
-
|
9918 |
-
|
9919 |
-
jsonp: "callback",
|
9920 |
-
jsonpCallback: function() {
|
9921 |
-
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
9922 |
-
this[ callback ] = true;
|
9923 |
-
return callback;
|
9924 |
-
}
|
9925 |
-
} );
|
9926 |
Â
|
9927 |
-
|
9928 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9929 |
Â
|
9930 |
-
|
9931 |
-
|
9932 |
-
"url" :
|
9933 |
-
typeof s.data === "string" &&
|
9934 |
-
( s.contentType || "" )
|
9935 |
-
.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
9936 |
-
rjsonp.test( s.data ) && "data"
|
9937 |
-
);
|
9938 |
Â
|
9939 |
-
//
|
9940 |
-
|
Â
|
|
Â
|
|
9941 |
Â
|
9942 |
-
|
9943 |
-
|
9944 |
-
|
9945 |
-
|
Â
|
|
Â
|
|
9946 |
Â
|
9947 |
-
|
9948 |
-
|
9949 |
-
|
9950 |
-
|
9951 |
-
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
9952 |
Â
}
|
Â
|
|
Â
|
|
9953 |
Â
|
9954 |
-
|
9955 |
-
|
9956 |
-
if ( !responseContainer ) {
|
9957 |
-
jQuery.error( callbackName + " was not called" );
|
9958 |
-
}
|
9959 |
-
return responseContainer[ 0 ];
|
9960 |
-
};
|
9961 |
-
|
9962 |
-
// Force json dataType
|
9963 |
-
s.dataTypes[ 0 ] = "json";
|
9964 |
Â
|
9965 |
-
|
9966 |
-
|
9967 |
-
|
9968 |
-
|
9969 |
-
|
9970 |
Â
|
9971 |
-
|
9972 |
-
|
9973 |
Â
|
9974 |
-
|
9975 |
-
|
9976 |
-
|
9977 |
Â
|
9978 |
-
|
9979 |
-
|
9980 |
-
|
9981 |
-
|
9982 |
Â
|
9983 |
-
|
9984 |
-
|
9985 |
Â
|
9986 |
-
|
9987 |
-
|
9988 |
Â
|
9989 |
-
|
9990 |
-
|
9991 |
-
|
9992 |
Â
|
9993 |
-
|
9994 |
-
|
9995 |
-
|
9996 |
-
|
9997 |
Â
|
9998 |
-
|
9999 |
-
|
10000 |
Â
|
10001 |
-
|
10002 |
-
|
10003 |
-
|
10004 |
-
|
10005 |
Â
|
10006 |
Â
|
10007 |
Â
|
10008 |
Â
|
10009 |
-
|
10010 |
-
|
10011 |
-
|
10012 |
-
|
10013 |
-
|
10014 |
-
|
10015 |
-
|
10016 |
-
|
10017 |
-
|
10018 |
-
|
10019 |
Â
|
10020 |
Â
|
10021 |
-
|
10022 |
-
|
10023 |
-
|
10024 |
-
|
10025 |
-
|
10026 |
-
|
10027 |
-
|
10028 |
-
|
10029 |
-
|
10030 |
-
|
10031 |
-
|
10032 |
-
|
10033 |
Â
|
10034 |
-
|
10035 |
Â
|
10036 |
-
|
10037 |
Â
|
10038 |
-
|
10039 |
-
|
10040 |
-
|
10041 |
-
|
10042 |
Â
|
10043 |
-
|
10044 |
-
|
10045 |
-
|
10046 |
-
|
10047 |
-
|
10048 |
-
|
10049 |
-
|
10050 |
-
|
10051 |
-
}
|
10052 |
Â
}
|
Â
|
|
10053 |
Â
|
10054 |
-
|
10055 |
-
|
10056 |
Â
|
10057 |
-
|
10058 |
-
|
10059 |
-
|
10060 |
-
|
10061 |
Â
|
10062 |
-
|
10063 |
Â
|
10064 |
-
|
10065 |
-
|
10066 |
-
|
10067 |
Â
|
10068 |
-
|
10069 |
-
|
10070 |
Â
|
10071 |
Â
|
10072 |
-
|
10073 |
-
|
10074 |
-
|
10075 |
-
|
10076 |
-
|
10077 |
-
|
10078 |
-
|
10079 |
Â
|
10080 |
-
|
10081 |
-
|
10082 |
-
|
10083 |
-
|
10084 |
Â
|
10085 |
-
|
10086 |
-
|
10087 |
Â
|
10088 |
-
|
10089 |
-
|
10090 |
-
|
10091 |
Â
|
10092 |
-
|
10093 |
-
|
10094 |
-
|
10095 |
-
|
10096 |
Â
|
10097 |
-
|
10098 |
-
|
10099 |
-
|
10100 |
-
|
10101 |
Â
|
10102 |
-
|
10103 |
-
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
|
10108 |
-
|
10109 |
Â
|
10110 |
-
|
10111 |
-
|
10112 |
Â
|
10113 |
-
|
10114 |
Â
|
10115 |
-
|
10116 |
-
|
10117 |
-
|
10118 |
Â
|
10119 |
-
|
10120 |
-
|
10121 |
Â
|
10122 |
-
|
10123 |
-
|
10124 |
-
|
10125 |
-
|
10126 |
-
|
10127 |
-
|
10128 |
-
} );
|
10129 |
Â
} );
|
10130 |
-
}
|
Â
|
|
10131 |
Â
|
10132 |
-
|
10133 |
-
|
10134 |
Â
|
10135 |
Â
|
10136 |
Â
|
10137 |
Â
|
10138 |
-
|
10139 |
-
|
10140 |
-
|
10141 |
-
|
10142 |
-
|
10143 |
-
|
10144 |
-
|
10145 |
-
|
10146 |
-
|
10147 |
-
|
10148 |
-
|
10149 |
-
|
10150 |
-
|
10151 |
Â
|
10152 |
Â
|
10153 |
Â
|
10154 |
Â
|
10155 |
-
|
10156 |
-
|
10157 |
-
|
10158 |
-
|
10159 |
-
|
10160 |
Â
|
10161 |
Â
|
10162 |
Â
|
10163 |
Â
|
10164 |
-
|
10165 |
-
|
10166 |
-
|
10167 |
-
|
10168 |
-
|
10169 |
-
|
10170 |
Â
|
10171 |
-
|
10172 |
-
|
10173 |
-
|
10174 |
-
|
10175 |
Â
|
10176 |
-
|
10177 |
-
|
10178 |
-
|
10179 |
-
|
10180 |
-
|
10181 |
Â
|
10182 |
-
|
10183 |
-
|
10184 |
-
|
10185 |
-
|
10186 |
-
|
10187 |
-
|
10188 |
Â
|
10189 |
-
|
10190 |
-
|
10191 |
-
|
10192 |
-
|
10193 |
Â
|
10194 |
-
|
10195 |
Â
|
10196 |
-
|
10197 |
-
|
10198 |
-
|
10199 |
Â
|
10200 |
-
|
10201 |
-
|
10202 |
-
|
10203 |
-
|
10204 |
-
|
10205 |
-
|
10206 |
Â
|
10207 |
-
|
10208 |
-
|
10209 |
Â
|
10210 |
-
|
10211 |
-
|
10212 |
-
}
|
10213 |
Â
}
|
10214 |
-
}
|
10215 |
-
|
10216 |
-
jQuery.fn.extend( {
|
10217 |
Â
|
10218 |
-
|
10219 |
-
offset: function( options ) {
|
10220 |
Â
|
10221 |
-
|
10222 |
-
|
10223 |
-
return options === undefined ?
|
10224 |
-
this :
|
10225 |
-
this.each( function( i ) {
|
10226 |
-
jQuery.offset.setOffset( this, options, i );
|
10227 |
-
} );
|
10228 |
-
}
|
10229 |
Â
|
10230 |
-
|
10231 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10232 |
Â
|
10233 |
-
|
10234 |
-
|
10235 |
-
}
|
10236 |
Â
|
10237 |
-
|
10238 |
-
|
10239 |
-
|
10240 |
-
// disconnected node in IE throws an error
|
10241 |
-
if ( !elem.getClientRects().length ) {
|
10242 |
-
return { top: 0, left: 0 };
|
10243 |
-
}
|
10244 |
Â
|
10245 |
-
|
10246 |
-
|
10247 |
-
|
10248 |
-
|
10249 |
-
|
10250 |
-
|
10251 |
-
|
10252 |
-
},
|
10253 |
Â
|
10254 |
-
// position
|
10255 |
-
|
10256 |
-
|
10257 |
-
|
10258 |
-
|
10259 |
-
|
Â
|
|
Â
|
|
10260 |
Â
|
10261 |
-
|
10262 |
-
|
10263 |
-
|
Â
|
|
Â
|
|
Â
|
|
10264 |
Â
|
10265 |
-
|
10266 |
-
|
Â
|
|
10267 |
Â
|
10268 |
-
|
10269 |
-
|
10270 |
Â
|
10271 |
-
|
10272 |
-
|
10273 |
Â
|
10274 |
-
|
10275 |
-
|
10276 |
-
doc = elem.ownerDocument;
|
10277 |
-
offsetParent = elem.offsetParent || doc.documentElement;
|
10278 |
-
while ( offsetParent &&
|
10279 |
-
( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
|
10280 |
-
jQuery.css( offsetParent, "position" ) === "static" ) {
|
10281 |
Â
|
10282 |
-
|
10283 |
-
|
10284 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10285 |
Â
|
10286 |
-
|
10287 |
-
parentOffset = jQuery( offsetParent ).offset();
|
10288 |
-
parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
|
10289 |
-
parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
|
10290 |
-
}
|
10291 |
Â
}
|
Â
|
|
10292 |
Â
|
10293 |
-
|
10294 |
-
|
10295 |
-
|
10296 |
-
|
10297 |
-
}
|
10298 |
-
}
|
10299 |
Â
|
10300 |
-
//
|
10301 |
-
|
10302 |
-
|
10303 |
-
|
10304 |
-
|
10305 |
-
|
10306 |
-
// but those exceptions were never presented as a real life use-cases
|
10307 |
-
// and might be considered as more preferable results.
|
10308 |
-
//
|
10309 |
-
// This logic, however, is not guaranteed and can change at any point in the future
|
10310 |
-
offsetParent: function() {
|
10311 |
-
return this.map( function() {
|
10312 |
-
var offsetParent = this.offsetParent;
|
10313 |
Â
|
10314 |
-
|
10315 |
-
|
10316 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10317 |
Â
|
10318 |
-
|
10319 |
-
|
10320 |
-
|
10321 |
-
} );
|
10322 |
Â
|
10323 |
-
|
10324 |
-
|
10325 |
-
|
Â
|
|
10326 |
Â
|
10327 |
-
|
10328 |
-
|
Â
|
|
10329 |
Â
|
10330 |
-
|
10331 |
-
|
10332 |
-
if ( isWindow( elem ) ) {
|
10333 |
-
win = elem;
|
10334 |
-
} else if ( elem.nodeType === 9 ) {
|
10335 |
-
win = elem.defaultView;
|
10336 |
-
}
|
10337 |
Â
|
10338 |
-
|
10339 |
-
|
10340 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10341 |
Â
|
10342 |
-
|
10343 |
-
|
10344 |
-
|
10345 |
-
top ? val : win.pageYOffset
|
10346 |
-
);
|
10347 |
Â
|
10348 |
-
|
10349 |
-
|
10350 |
-
|
10351 |
-
|
10352 |
-
|
10353 |
-
} );
|
10354 |
Â
|
10355 |
-
|
10356 |
-
|
10357 |
-
|
10358 |
-
|
10359 |
-
|
10360 |
-
|
10361 |
-
|
10362 |
-
|
10363 |
-
|
10364 |
-
|
10365 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10366 |
Â
|
10367 |
-
|
10368 |
-
|
10369 |
-
|
10370 |
-
|
10371 |
-
}
|
10372 |
Â
}
|
10373 |
-
|
10374 |
-
|
Â
|
|
10375 |
Â
|
10376 |
Â
|
10377 |
-
|
10378 |
-
|
10379 |
-
|
10380 |
-
|
10381 |
Â
|
10382 |
-
|
10383 |
-
|
10384 |
-
|
10385 |
-
|
10386 |
Â
|
10387 |
-
|
10388 |
-
|
10389 |
Â
|
10390 |
-
|
10391 |
Â
|
10392 |
-
|
10393 |
-
|
10394 |
-
|
10395 |
-
|
10396 |
-
|
10397 |
Â
|
10398 |
-
|
10399 |
-
|
10400 |
-
|
10401 |
Â
|
10402 |
-
|
10403 |
-
|
10404 |
-
|
10405 |
-
|
10406 |
-
|
10407 |
-
|
10408 |
-
|
10409 |
-
|
10410 |
Â
|
10411 |
-
|
10412 |
Â
|
10413 |
-
|
10414 |
-
|
10415 |
Â
|
10416 |
-
|
10417 |
-
|
10418 |
-
|
10419 |
-
|
10420 |
-
} );
|
10421 |
Â
} );
|
Â
|
|
10422 |
Â
|
10423 |
Â
|
10424 |
-
|
10425 |
-
|
10426 |
-
|
10427 |
-
|
10428 |
Â
|
10429 |
-
|
10430 |
-
|
10431 |
-
|
10432 |
-
|
10433 |
-
|
10434 |
-
|
10435 |
-
|
10436 |
Â
|
10437 |
-
|
10438 |
-
|
10439 |
-
|
10440 |
-
|
10441 |
-
|
10442 |
Â
|
10443 |
Â
|
10444 |
Â
|
10445 |
Â
|
10446 |
-
|
10447 |
Â
|
10448 |
-
|
10449 |
-
|
10450 |
-
|
10451 |
-
|
10452 |
-
|
10453 |
-
|
10454 |
Â
|
10455 |
-
|
10456 |
-
|
10457 |
-
|
10458 |
-
|
10459 |
Â
|
10460 |
-
|
10461 |
-
|
10462 |
-
|
10463 |
-
|
10464 |
-
|
10465 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10466 |
Â
|
10467 |
-
//
|
10468 |
-
//
|
10469 |
-
|
10470 |
-
|
10471 |
-
|
10472 |
-
var tmp, args, proxy;
|
10473 |
Â
|
10474 |
-
|
10475 |
-
|
10476 |
-
|
10477 |
-
|
10478 |
-
|
10479 |
Â
|
10480 |
-
|
10481 |
-
|
10482 |
-
if ( !isFunction( fn ) ) {
|
10483 |
-
return undefined;
|
10484 |
-
}
|
10485 |
Â
|
10486 |
-
|
10487 |
-
|
10488 |
-
proxy = function() {
|
10489 |
-
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
10490 |
-
};
|
10491 |
Â
|
10492 |
-
|
10493 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10494 |
Â
|
10495 |
-
|
10496 |
-
};
|
10497 |
Â
|
10498 |
-
|
10499 |
-
if ( hold ) {
|
10500 |
-
jQuery.readyWait++;
|
10501 |
-
} else {
|
10502 |
-
jQuery.ready( true );
|
10503 |
-
}
|
10504 |
-
};
|
10505 |
-
jQuery.isArray = Array.isArray;
|
10506 |
-
jQuery.parseJSON = JSON.parse;
|
10507 |
-
jQuery.nodeName = nodeName;
|
10508 |
-
jQuery.isFunction = isFunction;
|
10509 |
-
jQuery.isWindow = isWindow;
|
10510 |
-
jQuery.camelCase = camelCase;
|
10511 |
-
jQuery.type = toType;
|
10512 |
-
|
10513 |
-
jQuery.now = Date.now;
|
10514 |
-
|
10515 |
-
jQuery.isNumeric = function( obj ) {
|
10516 |
-
|
10517 |
-
// As of jQuery 3.0, isNumeric is limited to
|
10518 |
-
// strings and numbers (primitives or objects)
|
10519 |
-
// that can be coerced to finite numbers (gh-2662)
|
10520 |
-
var type = jQuery.type( obj );
|
10521 |
-
return ( type === "number" || type === "string" ) &&
|
10522 |
-
|
10523 |
-
// parseFloat NaNs numeric-cast false positives ("")
|
10524 |
-
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
10525 |
-
// subtraction forces infinities to NaN
|
10526 |
-
!isNaN( obj - parseFloat( obj ) );
|
10527 |
-
};
|
10528 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10529 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10530 |
Â
|
10531 |
Â
|
10532 |
-
// Register as a named AMD module, since jQuery can be concatenated with other
|
10533 |
-
// files that may use define, but not via a proper concatenation script that
|
10534 |
-
// understands anonymous AMD modules. A named AMD is safest and most robust
|
10535 |
-
// way to register. Lowercase jquery is used because AMD module names are
|
10536 |
-
// derived from file names, and jQuery is normally delivered in a lowercase
|
10537 |
-
// file name. Do this after creating the global so that if an AMD module wants
|
10538 |
-
// to call noConflict to hide this version of jQuery, it will work.
|
10539 |
Â
|
10540 |
-
// Note that for maximum portability, libraries that are not jQuery should
|
10541 |
-
// declare themselves as anonymous modules, and avoid setting a global if an
|
10542 |
-
// AMD loader is present. jQuery is a special case. For more information, see
|
10543 |
-
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
|
10544 |
Â
|
10545 |
-
|
10546 |
-
|
10547 |
-
|
10548 |
-
|
10549 |
-
|
10550 |
-
|
Â
|
|
10551 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10552 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10553 |
Â
|
10554 |
Â
|
10555 |
-
var
|
10556 |
Â
|
10557 |
-
// Map over jQuery in case of overwrite
|
10558 |
-
_jQuery = window.jQuery,
|
10559 |
Â
|
10560 |
-
|
10561 |
-
_$ = window.$;
|
10562 |
Â
|
10563 |
-
jQuery
|
10564 |
-
|
10565 |
-
window.$ = _$;
|
10566 |
-
}
|
10567 |
Â
|
10568 |
-
|
10569 |
-
|
10570 |
-
}
|
10571 |
Â
|
10572 |
-
|
10573 |
-
|
Â
|
|
Â
|
|
10574 |
Â
|
10575 |
-
|
10576 |
-
|
10577 |
-
// and CommonJS for browser emulators (#13566)
|
10578 |
-
if ( !noGlobal ) {
|
10579 |
-
window.jQuery = window.$ = jQuery;
|
10580 |
Â
}
|
10581 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10582 |
Â
|
10583 |
Â
|
10584 |
Â
|
10585 |
-
|
10586 |
-
|
Â
|
|
10587 |
Â
|
10588 |
Â
|
10589 |
-
|
10590 |
Â
|
10591 |
-
|
10592 |
-
|
104 |
Â
/*! no static exports found */
|
105 |
Â
/***/ (function(module, exports, __webpack_require__) {
|
106 |
Â
|
107 |
+
"use strict";
|
108 |
+
|
109 |
Â
|
110 |
+
__webpack_require__(/*! ../../css/src/wsal-wizard.scss */ "./css/src/wsal-wizard.scss");
|
111 |
Â
|
112 |
+
var _jquery = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
|
113 |
Â
|
114 |
+
var _jquery2 = _interopRequireDefault(_jquery);
|
115 |
Â
|
116 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
117 |
Â
|
118 |
+
/**
|
119 |
+
* WSAL Wizard
|
120 |
+
*
|
121 |
+
* Entry file for webpack.
|
122 |
+
*
|
123 |
+
* @since 3.2.3
|
124 |
+
*/
|
125 |
+
|
126 |
+
// Wizard styles.
|
127 |
+
(0, _jquery2.default)(document).ready(function () {
|
128 |
Â
|
129 |
Â
/**
|
130 |
+
* Step: `Access`
|
131 |
+
*
|
132 |
+
* Usernames & roles access setting.
|
133 |
+
*/
|
134 |
+
(0, _jquery2.default)('#editor-users-add, #editor-roles-add, #exuser-query-add, #exrole-query-add, #ipaddr-query-add').click(function () {
|
135 |
+
var type = (0, _jquery2.default)(this).attr('id').substr(0, 6);
|
136 |
+
var tokenType = (0, _jquery2.default)(this).attr('id').substr(7, 5);
|
137 |
+
var tokenValue = _jquery2.default.trim((0, _jquery2.default)('#' + type + '-' + tokenType + '-box').val());
|
138 |
+
var existing = (0, _jquery2.default)('#' + type + '-list input').filter(function () {
|
139 |
+
return this.value === tokenValue;
|
140 |
+
});
|
141 |
Â
|
142 |
+
if (!tokenValue || existing.length) {
|
143 |
+
return;
|
144 |
+
} // if value is empty or already used, stop here
|
145 |
Â
|
146 |
+
// checkDataToken( 'user' );
|
147 |
+
(0, _jquery2.default)('#' + type + '-' + tokenType + '-box, #' + type + '-' + tokenType + '-add').attr('disabled', true);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
|
149 |
+
_jquery2.default.ajax({
|
150 |
+
type: 'POST',
|
151 |
+
url: wsalData.ajaxURL,
|
152 |
+
async: true,
|
153 |
+
data: {
|
154 |
+
action: 'setup_check_security_token',
|
155 |
+
token: tokenValue,
|
156 |
+
nonce: wsalData.nonce
|
157 |
+
},
|
158 |
+
dataType: 'json',
|
159 |
+
success: function success(data) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
160 |
Â
|
161 |
+
// Remove disabled attribute.
|
162 |
+
(0, _jquery2.default)('#' + type + '-' + tokenType + '-box, #' + type + '-' + tokenType + '-add').removeAttr('disabled');
|
163 |
+
(0, _jquery2.default)('#' + type + '-' + tokenType + '-box').val('');
|
164 |
+
|
165 |
+
if (data.success) {
|
166 |
+
|
167 |
+
// Error handling.
|
168 |
+
if ('other' === data.tokenType && ('users' === tokenType || 'exuser' === type)) {
|
169 |
+
alert(wsalData.usersError);
|
170 |
+
return;
|
171 |
+
} else if ('other' === data.tokenType && ('roles' === tokenType || 'exrole' === type)) {
|
172 |
+
alert(wsalData.rolesError);
|
173 |
+
return;
|
174 |
+
} else if ('other' === data.tokenType && ('ip' === tokenType || 'ipaddr' === type)) {
|
175 |
+
alert(wsalData.ipError);
|
176 |
+
return;
|
177 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
178 |
Â
|
179 |
+
(0, _jquery2.default)('#' + type + '-list').append((0, _jquery2.default)('<span class="sectoken-' + data.tokenType + '"/>').text(data.token).append((0, _jquery2.default)('<input type="hidden" name="' + type + 's[]"/>').val(data.token), (0, _jquery2.default)('<a href="javascript:;" title="Remove">×</a>').click(removeSecToken)));
|
180 |
+
} else {
|
181 |
+
alert(data.message);
|
182 |
+
}
|
183 |
+
},
|
184 |
+
error: function error(xhr, textStatus, _error) {
|
185 |
+
console.log(xhr.statusText);
|
186 |
+
console.log(textStatus);
|
187 |
+
console.log(_error);
|
188 |
Â
}
|
189 |
Â
});
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
190 |
Â
});
|
191 |
Â
|
192 |
+
(0, _jquery2.default)('#editor-users-box, #editor-roles-box, #exuser-query-box, #exrole-query-box, #ipaddr-query-box').keydown(function (event) {
|
193 |
+
if (13 === event.keyCode) {
|
194 |
+
var type = (0, _jquery2.default)(this).attr('id').substr(0, 6);
|
195 |
+
var tokenType = (0, _jquery2.default)(this).attr('id').substr(7, 5);
|
196 |
+
(0, _jquery2.default)('#' + type + '-' + tokenType + '-add').click();
|
197 |
+
return false;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
198 |
Â
}
|
199 |
+
});
|
200 |
Â
|
201 |
+
/**
|
202 |
+
* Remove access settings token.
|
203 |
+
*/
|
204 |
+
(0, _jquery2.default)('#editor-list>span>a, #exuser-list>span>a, #exrole-list>span>a, #ipaddr-list>span>a').click(removeSecToken);
|
205 |
+
function removeSecToken() {
|
206 |
+
var token = (0, _jquery2.default)(this).parents('span:first');
|
207 |
+
token.addClass('sectoken-del').fadeOut('fast', function () {
|
208 |
+
token.remove();
|
209 |
+
});
|
210 |
+
};
|
211 |
+
});
|
212 |
Â
|
213 |
+
/***/ }),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
214 |
Â
|
215 |
+
/***/ "./node_modules/jquery/dist/jquery.js":
|
216 |
+
/*!********************************************!*\
|
217 |
+
!*** ./node_modules/jquery/dist/jquery.js ***!
|
218 |
+
\********************************************/
|
219 |
+
/*! no static exports found */
|
220 |
+
/***/ (function(module, exports, __webpack_require__) {
|
221 |
Â
|
222 |
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
223 |
+
* jQuery JavaScript Library v3.3.1
|
224 |
+
* https://jquery.com/
|
225 |
+
*
|
226 |
+
* Includes Sizzle.js
|
227 |
+
* https://sizzlejs.com/
|
228 |
+
*
|
229 |
+
* Copyright JS Foundation and other contributors
|
230 |
+
* Released under the MIT license
|
231 |
+
* https://jquery.org/license
|
232 |
+
*
|
233 |
+
* Date: 2018-01-20T17:24Z
|
234 |
+
*/
|
235 |
+
( function( global, factory ) {
|
236 |
Â
|
237 |
+
"use strict";
|
238 |
Â
|
239 |
+
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
240 |
+
|
241 |
+
// For CommonJS and CommonJS-like environments where a proper `window`
|
242 |
+
// is present, execute the factory and get jQuery.
|
243 |
+
// For environments that do not have a `window` with a `document`
|
244 |
+
// (such as Node.js), expose a factory as module.exports.
|
245 |
+
// This accentuates the need for the creation of a real `window`.
|
246 |
+
// e.g. var jQuery = require("jquery")(window);
|
247 |
+
// See ticket #14549 for more info.
|
248 |
+
module.exports = global.document ?
|
249 |
+
factory( global, true ) :
|
250 |
+
function( w ) {
|
251 |
+
if ( !w.document ) {
|
252 |
+
throw new Error( "jQuery requires a window with a document" );
|
253 |
+
}
|
254 |
+
return factory( w );
|
255 |
+
};
|
256 |
+
} else {
|
257 |
+
factory( global );
|
258 |
+
}
|
259 |
Â
|
260 |
+
// Pass this if window is not defined yet
|
261 |
+
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
262 |
Â
|
263 |
+
// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
|
264 |
+
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
|
265 |
+
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
|
266 |
+
// enough that all such attempts are guarded in a try block.
|
267 |
+
"use strict";
|
268 |
Â
|
269 |
+
var arr = [];
|
270 |
Â
|
271 |
+
var document = window.document;
|
272 |
Â
|
273 |
+
var getProto = Object.getPrototypeOf;
|
274 |
Â
|
275 |
+
var slice = arr.slice;
|
276 |
Â
|
277 |
+
var concat = arr.concat;
|
278 |
Â
|
279 |
+
var push = arr.push;
|
280 |
Â
|
281 |
+
var indexOf = arr.indexOf;
|
282 |
Â
|
283 |
+
var class2type = {};
|
284 |
Â
|
285 |
+
var toString = class2type.toString;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
286 |
Â
|
287 |
+
var hasOwn = class2type.hasOwnProperty;
|
288 |
Â
|
289 |
+
var fnToString = hasOwn.toString;
|
Â
|
|
Â
|
|
290 |
Â
|
291 |
+
var ObjectFunctionString = fnToString.call( Object );
|
292 |
Â
|
293 |
+
var support = {};
|
294 |
Â
|
295 |
+
var isFunction = function isFunction( obj ) {
|
296 |
Â
|
297 |
+
// Support: Chrome <=57, Firefox <=52
|
298 |
+
// In some browsers, typeof returns "function" for HTML <object> elements
|
299 |
+
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
300 |
+
// We don't want to classify *any* DOM node as a function.
|
301 |
+
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
302 |
+
};
|
303 |
Â
|
Â
|
|
Â
|
|
304 |
Â
|
305 |
+
var isWindow = function isWindow( obj ) {
|
306 |
+
return obj != null && obj === obj.window;
|
307 |
+
};
|
308 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
309 |
Â
|
310 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
311 |
Â
|
312 |
+
var preservedScriptAttributes = {
|
313 |
+
type: true,
|
314 |
+
src: true,
|
315 |
+
noModule: true
|
316 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
317 |
Â
|
318 |
+
function DOMEval( code, doc, node ) {
|
319 |
+
doc = doc || document;
|
320 |
Â
|
321 |
+
var i,
|
322 |
+
script = doc.createElement( "script" );
|
323 |
Â
|
324 |
+
script.text = code;
|
325 |
+
if ( node ) {
|
326 |
+
for ( i in preservedScriptAttributes ) {
|
327 |
+
if ( node[ i ] ) {
|
328 |
+
script[ i ] = node[ i ];
|
329 |
+
}
|
330 |
+
}
|
331 |
+
}
|
332 |
+
doc.head.appendChild( script ).parentNode.removeChild( script );
|
333 |
+
}
|
334 |
Â
|
Â
|
|
Â
|
|
335 |
Â
|
336 |
+
function toType( obj ) {
|
337 |
+
if ( obj == null ) {
|
338 |
+
return obj + "";
|
339 |
+
}
|
340 |
Â
|
341 |
+
// Support: Android <=2.3 only (functionish RegExp)
|
342 |
+
return typeof obj === "object" || typeof obj === "function" ?
|
343 |
+
class2type[ toString.call( obj ) ] || "object" :
|
344 |
+
typeof obj;
|
345 |
+
}
|
346 |
+
/* global Symbol */
|
347 |
+
// Defining this global in .eslintrc.json would create a danger of using the global
|
348 |
+
// unguarded in another place, it seems safer to define global only for this module
|
349 |
Â
|
Â
|
|
350 |
Â
|
Â
|
|
Â
|
|
351 |
Â
|
352 |
+
var
|
353 |
+
version = "3.3.1",
|
354 |
Â
|
355 |
+
// Define a local copy of jQuery
|
356 |
+
jQuery = function( selector, context ) {
|
357 |
Â
|
358 |
+
// The jQuery object is actually just the init constructor 'enhanced'
|
359 |
+
// Need init if jQuery is called (just allow error to be thrown if not included)
|
360 |
+
return new jQuery.fn.init( selector, context );
|
361 |
+
},
|
362 |
Â
|
363 |
+
// Support: Android <=4.0 only
|
364 |
+
// Make sure we trim BOM and NBSP
|
365 |
+
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
366 |
Â
|
367 |
+
jQuery.fn = jQuery.prototype = {
|
Â
|
|
Â
|
|
Â
|
|
368 |
Â
|
369 |
+
// The current version of jQuery being used
|
370 |
+
jquery: version,
|
Â
|
|
371 |
Â
|
372 |
+
constructor: jQuery,
|
Â
|
|
Â
|
|
373 |
Â
|
374 |
+
// The default length of a jQuery object is 0
|
375 |
+
length: 0,
|
376 |
Â
|
377 |
+
toArray: function() {
|
378 |
+
return slice.call( this );
|
379 |
+
},
|
380 |
Â
|
381 |
+
// Get the Nth element in the matched element set OR
|
382 |
+
// Get the whole matched element set as a clean array
|
383 |
+
get: function( num ) {
|
384 |
Â
|
385 |
+
// Return all the elements in a clean array
|
386 |
+
if ( num == null ) {
|
387 |
+
return slice.call( this );
|
388 |
+
}
|
389 |
Â
|
390 |
+
// Return just the one element from the set
|
391 |
+
return num < 0 ? this[ num + this.length ] : this[ num ];
|
392 |
+
},
|
Â
|
|
Â
|
|
393 |
Â
|
394 |
+
// Take an array of elements and push it onto the stack
|
395 |
+
// (returning the new matched element set)
|
396 |
+
pushStack: function( elems ) {
|
397 |
Â
|
398 |
+
// Build a new jQuery matched element set
|
399 |
+
var ret = jQuery.merge( this.constructor(), elems );
|
Â
|
|
400 |
Â
|
401 |
+
// Add the old object onto the stack (as a reference)
|
402 |
+
ret.prevObject = this;
|
Â
|
|
403 |
Â
|
404 |
+
// Return the newly-formed element set
|
405 |
+
return ret;
|
406 |
+
},
|
Â
|
|
Â
|
|
407 |
Â
|
408 |
+
// Execute a callback for every element in the matched set.
|
409 |
+
each: function( callback ) {
|
410 |
+
return jQuery.each( this, callback );
|
411 |
+
},
|
412 |
Â
|
413 |
+
map: function( callback ) {
|
414 |
+
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
415 |
+
return callback.call( elem, i, elem );
|
416 |
+
} ) );
|
417 |
+
},
|
418 |
+
|
419 |
+
slice: function() {
|
420 |
+
return this.pushStack( slice.apply( this, arguments ) );
|
421 |
+
},
|
422 |
+
|
423 |
+
first: function() {
|
424 |
+
return this.eq( 0 );
|
425 |
+
},
|
426 |
+
|
427 |
+
last: function() {
|
428 |
+
return this.eq( -1 );
|
429 |
+
},
|
430 |
+
|
431 |
+
eq: function( i ) {
|
432 |
+
var len = this.length,
|
433 |
+
j = +i + ( i < 0 ? len : 0 );
|
434 |
+
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
435 |
+
},
|
436 |
+
|
437 |
+
end: function() {
|
438 |
+
return this.prevObject || this.constructor();
|
439 |
+
},
|
440 |
+
|
441 |
+
// For internal use only.
|
442 |
+
// Behaves like an Array's method, not like a jQuery method.
|
443 |
+
push: push,
|
444 |
+
sort: arr.sort,
|
445 |
+
splice: arr.splice
|
446 |
+
};
|
447 |
+
|
448 |
+
jQuery.extend = jQuery.fn.extend = function() {
|
449 |
+
var options, name, src, copy, copyIsArray, clone,
|
450 |
+
target = arguments[ 0 ] || {},
|
451 |
+
i = 1,
|
452 |
+
length = arguments.length,
|
453 |
+
deep = false;
|
454 |
+
|
455 |
+
// Handle a deep copy situation
|
456 |
+
if ( typeof target === "boolean" ) {
|
457 |
+
deep = target;
|
458 |
+
|
459 |
+
// Skip the boolean and the target
|
460 |
+
target = arguments[ i ] || {};
|
461 |
+
i++;
|
462 |
+
}
|
463 |
Â
|
464 |
+
// Handle case when target is a string or something (possible in deep copy)
|
465 |
+
if ( typeof target !== "object" && !isFunction( target ) ) {
|
466 |
+
target = {};
|
467 |
+
}
|
Â
|
|
Â
|
|
468 |
Â
|
469 |
+
// Extend jQuery itself if only one argument is passed
|
470 |
+
if ( i === length ) {
|
471 |
+
target = this;
|
472 |
+
i--;
|
473 |
+
}
|
474 |
Â
|
475 |
+
for ( ; i < length; i++ ) {
|
Â
|
|
Â
|
|
Â
|
|
476 |
Â
|
477 |
+
// Only deal with non-null/undefined values
|
478 |
+
if ( ( options = arguments[ i ] ) != null ) {
|
Â
|
|
Â
|
|
479 |
Â
|
480 |
+
// Extend the base object
|
481 |
+
for ( name in options ) {
|
482 |
+
src = target[ name ];
|
483 |
+
copy = options[ name ];
|
Â
|
|
484 |
Â
|
485 |
+
// Prevent never-ending loop
|
486 |
+
if ( target === copy ) {
|
487 |
+
continue;
|
488 |
+
}
|
489 |
Â
|
490 |
+
// Recurse if we're merging plain objects or arrays
|
491 |
+
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
492 |
+
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
493 |
Â
|
494 |
+
if ( copyIsArray ) {
|
495 |
+
copyIsArray = false;
|
496 |
+
clone = src && Array.isArray( src ) ? src : [];
|
Â
|
|
497 |
Â
|
498 |
+
} else {
|
499 |
+
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
Â
|
|
500 |
Â
}
|
501 |
Â
|
502 |
+
// Never move original objects, clone them
|
503 |
+
target[ name ] = jQuery.extend( deep, clone, copy );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
504 |
Â
|
505 |
+
// Don't bring in undefined values
|
506 |
+
} else if ( copy !== undefined ) {
|
507 |
+
target[ name ] = copy;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
508 |
Â
}
|
509 |
Â
}
|
510 |
Â
}
|
511 |
+
}
|
512 |
Â
|
513 |
+
// Return the modified object
|
514 |
+
return target;
|
515 |
+
};
|
516 |
Â
|
517 |
+
jQuery.extend( {
|
518 |
Â
|
519 |
+
// Unique for each copy of jQuery on the page
|
520 |
+
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
521 |
Â
|
522 |
+
// Assume jQuery is ready without the ready module
|
523 |
+
isReady: true,
|
524 |
Â
|
525 |
+
error: function( msg ) {
|
526 |
+
throw new Error( msg );
|
527 |
+
},
|
528 |
Â
|
529 |
+
noop: function() {},
|
530 |
Â
|
531 |
+
isPlainObject: function( obj ) {
|
532 |
+
var proto, Ctor;
|
533 |
Â
|
534 |
+
// Detect obvious negatives
|
535 |
+
// Use toString instead of jQuery.type to catch host objects
|
536 |
+
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
537 |
+
return false;
|
538 |
+
}
|
539 |
Â
|
540 |
+
proto = getProto( obj );
|
541 |
Â
|
542 |
+
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
543 |
+
if ( !proto ) {
|
544 |
+
return true;
|
545 |
+
}
|
546 |
Â
|
547 |
+
// Objects with prototype are plain iff they were constructed by a global Object function
|
548 |
+
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
549 |
+
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
550 |
+
},
|
551 |
Â
|
552 |
+
isEmptyObject: function( obj ) {
|
553 |
Â
|
554 |
+
/* eslint-disable no-unused-vars */
|
555 |
+
// See https://github.com/eslint/eslint/issues/6125
|
556 |
+
var name;
|
557 |
Â
|
558 |
+
for ( name in obj ) {
|
559 |
+
return false;
|
560 |
+
}
|
561 |
+
return true;
|
562 |
+
},
|
563 |
Â
|
564 |
+
// Evaluates a script in a global context
|
565 |
+
globalEval: function( code ) {
|
566 |
+
DOMEval( code );
|
567 |
+
},
|
568 |
Â
|
569 |
+
each: function( obj, callback ) {
|
570 |
+
var length, i = 0;
|
571 |
Â
|
572 |
+
if ( isArrayLike( obj ) ) {
|
573 |
+
length = obj.length;
|
574 |
+
for ( ; i < length; i++ ) {
|
575 |
+
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
576 |
+
break;
|
Â
|
|
577 |
Â
}
|
578 |
+
}
|
579 |
+
} else {
|
580 |
+
for ( i in obj ) {
|
581 |
+
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
582 |
+
break;
|
583 |
Â
}
|
584 |
Â
}
|
585 |
+
}
|
586 |
Â
|
587 |
+
return obj;
|
588 |
+
},
|
589 |
Â
|
590 |
+
// Support: Android <=4.0 only
|
591 |
+
trim: function( text ) {
|
592 |
+
return text == null ?
|
593 |
+
"" :
|
594 |
+
( text + "" ).replace( rtrim, "" );
|
595 |
+
},
|
596 |
Â
|
597 |
+
// results is for internal usage only
|
598 |
+
makeArray: function( arr, results ) {
|
599 |
+
var ret = results || [];
|
600 |
Â
|
601 |
+
if ( arr != null ) {
|
602 |
+
if ( isArrayLike( Object( arr ) ) ) {
|
603 |
+
jQuery.merge( ret,
|
604 |
+
typeof arr === "string" ?
|
605 |
+
[ arr ] : arr
|
606 |
+
);
|
607 |
+
} else {
|
608 |
+
push.call( ret, arr );
|
Â
|
|
609 |
Â
}
|
610 |
+
}
|
611 |
Â
|
612 |
+
return ret;
|
613 |
+
},
|
614 |
Â
|
615 |
+
inArray: function( elem, arr, i ) {
|
616 |
+
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
617 |
+
},
|
618 |
Â
|
619 |
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
620 |
+
// push.apply(_, arraylike) throws on ancient WebKit
|
621 |
+
merge: function( first, second ) {
|
622 |
+
var len = +second.length,
|
623 |
+
j = 0,
|
624 |
+
i = first.length;
|
625 |
Â
|
626 |
+
for ( ; j < len; j++ ) {
|
627 |
+
first[ i++ ] = second[ j ];
|
628 |
+
}
|
629 |
Â
|
630 |
+
first.length = i;
|
631 |
Â
|
632 |
+
return first;
|
633 |
+
},
|
634 |
Â
|
635 |
+
grep: function( elems, callback, invert ) {
|
636 |
+
var callbackInverse,
|
637 |
+
matches = [],
|
638 |
+
i = 0,
|
639 |
+
length = elems.length,
|
640 |
+
callbackExpect = !invert;
|
641 |
Â
|
642 |
+
// Go through the array, only saving the items
|
643 |
+
// that pass the validator function
|
644 |
+
for ( ; i < length; i++ ) {
|
645 |
+
callbackInverse = !callback( elems[ i ], i );
|
646 |
+
if ( callbackInverse !== callbackExpect ) {
|
647 |
+
matches.push( elems[ i ] );
|
Â
|
|
648 |
Â
}
|
649 |
+
}
|
650 |
Â
|
651 |
+
return matches;
|
652 |
+
},
|
653 |
Â
|
654 |
+
// arg is for internal usage only
|
655 |
+
map: function( elems, callback, arg ) {
|
656 |
+
var length, value,
|
657 |
+
i = 0,
|
658 |
+
ret = [];
|
659 |
Â
|
660 |
+
// Go through the array, translating each of the items to their new values
|
661 |
+
if ( isArrayLike( elems ) ) {
|
662 |
+
length = elems.length;
|
663 |
+
for ( ; i < length; i++ ) {
|
664 |
+
value = callback( elems[ i ], i, arg );
|
665 |
Â
|
666 |
+
if ( value != null ) {
|
667 |
+
ret.push( value );
|
Â
|
|
668 |
Â
}
|
669 |
+
}
|
670 |
Â
|
671 |
+
// Go through every key on the object,
|
672 |
+
} else {
|
673 |
+
for ( i in elems ) {
|
674 |
+
value = callback( elems[ i ], i, arg );
|
675 |
Â
|
676 |
+
if ( value != null ) {
|
677 |
+
ret.push( value );
|
Â
|
|
678 |
Â
}
|
679 |
Â
}
|
680 |
+
}
|
681 |
Â
|
682 |
+
// Flatten any nested arrays
|
683 |
+
return concat.apply( [], ret );
|
684 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
685 |
Â
|
686 |
+
// A global GUID counter for objects
|
687 |
+
guid: 1,
|
Â
|
|
Â
|
|
688 |
Â
|
689 |
+
// jQuery.support is not used in Core but other projects attach their
|
690 |
+
// properties to it so it needs to exist.
|
691 |
+
support: support
|
692 |
+
} );
|
693 |
Â
|
694 |
+
if ( typeof Symbol === "function" ) {
|
695 |
+
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
696 |
+
}
|
Â
|
|
Â
|
|
697 |
Â
|
698 |
+
// Populate the class2type map
|
699 |
+
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
700 |
+
function( i, name ) {
|
701 |
+
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
702 |
+
} );
|
703 |
Â
|
704 |
+
function isArrayLike( obj ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
705 |
Â
|
706 |
+
// Support: real iOS 8.2 only (not reproducible in simulator)
|
707 |
+
// `in` check used to prevent JIT error (gh-2145)
|
708 |
+
// hasOwn isn't used here due to false negatives
|
709 |
+
// regarding Nodelist length in IE
|
710 |
+
var length = !!obj && "length" in obj && obj.length,
|
711 |
+
type = toType( obj );
|
712 |
Â
|
713 |
+
if ( isFunction( obj ) || isWindow( obj ) ) {
|
714 |
+
return false;
|
715 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
716 |
Â
|
717 |
+
return type === "array" || length === 0 ||
|
718 |
+
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
719 |
+
}
|
720 |
+
var Sizzle =
|
721 |
+
/*!
|
722 |
+
* Sizzle CSS Selector Engine v2.3.3
|
723 |
+
* https://sizzlejs.com/
|
724 |
+
*
|
725 |
+
* Copyright jQuery Foundation and other contributors
|
726 |
+
* Released under the MIT license
|
727 |
+
* http://jquery.org/license
|
728 |
+
*
|
729 |
+
* Date: 2016-08-08
|
730 |
+
*/
|
731 |
+
(function( window ) {
|
732 |
+
|
733 |
+
var i,
|
734 |
+
support,
|
735 |
+
Expr,
|
736 |
+
getText,
|
737 |
+
isXML,
|
738 |
+
tokenize,
|
739 |
+
compile,
|
740 |
+
select,
|
741 |
+
outermostContext,
|
742 |
+
sortInput,
|
743 |
+
hasDuplicate,
|
744 |
+
|
745 |
+
// Local document vars
|
746 |
+
setDocument,
|
747 |
+
document,
|
748 |
+
docElem,
|
749 |
+
documentIsHTML,
|
750 |
+
rbuggyQSA,
|
751 |
+
rbuggyMatches,
|
752 |
+
matches,
|
753 |
+
contains,
|
754 |
+
|
755 |
+
// Instance-specific data
|
756 |
+
expando = "sizzle" + 1 * new Date(),
|
757 |
+
preferredDoc = window.document,
|
758 |
+
dirruns = 0,
|
759 |
+
done = 0,
|
760 |
+
classCache = createCache(),
|
761 |
+
tokenCache = createCache(),
|
762 |
+
compilerCache = createCache(),
|
763 |
+
sortOrder = function( a, b ) {
|
764 |
+
if ( a === b ) {
|
765 |
+
hasDuplicate = true;
|
766 |
+
}
|
767 |
+
return 0;
|
768 |
+
},
|
769 |
+
|
770 |
+
// Instance methods
|
771 |
+
hasOwn = ({}).hasOwnProperty,
|
772 |
+
arr = [],
|
773 |
+
pop = arr.pop,
|
774 |
+
push_native = arr.push,
|
775 |
+
push = arr.push,
|
776 |
+
slice = arr.slice,
|
777 |
+
// Use a stripped-down indexOf as it's faster than native
|
778 |
+
// https://jsperf.com/thor-indexof-vs-for/5
|
779 |
+
indexOf = function( list, elem ) {
|
780 |
+
var i = 0,
|
781 |
+
len = list.length;
|
782 |
+
for ( ; i < len; i++ ) {
|
783 |
+
if ( list[i] === elem ) {
|
784 |
+
return i;
|
785 |
+
}
|
786 |
+
}
|
787 |
+
return -1;
|
788 |
+
},
|
789 |
+
|
790 |
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
791 |
+
|
792 |
+
// Regular expressions
|
793 |
+
|
794 |
+
// http://www.w3.org/TR/css3-selectors/#whitespace
|
795 |
+
whitespace = "[\\x20\\t\\r\\n\\f]",
|
796 |
+
|
797 |
+
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
798 |
+
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
|
799 |
+
|
800 |
+
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
801 |
+
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
802 |
+
// Operator (capture 2)
|
803 |
+
"*([*^$|!~]?=)" + whitespace +
|
804 |
+
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
805 |
+
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
806 |
+
"*\\]",
|
807 |
+
|
808 |
+
pseudos = ":(" + identifier + ")(?:\\((" +
|
809 |
+
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
810 |
+
// 1. quoted (capture 3; capture 4 or capture 5)
|
811 |
+
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
812 |
+
// 2. simple (capture 6)
|
813 |
+
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
814 |
+
// 3. anything else (capture 2)
|
815 |
+
".*" +
|
816 |
+
")\\)|)",
|
817 |
+
|
818 |
+
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
819 |
+
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
820 |
+
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
821 |
+
|
822 |
+
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
823 |
+
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
824 |
+
|
825 |
+
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
826 |
+
|
827 |
+
rpseudo = new RegExp( pseudos ),
|
828 |
+
ridentifier = new RegExp( "^" + identifier + "$" ),
|
829 |
+
|
830 |
+
matchExpr = {
|
831 |
+
"ID": new RegExp( "^#(" + identifier + ")" ),
|
832 |
+
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
833 |
+
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
834 |
+
"ATTR": new RegExp( "^" + attributes ),
|
835 |
+
"PSEUDO": new RegExp( "^" + pseudos ),
|
836 |
+
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
837 |
+
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
838 |
+
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
839 |
+
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
840 |
+
// For use in libraries implementing .is()
|
841 |
+
// We use this for POS matching in `select`
|
842 |
+
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
|
843 |
+
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
844 |
+
},
|
845 |
+
|
846 |
+
rinputs = /^(?:input|select|textarea|button)$/i,
|
847 |
+
rheader = /^h\d$/i,
|
848 |
+
|
849 |
+
rnative = /^[^{]+\{\s*\[native \w/,
|
850 |
+
|
851 |
+
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
852 |
+
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
853 |
+
|
854 |
+
rsibling = /[+~]/,
|
855 |
+
|
856 |
+
// CSS escapes
|
857 |
+
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
858 |
+
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
|
859 |
+
funescape = function( _, escaped, escapedWhitespace ) {
|
860 |
+
var high = "0x" + escaped - 0x10000;
|
861 |
+
// NaN means non-codepoint
|
862 |
+
// Support: Firefox<24
|
863 |
+
// Workaround erroneous numeric interpretation of +"0x"
|
864 |
+
return high !== high || escapedWhitespace ?
|
865 |
+
escaped :
|
866 |
+
high < 0 ?
|
867 |
+
// BMP codepoint
|
868 |
+
String.fromCharCode( high + 0x10000 ) :
|
869 |
+
// Supplemental Plane codepoint (surrogate pair)
|
870 |
+
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
871 |
+
},
|
872 |
+
|
873 |
+
// CSS string/identifier serialization
|
874 |
+
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
875 |
+
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
876 |
+
fcssescape = function( ch, asCodePoint ) {
|
877 |
+
if ( asCodePoint ) {
|
878 |
+
|
879 |
+
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
880 |
+
if ( ch === "\0" ) {
|
881 |
+
return "\uFFFD";
|
882 |
+
}
|
883 |
+
|
884 |
+
// Control characters and (dependent upon position) numbers get escaped as code points
|
885 |
+
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
886 |
+
}
|
887 |
+
|
888 |
+
// Other potentially-special ASCII characters get backslash-escaped
|
889 |
+
return "\\" + ch;
|
890 |
+
},
|
891 |
+
|
892 |
+
// Used for iframes
|
893 |
+
// See setDocument()
|
894 |
+
// Removing the function wrapper causes a "Permission Denied"
|
895 |
+
// error in IE
|
896 |
+
unloadHandler = function() {
|
897 |
+
setDocument();
|
898 |
+
},
|
899 |
+
|
900 |
+
disabledAncestor = addCombinator(
|
901 |
+
function( elem ) {
|
902 |
+
return elem.disabled === true && ("form" in elem || "label" in elem);
|
903 |
+
},
|
904 |
+
{ dir: "parentNode", next: "legend" }
|
905 |
+
);
|
906 |
Â
|
907 |
+
// Optimize for push.apply( _, NodeList )
|
908 |
+
try {
|
909 |
+
push.apply(
|
910 |
+
(arr = slice.call( preferredDoc.childNodes )),
|
911 |
+
preferredDoc.childNodes
|
912 |
+
);
|
913 |
+
// Support: Android<4.0
|
914 |
+
// Detect silently failing push.apply
|
915 |
+
arr[ preferredDoc.childNodes.length ].nodeType;
|
916 |
+
} catch ( e ) {
|
917 |
+
push = { apply: arr.length ?
|
918 |
+
|
919 |
+
// Leverage slice if possible
|
920 |
+
function( target, els ) {
|
921 |
+
push_native.apply( target, slice.call(els) );
|
922 |
+
} :
|
923 |
Â
|
924 |
+
// Support: IE<9
|
925 |
+
// Otherwise append directly
|
926 |
+
function( target, els ) {
|
927 |
+
var j = target.length,
|
928 |
+
i = 0;
|
929 |
+
// Can't trust NodeList.length
|
930 |
+
while ( (target[j++] = els[i++]) ) {}
|
931 |
+
target.length = j - 1;
|
932 |
+
}
|
933 |
+
};
|
934 |
+
}
|
935 |
Â
|
936 |
+
function Sizzle( selector, context, results, seed ) {
|
937 |
+
var m, i, elem, nid, match, groups, newSelector,
|
938 |
+
newContext = context && context.ownerDocument,
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
939 |
Â
|
940 |
+
// nodeType defaults to 9, since context defaults to document
|
941 |
+
nodeType = context ? context.nodeType : 9;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
942 |
Â
|
943 |
+
results = results || [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
944 |
Â
|
945 |
+
// Return early from calls with invalid selector or context
|
946 |
+
if ( typeof selector !== "string" || !selector ||
|
947 |
+
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
Â
|
|
948 |
Â
|
949 |
+
return results;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
950 |
Â
}
|
951 |
Â
|
952 |
+
// Try to shortcut find operations (as opposed to filters) in HTML documents
|
953 |
+
if ( !seed ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
954 |
Â
|
955 |
+
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
956 |
+
setDocument( context );
|
Â
|
|
Â
|
|
Â
|
|
957 |
Â
}
|
958 |
+
context = context || document;
|
959 |
Â
|
960 |
+
if ( documentIsHTML ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
961 |
Â
|
962 |
+
// If the selector is sufficiently simple, try using a "get*By*" DOM method
|
963 |
+
// (excepting DocumentFragment context, where the methods don't exist)
|
964 |
+
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
965 |
Â
|
966 |
+
// ID selector
|
967 |
+
if ( (m = match[1]) ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
968 |
Â
|
969 |
+
// Document context
|
970 |
+
if ( nodeType === 9 ) {
|
971 |
+
if ( (elem = context.getElementById( m )) ) {
|
972 |
Â
|
973 |
Â
// Support: IE, Opera, Webkit
|
974 |
Â
// TODO: identify versions
|
975 |
Â
// getElementById can match elements by name instead of ID
|
976 |
+
if ( elem.id === m ) {
|
Â
|
|
Â
|
|
Â
|
|
977 |
Â
results.push( elem );
|
978 |
Â
return results;
|
979 |
Â
}
|
980 |
+
} else {
|
981 |
+
return results;
|
982 |
Â
}
|
983 |
Â
|
984 |
+
// Element context
|
985 |
+
} else {
|
Â
|
|
Â
|
|
986 |
Â
|
987 |
+
// Support: IE, Opera, Webkit
|
988 |
+
// TODO: identify versions
|
989 |
+
// getElementById can match elements by name instead of ID
|
990 |
+
if ( newContext && (elem = newContext.getElementById( m )) &&
|
991 |
+
contains( context, elem ) &&
|
992 |
+
elem.id === m ) {
|
993 |
Â
|
994 |
+
results.push( elem );
|
995 |
+
return results;
|
996 |
+
}
|
997 |
Â
}
|
Â
|
|
998 |
Â
|
999 |
+
// Type selector
|
1000 |
+
} else if ( match[2] ) {
|
1001 |
+
push.apply( results, context.getElementsByTagName( selector ) );
|
1002 |
+
return results;
|
1003 |
+
|
1004 |
+
// Class selector
|
1005 |
+
} else if ( (m = match[3]) && support.getElementsByClassName &&
|
1006 |
+
context.getElementsByClassName ) {
|
1007 |
Â
|
1008 |
+
push.apply( results, context.getElementsByClassName( m ) );
|
1009 |
+
return results;
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
Â
|
1013 |
+
// Take advantage of querySelectorAll
|
1014 |
+
if ( support.qsa &&
|
1015 |
+
!compilerCache[ selector + " " ] &&
|
1016 |
+
(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
Â
|
|
1017 |
Â
|
1018 |
+
if ( nodeType !== 1 ) {
|
1019 |
+
newContext = context;
|
1020 |
+
newSelector = selector;
|
Â
|
|
Â
|
|
Â
|
|
1021 |
Â
|
1022 |
+
// qSA looks outside Element context, which is not what we want
|
1023 |
+
// Thanks to Andrew Dupont for this workaround technique
|
1024 |
+
// Support: IE <=8
|
1025 |
+
// Exclude object elements
|
1026 |
+
} else if ( context.nodeName.toLowerCase() !== "object" ) {
|
Â
|
|
Â
|
|
1027 |
Â
|
1028 |
+
// Capture the context ID, setting it first if necessary
|
1029 |
+
if ( (nid = context.getAttribute( "id" )) ) {
|
1030 |
+
nid = nid.replace( rcssescape, fcssescape );
|
1031 |
+
} else {
|
1032 |
+
context.setAttribute( "id", (nid = expando) );
|
1033 |
Â
}
|
1034 |
Â
|
1035 |
+
// Prefix every selector in the list
|
1036 |
+
groups = tokenize( selector );
|
1037 |
+
i = groups.length;
|
1038 |
+
while ( i-- ) {
|
1039 |
+
groups[i] = "#" + nid + " " + toSelector( groups[i] );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1040 |
Â
}
|
1041 |
+
newSelector = groups.join( "," );
|
1042 |
+
|
1043 |
+
// Expand context for sibling selectors
|
1044 |
+
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
1045 |
+
context;
|
1046 |
Â
}
|
Â
|
|
Â
|
|
1047 |
Â
|
1048 |
+
if ( newSelector ) {
|
1049 |
+
try {
|
1050 |
+
push.apply( results,
|
1051 |
+
newContext.querySelectorAll( newSelector )
|
1052 |
+
);
|
1053 |
+
return results;
|
1054 |
+
} catch ( qsaError ) {
|
1055 |
+
} finally {
|
1056 |
+
if ( nid === expando ) {
|
1057 |
+
context.removeAttribute( "id" );
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1061 |
Â
}
|
Â
|
|
1062 |
Â
}
|
Â
|
|
1063 |
Â
}
|
1064 |
Â
|
1065 |
+
// All others
|
1066 |
+
return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
/**
|
1070 |
+
* Create key-value caches of limited size
|
1071 |
+
* @returns {function(string, object)} Returns the Object data after storing it on itself with
|
1072 |
+
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
|
1073 |
+
* deleting the oldest entry
|
1074 |
+
*/
|
1075 |
+
function createCache() {
|
1076 |
+
var keys = [];
|
1077 |
+
|
1078 |
+
function cache( key, value ) {
|
1079 |
+
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
|
1080 |
+
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
1081 |
+
// Only keep the most recent entries
|
1082 |
+
delete cache[ keys.shift() ];
|
1083 |
+
}
|
1084 |
+
return (cache[ key + " " ] = value);
|
1085 |
Â
}
|
1086 |
+
return cache;
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
/**
|
1090 |
+
* Mark a function for special use by Sizzle
|
1091 |
+
* @param {Function} fn The function to mark
|
1092 |
+
*/
|
1093 |
+
function markFunction( fn ) {
|
1094 |
+
fn[ expando ] = true;
|
1095 |
+
return fn;
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* Support testing using an element
|
1100 |
+
* @param {Function} fn Passed the created element and returns a boolean result
|
1101 |
+
*/
|
1102 |
+
function assert( fn ) {
|
1103 |
+
var el = document.createElement("fieldset");
|
1104 |
Â
|
1105 |
+
try {
|
1106 |
+
return !!fn( el );
|
1107 |
+
} catch (e) {
|
1108 |
+
return false;
|
1109 |
+
} finally {
|
1110 |
+
// Remove from its parent by default
|
1111 |
+
if ( el.parentNode ) {
|
1112 |
+
el.parentNode.removeChild( el );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1113 |
Â
}
|
1114 |
+
// release memory in IE
|
1115 |
+
el = null;
|
1116 |
Â
}
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
/**
|
1120 |
+
* Adds the same handler for all of the specified attrs
|
1121 |
+
* @param {String} attrs Pipe-separated list of attributes
|
1122 |
+
* @param {Function} handler The method that will be applied
|
1123 |
+
*/
|
1124 |
+
function addHandle( attrs, handler ) {
|
1125 |
+
var arr = attrs.split("|"),
|
1126 |
+
i = arr.length;
|
1127 |
+
|
1128 |
+
while ( i-- ) {
|
1129 |
+
Expr.attrHandle[ arr[i] ] = handler;
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
/**
|
1134 |
+
* Checks document order of two siblings
|
1135 |
+
* @param {Element} a
|
1136 |
+
* @param {Element} b
|
1137 |
+
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
1138 |
+
*/
|
1139 |
+
function siblingCheck( a, b ) {
|
1140 |
+
var cur = b && a,
|
1141 |
+
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
1142 |
+
a.sourceIndex - b.sourceIndex;
|
1143 |
+
|
1144 |
+
// Use IE sourceIndex if available on both nodes
|
1145 |
+
if ( diff ) {
|
1146 |
+
return diff;
|
1147 |
Â
}
|
1148 |
Â
|
1149 |
+
// Check if b follows a
|
1150 |
+
if ( cur ) {
|
1151 |
+
while ( (cur = cur.nextSibling) ) {
|
1152 |
+
if ( cur === b ) {
|
1153 |
+
return -1;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1154 |
Â
}
|
1155 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1156 |
Â
}
|
1157 |
Â
|
1158 |
+
return a ? 1 : -1;
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
/**
|
1162 |
+
* Returns a function to use in pseudos for input types
|
1163 |
+
* @param {String} type
|
1164 |
+
*/
|
1165 |
+
function createInputPseudo( type ) {
|
1166 |
+
return function( elem ) {
|
1167 |
+
var name = elem.nodeName.toLowerCase();
|
1168 |
+
return name === "input" && elem.type === type;
|
1169 |
+
};
|
1170 |
+
}
|
1171 |
+
|
1172 |
+
/**
|
1173 |
+
* Returns a function to use in pseudos for buttons
|
1174 |
+
* @param {String} type
|
1175 |
+
*/
|
1176 |
+
function createButtonPseudo( type ) {
|
1177 |
+
return function( elem ) {
|
1178 |
+
var name = elem.nodeName.toLowerCase();
|
1179 |
+
return (name === "input" || name === "button") && elem.type === type;
|
1180 |
+
};
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
/**
|
1184 |
+
* Returns a function to use in pseudos for :enabled/:disabled
|
1185 |
+
* @param {Boolean} disabled true for :disabled; false for :enabled
|
1186 |
+
*/
|
1187 |
+
function createDisabledPseudo( disabled ) {
|
1188 |
+
|
1189 |
+
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
1190 |
+
return function( elem ) {
|
1191 |
+
|
1192 |
+
// Only certain elements can match :enabled or :disabled
|
1193 |
+
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
|
1194 |
+
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
|
1195 |
+
if ( "form" in elem ) {
|
1196 |
+
|
1197 |
+
// Check for inherited disabledness on relevant non-disabled elements:
|
1198 |
+
// * listed form-associated elements in a disabled fieldset
|
1199 |
+
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
1200 |
+
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
|
1201 |
+
// * option elements in a disabled optgroup
|
1202 |
+
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
|
1203 |
+
// All such elements have a "form" property.
|
1204 |
+
if ( elem.parentNode && elem.disabled === false ) {
|
1205 |
+
|
1206 |
+
// Option elements defer to a parent optgroup if present
|
1207 |
+
if ( "label" in elem ) {
|
1208 |
+
if ( "label" in elem.parentNode ) {
|
1209 |
+
return elem.parentNode.disabled === disabled;
|
1210 |
+
} else {
|
1211 |
+
return elem.disabled === disabled;
|
1212 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1213 |
Â
}
|
1214 |
Â
|
1215 |
+
// Support: IE 6 - 11
|
1216 |
+
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
1217 |
+
return elem.isDisabled === disabled ||
|
1218 |
Â
|
1219 |
+
// Where there is no isDisabled, check manually
|
1220 |
+
/* jshint -W018 */
|
1221 |
+
elem.isDisabled !== !disabled &&
|
1222 |
+
disabledAncestor( elem ) === disabled;
|
Â
|
|
1223 |
Â
}
|
1224 |
Â
|
1225 |
+
return elem.disabled === disabled;
|
Â
|
|
Â
|
|
Â
|
|
1226 |
Â
|
1227 |
+
// Try to winnow out elements that can't be disabled before trusting the disabled property.
|
1228 |
+
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
|
1229 |
+
// even exist on them, let alone have a boolean value.
|
1230 |
+
} else if ( "label" in elem ) {
|
1231 |
+
return elem.disabled === disabled;
|
1232 |
+
}
|
1233 |
+
|
1234 |
+
// Remaining elements are neither :enabled nor :disabled
|
1235 |
+
return false;
|
1236 |
+
};
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
/**
|
1240 |
+
* Returns a function to use in pseudos for positionals
|
1241 |
+
* @param {Function} fn
|
1242 |
+
*/
|
1243 |
+
function createPositionalPseudo( fn ) {
|
1244 |
+
return markFunction(function( argument ) {
|
1245 |
+
argument = +argument;
|
1246 |
+
return markFunction(function( seed, matches ) {
|
1247 |
+
var j,
|
1248 |
+
matchIndexes = fn( [], seed.length, argument ),
|
1249 |
+
i = matchIndexes.length;
|
1250 |
+
|
1251 |
+
// Match elements found at the specified indexes
|
1252 |
+
while ( i-- ) {
|
1253 |
+
if ( seed[ (j = matchIndexes[i]) ] ) {
|
1254 |
+
seed[j] = !(matches[j] = seed[j]);
|
1255 |
Â
}
|
1256 |
+
}
|
1257 |
Â
});
|
1258 |
+
});
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
/**
|
1262 |
+
* Checks a node for validity as a Sizzle context
|
1263 |
+
* @param {Element|Object=} context
|
1264 |
+
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
1265 |
+
*/
|
1266 |
+
function testContext( context ) {
|
1267 |
+
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
// Expose support vars for convenience
|
1271 |
+
support = Sizzle.support = {};
|
1272 |
+
|
1273 |
+
/**
|
1274 |
+
* Detects XML nodes
|
1275 |
+
* @param {Element|Object} elem An element or a document
|
1276 |
+
* @returns {Boolean} True iff elem is a non-HTML XML node
|
1277 |
+
*/
|
1278 |
+
isXML = Sizzle.isXML = function( elem ) {
|
1279 |
+
// documentElement is verified for cases where it doesn't yet exist
|
1280 |
+
// (such as loading iframes in IE - #4833)
|
1281 |
+
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
1282 |
+
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
1283 |
+
};
|
1284 |
+
|
1285 |
+
/**
|
1286 |
+
* Sets document-related variables once based on the current document
|
1287 |
+
* @param {Element|Object} [doc] An element or document object to use to set the document
|
1288 |
+
* @returns {Object} Returns the current document
|
1289 |
+
*/
|
1290 |
+
setDocument = Sizzle.setDocument = function( node ) {
|
1291 |
+
var hasCompare, subWindow,
|
1292 |
+
doc = node ? node.ownerDocument || node : preferredDoc;
|
1293 |
+
|
1294 |
+
// Return early if doc is invalid or already selected
|
1295 |
+
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
1296 |
+
return document;
|
1297 |
Â
}
|
1298 |
Â
|
1299 |
+
// Update global variables
|
1300 |
+
document = doc;
|
1301 |
+
docElem = document.documentElement;
|
1302 |
+
documentIsHTML = !isXML( document );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1303 |
Â
|
1304 |
+
// Support: IE 9-11, Edge
|
1305 |
+
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
|
1306 |
+
if ( preferredDoc !== document &&
|
1307 |
+
(subWindow = document.defaultView) && subWindow.top !== subWindow ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1308 |
Â
|
1309 |
+
// Support: IE 11, Edge
|
1310 |
+
if ( subWindow.addEventListener ) {
|
1311 |
+
subWindow.addEventListener( "unload", unloadHandler, false );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1312 |
Â
|
1313 |
+
// Support: IE 9 - 10 only
|
1314 |
+
} else if ( subWindow.attachEvent ) {
|
1315 |
+
subWindow.attachEvent( "onunload", unloadHandler );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1316 |
Â
}
|
1317 |
+
}
|
1318 |
Â
|
1319 |
+
/* Attributes
|
1320 |
+
---------------------------------------------------------------------- */
|
1321 |
Â
|
1322 |
+
// Support: IE<8
|
1323 |
+
// Verify that getAttribute really returns attributes and not properties
|
1324 |
+
// (excepting IE8 booleans)
|
1325 |
+
support.attributes = assert(function( el ) {
|
1326 |
+
el.className = "i";
|
1327 |
+
return !el.getAttribute("className");
|
1328 |
+
});
|
1329 |
Â
|
1330 |
+
/* getElement(s)By*
|
1331 |
+
---------------------------------------------------------------------- */
|
1332 |
Â
|
1333 |
+
// Check if getElementsByTagName("*") returns only elements
|
1334 |
+
support.getElementsByTagName = assert(function( el ) {
|
1335 |
+
el.appendChild( document.createComment("") );
|
1336 |
+
return !el.getElementsByTagName("*").length;
|
1337 |
+
});
|
1338 |
Â
|
1339 |
+
// Support: IE<9
|
1340 |
+
support.getElementsByClassName = rnative.test( document.getElementsByClassName );
|
1341 |
+
|
1342 |
+
// Support: IE<10
|
1343 |
+
// Check if getElementById returns elements by name
|
1344 |
+
// The broken getElementById methods don't pick up programmatically-set names,
|
1345 |
+
// so use a roundabout getElementsByName test
|
1346 |
+
support.getById = assert(function( el ) {
|
1347 |
+
docElem.appendChild( el ).id = expando;
|
1348 |
+
return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
1349 |
+
});
|
1350 |
Â
|
1351 |
+
// ID filter and find
|
1352 |
+
if ( support.getById ) {
|
1353 |
+
Expr.filter["ID"] = function( id ) {
|
1354 |
+
var attrId = id.replace( runescape, funescape );
|
1355 |
+
return function( elem ) {
|
1356 |
+
return elem.getAttribute("id") === attrId;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1357 |
Â
};
|
1358 |
+
};
|
1359 |
+
Expr.find["ID"] = function( id, context ) {
|
1360 |
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1361 |
+
var elem = context.getElementById( id );
|
1362 |
+
return elem ? [ elem ] : [];
|
1363 |
+
}
|
1364 |
+
};
|
1365 |
+
} else {
|
1366 |
+
Expr.filter["ID"] = function( id ) {
|
1367 |
+
var attrId = id.replace( runescape, funescape );
|
1368 |
+
return function( elem ) {
|
1369 |
+
var node = typeof elem.getAttributeNode !== "undefined" &&
|
1370 |
+
elem.getAttributeNode("id");
|
1371 |
+
return node && node.value === attrId;
|
1372 |
Â
};
|
1373 |
+
};
|
1374 |
Â
|
1375 |
+
// Support: IE 6 - 7 only
|
1376 |
+
// getElementById is not reliable as a find shortcut
|
1377 |
+
Expr.find["ID"] = function( id, context ) {
|
1378 |
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1379 |
+
var node, i, elems,
|
1380 |
+
elem = context.getElementById( id );
|
1381 |
Â
|
1382 |
+
if ( elem ) {
|
1383 |
+
|
1384 |
+
// Verify the id attribute
|
1385 |
+
node = elem.getAttributeNode("id");
|
1386 |
+
if ( node && node.value === id ) {
|
1387 |
+
return [ elem ];
|
1388 |
+
}
|
1389 |
Â
|
1390 |
+
// Fall back on getElementsByName
|
1391 |
+
elems = context.getElementsByName( id );
|
1392 |
+
i = 0;
|
1393 |
+
while ( (elem = elems[i++]) ) {
|
1394 |
Â
node = elem.getAttributeNode("id");
|
1395 |
Â
if ( node && node.value === id ) {
|
1396 |
Â
return [ elem ];
|
1397 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1398 |
Â
}
|
Â
|
|
Â
|
|
1399 |
Â
}
|
Â
|
|
Â
|
|
1400 |
Â
|
1401 |
+
return [];
|
1402 |
+
}
|
1403 |
+
};
|
1404 |
+
}
|
Â
|
|
1405 |
Â
|
1406 |
+
// Tag
|
1407 |
+
Expr.find["TAG"] = support.getElementsByTagName ?
|
1408 |
+
function( tag, context ) {
|
1409 |
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
1410 |
+
return context.getElementsByTagName( tag );
|
1411 |
Â
|
1412 |
+
// DocumentFragment nodes don't have gEBTN
|
1413 |
+
} else if ( support.qsa ) {
|
1414 |
+
return context.querySelectorAll( tag );
|
1415 |
+
}
|
1416 |
+
} :
|
Â
|
|
1417 |
Â
|
1418 |
+
function( tag, context ) {
|
1419 |
+
var elem,
|
1420 |
+
tmp = [],
|
1421 |
+
i = 0,
|
1422 |
+
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
1423 |
+
results = context.getElementsByTagName( tag );
|
Â
|
|
1424 |
Â
|
1425 |
+
// Filter out possible comments
|
1426 |
+
if ( tag === "*" ) {
|
1427 |
+
while ( (elem = results[i++]) ) {
|
1428 |
+
if ( elem.nodeType === 1 ) {
|
1429 |
+
tmp.push( elem );
|
1430 |
+
}
|
1431 |
Â
}
|
Â
|
|
Â
|
|
1432 |
Â
|
1433 |
+
return tmp;
|
Â
|
|
Â
|
|
Â
|
|
1434 |
Â
}
|
1435 |
+
return results;
|
1436 |
Â
};
|
1437 |
Â
|
1438 |
+
// Class
|
1439 |
+
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1440 |
+
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
1441 |
+
return context.getElementsByClassName( className );
|
1442 |
+
}
|
1443 |
+
};
|
1444 |
Â
|
1445 |
+
/* QSA/matchesSelector
|
1446 |
+
---------------------------------------------------------------------- */
|
1447 |
Â
|
1448 |
+
// QSA and matchesSelector support
|
Â
|
|
1449 |
Â
|
1450 |
+
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
1451 |
+
rbuggyMatches = [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1452 |
Â
|
1453 |
+
// qSa(:focus) reports false when true (Chrome 21)
|
1454 |
+
// We allow this because of a bug in IE8/9 that throws an error
|
1455 |
+
// whenever `document.activeElement` is accessed on an iframe
|
1456 |
+
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
1457 |
+
// See https://bugs.jquery.com/ticket/13378
|
1458 |
+
rbuggyQSA = [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1459 |
Â
|
1460 |
+
if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
|
1461 |
+
// Build QSA regex
|
1462 |
+
// Regex strategy adopted from Diego Perini
|
1463 |
+
assert(function( el ) {
|
1464 |
+
// Select is set to empty string on purpose
|
1465 |
+
// This is to test IE's treatment of not explicitly
|
1466 |
+
// setting a boolean content attribute,
|
1467 |
+
// since its presence should be enough
|
1468 |
+
// https://bugs.jquery.com/ticket/12359
|
1469 |
+
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
1470 |
+
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
1471 |
+
"<option selected=''></option></select>";
|
1472 |
Â
|
1473 |
+
// Support: IE8, Opera 11-12.16
|
1474 |
+
// Nothing should be selected when empty strings follow ^= or $= or *=
|
1475 |
+
// The test attribute must be unknown in Opera but "safe" for WinRT
|
1476 |
+
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
1477 |
+
if ( el.querySelectorAll("[msallowcapture^='']").length ) {
|
1478 |
+
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
1479 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
1480 |
Â
|
1481 |
+
// Support: IE8
|
1482 |
+
// Boolean attributes and "value" are not treated correctly
|
1483 |
+
if ( !el.querySelectorAll("[selected]").length ) {
|
1484 |
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
1485 |
+
}
|
Â
|
|
1486 |
Â
|
1487 |
+
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
1488 |
+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1489 |
+
rbuggyQSA.push("~=");
|
1490 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
1491 |
Â
|
1492 |
+
// Webkit/Opera - :checked should return selected option elements
|
1493 |
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
1494 |
+
// IE8 throws error here and will not see later tests
|
1495 |
+
if ( !el.querySelectorAll(":checked").length ) {
|
1496 |
+
rbuggyQSA.push(":checked");
|
1497 |
+
}
|
1498 |
Â
|
1499 |
+
// Support: Safari 8+, iOS 8+
|
1500 |
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
1501 |
+
// In-page `selector#id sibling-combinator selector` fails
|
1502 |
+
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
1503 |
+
rbuggyQSA.push(".#.+[+~]");
|
1504 |
+
}
|
1505 |
+
});
|
1506 |
Â
|
1507 |
+
assert(function( el ) {
|
1508 |
+
el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
1509 |
+
"<select disabled='disabled'><option/></select>";
|
Â
|
|
Â
|
|
1510 |
Â
|
1511 |
+
// Support: Windows 8 Native Apps
|
1512 |
+
// The type and name attributes are restricted during .innerHTML assignment
|
1513 |
+
var input = document.createElement("input");
|
1514 |
+
input.setAttribute( "type", "hidden" );
|
1515 |
+
el.appendChild( input ).setAttribute( "name", "D" );
|
1516 |
Â
|
1517 |
+
// Support: IE8
|
1518 |
+
// Enforce case-sensitivity of name attribute
|
1519 |
+
if ( el.querySelectorAll("[name=d]").length ) {
|
1520 |
+
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
1521 |
+
}
|
Â
|
|
1522 |
Â
|
1523 |
+
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
1524 |
+
// IE8 throws error here and will not see later tests
|
1525 |
+
if ( el.querySelectorAll(":enabled").length !== 2 ) {
|
1526 |
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
1527 |
+
}
|
1528 |
Â
|
1529 |
+
// Support: IE9-11+
|
1530 |
+
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
1531 |
+
docElem.appendChild( el ).disabled = true;
|
1532 |
+
if ( el.querySelectorAll(":disabled").length !== 2 ) {
|
1533 |
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
1534 |
+
}
|
1535 |
Â
|
1536 |
+
// Opera 10-11 does not throw on post-comma invalid pseudos
|
1537 |
+
el.querySelectorAll("*,:x");
|
1538 |
+
rbuggyQSA.push(",.*:");
|
1539 |
+
});
|
1540 |
+
}
|
1541 |
Â
|
1542 |
+
if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
|
1543 |
+
docElem.webkitMatchesSelector ||
|
1544 |
+
docElem.mozMatchesSelector ||
|
1545 |
+
docElem.oMatchesSelector ||
|
1546 |
+
docElem.msMatchesSelector) )) ) {
|
1547 |
+
|
1548 |
+
assert(function( el ) {
|
1549 |
+
// Check to see if it's possible to do matchesSelector
|
1550 |
+
// on a disconnected node (IE 9)
|
1551 |
+
support.disconnectedMatch = matches.call( el, "*" );
|
1552 |
+
|
1553 |
+
// This should fail with an exception
|
1554 |
+
// Gecko does not error, returns false instead
|
1555 |
+
matches.call( el, "[s!='']:x" );
|
1556 |
+
rbuggyMatches.push( "!=", pseudos );
|
1557 |
+
});
|
1558 |
+
}
|
1559 |
Â
|
1560 |
+
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
|
1561 |
+
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1562 |
Â
|
1563 |
+
/* Contains
|
1564 |
+
---------------------------------------------------------------------- */
|
1565 |
+
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
1566 |
Â
|
1567 |
+
// Element contains another
|
1568 |
+
// Purposefully self-exclusive
|
1569 |
+
// As in, an element does not contain itself
|
1570 |
+
contains = hasCompare || rnative.test( docElem.contains ) ?
|
1571 |
Â
function( a, b ) {
|
1572 |
+
var adown = a.nodeType === 9 ? a.documentElement : a,
|
1573 |
+
bup = b && b.parentNode;
|
1574 |
+
return a === bup || !!( bup && bup.nodeType === 1 && (
|
1575 |
+
adown.contains ?
|
1576 |
+
adown.contains( bup ) :
|
1577 |
+
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
1578 |
+
));
|
1579 |
+
} :
|
1580 |
+
function( a, b ) {
|
1581 |
+
if ( b ) {
|
1582 |
+
while ( (b = b.parentNode) ) {
|
1583 |
+
if ( b === a ) {
|
1584 |
+
return true;
|
1585 |
+
}
|
1586 |
+
}
|
1587 |
Â
}
|
1588 |
+
return false;
|
1589 |
+
};
|
1590 |
Â
|
1591 |
+
/* Sorting
|
1592 |
+
---------------------------------------------------------------------- */
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1593 |
Â
|
1594 |
+
// Document order sorting
|
1595 |
+
sortOrder = hasCompare ?
|
1596 |
+
function( a, b ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1597 |
Â
|
1598 |
+
// Flag for duplicate removal
|
1599 |
+
if ( a === b ) {
|
1600 |
+
hasDuplicate = true;
|
1601 |
+
return 0;
|
1602 |
+
}
|
1603 |
Â
|
1604 |
+
// Sort on method existence if only one input has compareDocumentPosition
|
1605 |
+
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
1606 |
+
if ( compare ) {
|
1607 |
+
return compare;
|
1608 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
1609 |
Â
|
1610 |
+
// Calculate position if both inputs belong to the same document
|
1611 |
+
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
|
1612 |
+
a.compareDocumentPosition( b ) :
|
Â
|
|
Â
|
|
Â
|
|
1613 |
Â
|
1614 |
+
// Otherwise we know they are disconnected
|
1615 |
+
1;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1616 |
Â
|
1617 |
+
// Disconnected nodes
|
1618 |
+
if ( compare & 1 ||
|
1619 |
+
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
Â
|
|
1620 |
Â
|
1621 |
+
// Choose the first element that is related to our preferred document
|
1622 |
+
if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
|
1623 |
+
return -1;
|
Â
|
|
1624 |
Â
}
|
1625 |
+
if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
1626 |
+
return 1;
|
Â
|
|
1627 |
Â
}
|
1628 |
Â
|
1629 |
+
// Maintain original order
|
1630 |
+
return sortInput ?
|
1631 |
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1632 |
+
0;
|
1633 |
+
}
|
1634 |
Â
|
1635 |
+
return compare & 4 ? -1 : 1;
|
1636 |
+
} :
|
1637 |
+
function( a, b ) {
|
1638 |
+
// Exit early if the nodes are identical
|
1639 |
+
if ( a === b ) {
|
1640 |
+
hasDuplicate = true;
|
1641 |
+
return 0;
|
1642 |
+
}
|
1643 |
Â
|
1644 |
+
var cur,
|
1645 |
+
i = 0,
|
1646 |
+
aup = a.parentNode,
|
1647 |
+
bup = b.parentNode,
|
1648 |
+
ap = [ a ],
|
1649 |
+
bp = [ b ];
|
1650 |
+
|
1651 |
+
// Parentless nodes are either documents or disconnected
|
1652 |
+
if ( !aup || !bup ) {
|
1653 |
+
return a === document ? -1 :
|
1654 |
+
b === document ? 1 :
|
1655 |
+
aup ? -1 :
|
1656 |
+
bup ? 1 :
|
1657 |
+
sortInput ?
|
1658 |
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1659 |
Â
0;
|
Â
|
|
1660 |
Â
|
1661 |
+
// If the nodes are siblings, we can do a quick check
|
1662 |
+
} else if ( aup === bup ) {
|
1663 |
+
return siblingCheck( a, b );
|
1664 |
+
}
|
1665 |
Â
|
1666 |
+
// Otherwise we need full lists of their ancestors for comparison
|
1667 |
+
cur = a;
|
1668 |
+
while ( (cur = cur.parentNode) ) {
|
1669 |
+
ap.unshift( cur );
|
1670 |
+
}
|
1671 |
+
cur = b;
|
1672 |
+
while ( (cur = cur.parentNode) ) {
|
1673 |
+
bp.unshift( cur );
|
1674 |
+
}
|
1675 |
Â
|
1676 |
+
// Walk down the tree looking for a discrepancy
|
1677 |
+
while ( ap[i] === bp[i] ) {
|
1678 |
+
i++;
|
Â
|
|
1679 |
Â
}
|
1680 |
Â
|
1681 |
+
return i ?
|
1682 |
+
// Do a sibling check if the nodes have a common ancestor
|
1683 |
+
siblingCheck( ap[i], bp[i] ) :
|
1684 |
Â
|
1685 |
+
// Otherwise nodes in our document sort first
|
1686 |
+
ap[i] === preferredDoc ? -1 :
|
1687 |
+
bp[i] === preferredDoc ? 1 :
|
1688 |
+
0;
|
1689 |
+
};
|
1690 |
Â
|
1691 |
+
return document;
|
1692 |
+
};
|
1693 |
Â
|
1694 |
+
Sizzle.matches = function( expr, elements ) {
|
1695 |
+
return Sizzle( expr, null, null, elements );
|
1696 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1697 |
Â
|
1698 |
+
Sizzle.matchesSelector = function( elem, expr ) {
|
1699 |
+
// Set document vars if needed
|
1700 |
+
if ( ( elem.ownerDocument || elem ) !== document ) {
|
1701 |
+
setDocument( elem );
|
1702 |
+
}
|
1703 |
Â
|
1704 |
+
// Make sure that attribute selectors are quoted
|
1705 |
+
expr = expr.replace( rattributeQuotes, "='$1']" );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1706 |
Â
|
1707 |
+
if ( support.matchesSelector && documentIsHTML &&
|
1708 |
+
!compilerCache[ expr + " " ] &&
|
1709 |
+
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
1710 |
+
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
Â
|
|
1711 |
Â
|
1712 |
+
try {
|
1713 |
+
var ret = matches.call( elem, expr );
|
Â
|
|
Â
|
|
Â
|
|
1714 |
Â
|
1715 |
+
// IE 9's matchesSelector returns false on disconnected nodes
|
1716 |
+
if ( ret || support.disconnectedMatch ||
|
1717 |
+
// As well, disconnected nodes are said to be in a document
|
1718 |
+
// fragment in IE 9
|
1719 |
+
elem.document && elem.document.nodeType !== 11 ) {
|
1720 |
+
return ret;
|
1721 |
+
}
|
1722 |
+
} catch (e) {}
|
1723 |
+
}
|
1724 |
Â
|
1725 |
+
return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
1726 |
+
};
|
Â
|
|
1727 |
Â
|
1728 |
+
Sizzle.contains = function( context, elem ) {
|
1729 |
+
// Set document vars if needed
|
1730 |
+
if ( ( context.ownerDocument || context ) !== document ) {
|
1731 |
+
setDocument( context );
|
1732 |
+
}
|
1733 |
+
return contains( context, elem );
|
1734 |
+
};
|
1735 |
Â
|
1736 |
+
Sizzle.attr = function( elem, name ) {
|
1737 |
+
// Set document vars if needed
|
1738 |
+
if ( ( elem.ownerDocument || elem ) !== document ) {
|
1739 |
+
setDocument( elem );
|
1740 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1741 |
Â
|
1742 |
+
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
1743 |
+
// Don't get fooled by Object.prototype properties (jQuery #13807)
|
1744 |
+
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
1745 |
+
fn( elem, name, !documentIsHTML ) :
|
1746 |
+
undefined;
|
1747 |
+
|
1748 |
+
return val !== undefined ?
|
1749 |
+
val :
|
1750 |
+
support.attributes || !documentIsHTML ?
|
1751 |
+
elem.getAttribute( name ) :
|
1752 |
+
(val = elem.getAttributeNode(name)) && val.specified ?
|
1753 |
+
val.value :
|
1754 |
+
null;
|
1755 |
+
};
|
1756 |
+
|
1757 |
+
Sizzle.escape = function( sel ) {
|
1758 |
+
return (sel + "").replace( rcssescape, fcssescape );
|
1759 |
+
};
|
1760 |
+
|
1761 |
+
Sizzle.error = function( msg ) {
|
1762 |
+
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
1763 |
+
};
|
1764 |
+
|
1765 |
+
/**
|
1766 |
+
* Document sorting and removing duplicates
|
1767 |
+
* @param {ArrayLike} results
|
1768 |
+
*/
|
1769 |
+
Sizzle.uniqueSort = function( results ) {
|
1770 |
+
var elem,
|
1771 |
+
duplicates = [],
|
1772 |
+
j = 0,
|
1773 |
+
i = 0;
|
1774 |
Â
|
1775 |
+
// Unless we *know* we can detect duplicates, assume their presence
|
1776 |
+
hasDuplicate = !support.detectDuplicates;
|
1777 |
+
sortInput = !support.sortStable && results.slice( 0 );
|
1778 |
+
results.sort( sortOrder );
|
1779 |
+
|
1780 |
+
if ( hasDuplicate ) {
|
1781 |
+
while ( (elem = results[i++]) ) {
|
1782 |
+
if ( elem === results[ i ] ) {
|
1783 |
+
j = duplicates.push( i );
|
1784 |
Â
}
|
1785 |
Â
}
|
1786 |
+
while ( j-- ) {
|
1787 |
+
results.splice( duplicates[ j ], 1 );
|
1788 |
+
}
|
1789 |
+
}
|
1790 |
Â
|
1791 |
+
// Clear input after sorting to release objects
|
1792 |
+
// See https://github.com/jquery/sizzle/pull/225
|
1793 |
+
sortInput = null;
|
1794 |
+
|
1795 |
+
return results;
|
1796 |
+
};
|
1797 |
+
|
1798 |
+
/**
|
1799 |
+
* Utility function for retrieving the text value of an array of DOM nodes
|
1800 |
+
* @param {Array|Element} elem
|
1801 |
+
*/
|
1802 |
+
getText = Sizzle.getText = function( elem ) {
|
1803 |
+
var node,
|
1804 |
+
ret = "",
|
1805 |
+
i = 0,
|
1806 |
+
nodeType = elem.nodeType;
|
1807 |
+
|
1808 |
+
if ( !nodeType ) {
|
1809 |
+
// If no nodeType, this is expected to be an array
|
1810 |
+
while ( (node = elem[i++]) ) {
|
1811 |
+
// Do not traverse comment nodes
|
1812 |
+
ret += getText( node );
|
1813 |
+
}
|
1814 |
+
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
1815 |
+
// Use textContent for elements
|
1816 |
+
// innerText usage removed for consistency of new lines (jQuery #11153)
|
1817 |
+
if ( typeof elem.textContent === "string" ) {
|
1818 |
+
return elem.textContent;
|
1819 |
+
} else {
|
1820 |
+
// Traverse its children
|
1821 |
+
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
1822 |
+
ret += getText( elem );
|
Â
|
|
1823 |
Â
}
|
Â
|
|
Â
|
|
1824 |
Â
}
|
1825 |
+
} else if ( nodeType === 3 || nodeType === 4 ) {
|
1826 |
+
return elem.nodeValue;
|
1827 |
+
}
|
1828 |
+
// Do not include comment or processing instruction nodes
|
1829 |
Â
|
1830 |
+
return ret;
|
1831 |
+
};
|
1832 |
Â
|
1833 |
+
Expr = Sizzle.selectors = {
|
Â
|
|
1834 |
Â
|
1835 |
+
// Can be adjusted by the user
|
1836 |
+
cacheLength: 50,
|
1837 |
Â
|
1838 |
+
createPseudo: markFunction,
|
1839 |
Â
|
1840 |
+
match: matchExpr,
|
1841 |
Â
|
1842 |
+
attrHandle: {},
|
1843 |
Â
|
1844 |
+
find: {},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1845 |
Â
|
1846 |
+
relative: {
|
1847 |
+
">": { dir: "parentNode", first: true },
|
1848 |
+
" ": { dir: "parentNode" },
|
1849 |
+
"+": { dir: "previousSibling", first: true },
|
1850 |
+
"~": { dir: "previousSibling" }
|
1851 |
+
},
|
1852 |
Â
|
1853 |
+
preFilter: {
|
1854 |
+
"ATTR": function( match ) {
|
1855 |
+
match[1] = match[1].replace( runescape, funescape );
|
1856 |
Â
|
1857 |
+
// Move the given value to match[3] whether quoted or unquoted
|
1858 |
+
match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
|
Â
|
|
1859 |
Â
|
1860 |
+
if ( match[2] === "~=" ) {
|
1861 |
+
match[3] = " " + match[3] + " ";
|
1862 |
+
}
|
1863 |
Â
|
1864 |
+
return match.slice( 0, 4 );
|
1865 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1866 |
Â
|
1867 |
+
"CHILD": function( match ) {
|
1868 |
+
/* matches from matchExpr["CHILD"]
|
1869 |
+
1 type (only|nth|...)
|
1870 |
+
2 what (child|of-type)
|
1871 |
+
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
|
1872 |
+
4 xn-component of xn+y argument ([+-]?\d*n|)
|
1873 |
+
5 sign of xn-component
|
1874 |
+
6 x of xn-component
|
1875 |
+
7 sign of y-component
|
1876 |
+
8 y of y-component
|
1877 |
+
*/
|
1878 |
+
match[1] = match[1].toLowerCase();
|
1879 |
Â
|
1880 |
+
if ( match[1].slice( 0, 3 ) === "nth" ) {
|
1881 |
+
// nth-* requires argument
|
1882 |
+
if ( !match[3] ) {
|
1883 |
Â
Sizzle.error( match[0] );
|
1884 |
Â
}
|
1885 |
Â
|
1886 |
+
// numeric x and y parameters for Expr.filter.CHILD
|
1887 |
+
// remember that false/true cast respectively to 0/1
|
1888 |
+
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
|
1889 |
+
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
|
1890 |
Â
|
1891 |
+
// other types prohibit arguments
|
1892 |
+
} else if ( match[3] ) {
|
1893 |
+
Sizzle.error( match[0] );
|
1894 |
+
}
|
1895 |
Â
|
1896 |
+
return match;
|
1897 |
+
},
|
Â
|
|
1898 |
Â
|
1899 |
+
"PSEUDO": function( match ) {
|
1900 |
+
var excess,
|
1901 |
+
unquoted = !match[6] && match[2];
|
1902 |
Â
|
1903 |
+
if ( matchExpr["CHILD"].test( match[0] ) ) {
|
1904 |
+
return null;
|
1905 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
1906 |
Â
|
1907 |
+
// Accept quoted arguments as-is
|
1908 |
+
if ( match[3] ) {
|
1909 |
+
match[2] = match[4] || match[5] || "";
|
Â
|
|
1910 |
Â
|
1911 |
+
// Strip excess characters from unquoted arguments
|
1912 |
+
} else if ( unquoted && rpseudo.test( unquoted ) &&
|
1913 |
+
// Get excess from tokenize (recursively)
|
1914 |
+
(excess = tokenize( unquoted, true )) &&
|
1915 |
+
// advance to the next closing parenthesis
|
1916 |
+
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
1917 |
+
|
1918 |
+
// excess is a negative index
|
1919 |
+
match[0] = match[0].slice( 0, excess );
|
1920 |
+
match[2] = unquoted.slice( 0, excess );
|
1921 |
Â
}
|
1922 |
+
|
1923 |
+
// Return only captures needed by the pseudo filter method (type and argument)
|
1924 |
+
return match.slice( 0, 3 );
|
1925 |
+
}
|
1926 |
+
},
|
1927 |
+
|
1928 |
+
filter: {
|
1929 |
+
|
1930 |
+
"TAG": function( nodeNameSelector ) {
|
1931 |
+
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
1932 |
+
return nodeNameSelector === "*" ?
|
1933 |
+
function() { return true; } :
|
1934 |
+
function( elem ) {
|
1935 |
+
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
1936 |
+
};
|
1937 |
Â
},
|
1938 |
Â
|
1939 |
+
"CLASS": function( className ) {
|
1940 |
+
var pattern = classCache[ className + " " ];
|
1941 |
Â
|
1942 |
+
return pattern ||
|
1943 |
+
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
|
1944 |
+
classCache( className, function( elem ) {
|
1945 |
+
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
|
1946 |
+
});
|
1947 |
+
},
|
Â
|
|
Â
|
|
1948 |
Â
|
1949 |
+
"ATTR": function( name, operator, check ) {
|
1950 |
+
return function( elem ) {
|
1951 |
+
var result = Sizzle.attr( elem, name );
|
1952 |
Â
|
1953 |
+
if ( result == null ) {
|
1954 |
+
return operator === "!=";
|
1955 |
+
}
|
1956 |
+
if ( !operator ) {
|
1957 |
+
return true;
|
1958 |
+
}
|
1959 |
Â
|
1960 |
+
result += "";
|
Â
|
|
Â
|
|
1961 |
Â
|
1962 |
+
return operator === "=" ? result === check :
|
1963 |
+
operator === "!=" ? result !== check :
|
1964 |
+
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
1965 |
+
operator === "*=" ? check && result.indexOf( check ) > -1 :
|
1966 |
+
operator === "$=" ? check && result.slice( -check.length ) === check :
|
1967 |
+
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1968 |
+
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1969 |
+
false;
|
1970 |
+
};
|
1971 |
+
},
|
1972 |
Â
|
1973 |
+
"CHILD": function( type, what, argument, first, last ) {
|
1974 |
+
var simple = type.slice( 0, 3 ) !== "nth",
|
1975 |
+
forward = type.slice( -4 ) !== "last",
|
1976 |
+
ofType = what === "of-type";
|
1977 |
Â
|
1978 |
+
return first === 1 && last === 0 ?
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1979 |
Â
|
1980 |
+
// Shortcut for :nth-*(n)
|
1981 |
+
function( elem ) {
|
1982 |
+
return !!elem.parentNode;
|
1983 |
+
} :
|
1984 |
Â
|
1985 |
+
function( elem, context, xml ) {
|
1986 |
+
var cache, uniqueCache, outerCache, node, nodeIndex, start,
|
1987 |
+
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
1988 |
+
parent = elem.parentNode,
|
1989 |
+
name = ofType && elem.nodeName.toLowerCase(),
|
1990 |
+
useCache = !xml && !ofType,
|
1991 |
+
diff = false;
|
1992 |
Â
|
1993 |
+
if ( parent ) {
|
1994 |
+
|
1995 |
+
// :(first|last|only)-(child|of-type)
|
1996 |
+
if ( simple ) {
|
1997 |
+
while ( dir ) {
|
1998 |
+
node = elem;
|
1999 |
+
while ( (node = node[ dir ]) ) {
|
2000 |
+
if ( ofType ?
|
2001 |
+
node.nodeName.toLowerCase() === name :
|
2002 |
+
node.nodeType === 1 ) {
|
2003 |
+
|
2004 |
+
return false;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2005 |
Â
}
|
Â
|
|
Â
|
|
2006 |
Â
}
|
2007 |
+
// Reverse direction for :only-* (if we haven't yet done so)
|
2008 |
+
start = dir = type === "only" && !start && "nextSibling";
|
2009 |
Â
}
|
2010 |
+
return true;
|
2011 |
+
}
|
2012 |
+
|
2013 |
+
start = [ forward ? parent.firstChild : parent.lastChild ];
|
2014 |
+
|
2015 |
+
// non-xml :nth-child(...) stores cache data on `parent`
|
2016 |
+
if ( forward && useCache ) {
|
2017 |
+
|
2018 |
+
// Seek `elem` from a previously-cached index
|
2019 |
+
|
2020 |
+
// ...in a gzip-friendly way
|
2021 |
+
node = parent;
|
2022 |
+
outerCache = node[ expando ] || (node[ expando ] = {});
|
2023 |
+
|
2024 |
+
// Support: IE <9 only
|
2025 |
+
// Defend against cloned attroperties (jQuery gh-1709)
|
2026 |
+
uniqueCache = outerCache[ node.uniqueID ] ||
|
2027 |
+
(outerCache[ node.uniqueID ] = {});
|
2028 |
Â
|
2029 |
+
cache = uniqueCache[ type ] || [];
|
2030 |
+
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
2031 |
+
diff = nodeIndex && cache[ 2 ];
|
2032 |
+
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
2033 |
Â
|
2034 |
+
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
Â
|
|
2035 |
Â
|
2036 |
+
// Fallback to seeking `elem` from the start
|
2037 |
+
(diff = nodeIndex = 0) || start.pop()) ) {
|
2038 |
Â
|
2039 |
+
// When found, cache indexes on `parent` and break
|
2040 |
+
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
2041 |
+
uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
|
2042 |
+
break;
|
2043 |
+
}
|
2044 |
+
}
|
2045 |
+
|
2046 |
+
} else {
|
2047 |
+
// Use previously-cached element index if available
|
2048 |
+
if ( useCache ) {
|
2049 |
Â
// ...in a gzip-friendly way
|
2050 |
+
node = elem;
|
2051 |
Â
outerCache = node[ expando ] || (node[ expando ] = {});
|
2052 |
Â
|
2053 |
Â
// Support: IE <9 only
|
2057 |
Â
|
2058 |
Â
cache = uniqueCache[ type ] || [];
|
2059 |
Â
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
2060 |
+
diff = nodeIndex;
|
2061 |
+
}
|
2062 |
Â
|
2063 |
+
// xml :nth-child(...)
|
2064 |
+
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
2065 |
+
if ( diff === false ) {
|
2066 |
+
// Use the same loop as above to seek `elem` from the start
|
2067 |
Â
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
Â
|
|
Â
|
|
2068 |
Â
(diff = nodeIndex = 0) || start.pop()) ) {
|
2069 |
Â
|
2070 |
+
if ( ( ofType ?
|
2071 |
+
node.nodeName.toLowerCase() === name :
|
2072 |
+
node.nodeType === 1 ) &&
|
2073 |
+
++diff ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2074 |
Â
|
2075 |
+
// Cache the index of each encountered element
|
2076 |
+
if ( useCache ) {
|
2077 |
+
outerCache = node[ expando ] || (node[ expando ] = {});
|
Â
|
|
2078 |
Â
|
2079 |
+
// Support: IE <9 only
|
2080 |
+
// Defend against cloned attroperties (jQuery gh-1709)
|
2081 |
+
uniqueCache = outerCache[ node.uniqueID ] ||
|
2082 |
+
(outerCache[ node.uniqueID ] = {});
|
2083 |
Â
|
2084 |
+
uniqueCache[ type ] = [ dirruns, diff ];
|
2085 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2086 |
Â
|
2087 |
+
if ( node === elem ) {
|
2088 |
+
break;
|
Â
|
|
2089 |
Â
}
|
2090 |
Â
}
|
2091 |
Â
}
|
2092 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2093 |
Â
}
|
Â
|
|
Â
|
|
2094 |
Â
|
2095 |
+
// Incorporate the offset, then check against cycle size
|
2096 |
+
diff -= last;
|
2097 |
+
return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
2098 |
+
}
|
2099 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2100 |
Â
},
|
2101 |
Â
|
2102 |
+
"PSEUDO": function( pseudo, argument ) {
|
2103 |
+
// pseudo-class names are case-insensitive
|
2104 |
+
// http://www.w3.org/TR/selectors/#pseudo-classes
|
2105 |
+
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
2106 |
+
// Remember that setFilters inherits from pseudos
|
2107 |
+
var args,
|
2108 |
+
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
2109 |
+
Sizzle.error( "unsupported pseudo: " + pseudo );
|
2110 |
+
|
2111 |
+
// The user may use createPseudo to indicate that
|
2112 |
+
// arguments are needed to create the filter function
|
2113 |
+
// just as Sizzle does
|
2114 |
+
if ( fn[ expando ] ) {
|
2115 |
+
return fn( argument );
|
2116 |
+
}
|
2117 |
+
|
2118 |
+
// But maintain support for old signatures
|
2119 |
+
if ( fn.length > 1 ) {
|
2120 |
+
args = [ pseudo, pseudo, "", argument ];
|
2121 |
+
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
2122 |
+
markFunction(function( seed, matches ) {
|
2123 |
+
var idx,
|
2124 |
+
matched = fn( seed, argument ),
|
2125 |
+
i = matched.length;
|
2126 |
Â
while ( i-- ) {
|
2127 |
+
idx = indexOf( seed, matched[i] );
|
2128 |
+
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
Â
|
|
2129 |
Â
}
|
2130 |
Â
}) :
|
2131 |
+
function( elem ) {
|
2132 |
+
return fn( elem, 0, args );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2133 |
Â
};
|
2134 |
+
}
|
2135 |
+
|
2136 |
+
return fn;
|
2137 |
+
}
|
2138 |
+
},
|
2139 |
Â
|
2140 |
+
pseudos: {
|
2141 |
+
// Potentially complex pseudos
|
2142 |
+
"not": markFunction(function( selector ) {
|
2143 |
+
// Trim the selector passed to compile
|
2144 |
+
// to avoid treating leading and trailing
|
2145 |
+
// spaces as combinators
|
2146 |
+
var input = [],
|
2147 |
+
results = [],
|
2148 |
+
matcher = compile( selector.replace( rtrim, "$1" ) );
|
2149 |
Â
|
2150 |
+
return matcher[ expando ] ?
|
2151 |
+
markFunction(function( seed, matches, context, xml ) {
|
2152 |
+
var elem,
|
2153 |
+
unmatched = matcher( seed, null, xml, [] ),
|
2154 |
+
i = seed.length;
|
2155 |
+
|
2156 |
+
// Match elements unmatched by `matcher`
|
2157 |
+
while ( i-- ) {
|
2158 |
+
if ( (elem = unmatched[i]) ) {
|
2159 |
+
seed[i] = !(matches[i] = elem);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2160 |
Â
}
|
2161 |
+
}
|
2162 |
+
}) :
|
2163 |
+
function( elem, context, xml ) {
|
2164 |
+
input[0] = elem;
|
2165 |
+
matcher( input, null, xml, results );
|
2166 |
+
// Don't keep the element (issue #299)
|
2167 |
+
input[0] = null;
|
2168 |
+
return !results.pop();
|
2169 |
Â
};
|
2170 |
+
}),
|
2171 |
Â
|
2172 |
+
"has": markFunction(function( selector ) {
|
2173 |
+
return function( elem ) {
|
2174 |
+
return Sizzle( selector, elem ).length > 0;
|
2175 |
+
};
|
2176 |
+
}),
|
2177 |
Â
|
2178 |
+
"contains": markFunction(function( text ) {
|
2179 |
+
text = text.replace( runescape, funescape );
|
2180 |
+
return function( elem ) {
|
2181 |
+
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
|
2182 |
+
};
|
2183 |
+
}),
|
2184 |
+
|
2185 |
+
// "Whether an element is represented by a :lang() selector
|
2186 |
+
// is based solely on the element's language value
|
2187 |
+
// being equal to the identifier C,
|
2188 |
+
// or beginning with the identifier C immediately followed by "-".
|
2189 |
+
// The matching of C against the element's language value is performed case-insensitively.
|
2190 |
+
// The identifier C does not have to be a valid language name."
|
2191 |
+
// http://www.w3.org/TR/selectors/#lang-pseudo
|
2192 |
+
"lang": markFunction( function( lang ) {
|
2193 |
+
// lang value must be a valid identifier
|
2194 |
+
if ( !ridentifier.test(lang || "") ) {
|
2195 |
+
Sizzle.error( "unsupported lang: " + lang );
|
2196 |
+
}
|
2197 |
+
lang = lang.replace( runescape, funescape ).toLowerCase();
|
2198 |
+
return function( elem ) {
|
2199 |
+
var elemLang;
|
2200 |
+
do {
|
2201 |
+
if ( (elemLang = documentIsHTML ?
|
2202 |
+
elem.lang :
|
2203 |
+
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
|
2204 |
+
|
2205 |
+
elemLang = elemLang.toLowerCase();
|
2206 |
+
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
2207 |
+
}
|
2208 |
+
} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
|
2209 |
+
return false;
|
2210 |
+
};
|
2211 |
+
}),
|
2212 |
Â
|
2213 |
+
// Miscellaneous
|
2214 |
+
"target": function( elem ) {
|
2215 |
+
var hash = window.location && window.location.hash;
|
2216 |
+
return hash && hash.slice( 1 ) === elem.id;
|
2217 |
+
},
|
2218 |
Â
|
2219 |
+
"root": function( elem ) {
|
2220 |
+
return elem === docElem;
|
2221 |
+
},
|
2222 |
Â
|
2223 |
+
"focus": function( elem ) {
|
2224 |
+
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
|
2225 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
2226 |
Â
|
2227 |
+
// Boolean properties
|
2228 |
+
"enabled": createDisabledPseudo( false ),
|
2229 |
+
"disabled": createDisabledPseudo( true ),
|
Â
|
|
Â
|
|
Â
|
|
2230 |
Â
|
2231 |
+
"checked": function( elem ) {
|
2232 |
+
// In CSS3, :checked should return both checked and selected elements
|
2233 |
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
2234 |
+
var nodeName = elem.nodeName.toLowerCase();
|
2235 |
+
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
2236 |
+
},
|
2237 |
Â
|
2238 |
+
"selected": function( elem ) {
|
2239 |
+
// Accessing this property makes selected-by-default
|
2240 |
+
// options in Safari work properly
|
2241 |
+
if ( elem.parentNode ) {
|
2242 |
+
elem.parentNode.selectedIndex;
|
2243 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2244 |
Â
|
2245 |
+
return elem.selected === true;
|
2246 |
+
},
|
Â
|
|
2247 |
Â
|
2248 |
+
// Contents
|
2249 |
+
"empty": function( elem ) {
|
2250 |
+
// http://www.w3.org/TR/selectors/#empty-pseudo
|
2251 |
+
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
2252 |
+
// but not by others (comment: 8; processing instruction: 7; etc.)
|
2253 |
+
// nodeType < 6 works because attributes (2) do not appear as children
|
2254 |
+
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
2255 |
+
if ( elem.nodeType < 6 ) {
|
2256 |
+
return false;
|
2257 |
+
}
|
2258 |
+
}
|
2259 |
+
return true;
|
2260 |
+
},
|
2261 |
Â
|
2262 |
+
"parent": function( elem ) {
|
2263 |
+
return !Expr.pseudos["empty"]( elem );
|
2264 |
+
},
|
2265 |
Â
|
2266 |
+
// Element/input types
|
2267 |
+
"header": function( elem ) {
|
2268 |
+
return rheader.test( elem.nodeName );
|
2269 |
+
},
|
2270 |
Â
|
2271 |
+
"input": function( elem ) {
|
2272 |
+
return rinputs.test( elem.nodeName );
|
2273 |
+
},
|
Â
|
|
2274 |
Â
|
2275 |
+
"button": function( elem ) {
|
2276 |
+
var name = elem.nodeName.toLowerCase();
|
2277 |
+
return name === "input" && elem.type === "button" || name === "button";
|
2278 |
+
},
|
2279 |
Â
|
2280 |
+
"text": function( elem ) {
|
2281 |
+
var attr;
|
2282 |
+
return elem.nodeName.toLowerCase() === "input" &&
|
2283 |
+
elem.type === "text" &&
|
2284 |
Â
|
2285 |
+
// Support: IE<8
|
2286 |
+
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
|
2287 |
+
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
|
2288 |
+
},
|
2289 |
Â
|
2290 |
+
// Position-in-collection
|
2291 |
+
"first": createPositionalPseudo(function() {
|
2292 |
+
return [ 0 ];
|
2293 |
+
}),
|
2294 |
Â
|
2295 |
+
"last": createPositionalPseudo(function( matchIndexes, length ) {
|
2296 |
+
return [ length - 1 ];
|
2297 |
+
}),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2298 |
Â
|
2299 |
+
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2300 |
+
return [ argument < 0 ? argument + length : argument ];
|
2301 |
+
}),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2302 |
Â
|
2303 |
+
"even": createPositionalPseudo(function( matchIndexes, length ) {
|
2304 |
+
var i = 0;
|
2305 |
+
for ( ; i < length; i += 2 ) {
|
2306 |
+
matchIndexes.push( i );
|
2307 |
+
}
|
2308 |
+
return matchIndexes;
|
2309 |
+
}),
|
2310 |
Â
|
2311 |
+
"odd": createPositionalPseudo(function( matchIndexes, length ) {
|
2312 |
+
var i = 1;
|
2313 |
+
for ( ; i < length; i += 2 ) {
|
2314 |
+
matchIndexes.push( i );
|
2315 |
+
}
|
2316 |
+
return matchIndexes;
|
2317 |
+
}),
|
Â
|
|
Â
|
|
2318 |
Â
|
2319 |
+
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2320 |
+
var i = argument < 0 ? argument + length : argument;
|
2321 |
+
for ( ; --i >= 0; ) {
|
2322 |
+
matchIndexes.push( i );
|
2323 |
+
}
|
2324 |
+
return matchIndexes;
|
2325 |
+
}),
|
2326 |
Â
|
2327 |
+
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2328 |
+
var i = argument < 0 ? argument + length : argument;
|
2329 |
+
for ( ; ++i < length; ) {
|
2330 |
+
matchIndexes.push( i );
|
2331 |
+
}
|
2332 |
+
return matchIndexes;
|
2333 |
+
})
|
2334 |
Â
}
|
2335 |
+
};
|
2336 |
+
|
2337 |
+
Expr.pseudos["nth"] = Expr.pseudos["eq"];
|
2338 |
+
|
2339 |
+
// Add button/input type pseudos
|
2340 |
+
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
2341 |
+
Expr.pseudos[ i ] = createInputPseudo( i );
|
2342 |
+
}
|
2343 |
+
for ( i in { submit: true, reset: true } ) {
|
2344 |
+
Expr.pseudos[ i ] = createButtonPseudo( i );
|
2345 |
+
}
|
2346 |
+
|
2347 |
+
// Easy API for creating new setFilters
|
2348 |
+
function setFilters() {}
|
2349 |
+
setFilters.prototype = Expr.filters = Expr.pseudos;
|
2350 |
+
Expr.setFilters = new setFilters();
|
2351 |
+
|
2352 |
+
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
2353 |
+
var matched, match, tokens, type,
|
2354 |
+
soFar, groups, preFilters,
|
2355 |
+
cached = tokenCache[ selector + " " ];
|
2356 |
+
|
2357 |
+
if ( cached ) {
|
2358 |
+
return parseOnly ? 0 : cached.slice( 0 );
|
2359 |
Â
}
|
2360 |
Â
|
2361 |
+
soFar = selector;
|
2362 |
+
groups = [];
|
2363 |
+
preFilters = Expr.preFilter;
|
Â
|
|
2364 |
Â
|
2365 |
+
while ( soFar ) {
|
Â
|
|
Â
|
|
Â
|
|
2366 |
Â
|
2367 |
+
// Comma and first run
|
2368 |
+
if ( !matched || (match = rcomma.exec( soFar )) ) {
|
2369 |
+
if ( match ) {
|
2370 |
+
// Don't consume trailing commas as valid
|
2371 |
+
soFar = soFar.slice( match[0].length ) || soFar;
|
2372 |
+
}
|
2373 |
+
groups.push( (tokens = []) );
|
2374 |
Â
}
|
2375 |
Â
|
2376 |
+
matched = false;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2377 |
Â
|
2378 |
+
// Combinators
|
2379 |
+
if ( (match = rcombinators.exec( soFar )) ) {
|
2380 |
+
matched = match.shift();
|
2381 |
+
tokens.push({
|
2382 |
+
value: matched,
|
2383 |
+
// Cast descendant combinators to space
|
2384 |
+
type: match[0].replace( rtrim, " " )
|
2385 |
+
});
|
2386 |
+
soFar = soFar.slice( matched.length );
|
2387 |
+
}
|
2388 |
Â
|
2389 |
+
// Filters
|
2390 |
+
for ( type in Expr.filter ) {
|
2391 |
+
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
2392 |
+
(match = preFilters[ type ]( match ))) ) {
|
2393 |
Â
matched = match.shift();
|
2394 |
Â
tokens.push({
|
2395 |
Â
value: matched,
|
2396 |
+
type: type,
|
2397 |
+
matches: match
|
2398 |
Â
});
|
2399 |
Â
soFar = soFar.slice( matched.length );
|
2400 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2401 |
Â
}
|
2402 |
Â
|
2403 |
+
if ( !matched ) {
|
2404 |
+
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2405 |
Â
}
|
Â
|
|
2406 |
Â
}
|
2407 |
Â
|
2408 |
+
// Return the length of the invalid excess
|
2409 |
+
// if we're just parsing
|
2410 |
+
// Otherwise, throw an error or return tokens
|
2411 |
+
return parseOnly ?
|
2412 |
+
soFar.length :
|
2413 |
+
soFar ?
|
2414 |
+
Sizzle.error( selector ) :
|
2415 |
+
// Cache the tokens
|
2416 |
+
tokenCache( selector, groups ).slice( 0 );
|
2417 |
+
};
|
2418 |
+
|
2419 |
+
function toSelector( tokens ) {
|
2420 |
+
var i = 0,
|
2421 |
+
len = tokens.length,
|
2422 |
+
selector = "";
|
2423 |
+
for ( ; i < len; i++ ) {
|
2424 |
+
selector += tokens[i].value;
|
2425 |
+
}
|
2426 |
+
return selector;
|
2427 |
+
}
|
2428 |
Â
|
2429 |
+
function addCombinator( matcher, combinator, base ) {
|
2430 |
+
var dir = combinator.dir,
|
2431 |
+
skip = combinator.next,
|
2432 |
+
key = skip || dir,
|
2433 |
+
checkNonElements = base && key === "parentNode",
|
2434 |
+
doneName = done++;
|
2435 |
+
|
2436 |
+
return combinator.first ?
|
2437 |
+
// Check against closest ancestor/preceding element
|
2438 |
+
function( elem, context, xml ) {
|
2439 |
+
while ( (elem = elem[ dir ]) ) {
|
2440 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2441 |
+
return matcher( elem, context, xml );
|
2442 |
Â
}
|
2443 |
+
}
|
2444 |
+
return false;
|
2445 |
+
} :
|
2446 |
Â
|
2447 |
+
// Check against all ancestor/preceding elements
|
2448 |
+
function( elem, context, xml ) {
|
2449 |
+
var oldCache, uniqueCache, outerCache,
|
2450 |
+
newCache = [ dirruns, doneName ];
|
2451 |
Â
|
2452 |
+
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
2453 |
+
if ( xml ) {
|
2454 |
+
while ( (elem = elem[ dir ]) ) {
|
2455 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2456 |
+
if ( matcher( elem, context, xml ) ) {
|
2457 |
+
return true;
|
Â
|
|
2458 |
Â
}
|
2459 |
Â
}
|
2460 |
+
}
|
2461 |
+
} else {
|
2462 |
+
while ( (elem = elem[ dir ]) ) {
|
2463 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2464 |
+
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
2465 |
Â
|
2466 |
+
// Support: IE <9 only
|
2467 |
+
// Defend against cloned attroperties (jQuery gh-1709)
|
2468 |
+
uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
|
2469 |
Â
|
2470 |
+
if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
2471 |
+
elem = elem[ dir ] || elem;
|
2472 |
+
} else if ( (oldCache = uniqueCache[ key ]) &&
|
2473 |
+
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
2474 |
Â
|
2475 |
+
// Assign to newCache so results back-propagate to previous elements
|
2476 |
+
return (newCache[ 2 ] = oldCache[ 2 ]);
|
2477 |
+
} else {
|
2478 |
+
// Reuse newcache so results back-propagate to previous elements
|
2479 |
+
uniqueCache[ key ] = newCache;
|
2480 |
Â
|
2481 |
+
// A match means we're done; a fail means we have to keep checking
|
2482 |
+
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
2483 |
+
return true;
|
Â
|
|
2484 |
Â
}
|
2485 |
Â
}
|
2486 |
Â
}
|
2487 |
Â
}
|
2488 |
+
}
|
2489 |
+
return false;
|
2490 |
+
};
|
2491 |
+
}
|
2492 |
Â
|
2493 |
+
function elementMatcher( matchers ) {
|
2494 |
+
return matchers.length > 1 ?
|
2495 |
+
function( elem, context, xml ) {
|
2496 |
+
var i = matchers.length;
|
2497 |
+
while ( i-- ) {
|
2498 |
+
if ( !matchers[i]( elem, context, xml ) ) {
|
2499 |
+
return false;
|
Â
|
|
2500 |
Â
}
|
2501 |
+
}
|
2502 |
+
return true;
|
2503 |
+
} :
|
2504 |
+
matchers[0];
|
2505 |
+
}
|
2506 |
+
|
2507 |
+
function multipleContexts( selector, contexts, results ) {
|
2508 |
+
var i = 0,
|
2509 |
+
len = contexts.length;
|
2510 |
+
for ( ; i < len; i++ ) {
|
2511 |
+
Sizzle( selector, contexts[i], results );
|
Â
|
|
2512 |
Â
}
|
2513 |
+
return results;
|
2514 |
+
}
|
2515 |
Â
|
2516 |
+
function condense( unmatched, map, filter, context, xml ) {
|
2517 |
+
var elem,
|
2518 |
+
newUnmatched = [],
|
2519 |
+
i = 0,
|
2520 |
+
len = unmatched.length,
|
2521 |
+
mapped = map != null;
|
2522 |
Â
|
2523 |
+
for ( ; i < len; i++ ) {
|
2524 |
+
if ( (elem = unmatched[i]) ) {
|
2525 |
+
if ( !filter || filter( elem, context, xml ) ) {
|
2526 |
+
newUnmatched.push( elem );
|
2527 |
+
if ( mapped ) {
|
2528 |
+
map.push( i );
|
Â
|
|
2529 |
Â
}
|
2530 |
Â
}
|
2531 |
Â
}
|
Â
|
|
Â
|
|
2532 |
Â
}
|
2533 |
Â
|
2534 |
+
return newUnmatched;
|
2535 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2536 |
Â
|
2537 |
+
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
|
2538 |
+
if ( postFilter && !postFilter[ expando ] ) {
|
2539 |
+
postFilter = setMatcher( postFilter );
|
2540 |
+
}
|
2541 |
+
if ( postFinder && !postFinder[ expando ] ) {
|
2542 |
+
postFinder = setMatcher( postFinder, postSelector );
|
2543 |
+
}
|
2544 |
+
return markFunction(function( seed, results, context, xml ) {
|
2545 |
+
var temp, i, elem,
|
2546 |
+
preMap = [],
|
2547 |
+
postMap = [],
|
2548 |
+
preexisting = results.length,
|
2549 |
Â
|
2550 |
+
// Get initial elements from seed or context
|
2551 |
+
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
|
Â
|
|
Â
|
|
2552 |
Â
|
2553 |
+
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
2554 |
+
matcherIn = preFilter && ( seed || !selector ) ?
|
2555 |
+
condense( elems, preMap, preFilter, context, xml ) :
|
2556 |
+
elems,
|
2557 |
Â
|
2558 |
+
matcherOut = matcher ?
|
2559 |
+
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
|
2560 |
+
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
2561 |
Â
|
2562 |
+
// ...intermediate processing is necessary
|
2563 |
+
[] :
|
Â
|
|
2564 |
Â
|
2565 |
+
// ...otherwise use results directly
|
2566 |
+
results :
|
2567 |
+
matcherIn;
|
Â
|
|
2568 |
Â
|
2569 |
+
// Find primary matches
|
2570 |
+
if ( matcher ) {
|
2571 |
+
matcher( matcherIn, matcherOut, context, xml );
|
2572 |
+
}
|
2573 |
Â
|
2574 |
+
// Apply postFilter
|
2575 |
+
if ( postFilter ) {
|
2576 |
+
temp = condense( matcherOut, postMap );
|
2577 |
+
postFilter( temp, [], context, xml );
|
2578 |
+
|
2579 |
+
// Un-match failing elements by moving them back to matcherIn
|
2580 |
+
i = temp.length;
|
2581 |
+
while ( i-- ) {
|
2582 |
+
if ( (elem = temp[i]) ) {
|
2583 |
+
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
|
2584 |
Â
}
|
2585 |
Â
}
|
2586 |
+
}
|
2587 |
Â
|
2588 |
+
if ( seed ) {
|
2589 |
+
if ( postFinder || preFilter ) {
|
2590 |
+
if ( postFinder ) {
|
2591 |
+
// Get the final matcherOut by condensing this intermediate into postFinder contexts
|
2592 |
+
temp = [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2593 |
Â
i = matcherOut.length;
|
2594 |
Â
while ( i-- ) {
|
2595 |
+
if ( (elem = matcherOut[i]) ) {
|
2596 |
+
// Restore matcherIn since elem is not yet a final match
|
2597 |
+
temp.push( (matcherIn[i] = elem) );
|
Â
|
|
2598 |
Â
}
|
2599 |
Â
}
|
2600 |
+
postFinder( null, (matcherOut = []), temp, xml );
|
2601 |
Â
}
|
2602 |
Â
|
2603 |
+
// Move matched elements from seed to results to keep them synchronized
|
2604 |
+
i = matcherOut.length;
|
2605 |
+
while ( i-- ) {
|
2606 |
+
if ( (elem = matcherOut[i]) &&
|
2607 |
+
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
|
2608 |
+
|
2609 |
+
seed[temp] = !(results[temp] = elem);
|
2610 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
2611 |
Â
}
|
2612 |
Â
}
|
Â
|
|
Â
|
|
2613 |
Â
|
2614 |
+
// Add elements to results, through postFinder if defined
|
2615 |
+
} else {
|
2616 |
+
matcherOut = condense(
|
2617 |
+
matcherOut === results ?
|
2618 |
+
matcherOut.splice( preexisting, matcherOut.length ) :
|
2619 |
+
matcherOut
|
2620 |
+
);
|
2621 |
+
if ( postFinder ) {
|
2622 |
+
postFinder( null, results, matcherOut, xml );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2623 |
Â
} else {
|
2624 |
+
push.apply( results, matcherOut );
|
2625 |
+
}
|
2626 |
+
}
|
2627 |
+
});
|
2628 |
+
}
|
2629 |
+
|
2630 |
+
function matcherFromTokens( tokens ) {
|
2631 |
+
var checkContext, matcher, j,
|
2632 |
+
len = tokens.length,
|
2633 |
+
leadingRelative = Expr.relative[ tokens[0].type ],
|
2634 |
+
implicitRelative = leadingRelative || Expr.relative[" "],
|
2635 |
+
i = leadingRelative ? 1 : 0,
|
2636 |
+
|
2637 |
+
// The foundational matcher ensures that elements are reachable from top-level context(s)
|
2638 |
+
matchContext = addCombinator( function( elem ) {
|
2639 |
+
return elem === checkContext;
|
2640 |
+
}, implicitRelative, true ),
|
2641 |
+
matchAnyContext = addCombinator( function( elem ) {
|
2642 |
+
return indexOf( checkContext, elem ) > -1;
|
2643 |
+
}, implicitRelative, true ),
|
2644 |
+
matchers = [ function( elem, context, xml ) {
|
2645 |
+
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2646 |
+
(checkContext = context).nodeType ?
|
2647 |
+
matchContext( elem, context, xml ) :
|
2648 |
+
matchAnyContext( elem, context, xml ) );
|
2649 |
+
// Avoid hanging onto element (issue #299)
|
2650 |
+
checkContext = null;
|
2651 |
+
return ret;
|
2652 |
+
} ];
|
2653 |
+
|
2654 |
+
for ( ; i < len; i++ ) {
|
2655 |
+
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
2656 |
+
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
|
2657 |
+
} else {
|
2658 |
+
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
2659 |
+
|
2660 |
+
// Return special upon seeing a positional matcher
|
2661 |
+
if ( matcher[ expando ] ) {
|
2662 |
+
// Find the next relative operator (if any) for proper handling
|
2663 |
+
j = ++i;
|
2664 |
+
for ( ; j < len; j++ ) {
|
2665 |
+
if ( Expr.relative[ tokens[j].type ] ) {
|
2666 |
+
break;
|
2667 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2668 |
Â
}
|
2669 |
+
return setMatcher(
|
2670 |
+
i > 1 && elementMatcher( matchers ),
|
2671 |
+
i > 1 && toSelector(
|
2672 |
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
2673 |
+
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
|
2674 |
+
).replace( rtrim, "$1" ),
|
2675 |
+
matcher,
|
2676 |
+
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
2677 |
+
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
2678 |
+
j < len && toSelector( tokens )
|
2679 |
+
);
|
2680 |
Â
}
|
2681 |
+
matchers.push( matcher );
|
2682 |
Â
}
|
Â
|
|
Â
|
|
2683 |
Â
}
|
2684 |
Â
|
2685 |
+
return elementMatcher( matchers );
|
2686 |
+
}
|
2687 |
+
|
2688 |
+
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
2689 |
+
var bySet = setMatchers.length > 0,
|
2690 |
+
byElement = elementMatchers.length > 0,
|
2691 |
+
superMatcher = function( seed, context, xml, results, outermost ) {
|
2692 |
+
var elem, j, matcher,
|
2693 |
+
matchedCount = 0,
|
2694 |
+
i = "0",
|
2695 |
+
unmatched = seed && [],
|
2696 |
+
setMatched = [],
|
2697 |
+
contextBackup = outermostContext,
|
2698 |
+
// We must always have either seed elements or outermost context
|
2699 |
+
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
|
2700 |
+
// Use integer dirruns iff this is the outermost matcher
|
2701 |
+
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
|
2702 |
+
len = elems.length;
|
2703 |
+
|
2704 |
+
if ( outermost ) {
|
2705 |
+
outermostContext = context === document || context || outermost;
|
2706 |
+
}
|
2707 |
+
|
2708 |
+
// Add elements passing elementMatchers directly to results
|
2709 |
+
// Support: IE<9, Safari
|
2710 |
+
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
|
2711 |
+
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
2712 |
+
if ( byElement && elem ) {
|
2713 |
+
j = 0;
|
2714 |
+
if ( !context && elem.ownerDocument !== document ) {
|
2715 |
+
setDocument( elem );
|
2716 |
+
xml = !documentIsHTML;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2717 |
Â
}
|
2718 |
+
while ( (matcher = elementMatchers[j++]) ) {
|
2719 |
+
if ( matcher( elem, context || document, xml) ) {
|
2720 |
+
results.push( elem );
|
2721 |
+
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2722 |
Â
}
|
2723 |
Â
}
|
2724 |
+
if ( outermost ) {
|
2725 |
+
dirruns = dirrunsUnique;
|
2726 |
+
}
|
2727 |
Â
}
|
2728 |
Â
|
2729 |
+
// Track unmatched elements for set filters
|
2730 |
+
if ( bySet ) {
|
2731 |
+
// They will have gone through all possible matchers
|
2732 |
+
if ( (elem = !matcher && elem) ) {
|
2733 |
+
matchedCount--;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2734 |
Â
}
|
2735 |
Â
|
2736 |
+
// Lengthen the array for every element, matched or not
|
2737 |
Â
if ( seed ) {
|
2738 |
+
unmatched.push( elem );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2739 |
Â
}
|
2740 |
+
}
|
2741 |
+
}
|
2742 |
Â
|
2743 |
+
// `i` is now the count of elements visited above, and adding it to `matchedCount`
|
2744 |
+
// makes the latter nonnegative.
|
2745 |
+
matchedCount += i;
|
2746 |
Â
|
2747 |
+
// Apply set filters to unmatched elements
|
2748 |
+
// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
|
2749 |
+
// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
|
2750 |
+
// no element matchers and no seed.
|
2751 |
+
// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
|
2752 |
+
// case, which will result in a "00" `matchedCount` that differs from `i` but is also
|
2753 |
+
// numerically zero.
|
2754 |
+
if ( bySet && i !== matchedCount ) {
|
2755 |
+
j = 0;
|
2756 |
+
while ( (matcher = setMatchers[j++]) ) {
|
2757 |
+
matcher( unmatched, setMatched, context, xml );
|
2758 |
+
}
|
2759 |
Â
|
2760 |
+
if ( seed ) {
|
2761 |
+
// Reintegrate element matches to eliminate the need for sorting
|
2762 |
+
if ( matchedCount > 0 ) {
|
2763 |
+
while ( i-- ) {
|
2764 |
+
if ( !(unmatched[i] || setMatched[i]) ) {
|
2765 |
+
setMatched[i] = pop.call( results );
|
2766 |
+
}
|
2767 |
+
}
|
2768 |
Â
}
|
Â
|
|
2769 |
Â
|
2770 |
+
// Discard index placeholder values to get only actual matches
|
2771 |
+
setMatched = condense( setMatched );
|
Â
|
|
Â
|
|
2772 |
Â
}
|
2773 |
Â
|
2774 |
+
// Add matches to results
|
2775 |
+
push.apply( results, setMatched );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2776 |
Â
|
2777 |
+
// Seedless set matches succeeding multiple successful matchers stipulate sorting
|
2778 |
+
if ( outermost && !seed && setMatched.length > 0 &&
|
2779 |
+
( matchedCount + setMatchers.length ) > 1 ) {
|
Â
|
|
Â
|
|
2780 |
Â
|
2781 |
+
Sizzle.uniqueSort( results );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2782 |
Â
}
|
2783 |
Â
}
|
2784 |
Â
|
2785 |
+
// Override manipulation of globals by nested matchers
|
2786 |
+
if ( outermost ) {
|
2787 |
+
dirruns = dirrunsUnique;
|
2788 |
+
outermostContext = contextBackup;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2789 |
Â
}
|
2790 |
Â
|
2791 |
+
return unmatched;
|
2792 |
+
};
|
Â
|
|
Â
|
|
2793 |
Â
|
2794 |
+
return bySet ?
|
2795 |
+
markFunction( superMatcher ) :
|
2796 |
+
superMatcher;
|
2797 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2798 |
Â
|
2799 |
+
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
2800 |
+
var i,
|
2801 |
+
setMatchers = [],
|
2802 |
+
elementMatchers = [],
|
2803 |
+
cached = compilerCache[ selector + " " ];
|
2804 |
+
|
2805 |
+
if ( !cached ) {
|
2806 |
+
// Generate a function of recursive functions that can be used to check each element
|
2807 |
+
if ( !match ) {
|
2808 |
+
match = tokenize( selector );
|
2809 |
+
}
|
2810 |
+
i = match.length;
|
2811 |
+
while ( i-- ) {
|
2812 |
+
cached = matcherFromTokens( match[i] );
|
2813 |
+
if ( cached[ expando ] ) {
|
2814 |
+
setMatchers.push( cached );
|
2815 |
+
} else {
|
2816 |
+
elementMatchers.push( cached );
|
2817 |
Â
}
|
2818 |
Â
}
|
2819 |
Â
|
2820 |
+
// Cache the compiled function
|
2821 |
+
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2822 |
Â
|
2823 |
+
// Save selector and tokenization
|
2824 |
+
cached.selector = selector;
|
2825 |
+
}
|
2826 |
+
return cached;
|
2827 |
+
};
|
2828 |
+
|
2829 |
+
/**
|
2830 |
+
* A low-level selection function that works with Sizzle's compiled
|
2831 |
+
* selector functions
|
2832 |
+
* @param {String|Function} selector A selector or a pre-compiled
|
2833 |
+
* selector function built with Sizzle.compile
|
2834 |
+
* @param {Element} context
|
2835 |
+
* @param {Array} [results]
|
2836 |
+
* @param {Array} [seed] A set of elements to match against
|
2837 |
+
*/
|
2838 |
+
select = Sizzle.select = function( selector, context, results, seed ) {
|
2839 |
+
var i, tokens, token, type, find,
|
2840 |
+
compiled = typeof selector === "function" && selector,
|
2841 |
+
match = !seed && tokenize( (selector = compiled.selector || selector) );
|
2842 |
+
|
2843 |
+
results = results || [];
|
2844 |
+
|
2845 |
+
// Try to minimize operations if there is only one selector in the list and no seed
|
2846 |
+
// (the latter of which guarantees us context)
|
2847 |
+
if ( match.length === 1 ) {
|
2848 |
+
|
2849 |
+
// Reduce context if the leading compound selector is an ID
|
2850 |
+
tokens = match[0] = match[0].slice( 0 );
|
2851 |
+
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2852 |
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
|
2853 |
+
|
2854 |
+
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
2855 |
+
if ( !context ) {
|
2856 |
+
return results;
|
2857 |
Â
|
2858 |
+
// Precompiled matchers will still verify ancestry, so step up a level
|
2859 |
+
} else if ( compiled ) {
|
2860 |
+
context = context.parentNode;
|
2861 |
+
}
|
2862 |
Â
|
2863 |
+
selector = selector.slice( tokens.shift().value.length );
|
2864 |
+
}
|
2865 |
Â
|
2866 |
+
// Fetch a seed set for right-to-left matching
|
2867 |
+
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
|
2868 |
+
while ( i-- ) {
|
2869 |
+
token = tokens[i];
|
Â
|
|
Â
|
|
2870 |
Â
|
2871 |
+
// Abort if we hit a combinator
|
2872 |
+
if ( Expr.relative[ (type = token.type) ] ) {
|
2873 |
+
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2874 |
Â
}
|
2875 |
+
if ( (find = Expr.find[ type ]) ) {
|
2876 |
+
// Search, expanding context for leading sibling combinators
|
2877 |
+
if ( (seed = find(
|
2878 |
+
token.matches[0].replace( runescape, funescape ),
|
2879 |
+
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
|
2880 |
+
)) ) {
|
2881 |
+
|
2882 |
+
// If seed is empty or no tokens remain, we can return early
|
2883 |
+
tokens.splice( i, 1 );
|
2884 |
+
selector = seed.length && toSelector( tokens );
|
2885 |
+
if ( !selector ) {
|
2886 |
+
push.apply( results, seed );
|
2887 |
+
return results;
|
2888 |
+
}
|
2889 |
Â
|
2890 |
+
break;
|
2891 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2892 |
Â
}
|
2893 |
+
}
|
2894 |
Â
}
|
2895 |
Â
|
2896 |
+
// Compile and execute a filtering function if one is not provided
|
2897 |
+
// Provide `match` to avoid retokenization if we modified the selector above
|
2898 |
+
( compiled || compile( selector, match ) )(
|
2899 |
+
seed,
|
2900 |
+
context,
|
2901 |
+
!documentIsHTML,
|
2902 |
+
results,
|
2903 |
+
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
2904 |
+
);
|
2905 |
+
return results;
|
2906 |
+
};
|
2907 |
+
|
2908 |
+
// One-time assignments
|
2909 |
+
|
2910 |
+
// Sort stability
|
2911 |
+
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
|
2912 |
+
|
2913 |
+
// Support: Chrome 14-35+
|
2914 |
+
// Always assume duplicates if they aren't passed to the comparison function
|
2915 |
+
support.detectDuplicates = !!hasDuplicate;
|
2916 |
+
|
2917 |
+
// Initialize against the default document
|
2918 |
+
setDocument();
|
2919 |
+
|
2920 |
+
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
|
2921 |
+
// Detached nodes confoundingly follow *each other*
|
2922 |
+
support.sortDetached = assert(function( el ) {
|
2923 |
+
// Should return 1, but returns 4 (following)
|
2924 |
+
return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
|
2925 |
+
});
|
2926 |
+
|
2927 |
+
// Support: IE<8
|
2928 |
+
// Prevent attribute/property "interpolation"
|
2929 |
+
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
2930 |
+
if ( !assert(function( el ) {
|
2931 |
+
el.innerHTML = "<a href='#'></a>";
|
2932 |
+
return el.firstChild.getAttribute("href") === "#" ;
|
2933 |
+
}) ) {
|
2934 |
+
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
2935 |
+
if ( !isXML ) {
|
2936 |
+
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
2937 |
+
}
|
2938 |
+
});
|
2939 |
+
}
|
2940 |
+
|
2941 |
+
// Support: IE<9
|
2942 |
+
// Use defaultValue in place of getAttribute("value")
|
2943 |
+
if ( !support.attributes || !assert(function( el ) {
|
2944 |
+
el.innerHTML = "<input/>";
|
2945 |
+
el.firstChild.setAttribute( "value", "" );
|
2946 |
+
return el.firstChild.getAttribute( "value" ) === "";
|
2947 |
+
}) ) {
|
2948 |
+
addHandle( "value", function( elem, name, isXML ) {
|
2949 |
+
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
2950 |
+
return elem.defaultValue;
|
2951 |
+
}
|
2952 |
+
});
|
2953 |
+
}
|
2954 |
+
|
2955 |
+
// Support: IE<9
|
2956 |
+
// Use getAttributeNode to fetch booleans when getAttribute lies
|
2957 |
+
if ( !assert(function( el ) {
|
2958 |
+
return el.getAttribute("disabled") == null;
|
2959 |
+
}) ) {
|
2960 |
+
addHandle( booleans, function( elem, name, isXML ) {
|
2961 |
+
var val;
|
2962 |
+
if ( !isXML ) {
|
2963 |
+
return elem[ name ] === true ? name.toLowerCase() :
|
2964 |
+
(val = elem.getAttributeNode( name )) && val.specified ?
|
2965 |
+
val.value :
|
2966 |
+
null;
|
2967 |
+
}
|
2968 |
+
});
|
2969 |
+
}
|
2970 |
Â
|
2971 |
+
return Sizzle;
|
2972 |
Â
|
2973 |
+
})( window );
|
2974 |
Â
|
2975 |
Â
|
2976 |
Â
|
2977 |
+
jQuery.find = Sizzle;
|
2978 |
+
jQuery.expr = Sizzle.selectors;
|
2979 |
Â
|
2980 |
+
// Deprecated
|
2981 |
+
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
2982 |
+
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
|
2983 |
+
jQuery.text = Sizzle.getText;
|
2984 |
+
jQuery.isXMLDoc = Sizzle.isXML;
|
2985 |
+
jQuery.contains = Sizzle.contains;
|
2986 |
+
jQuery.escapeSelector = Sizzle.escape;
|
2987 |
Â
|
2988 |
Â
|
2989 |
Â
|
2990 |
Â
|
2991 |
+
var dir = function( elem, dir, until ) {
|
2992 |
+
var matched = [],
|
2993 |
+
truncate = until !== undefined;
|
2994 |
Â
|
2995 |
+
while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
|
2996 |
+
if ( elem.nodeType === 1 ) {
|
2997 |
+
if ( truncate && jQuery( elem ).is( until ) ) {
|
2998 |
+
break;
|
Â
|
|
Â
|
|
2999 |
Â
}
|
3000 |
+
matched.push( elem );
|
3001 |
Â
}
|
3002 |
+
}
|
3003 |
+
return matched;
|
3004 |
+
};
|
3005 |
Â
|
3006 |
Â
|
3007 |
+
var siblings = function( n, elem ) {
|
3008 |
+
var matched = [];
|
3009 |
Â
|
3010 |
+
for ( ; n; n = n.nextSibling ) {
|
3011 |
+
if ( n.nodeType === 1 && n !== elem ) {
|
3012 |
+
matched.push( n );
|
Â
|
|
3013 |
Â
}
|
3014 |
+
}
|
3015 |
Â
|
3016 |
+
return matched;
|
3017 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
3018 |
Â
|
3019 |
Â
|
3020 |
+
var rneedsContext = jQuery.expr.match.needsContext;
|
3021 |
Â
|
Â
|
|
3022 |
Â
|
Â
|
|
3023 |
Â
|
3024 |
+
function nodeName( elem, name ) {
|
Â
|
|
3025 |
Â
|
3026 |
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
3027 |
Â
|
3028 |
+
};
|
3029 |
+
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
3030 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3031 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3032 |
Â
|
3033 |
+
// Implement the identical functionality for filter and not
|
3034 |
+
function winnow( elements, qualifier, not ) {
|
3035 |
+
if ( isFunction( qualifier ) ) {
|
3036 |
+
return jQuery.grep( elements, function( elem, i ) {
|
3037 |
+
return !!qualifier.call( elem, i, elem ) !== not;
|
3038 |
+
} );
|
3039 |
+
}
|
3040 |
Â
|
3041 |
+
// Single element
|
3042 |
+
if ( qualifier.nodeType ) {
|
3043 |
+
return jQuery.grep( elements, function( elem ) {
|
3044 |
+
return ( elem === qualifier ) !== not;
|
3045 |
+
} );
|
3046 |
Â
}
|
3047 |
Â
|
3048 |
+
// Arraylike of elements (jQuery, arguments, Array)
|
3049 |
+
if ( typeof qualifier !== "string" ) {
|
3050 |
+
return jQuery.grep( elements, function( elem ) {
|
3051 |
+
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
3052 |
+
} );
|
3053 |
+
}
|
3054 |
Â
|
3055 |
+
// Filtered directly for both simple and complex selectors
|
3056 |
+
return jQuery.filter( qualifier, elements, not );
|
3057 |
+
}
|
3058 |
Â
|
3059 |
+
jQuery.filter = function( expr, elems, not ) {
|
3060 |
+
var elem = elems[ 0 ];
|
Â
|
|
3061 |
Â
|
3062 |
+
if ( not ) {
|
3063 |
+
expr = ":not(" + expr + ")";
|
3064 |
+
}
|
Â
|
|
3065 |
Â
|
3066 |
+
if ( elems.length === 1 && elem.nodeType === 1 ) {
|
3067 |
+
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
3068 |
+
}
|
Â
|
|
Â
|
|
3069 |
Â
|
3070 |
+
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
3071 |
+
return elem.nodeType === 1;
|
3072 |
+
} ) );
|
3073 |
+
};
|
3074 |
+
|
3075 |
+
jQuery.fn.extend( {
|
3076 |
+
find: function( selector ) {
|
3077 |
+
var i, ret,
|
3078 |
+
len = this.length,
|
3079 |
+
self = this;
|
3080 |
+
|
3081 |
+
if ( typeof selector !== "string" ) {
|
3082 |
+
return this.pushStack( jQuery( selector ).filter( function() {
|
3083 |
+
for ( i = 0; i < len; i++ ) {
|
3084 |
+
if ( jQuery.contains( self[ i ], this ) ) {
|
3085 |
+
return true;
|
3086 |
Â
}
|
3087 |
+
}
|
3088 |
+
} ) );
|
3089 |
+
}
|
Â
|
|
3090 |
Â
|
3091 |
+
ret = this.pushStack( [] );
|
Â
|
|
Â
|
|
3092 |
Â
|
3093 |
+
for ( i = 0; i < len; i++ ) {
|
3094 |
+
jQuery.find( selector, self[ i ], ret );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3095 |
Â
}
|
Â
|
|
3096 |
Â
|
3097 |
+
return len > 1 ? jQuery.uniqueSort( ret ) : ret;
|
3098 |
+
},
|
3099 |
+
filter: function( selector ) {
|
3100 |
+
return this.pushStack( winnow( this, selector || [], false ) );
|
3101 |
+
},
|
3102 |
+
not: function( selector ) {
|
3103 |
+
return this.pushStack( winnow( this, selector || [], true ) );
|
3104 |
+
},
|
3105 |
+
is: function( selector ) {
|
3106 |
+
return !!winnow(
|
3107 |
+
this,
|
3108 |
Â
|
3109 |
+
// If this is a positional/relative selector, check membership in the returned set
|
3110 |
+
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
3111 |
+
typeof selector === "string" && rneedsContext.test( selector ) ?
|
3112 |
+
jQuery( selector ) :
|
3113 |
+
selector || [],
|
3114 |
+
false
|
3115 |
+
).length;
|
3116 |
+
}
|
3117 |
+
} );
|
3118 |
Â
|
3119 |
Â
|
3120 |
+
// Initialize a jQuery object
|
Â
|
|
3121 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3122 |
Â
|
3123 |
+
// A central reference to the root jQuery(document)
|
3124 |
+
var rootjQuery,
|
3125 |
Â
|
3126 |
+
// A simple way to check for HTML strings
|
3127 |
+
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
3128 |
+
// Strict HTML recognition (#11290: must start with <)
|
3129 |
+
// Shortcut simple #id case for speed
|
3130 |
+
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
3131 |
Â
|
3132 |
+
init = jQuery.fn.init = function( selector, context, root ) {
|
3133 |
+
var match, elem;
|
Â
|
|
3134 |
Â
|
3135 |
+
// HANDLE: $(""), $(null), $(undefined), $(false)
|
3136 |
+
if ( !selector ) {
|
3137 |
+
return this;
|
3138 |
+
}
|
Â
|
|
3139 |
Â
|
3140 |
+
// Method init() accepts an alternate rootjQuery
|
3141 |
+
// so migrate can support jQuery.sub (gh-2101)
|
3142 |
+
root = root || rootjQuery;
|
3143 |
Â
|
3144 |
+
// Handle HTML strings
|
3145 |
+
if ( typeof selector === "string" ) {
|
3146 |
+
if ( selector[ 0 ] === "<" &&
|
3147 |
+
selector[ selector.length - 1 ] === ">" &&
|
3148 |
+
selector.length >= 3 ) {
|
3149 |
Â
|
3150 |
+
// Assume that strings that start and end with <> are HTML and skip the regex check
|
3151 |
+
match = [ null, selector, null ];
|
3152 |
Â
|
3153 |
+
} else {
|
3154 |
+
match = rquickExpr.exec( selector );
|
3155 |
+
}
|
3156 |
Â
|
3157 |
+
// Match html or make sure no context is specified for #id
|
3158 |
+
if ( match && ( match[ 1 ] || !context ) ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3159 |
Â
|
3160 |
+
// HANDLE: $(html) -> $(array)
|
3161 |
+
if ( match[ 1 ] ) {
|
3162 |
+
context = context instanceof jQuery ? context[ 0 ] : context;
|
3163 |
Â
|
3164 |
+
// Option to run scripts is true for back-compat
|
3165 |
+
// Intentionally let the error be thrown if parseHTML is not present
|
3166 |
+
jQuery.merge( this, jQuery.parseHTML(
|
3167 |
+
match[ 1 ],
|
3168 |
+
context && context.nodeType ? context.ownerDocument || context : document,
|
3169 |
+
true
|
3170 |
+
) );
|
3171 |
Â
|
3172 |
+
// HANDLE: $(html, props)
|
3173 |
+
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
3174 |
+
for ( match in context ) {
|
3175 |
+
|
3176 |
+
// Properties of context are called as methods if possible
|
3177 |
+
if ( isFunction( this[ match ] ) ) {
|
3178 |
+
this[ match ]( context[ match ] );
|
3179 |
+
|
3180 |
+
// ...and otherwise set as attributes
|
3181 |
+
} else {
|
3182 |
+
this.attr( match, context[ match ] );
|
3183 |
Â
}
|
3184 |
Â
}
|
3185 |
+
}
|
3186 |
Â
|
3187 |
+
return this;
|
3188 |
Â
|
3189 |
+
// HANDLE: $(#id)
|
3190 |
+
} else {
|
3191 |
+
elem = document.getElementById( match[ 2 ] );
|
3192 |
Â
|
3193 |
+
if ( elem ) {
|
3194 |
Â
|
3195 |
+
// Inject the element directly into the jQuery object
|
3196 |
+
this[ 0 ] = elem;
|
3197 |
+
this.length = 1;
|
Â
|
|
Â
|
|
3198 |
Â
}
|
3199 |
+
return this;
|
3200 |
+
}
|
3201 |
Â
|
3202 |
+
// HANDLE: $(expr, $(...))
|
3203 |
+
} else if ( !context || context.jquery ) {
|
3204 |
+
return ( context || root ).find( selector );
|
3205 |
Â
|
3206 |
+
// HANDLE: $(expr, context)
|
3207 |
+
// (which is just equivalent to: $(context).find(expr)
|
3208 |
+
} else {
|
3209 |
+
return this.constructor( context ).find( selector );
|
3210 |
+
}
|
3211 |
Â
|
3212 |
+
// HANDLE: $(DOMElement)
|
3213 |
+
} else if ( selector.nodeType ) {
|
3214 |
+
this[ 0 ] = selector;
|
3215 |
+
this.length = 1;
|
3216 |
+
return this;
|
3217 |
Â
|
3218 |
+
// HANDLE: $(function)
|
3219 |
+
// Shortcut for document ready
|
3220 |
+
} else if ( isFunction( selector ) ) {
|
3221 |
+
return root.ready !== undefined ?
|
3222 |
+
root.ready( selector ) :
|
3223 |
Â
|
3224 |
+
// Execute immediately if ready is not present
|
3225 |
+
selector( jQuery );
|
3226 |
+
}
|
3227 |
Â
|
3228 |
+
return jQuery.makeArray( selector, this );
|
3229 |
+
};
|
3230 |
Â
|
3231 |
+
// Give the init function the jQuery prototype for later instantiation
|
3232 |
+
init.prototype = jQuery.fn;
|
3233 |
Â
|
3234 |
+
// Initialize central reference
|
3235 |
+
rootjQuery = jQuery( document );
|
3236 |
Â
|
3237 |
Â
|
3238 |
+
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
3239 |
Â
|
3240 |
+
// Methods guaranteed to produce a unique set when starting from a unique set
|
3241 |
+
guaranteedUnique = {
|
3242 |
+
children: true,
|
3243 |
+
contents: true,
|
3244 |
+
next: true,
|
3245 |
+
prev: true
|
3246 |
+
};
|
3247 |
Â
|
3248 |
+
jQuery.fn.extend( {
|
3249 |
+
has: function( target ) {
|
3250 |
+
var targets = jQuery( target, this ),
|
3251 |
+
l = targets.length;
|
3252 |
Â
|
3253 |
+
return this.filter( function() {
|
3254 |
+
var i = 0;
|
3255 |
+
for ( ; i < l; i++ ) {
|
3256 |
+
if ( jQuery.contains( this, targets[ i ] ) ) {
|
3257 |
+
return true;
|
Â
|
|
3258 |
Â
}
|
3259 |
+
}
|
3260 |
+
} );
|
3261 |
+
},
|
3262 |
Â
|
3263 |
+
closest: function( selectors, context ) {
|
3264 |
+
var cur,
|
3265 |
+
i = 0,
|
3266 |
+
l = this.length,
|
3267 |
+
matched = [],
|
3268 |
+
targets = typeof selectors !== "string" && jQuery( selectors );
|
3269 |
Â
|
3270 |
+
// Positional selectors never match, since there's no _selection_ context
|
3271 |
+
if ( !rneedsContext.test( selectors ) ) {
|
3272 |
+
for ( ; i < l; i++ ) {
|
3273 |
+
for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
|
3274 |
Â
|
3275 |
+
// Always skip document fragments
|
3276 |
+
if ( cur.nodeType < 11 && ( targets ?
|
3277 |
+
targets.index( cur ) > -1 :
|
3278 |
Â
|
3279 |
+
// Don't pass non-elements to Sizzle
|
3280 |
+
cur.nodeType === 1 &&
|
3281 |
+
jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
3282 |
Â
|
3283 |
+
matched.push( cur );
|
3284 |
+
break;
|
Â
|
|
3285 |
Â
}
|
3286 |
Â
}
|
3287 |
Â
}
|
3288 |
+
}
|
3289 |
Â
|
3290 |
+
return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
|
3291 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
3292 |
Â
|
3293 |
+
// Determine the position of an element within the set
|
3294 |
+
index: function( elem ) {
|
Â
|
|
Â
|
|
3295 |
Â
|
3296 |
+
// No argument, return index in parent
|
3297 |
+
if ( !elem ) {
|
3298 |
+
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
3299 |
+
}
|
3300 |
Â
|
3301 |
+
// Index in selector
|
3302 |
+
if ( typeof elem === "string" ) {
|
3303 |
+
return indexOf.call( jQuery( elem ), this[ 0 ] );
|
3304 |
+
}
|
3305 |
Â
|
3306 |
+
// Locate the position of the desired element
|
3307 |
+
return indexOf.call( this,
|
Â
|
|
Â
|
|
3308 |
Â
|
3309 |
+
// If it receives a jQuery object, the first element is used
|
3310 |
+
elem.jquery ? elem[ 0 ] : elem
|
3311 |
+
);
|
3312 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
3313 |
Â
|
3314 |
+
add: function( selector, context ) {
|
3315 |
+
return this.pushStack(
|
3316 |
+
jQuery.uniqueSort(
|
3317 |
+
jQuery.merge( this.get(), jQuery( selector, context ) )
|
3318 |
+
)
|
3319 |
+
);
|
3320 |
+
},
|
3321 |
Â
|
3322 |
+
addBack: function( selector ) {
|
3323 |
+
return this.add( selector == null ?
|
3324 |
+
this.prevObject : this.prevObject.filter( selector )
|
3325 |
+
);
|
3326 |
Â
}
|
3327 |
+
} );
|
3328 |
+
|
3329 |
+
function sibling( cur, dir ) {
|
3330 |
+
while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
|
3331 |
+
return cur;
|
3332 |
+
}
|
3333 |
+
|
3334 |
+
jQuery.each( {
|
3335 |
+
parent: function( elem ) {
|
3336 |
+
var parent = elem.parentNode;
|
3337 |
+
return parent && parent.nodeType !== 11 ? parent : null;
|
3338 |
+
},
|
3339 |
+
parents: function( elem ) {
|
3340 |
+
return dir( elem, "parentNode" );
|
3341 |
+
},
|
3342 |
+
parentsUntil: function( elem, i, until ) {
|
3343 |
+
return dir( elem, "parentNode", until );
|
3344 |
+
},
|
3345 |
+
next: function( elem ) {
|
3346 |
+
return sibling( elem, "nextSibling" );
|
3347 |
+
},
|
3348 |
+
prev: function( elem ) {
|
3349 |
+
return sibling( elem, "previousSibling" );
|
3350 |
+
},
|
3351 |
+
nextAll: function( elem ) {
|
3352 |
+
return dir( elem, "nextSibling" );
|
3353 |
+
},
|
3354 |
+
prevAll: function( elem ) {
|
3355 |
+
return dir( elem, "previousSibling" );
|
3356 |
+
},
|
3357 |
+
nextUntil: function( elem, i, until ) {
|
3358 |
+
return dir( elem, "nextSibling", until );
|
3359 |
+
},
|
3360 |
+
prevUntil: function( elem, i, until ) {
|
3361 |
+
return dir( elem, "previousSibling", until );
|
3362 |
+
},
|
3363 |
+
siblings: function( elem ) {
|
3364 |
+
return siblings( ( elem.parentNode || {} ).firstChild, elem );
|
3365 |
+
},
|
3366 |
+
children: function( elem ) {
|
3367 |
+
return siblings( elem.firstChild );
|
3368 |
+
},
|
3369 |
+
contents: function( elem ) {
|
3370 |
+
if ( nodeName( elem, "iframe" ) ) {
|
3371 |
+
return elem.contentDocument;
|
3372 |
+
}
|
3373 |
+
|
3374 |
+
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
3375 |
+
// Treat the template element as a regular one in browsers that
|
3376 |
+
// don't support it.
|
3377 |
+
if ( nodeName( elem, "template" ) ) {
|
3378 |
+
elem = elem.content || elem;
|
3379 |
+
}
|
3380 |
+
|
3381 |
+
return jQuery.merge( [], elem.childNodes );
|
3382 |
+
}
|
3383 |
+
}, function( name, fn ) {
|
3384 |
+
jQuery.fn[ name ] = function( until, selector ) {
|
3385 |
+
var matched = jQuery.map( this, fn, until );
|
3386 |
Â
|
3387 |
+
if ( name.slice( -5 ) !== "Until" ) {
|
3388 |
+
selector = until;
|
3389 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3390 |
Â
|
3391 |
+
if ( selector && typeof selector === "string" ) {
|
3392 |
+
matched = jQuery.filter( selector, matched );
|
3393 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
3394 |
Â
|
3395 |
+
if ( this.length > 1 ) {
|
3396 |
+
|
3397 |
+
// Remove duplicates
|
3398 |
+
if ( !guaranteedUnique[ name ] ) {
|
3399 |
+
jQuery.uniqueSort( matched );
|
3400 |
Â
}
|
3401 |
Â
|
3402 |
+
// Reverse order for parents* and prev-derivatives
|
3403 |
+
if ( rparentsprev.test( name ) ) {
|
3404 |
+
matched.reverse();
|
3405 |
Â
}
|
3406 |
+
}
|
3407 |
Â
|
3408 |
+
return this.pushStack( matched );
|
3409 |
+
};
|
3410 |
+
} );
|
3411 |
+
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
|
3412 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3413 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3414 |
Â
|
3415 |
+
// Convert String-formatted options into Object-formatted ones
|
3416 |
+
function createOptions( options ) {
|
3417 |
+
var object = {};
|
3418 |
+
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
3419 |
+
object[ flag ] = true;
|
3420 |
Â
} );
|
3421 |
+
return object;
|
3422 |
+
}
|
3423 |
Â
|
3424 |
+
/*
|
3425 |
+
* Create a callback list using the following parameters:
|
3426 |
+
*
|
3427 |
+
* options: an optional list of space-separated options that will change how
|
3428 |
+
* the callback list behaves or a more traditional option object
|
3429 |
+
*
|
3430 |
+
* By default a callback list will act like an event callback list and can be
|
3431 |
+
* "fired" multiple times.
|
3432 |
+
*
|
3433 |
+
* Possible options:
|
3434 |
+
*
|
3435 |
+
* once: will ensure the callback list can only be fired once (like a Deferred)
|
3436 |
+
*
|
3437 |
+
* memory: will keep track of previous values and will call any callback added
|
3438 |
+
* after the list has been fired right away with the latest "memorized"
|
3439 |
+
* values (like a Deferred)
|
3440 |
+
*
|
3441 |
+
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
3442 |
+
*
|
3443 |
+
* stopOnFalse: interrupt callings when a callback returns false
|
3444 |
+
*
|
3445 |
+
*/
|
3446 |
+
jQuery.Callbacks = function( options ) {
|
3447 |
Â
|
3448 |
+
// Convert options from String-formatted to Object-formatted if needed
|
3449 |
+
// (we check in cache first)
|
3450 |
+
options = typeof options === "string" ?
|
3451 |
+
createOptions( options ) :
|
3452 |
+
jQuery.extend( {}, options );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3453 |
Â
|
3454 |
+
var // Flag to know if list is currently firing
|
3455 |
+
firing,
|
3456 |
Â
|
3457 |
+
// Last fire value for non-forgettable lists
|
3458 |
+
memory,
|
3459 |
Â
|
3460 |
+
// Flag to know if list was already fired
|
3461 |
+
fired,
|
3462 |
Â
|
3463 |
+
// Flag to prevent firing
|
3464 |
+
locked,
|
3465 |
Â
|
3466 |
+
// Actual callback list
|
3467 |
+
list = [],
|
3468 |
Â
|
3469 |
+
// Queue of execution data for repeatable lists
|
3470 |
+
queue = [],
|
3471 |
Â
|
3472 |
+
// Index of currently firing callback (modified by add/remove as needed)
|
3473 |
+
firingIndex = -1,
|
3474 |
Â
|
3475 |
+
// Fire callbacks
|
3476 |
+
fire = function() {
|
3477 |
Â
|
3478 |
+
// Enforce single-firing
|
3479 |
+
locked = locked || options.once;
|
3480 |
Â
|
3481 |
+
// Execute callbacks for all pending executions,
|
3482 |
+
// respecting firingIndex overrides and runtime changes
|
3483 |
+
fired = firing = true;
|
3484 |
+
for ( ; queue.length; firingIndex = -1 ) {
|
3485 |
+
memory = queue.shift();
|
3486 |
+
while ( ++firingIndex < list.length ) {
|
3487 |
Â
|
3488 |
+
// Run callback and check for early termination
|
3489 |
+
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
3490 |
+
options.stopOnFalse ) {
|
3491 |
Â
|
3492 |
+
// Jump to end and forget the data so .add doesn't re-fire
|
3493 |
+
firingIndex = list.length;
|
3494 |
+
memory = false;
|
Â
|
|
3495 |
Â
}
|
3496 |
Â
}
|
3497 |
+
}
|
3498 |
Â
|
3499 |
+
// Forget the data if we're done with it
|
3500 |
+
if ( !options.memory ) {
|
3501 |
+
memory = false;
|
3502 |
+
}
|
3503 |
Â
|
3504 |
+
firing = false;
|
3505 |
Â
|
3506 |
+
// Clean up if we're done firing for good
|
3507 |
+
if ( locked ) {
|
3508 |
Â
|
3509 |
+
// Keep an empty list if we have data for future add calls
|
3510 |
+
if ( memory ) {
|
3511 |
+
list = [];
|
3512 |
Â
|
3513 |
+
// Otherwise, this object is spent
|
3514 |
+
} else {
|
3515 |
+
list = "";
|
Â
|
|
3516 |
Â
}
|
3517 |
+
}
|
3518 |
+
},
|
Â
|
|
Â
|
|
3519 |
Â
|
3520 |
+
// Actual Callbacks object
|
3521 |
+
self = {
|
Â
|
|
3522 |
Â
|
3523 |
+
// Add a callback or a collection of callbacks to the list
|
3524 |
+
add: function() {
|
3525 |
+
if ( list ) {
|
Â
|
|
Â
|
|
3526 |
Â
|
3527 |
+
// If we have memory from a past run, we should fire after adding
|
3528 |
+
if ( memory && !firing ) {
|
3529 |
+
firingIndex = list.length - 1;
|
3530 |
+
queue.push( memory );
|
3531 |
+
}
|
Â
|
|
Â
|
|
3532 |
Â
|
3533 |
+
( function add( args ) {
|
3534 |
+
jQuery.each( args, function( _, arg ) {
|
3535 |
+
if ( isFunction( arg ) ) {
|
3536 |
+
if ( !options.unique || !self.has( arg ) ) {
|
3537 |
+
list.push( arg );
|
3538 |
Â
}
|
3539 |
+
} else if ( arg && arg.length && toType( arg ) !== "string" ) {
|
Â
|
|
3540 |
Â
|
3541 |
+
// Inspect recursively
|
3542 |
+
add( arg );
|
3543 |
+
}
|
3544 |
+
} );
|
3545 |
+
} )( arguments );
|
3546 |
+
|
3547 |
+
if ( memory && !firing ) {
|
3548 |
+
fire();
|
3549 |
Â
}
|
3550 |
+
}
|
3551 |
+
return this;
|
3552 |
+
},
|
3553 |
Â
|
3554 |
+
// Remove a callback from the list
|
3555 |
+
remove: function() {
|
3556 |
+
jQuery.each( arguments, function( _, arg ) {
|
3557 |
+
var index;
|
3558 |
+
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
3559 |
+
list.splice( index, 1 );
|
3560 |
Â
|
3561 |
+
// Handle firing indexes
|
3562 |
+
if ( index <= firingIndex ) {
|
3563 |
+
firingIndex--;
|
Â
|
|
3564 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3565 |
Â
}
|
3566 |
+
} );
|
3567 |
+
return this;
|
3568 |
+
},
|
3569 |
Â
|
3570 |
+
// Check if a given callback is in the list.
|
3571 |
+
// If no argument is given, return whether or not list has callbacks attached.
|
3572 |
+
has: function( fn ) {
|
3573 |
+
return fn ?
|
3574 |
+
jQuery.inArray( fn, list ) > -1 :
|
3575 |
+
list.length > 0;
|
3576 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3577 |
Â
|
3578 |
+
// Remove all callbacks from the list
|
3579 |
+
empty: function() {
|
3580 |
+
if ( list ) {
|
3581 |
+
list = [];
|
3582 |
+
}
|
3583 |
+
return this;
|
3584 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3585 |
Â
|
3586 |
+
// Disable .fire and .add
|
3587 |
+
// Abort any current/pending executions
|
3588 |
+
// Clear all callbacks and values
|
3589 |
+
disable: function() {
|
3590 |
+
locked = queue = [];
|
3591 |
+
list = memory = "";
|
3592 |
+
return this;
|
3593 |
+
},
|
3594 |
+
disabled: function() {
|
3595 |
+
return !list;
|
3596 |
+
},
|
Â
|
|
3597 |
Â
|
3598 |
+
// Disable .fire
|
3599 |
+
// Also disable .add unless we have memory (since it would have no effect)
|
3600 |
+
// Abort any pending executions
|
3601 |
+
lock: function() {
|
3602 |
+
locked = queue = [];
|
3603 |
+
if ( !memory && !firing ) {
|
3604 |
+
list = memory = "";
|
3605 |
+
}
|
3606 |
+
return this;
|
3607 |
+
},
|
3608 |
+
locked: function() {
|
3609 |
+
return !!locked;
|
3610 |
+
},
|
3611 |
Â
|
3612 |
+
// Call all callbacks with the given context and arguments
|
3613 |
+
fireWith: function( context, args ) {
|
3614 |
+
if ( !locked ) {
|
3615 |
+
args = args || [];
|
3616 |
+
args = [ context, args.slice ? args.slice() : args ];
|
3617 |
+
queue.push( args );
|
3618 |
+
if ( !firing ) {
|
3619 |
+
fire();
|
3620 |
+
}
|
3621 |
Â
}
|
3622 |
+
return this;
|
3623 |
+
},
|
3624 |
Â
|
3625 |
+
// Call all the callbacks with the given arguments
|
3626 |
+
fire: function() {
|
3627 |
+
self.fireWith( this, arguments );
|
3628 |
+
return this;
|
3629 |
+
},
|
3630 |
Â
|
3631 |
+
// To know if the callbacks have already been called at least once
|
3632 |
+
fired: function() {
|
3633 |
+
return !!fired;
|
3634 |
+
}
|
3635 |
+
};
|
3636 |
Â
|
3637 |
+
return self;
|
3638 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3639 |
Â
|
Â
|
|
Â
|
|
3640 |
Â
|
3641 |
+
function Identity( v ) {
|
3642 |
+
return v;
|
3643 |
+
}
|
3644 |
+
function Thrower( ex ) {
|
3645 |
+
throw ex;
|
3646 |
+
}
|
3647 |
Â
|
3648 |
+
function adoptValue( value, resolve, reject, noValue ) {
|
3649 |
+
var method;
|
Â
|
|
3650 |
Â
|
3651 |
+
try {
|
Â
|
|
Â
|
|
3652 |
Â
|
3653 |
+
// Check for promise aspect first to privilege synchronous behavior
|
3654 |
+
if ( value && isFunction( ( method = value.promise ) ) ) {
|
3655 |
+
method.call( value ).done( resolve ).fail( reject );
|
3656 |
Â
|
3657 |
+
// Other thenables
|
3658 |
+
} else if ( value && isFunction( ( method = value.then ) ) ) {
|
3659 |
+
method.call( value, resolve, reject );
|
Â
|
|
Â
|
|
3660 |
Â
|
3661 |
+
// Other non-thenables
|
3662 |
+
} else {
|
Â
|
|
Â
|
|
3663 |
Â
|
3664 |
+
// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
|
3665 |
+
// * false: [ value ].slice( 0 ) => resolve( value )
|
3666 |
+
// * true: [ value ].slice( 1 ) => resolve()
|
3667 |
+
resolve.apply( undefined, [ value ].slice( noValue ) );
|
3668 |
Â
}
|
Â
|
|
3669 |
Â
|
3670 |
+
// For Promises/A+, convert exceptions into rejections
|
3671 |
+
// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
|
3672 |
+
// Deferred#then to conditionally suppress rejection.
|
3673 |
+
} catch ( value ) {
|
3674 |
Â
|
3675 |
+
// Support: Android 4.0 only
|
3676 |
+
// Strict mode functions invoked without .call/.apply get global-object context
|
3677 |
+
reject.apply( undefined, [ value ] );
|
3678 |
+
}
|
3679 |
+
}
|
3680 |
+
|
3681 |
+
jQuery.extend( {
|
3682 |
+
|
3683 |
+
Deferred: function( func ) {
|
3684 |
+
var tuples = [
|
3685 |
+
|
3686 |
+
// action, add listener, callbacks,
|
3687 |
+
// ... .then handlers, argument index, [final state]
|
3688 |
+
[ "notify", "progress", jQuery.Callbacks( "memory" ),
|
3689 |
+
jQuery.Callbacks( "memory" ), 2 ],
|
3690 |
+
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
|
3691 |
+
jQuery.Callbacks( "once memory" ), 0, "resolved" ],
|
3692 |
+
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
|
3693 |
+
jQuery.Callbacks( "once memory" ), 1, "rejected" ]
|
3694 |
+
],
|
3695 |
+
state = "pending",
|
3696 |
+
promise = {
|
3697 |
+
state: function() {
|
3698 |
+
return state;
|
3699 |
+
},
|
3700 |
+
always: function() {
|
3701 |
+
deferred.done( arguments ).fail( arguments );
|
3702 |
+
return this;
|
3703 |
+
},
|
3704 |
+
"catch": function( fn ) {
|
3705 |
+
return promise.then( null, fn );
|
3706 |
+
},
|
3707 |
Â
|
3708 |
+
// Keep pipe for back-compat
|
3709 |
+
pipe: function( /* fnDone, fnFail, fnProgress */ ) {
|
3710 |
+
var fns = arguments;
|
3711 |
+
|
3712 |
+
return jQuery.Deferred( function( newDefer ) {
|
3713 |
+
jQuery.each( tuples, function( i, tuple ) {
|
3714 |
+
|
3715 |
+
// Map tuples (progress, done, fail) to arguments (done, fail, progress)
|
3716 |
+
var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
|
3717 |
+
|
3718 |
+
// deferred.progress(function() { bind to newDefer or newDefer.notify })
|
3719 |
+
// deferred.done(function() { bind to newDefer or newDefer.resolve })
|
3720 |
+
// deferred.fail(function() { bind to newDefer or newDefer.reject })
|
3721 |
+
deferred[ tuple[ 1 ] ]( function() {
|
3722 |
+
var returned = fn && fn.apply( this, arguments );
|
3723 |
+
if ( returned && isFunction( returned.promise ) ) {
|
3724 |
+
returned.promise()
|
3725 |
+
.progress( newDefer.notify )
|
3726 |
+
.done( newDefer.resolve )
|
3727 |
+
.fail( newDefer.reject );
|
3728 |
+
} else {
|
3729 |
+
newDefer[ tuple[ 0 ] + "With" ](
|
3730 |
+
this,
|
3731 |
+
fn ? [ returned ] : arguments
|
3732 |
+
);
|
3733 |
+
}
|
Â
|
|
3734 |
Â
} );
|
3735 |
+
} );
|
3736 |
+
fns = null;
|
3737 |
+
} ).promise();
|
3738 |
+
},
|
3739 |
+
then: function( onFulfilled, onRejected, onProgress ) {
|
3740 |
+
var maxDepth = 0;
|
3741 |
+
function resolve( depth, deferred, handler, special ) {
|
3742 |
+
return function() {
|
3743 |
+
var that = this,
|
3744 |
+
args = arguments,
|
3745 |
+
mightThrow = function() {
|
3746 |
+
var returned, then;
|
3747 |
+
|
3748 |
+
// Support: Promises/A+ section 2.3.3.3.3
|
3749 |
+
// https://promisesaplus.com/#point-59
|
3750 |
+
// Ignore double-resolution attempts
|
3751 |
+
if ( depth < maxDepth ) {
|
3752 |
+
return;
|
3753 |
+
}
|
Â
|
|
3754 |
Â
|
3755 |
+
returned = handler.apply( that, args );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3756 |
Â
|
3757 |
+
// Support: Promises/A+ section 2.3.1
|
3758 |
+
// https://promisesaplus.com/#point-48
|
3759 |
+
if ( returned === deferred.promise() ) {
|
3760 |
+
throw new TypeError( "Thenable self-resolution" );
|
3761 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3762 |
Â
|
3763 |
+
// Support: Promises/A+ sections 2.3.3.1, 3.5
|
3764 |
+
// https://promisesaplus.com/#point-54
|
3765 |
+
// https://promisesaplus.com/#point-75
|
3766 |
+
// Retrieve `then` only once
|
3767 |
+
then = returned &&
|
3768 |
+
|
3769 |
+
// Support: Promises/A+ section 2.3.4
|
3770 |
+
// https://promisesaplus.com/#point-64
|
3771 |
+
// Only check objects and functions for thenability
|
3772 |
+
( typeof returned === "object" ||
|
3773 |
+
typeof returned === "function" ) &&
|
3774 |
+
returned.then;
|
3775 |
+
|
3776 |
+
// Handle a returned thenable
|
3777 |
+
if ( isFunction( then ) ) {
|
3778 |
+
|
3779 |
+
// Special processors (notify) just wait for resolution
|
3780 |
+
if ( special ) {
|
3781 |
+
then.call(
|
3782 |
+
returned,
|
3783 |
+
resolve( maxDepth, deferred, Identity, special ),
|
3784 |
+
resolve( maxDepth, deferred, Thrower, special )
|
3785 |
+
);
|
3786 |
+
|
3787 |
+
// Normal processors (resolve) also hook into progress
|
3788 |
Â
} else {
|
3789 |
Â
|
3790 |
+
// ...and disregard older resolution values
|
3791 |
+
maxDepth++;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3792 |
Â
|
3793 |
+
then.call(
|
3794 |
+
returned,
|
3795 |
+
resolve( maxDepth, deferred, Identity, special ),
|
3796 |
+
resolve( maxDepth, deferred, Thrower, special ),
|
3797 |
+
resolve( maxDepth, deferred, Identity,
|
3798 |
+
deferred.notifyWith )
|
3799 |
+
);
|
3800 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3801 |
Â
|
3802 |
+
// Handle all other returned values
|
3803 |
+
} else {
|
3804 |
+
|
3805 |
+
// Only substitute handlers pass on context
|
3806 |
+
// and multiple values (non-spec behavior)
|
3807 |
+
if ( handler !== Identity ) {
|
3808 |
+
that = undefined;
|
3809 |
+
args = [ returned ];
|
3810 |
+
}
|
3811 |
+
|
3812 |
+
// Process the value(s)
|
3813 |
+
// Default process is resolve
|
3814 |
+
( special || deferred.resolveWith )( that, args );
|
3815 |
+
}
|
3816 |
+
},
|
3817 |
+
|
3818 |
+
// Only normal processors (resolve) catch and reject exceptions
|
3819 |
+
process = special ?
|
3820 |
+
mightThrow :
|
3821 |
+
function() {
|
3822 |
+
try {
|
3823 |
+
mightThrow();
|
3824 |
+
} catch ( e ) {
|
3825 |
+
|
3826 |
+
if ( jQuery.Deferred.exceptionHook ) {
|
3827 |
+
jQuery.Deferred.exceptionHook( e,
|
3828 |
+
process.stackTrace );
|
3829 |
+
}
|
3830 |
Â
|
3831 |
+
// Support: Promises/A+ section 2.3.3.3.4.1
|
3832 |
+
// https://promisesaplus.com/#point-61
|
3833 |
+
// Ignore post-resolution exceptions
|
3834 |
+
if ( depth + 1 >= maxDepth ) {
|
Â
|
|
Â
|
|
3835 |
Â
|
3836 |
+
// Only substitute handlers pass on context
|
3837 |
+
// and multiple values (non-spec behavior)
|
3838 |
+
if ( handler !== Thrower ) {
|
3839 |
+
that = undefined;
|
3840 |
+
args = [ e ];
|
3841 |
Â
}
|
3842 |
+
|
3843 |
+
deferred.rejectWith( that, args );
|
3844 |
Â
}
|
3845 |
+
}
|
3846 |
+
};
|
3847 |
+
|
3848 |
+
// Support: Promises/A+ section 2.3.3.3.1
|
3849 |
+
// https://promisesaplus.com/#point-57
|
3850 |
+
// Re-resolve promises immediately to dodge false rejection from
|
3851 |
+
// subsequent errors
|
3852 |
+
if ( depth ) {
|
3853 |
+
process();
|
3854 |
+
} else {
|
3855 |
Â
|
3856 |
+
// Call an optional hook to record the stack, in case of exception
|
3857 |
+
// since it's otherwise lost when execution goes async
|
3858 |
+
if ( jQuery.Deferred.getStackHook ) {
|
3859 |
+
process.stackTrace = jQuery.Deferred.getStackHook();
|
Â
|
|
Â
|
|
3860 |
Â
}
|
3861 |
+
window.setTimeout( process );
|
3862 |
+
}
|
3863 |
+
};
|
3864 |
+
}
|
3865 |
Â
|
3866 |
+
return jQuery.Deferred( function( newDefer ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3867 |
Â
|
3868 |
+
// progress_handlers.add( ... )
|
3869 |
+
tuples[ 0 ][ 3 ].add(
|
3870 |
+
resolve(
|
3871 |
+
0,
|
3872 |
+
newDefer,
|
3873 |
+
isFunction( onProgress ) ?
|
3874 |
+
onProgress :
|
3875 |
+
Identity,
|
3876 |
+
newDefer.notifyWith
|
3877 |
+
)
|
3878 |
+
);
|
3879 |
+
|
3880 |
+
// fulfilled_handlers.add( ... )
|
3881 |
+
tuples[ 1 ][ 3 ].add(
|
3882 |
+
resolve(
|
3883 |
+
0,
|
3884 |
+
newDefer,
|
3885 |
+
isFunction( onFulfilled ) ?
|
3886 |
+
onFulfilled :
|
3887 |
+
Identity
|
3888 |
+
)
|
3889 |
+
);
|
3890 |
+
|
3891 |
+
// rejected_handlers.add( ... )
|
3892 |
+
tuples[ 2 ][ 3 ].add(
|
3893 |
+
resolve(
|
3894 |
+
0,
|
3895 |
+
newDefer,
|
3896 |
+
isFunction( onRejected ) ?
|
3897 |
+
onRejected :
|
3898 |
+
Thrower
|
3899 |
+
)
|
3900 |
+
);
|
3901 |
+
} ).promise();
|
3902 |
Â
},
|
Â
|
|
3903 |
Â
|
3904 |
+
// Get a promise for this deferred
|
3905 |
+
// If obj is provided, the promise aspect is added to the object
|
3906 |
+
promise: function( obj ) {
|
3907 |
+
return obj != null ? jQuery.extend( obj, promise ) : promise;
|
3908 |
+
}
|
3909 |
+
},
|
3910 |
+
deferred = {};
|
3911 |
Â
|
3912 |
+
// Add list-specific methods
|
3913 |
+
jQuery.each( tuples, function( i, tuple ) {
|
3914 |
+
var list = tuple[ 2 ],
|
3915 |
+
stateString = tuple[ 5 ];
|
3916 |
Â
|
3917 |
+
// promise.progress = list.add
|
3918 |
+
// promise.done = list.add
|
3919 |
+
// promise.fail = list.add
|
3920 |
+
promise[ tuple[ 1 ] ] = list.add;
|
3921 |
Â
|
3922 |
+
// Handle state
|
3923 |
+
if ( stateString ) {
|
3924 |
+
list.add(
|
3925 |
+
function() {
|
3926 |
Â
|
3927 |
+
// state = "resolved" (i.e., fulfilled)
|
3928 |
+
// state = "rejected"
|
3929 |
+
state = stateString;
|
3930 |
+
},
|
3931 |
Â
|
3932 |
+
// rejected_callbacks.disable
|
3933 |
+
// fulfilled_callbacks.disable
|
3934 |
+
tuples[ 3 - i ][ 2 ].disable,
|
3935 |
Â
|
3936 |
+
// rejected_handlers.disable
|
3937 |
+
// fulfilled_handlers.disable
|
3938 |
+
tuples[ 3 - i ][ 3 ].disable,
|
3939 |
Â
|
3940 |
+
// progress_callbacks.lock
|
3941 |
+
tuples[ 0 ][ 2 ].lock,
|
Â
|
|
Â
|
|
3942 |
Â
|
3943 |
+
// progress_handlers.lock
|
3944 |
+
tuples[ 0 ][ 3 ].lock
|
3945 |
+
);
|
3946 |
+
}
|
3947 |
Â
|
3948 |
+
// progress_handlers.fire
|
3949 |
+
// fulfilled_handlers.fire
|
3950 |
+
// rejected_handlers.fire
|
3951 |
+
list.add( tuple[ 3 ].fire );
|
Â
|
|
Â
|
|
Â
|
|
3952 |
Â
|
3953 |
+
// deferred.notify = function() { deferred.notifyWith(...) }
|
3954 |
+
// deferred.resolve = function() { deferred.resolveWith(...) }
|
3955 |
+
// deferred.reject = function() { deferred.rejectWith(...) }
|
3956 |
+
deferred[ tuple[ 0 ] ] = function() {
|
3957 |
+
deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
|
3958 |
+
return this;
|
3959 |
+
};
|
3960 |
Â
|
3961 |
+
// deferred.notifyWith = list.fireWith
|
3962 |
+
// deferred.resolveWith = list.fireWith
|
3963 |
+
// deferred.rejectWith = list.fireWith
|
3964 |
+
deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
|
3965 |
+
} );
|
3966 |
Â
|
3967 |
+
// Make the deferred a promise
|
3968 |
+
promise.promise( deferred );
|
Â
|
|
Â
|
|
3969 |
Â
|
3970 |
+
// Call given func if any
|
3971 |
+
if ( func ) {
|
3972 |
+
func.call( deferred, deferred );
|
3973 |
+
}
|
3974 |
Â
|
3975 |
+
// All done!
|
3976 |
+
return deferred;
|
3977 |
+
},
|
3978 |
Â
|
3979 |
+
// Deferred helper
|
3980 |
+
when: function( singleValue ) {
|
3981 |
+
var
|
3982 |
Â
|
3983 |
+
// count of uncompleted subordinates
|
3984 |
+
remaining = arguments.length,
|
3985 |
Â
|
3986 |
+
// count of unprocessed arguments
|
3987 |
+
i = remaining,
|
Â
|
|
3988 |
Â
|
3989 |
+
// subordinate fulfillment data
|
3990 |
+
resolveContexts = Array( i ),
|
3991 |
+
resolveValues = slice.call( arguments ),
|
3992 |
Â
|
3993 |
+
// the master Deferred
|
3994 |
+
master = jQuery.Deferred(),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3995 |
Â
|
3996 |
+
// subordinate callback factory
|
3997 |
+
updateFunc = function( i ) {
|
3998 |
+
return function( value ) {
|
3999 |
+
resolveContexts[ i ] = this;
|
4000 |
+
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
4001 |
+
if ( !( --remaining ) ) {
|
4002 |
+
master.resolveWith( resolveContexts, resolveValues );
|
4003 |
+
}
|
4004 |
+
};
|
4005 |
+
};
|
4006 |
Â
|
4007 |
+
// Single- and empty arguments are adopted like Promise.resolve
|
4008 |
+
if ( remaining <= 1 ) {
|
4009 |
+
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
4010 |
+
!remaining );
|
4011 |
Â
|
4012 |
+
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
4013 |
+
if ( master.state() === "pending" ||
|
4014 |
+
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
4015 |
Â
|
4016 |
+
return master.then();
|
Â
|
|
Â
|
|
4017 |
Â
}
|
4018 |
+
}
|
4019 |
Â
|
4020 |
+
// Multiple arguments are aggregated like Promise.all array elements
|
4021 |
+
while ( i-- ) {
|
4022 |
+
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
4023 |
Â
}
|
Â
|
|
4024 |
Â
|
4025 |
+
return master.promise();
|
4026 |
+
}
|
4027 |
+
} );
|
4028 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4029 |
Â
|
4030 |
+
// These usually indicate a programmer mistake during development,
|
4031 |
+
// warn about them ASAP rather than swallowing them by default.
|
4032 |
+
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
4033 |
Â
|
4034 |
+
jQuery.Deferred.exceptionHook = function( error, stack ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4035 |
Â
|
4036 |
+
// Support: IE 8 - 9 only
|
4037 |
+
// Console exists when dev tools are open, which can happen at any time
|
4038 |
+
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
4039 |
+
window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
|
4040 |
+
}
|
4041 |
+
};
|
4042 |
Â
|
4043 |
Â
|
4044 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4045 |
Â
|
4046 |
+
jQuery.readyException = function( error ) {
|
4047 |
+
window.setTimeout( function() {
|
4048 |
+
throw error;
|
4049 |
+
} );
|
4050 |
+
};
|
4051 |
Â
|
4052 |
Â
|
4053 |
Â
|
Â
|
|
Â
|
|
4054 |
Â
|
4055 |
+
// The deferred used on DOM ready
|
4056 |
+
var readyList = jQuery.Deferred();
|
4057 |
Â
|
4058 |
+
jQuery.fn.ready = function( fn ) {
|
Â
|
|
4059 |
Â
|
4060 |
+
readyList
|
4061 |
+
.then( fn )
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4062 |
Â
|
4063 |
+
// Wrap jQuery.readyException in a function so that the lookup
|
4064 |
+
// happens at the time of error handling instead of callback
|
4065 |
+
// registration.
|
4066 |
+
.catch( function( error ) {
|
4067 |
+
jQuery.readyException( error );
|
4068 |
+
} );
|
4069 |
Â
|
4070 |
+
return this;
|
4071 |
+
};
|
4072 |
Â
|
4073 |
+
jQuery.extend( {
|
Â
|
|
4074 |
Â
|
4075 |
+
// Is the DOM ready to be used? Set to true once it occurs.
|
4076 |
+
isReady: false,
|
Â
|
|
4077 |
Â
|
4078 |
+
// A counter to track how many items to wait for before
|
4079 |
+
// the ready event fires. See #6781
|
4080 |
+
readyWait: 1,
|
4081 |
Â
|
4082 |
+
// Handle when the DOM is ready
|
4083 |
+
ready: function( wait ) {
|
Â
|
|
Â
|
|
4084 |
Â
|
4085 |
+
// Abort if there are pending holds or we're already ready
|
4086 |
+
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
4087 |
+
return;
|
4088 |
+
}
|
4089 |
Â
|
4090 |
+
// Remember that the DOM is ready
|
4091 |
+
jQuery.isReady = true;
|
Â
|
|
Â
|
|
4092 |
Â
|
4093 |
+
// If a normal DOM Ready event fired, decrement, and wait if need be
|
4094 |
+
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
4095 |
+
return;
|
4096 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
4097 |
Â
|
4098 |
+
// If there are functions bound, to execute
|
4099 |
+
readyList.resolveWith( document, [ jQuery ] );
|
Â
|
|
Â
|
|
Â
|
|
4100 |
Â
}
|
4101 |
+
} );
|
4102 |
Â
|
4103 |
+
jQuery.ready.then = readyList.then;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4104 |
Â
|
4105 |
+
// The ready event handler and self cleanup method
|
4106 |
+
function completed() {
|
4107 |
+
document.removeEventListener( "DOMContentLoaded", completed );
|
4108 |
+
window.removeEventListener( "load", completed );
|
4109 |
+
jQuery.ready();
|
4110 |
+
}
|
4111 |
Â
|
4112 |
+
// Catch cases where $(document).ready() is called
|
4113 |
+
// after the browser event has already occurred.
|
4114 |
+
// Support: IE <=9 - 10 only
|
4115 |
+
// Older IE sometimes signals "interactive" too soon
|
4116 |
+
if ( document.readyState === "complete" ||
|
4117 |
+
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
4118 |
Â
|
4119 |
+
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
4120 |
+
window.setTimeout( jQuery.ready );
|
4121 |
Â
|
4122 |
+
} else {
|
Â
|
|
Â
|
|
4123 |
Â
|
4124 |
+
// Use the handy event callback
|
4125 |
+
document.addEventListener( "DOMContentLoaded", completed );
|
4126 |
Â
|
4127 |
+
// A fallback to window.onload, that will always work
|
4128 |
+
window.addEventListener( "load", completed );
|
4129 |
+
}
|
4130 |
Â
|
4131 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4132 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4133 |
Â
|
4134 |
+
// Multifunctional method to get and set values of a collection
|
4135 |
+
// The value/s can optionally be executed if it's a function
|
4136 |
+
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
4137 |
+
var i = 0,
|
4138 |
+
len = elems.length,
|
4139 |
+
bulk = key == null;
|
4140 |
Â
|
4141 |
+
// Sets many values
|
4142 |
+
if ( toType( key ) === "object" ) {
|
4143 |
+
chainable = true;
|
4144 |
+
for ( i in key ) {
|
4145 |
+
access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
4146 |
+
}
|
4147 |
Â
|
4148 |
+
// Sets one value
|
4149 |
+
} else if ( value !== undefined ) {
|
4150 |
+
chainable = true;
|
4151 |
Â
|
4152 |
+
if ( !isFunction( value ) ) {
|
4153 |
+
raw = true;
|
4154 |
+
}
|
Â
|
|
4155 |
Â
|
4156 |
+
if ( bulk ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4157 |
Â
|
4158 |
+
// Bulk operations run against the entire set
|
4159 |
+
if ( raw ) {
|
4160 |
+
fn.call( elems, value );
|
4161 |
+
fn = null;
|
4162 |
+
|
4163 |
+
// ...except when executing function values
|
4164 |
+
} else {
|
4165 |
+
bulk = fn;
|
4166 |
+
fn = function( elem, key, value ) {
|
4167 |
+
return bulk.call( jQuery( elem ), value );
|
4168 |
+
};
|
4169 |
Â
}
|
4170 |
Â
}
|
4171 |
Â
|
4172 |
+
if ( fn ) {
|
4173 |
+
for ( ; i < len; i++ ) {
|
4174 |
+
fn(
|
4175 |
+
elems[ i ], key, raw ?
|
4176 |
+
value :
|
4177 |
+
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
4178 |
+
);
|
4179 |
+
}
|
4180 |
Â
}
|
4181 |
+
}
|
4182 |
Â
|
4183 |
+
if ( chainable ) {
|
4184 |
+
return elems;
|
4185 |
+
}
|
Â
|
|
4186 |
Â
|
4187 |
+
// Gets
|
4188 |
+
if ( bulk ) {
|
4189 |
+
return fn.call( elems );
|
4190 |
+
}
|
4191 |
Â
|
4192 |
+
return len ? fn( elems[ 0 ], key ) : emptyGet;
|
4193 |
+
};
|
4194 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4195 |
Â
|
4196 |
+
// Matches dashed string for camelizing
|
4197 |
+
var rmsPrefix = /^-ms-/,
|
4198 |
+
rdashAlpha = /-([a-z])/g;
|
Â
|
|
4199 |
Â
|
4200 |
+
// Used by camelCase as callback to replace()
|
4201 |
+
function fcamelCase( all, letter ) {
|
4202 |
+
return letter.toUpperCase();
|
4203 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
4204 |
Â
|
4205 |
+
// Convert dashed to camelCase; used by the css and data modules
|
4206 |
+
// Support: IE <=9 - 11, Edge 12 - 15
|
4207 |
+
// Microsoft forgot to hump their vendor prefix (#9572)
|
4208 |
+
function camelCase( string ) {
|
4209 |
+
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
4210 |
+
}
|
4211 |
+
var acceptData = function( owner ) {
|
Â
|
|
4212 |
Â
|
4213 |
+
// Accepts only:
|
4214 |
+
// - Node
|
4215 |
+
// - Node.ELEMENT_NODE
|
4216 |
+
// - Node.DOCUMENT_NODE
|
4217 |
+
// - Object
|
4218 |
+
// - Any
|
4219 |
+
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
4220 |
+
};
|
4221 |
Â
|
4222 |
Â
|
4223 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4224 |
Â
|
4225 |
+
function Data() {
|
4226 |
+
this.expando = jQuery.expando + Data.uid++;
|
4227 |
+
}
|
4228 |
Â
|
4229 |
+
Data.uid = 1;
|
4230 |
Â
|
4231 |
+
Data.prototype = {
|
4232 |
Â
|
4233 |
+
cache: function( owner ) {
|
Â
|
|
4234 |
Â
|
4235 |
+
// Check if the owner object already has a cache
|
4236 |
+
var value = owner[ this.expando ];
|
Â
|
|
4237 |
Â
|
4238 |
+
// If not, create one
|
4239 |
+
if ( !value ) {
|
4240 |
+
value = {};
|
Â
|
|
4241 |
Â
|
4242 |
+
// We can accept data for non-element nodes in modern browsers,
|
4243 |
+
// but we should not, see #8335.
|
4244 |
+
// Always return an empty object.
|
4245 |
+
if ( acceptData( owner ) ) {
|
4246 |
Â
|
4247 |
+
// If it is a node unlikely to be stringify-ed or looped over
|
4248 |
+
// use plain assignment
|
4249 |
+
if ( owner.nodeType ) {
|
4250 |
+
owner[ this.expando ] = value;
|
4251 |
+
|
4252 |
+
// Otherwise secure it in a non-enumerable property
|
4253 |
+
// configurable must be true to allow the property to be
|
4254 |
+
// deleted when data is removed
|
4255 |
+
} else {
|
4256 |
+
Object.defineProperty( owner, this.expando, {
|
4257 |
+
value: value,
|
4258 |
+
configurable: true
|
4259 |
+
} );
|
4260 |
Â
}
|
4261 |
Â
}
|
4262 |
+
}
|
4263 |
Â
|
4264 |
+
return value;
|
4265 |
+
},
|
4266 |
+
set: function( owner, data, value ) {
|
4267 |
+
var prop,
|
4268 |
+
cache = this.cache( owner );
|
4269 |
Â
|
4270 |
+
// Handle: [ owner, key, value ] args
|
4271 |
+
// Always use camelCase key (gh-2257)
|
4272 |
+
if ( typeof data === "string" ) {
|
4273 |
+
cache[ camelCase( data ) ] = value;
|
4274 |
Â
|
4275 |
+
// Handle: [ owner, { properties } ] args
|
4276 |
+
} else {
|
4277 |
Â
|
4278 |
+
// Copy the properties one-by-one to the cache object
|
4279 |
+
for ( prop in data ) {
|
4280 |
+
cache[ camelCase( prop ) ] = data[ prop ];
|
Â
|
|
4281 |
Â
}
|
4282 |
+
}
|
4283 |
+
return cache;
|
4284 |
+
},
|
4285 |
+
get: function( owner, key ) {
|
4286 |
+
return key === undefined ?
|
4287 |
+
this.cache( owner ) :
|
4288 |
Â
|
4289 |
+
// Always use camelCase key (gh-2257)
|
4290 |
+
owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
|
4291 |
+
},
|
4292 |
+
access: function( owner, key, value ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4293 |
Â
|
4294 |
+
// In cases where either:
|
4295 |
+
//
|
4296 |
+
// 1. No key was specified
|
4297 |
+
// 2. A string key was specified, but no value provided
|
4298 |
+
//
|
4299 |
+
// Take the "read" path and allow the get method to determine
|
4300 |
+
// which value to return, respectively either:
|
4301 |
+
//
|
4302 |
+
// 1. The entire cache object
|
4303 |
+
// 2. The data stored at the key
|
4304 |
+
//
|
4305 |
+
if ( key === undefined ||
|
4306 |
+
( ( key && typeof key === "string" ) && value === undefined ) ) {
|
4307 |
Â
|
4308 |
+
return this.get( owner, key );
|
4309 |
+
}
|
4310 |
Â
|
4311 |
+
// When the key is not a string, or both a key and value
|
4312 |
+
// are specified, set or extend (existing objects) with either:
|
4313 |
+
//
|
4314 |
+
// 1. An object of properties
|
4315 |
+
// 2. A key and value
|
4316 |
+
//
|
4317 |
+
this.set( owner, key, value );
|
4318 |
Â
|
4319 |
+
// Since the "set" path can have two possible entry points
|
4320 |
+
// return the expected data based on which path was taken[*]
|
4321 |
+
return value !== undefined ? value : key;
|
4322 |
+
},
|
4323 |
+
remove: function( owner, key ) {
|
4324 |
+
var i,
|
4325 |
+
cache = owner[ this.expando ];
|
4326 |
Â
|
4327 |
+
if ( cache === undefined ) {
|
4328 |
+
return;
|
4329 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
4330 |
Â
|
4331 |
+
if ( key !== undefined ) {
|
4332 |
Â
|
4333 |
+
// Support array or space separated string of keys
|
4334 |
+
if ( Array.isArray( key ) ) {
|
Â
|
|
Â
|
|
4335 |
Â
|
4336 |
+
// If key is an array of keys...
|
4337 |
+
// We always set camelCase keys, so remove that.
|
4338 |
+
key = key.map( camelCase );
|
4339 |
+
} else {
|
4340 |
+
key = camelCase( key );
|
4341 |
Â
|
4342 |
+
// If a key with the spaces exists, use it.
|
4343 |
+
// Otherwise, create an array by matching non-whitespace
|
4344 |
+
key = key in cache ?
|
4345 |
+
[ key ] :
|
4346 |
+
( key.match( rnothtmlwhite ) || [] );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4347 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4348 |
Â
|
4349 |
+
i = key.length;
|
4350 |
Â
|
4351 |
+
while ( i-- ) {
|
4352 |
+
delete cache[ key[ i ] ];
|
4353 |
+
}
|
4354 |
+
}
|
4355 |
Â
|
4356 |
+
// Remove the expando if there's no more data
|
4357 |
+
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
4358 |
Â
|
4359 |
+
// Support: Chrome <=35 - 45
|
4360 |
+
// Webkit & Blink performance suffers when deleting properties
|
4361 |
+
// from DOM nodes, so set to undefined instead
|
4362 |
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
|
4363 |
+
if ( owner.nodeType ) {
|
4364 |
+
owner[ this.expando ] = undefined;
|
4365 |
+
} else {
|
4366 |
+
delete owner[ this.expando ];
|
4367 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4368 |
Â
}
|
4369 |
+
},
|
4370 |
+
hasData: function( owner ) {
|
4371 |
+
var cache = owner[ this.expando ];
|
4372 |
+
return cache !== undefined && !jQuery.isEmptyObject( cache );
|
4373 |
+
}
|
4374 |
+
};
|
4375 |
+
var dataPriv = new Data();
|
4376 |
Â
|
4377 |
+
var dataUser = new Data();
|
Â
|
|
Â
|
|
4378 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4379 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4380 |
Â
|
4381 |
+
// Implementation Summary
|
4382 |
+
//
|
4383 |
+
// 1. Enforce API surface and semantic compatibility with 1.9.x branch
|
4384 |
+
// 2. Improve the module's maintainability by reducing the storage
|
4385 |
+
// paths to a single mechanism.
|
4386 |
+
// 3. Use the same single mechanism to support "private" and "user" data.
|
4387 |
+
// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
|
4388 |
+
// 5. Avoid exposing implementation details on user objects (eg. expando properties)
|
4389 |
+
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
4390 |
+
|
4391 |
+
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
4392 |
+
rmultiDash = /[A-Z]/g;
|
4393 |
Â
|
4394 |
+
function getData( data ) {
|
4395 |
+
if ( data === "true" ) {
|
4396 |
+
return true;
|
4397 |
Â
}
|
4398 |
Â
|
4399 |
+
if ( data === "false" ) {
|
4400 |
+
return false;
|
4401 |
+
}
|
4402 |
Â
|
4403 |
+
if ( data === "null" ) {
|
4404 |
+
return null;
|
4405 |
+
}
|
Â
|
|
Â
|
|
4406 |
Â
|
4407 |
+
// Only convert to a number if it doesn't change the string
|
4408 |
+
if ( data === +data + "" ) {
|
4409 |
+
return +data;
|
4410 |
+
}
|
4411 |
Â
|
4412 |
+
if ( rbrace.test( data ) ) {
|
4413 |
+
return JSON.parse( data );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4414 |
Â
}
|
4415 |
Â
|
4416 |
+
return data;
|
4417 |
+
}
|
Â
|
|
Â
|
|
4418 |
Â
|
4419 |
+
function dataAttr( elem, key, data ) {
|
4420 |
+
var name;
|
Â
|
|
4421 |
Â
|
4422 |
+
// If nothing was found internally, try to fetch any
|
4423 |
+
// data from the HTML5 data-* attribute
|
4424 |
+
if ( data === undefined && elem.nodeType === 1 ) {
|
4425 |
+
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
4426 |
+
data = elem.getAttribute( name );
|
4427 |
Â
|
4428 |
+
if ( typeof data === "string" ) {
|
4429 |
+
try {
|
4430 |
+
data = getData( data );
|
4431 |
+
} catch ( e ) {}
|
Â
|
|
4432 |
Â
|
4433 |
+
// Make sure we set the data so it isn't changed later
|
4434 |
+
dataUser.set( elem, key, data );
|
4435 |
+
} else {
|
4436 |
+
data = undefined;
|
4437 |
Â
}
|
4438 |
+
}
|
4439 |
+
return data;
|
4440 |
+
}
|
4441 |
+
|
4442 |
+
jQuery.extend( {
|
4443 |
+
hasData: function( elem ) {
|
4444 |
+
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
4445 |
+
},
|
4446 |
+
|
4447 |
+
data: function( elem, name, data ) {
|
4448 |
+
return dataUser.access( elem, name, data );
|
4449 |
+
},
|
4450 |
+
|
4451 |
+
removeData: function( elem, name ) {
|
4452 |
+
dataUser.remove( elem, name );
|
4453 |
+
},
|
4454 |
+
|
4455 |
+
// TODO: Now that all calls to _data and _removeData have been replaced
|
4456 |
+
// with direct calls to dataPriv methods, these can be deprecated.
|
4457 |
+
_data: function( elem, name, data ) {
|
4458 |
+
return dataPriv.access( elem, name, data );
|
4459 |
+
},
|
4460 |
+
|
4461 |
+
_removeData: function( elem, name ) {
|
4462 |
+
dataPriv.remove( elem, name );
|
4463 |
+
}
|
4464 |
+
} );
|
4465 |
Â
|
4466 |
+
jQuery.fn.extend( {
|
4467 |
+
data: function( key, value ) {
|
4468 |
+
var i, name, data,
|
4469 |
+
elem = this[ 0 ],
|
4470 |
+
attrs = elem && elem.attributes;
|
4471 |
Â
|
4472 |
+
// Gets all values
|
4473 |
+
if ( key === undefined ) {
|
4474 |
+
if ( this.length ) {
|
4475 |
+
data = dataUser.get( elem );
|
4476 |
Â
|
4477 |
+
if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
|
4478 |
+
i = attrs.length;
|
4479 |
+
while ( i-- ) {
|
4480 |
Â
|
4481 |
+
// Support: IE 11 only
|
4482 |
+
// The attrs elements can be null (#14894)
|
4483 |
+
if ( attrs[ i ] ) {
|
4484 |
+
name = attrs[ i ].name;
|
4485 |
+
if ( name.indexOf( "data-" ) === 0 ) {
|
4486 |
+
name = camelCase( name.slice( 5 ) );
|
4487 |
+
dataAttr( elem, name, data[ name ] );
|
Â
|
|
4488 |
Â
}
|
4489 |
Â
}
|
Â
|
|
4490 |
Â
}
|
4491 |
+
dataPriv.set( elem, "hasDataAttrs", true );
|
4492 |
Â
}
|
Â
|
|
Â
|
|
4493 |
Â
}
|
4494 |
Â
|
4495 |
+
return data;
|
4496 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4497 |
Â
|
4498 |
+
// Sets multiple values
|
4499 |
+
if ( typeof key === "object" ) {
|
4500 |
+
return this.each( function() {
|
4501 |
+
dataUser.set( this, key );
|
4502 |
+
} );
|
4503 |
+
}
|
4504 |
Â
|
4505 |
+
return access( this, function( value ) {
|
4506 |
+
var data;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4507 |
Â
|
4508 |
+
// The calling jQuery object (element matches) is not empty
|
4509 |
+
// (and therefore has an element appears at this[ 0 ]) and the
|
4510 |
+
// `value` parameter was not undefined. An empty jQuery object
|
4511 |
+
// will result in `undefined` for elem = this[ 0 ] which will
|
4512 |
+
// throw an exception if an attempt to read a data cache is made.
|
4513 |
+
if ( elem && value === undefined ) {
|
4514 |
Â
|
4515 |
+
// Attempt to get data from the cache
|
4516 |
+
// The key will always be camelCased in Data
|
4517 |
+
data = dataUser.get( elem, key );
|
4518 |
+
if ( data !== undefined ) {
|
4519 |
+
return data;
|
4520 |
+
}
|
4521 |
Â
|
4522 |
+
// Attempt to "discover" the data in
|
4523 |
+
// HTML5 custom data-* attrs
|
4524 |
+
data = dataAttr( elem, key );
|
4525 |
+
if ( data !== undefined ) {
|
4526 |
+
return data;
|
4527 |
Â
}
|
4528 |
Â
|
4529 |
+
// We tried really hard, but the data doesn't exist.
|
4530 |
+
return;
|
4531 |
+
}
|
4532 |
Â
|
4533 |
+
// Set the data...
|
4534 |
+
this.each( function() {
|
Â
|
|
Â
|
|
Â
|
|
4535 |
Â
|
4536 |
+
// We always store the camelCased key
|
4537 |
+
dataUser.set( this, key, value );
|
Â
|
|
4538 |
Â
} );
|
4539 |
+
}, null, value, arguments.length > 1, null, true );
|
4540 |
+
},
|
4541 |
Â
|
4542 |
+
removeData: function( key ) {
|
4543 |
+
return this.each( function() {
|
4544 |
+
dataUser.remove( this, key );
|
4545 |
+
} );
|
4546 |
+
}
|
4547 |
+
} );
|
4548 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4549 |
Â
|
4550 |
+
jQuery.extend( {
|
4551 |
+
queue: function( elem, type, data ) {
|
4552 |
+
var queue;
|
4553 |
Â
|
4554 |
+
if ( elem ) {
|
4555 |
+
type = ( type || "fx" ) + "queue";
|
4556 |
+
queue = dataPriv.get( elem, type );
|
4557 |
+
|
4558 |
+
// Speed up dequeue by getting out quickly if this is just a lookup
|
4559 |
+
if ( data ) {
|
4560 |
+
if ( !queue || Array.isArray( data ) ) {
|
4561 |
+
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
4562 |
+
} else {
|
4563 |
+
queue.push( data );
|
4564 |
Â
}
|
Â
|
|
4565 |
Â
}
|
4566 |
+
return queue || [];
|
4567 |
+
}
|
4568 |
+
},
|
Â
|
|
4569 |
Â
|
4570 |
+
dequeue: function( elem, type ) {
|
4571 |
+
type = type || "fx";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4572 |
Â
|
4573 |
+
var queue = jQuery.queue( elem, type ),
|
4574 |
+
startLength = queue.length,
|
4575 |
+
fn = queue.shift(),
|
4576 |
+
hooks = jQuery._queueHooks( elem, type ),
|
4577 |
+
next = function() {
|
4578 |
+
jQuery.dequeue( elem, type );
|
4579 |
+
};
|
4580 |
Â
|
4581 |
+
// If the fx queue is dequeued, always remove the progress sentinel
|
4582 |
+
if ( fn === "inprogress" ) {
|
4583 |
+
fn = queue.shift();
|
4584 |
+
startLength--;
|
4585 |
+
}
|
4586 |
Â
|
4587 |
+
if ( fn ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4588 |
Â
|
4589 |
+
// Add a progress sentinel to prevent the fx queue from being
|
4590 |
+
// automatically dequeued
|
4591 |
+
if ( type === "fx" ) {
|
4592 |
+
queue.unshift( "inprogress" );
|
4593 |
Â
}
|
4594 |
Â
|
4595 |
+
// Clear up the last queue stop function
|
4596 |
+
delete hooks.stop;
|
4597 |
+
fn.call( elem, next, hooks );
|
4598 |
+
}
|
4599 |
Â
|
4600 |
+
if ( !startLength && hooks ) {
|
4601 |
+
hooks.empty.fire();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4602 |
Â
}
|
4603 |
+
},
|
4604 |
Â
|
4605 |
+
// Not public - generate a queueHooks object, or return the current one
|
4606 |
+
_queueHooks: function( elem, type ) {
|
4607 |
+
var key = type + "queueHooks";
|
4608 |
+
return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
|
4609 |
+
empty: jQuery.Callbacks( "once memory" ).add( function() {
|
4610 |
+
dataPriv.remove( elem, [ type + "queue", key ] );
|
4611 |
+
} )
|
4612 |
+
} );
|
4613 |
+
}
|
4614 |
+
} );
|
4615 |
Â
|
4616 |
+
jQuery.fn.extend( {
|
4617 |
+
queue: function( type, data ) {
|
4618 |
+
var setter = 2;
|
Â
|
|
Â
|
|
4619 |
Â
|
4620 |
+
if ( typeof type !== "string" ) {
|
4621 |
+
data = type;
|
4622 |
+
type = "fx";
|
4623 |
+
setter--;
|
4624 |
+
}
|
4625 |
Â
|
4626 |
+
if ( arguments.length < setter ) {
|
4627 |
+
return jQuery.queue( this[ 0 ], type );
|
4628 |
+
}
|
Â
|
|
4629 |
Â
|
4630 |
+
return data === undefined ?
|
4631 |
+
this :
|
4632 |
+
this.each( function() {
|
4633 |
+
var queue = jQuery.queue( this, type, data );
|
4634 |
Â
|
4635 |
+
// Ensure a hooks for this queue
|
4636 |
+
jQuery._queueHooks( this, type );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4637 |
Â
|
4638 |
+
if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
|
4639 |
+
jQuery.dequeue( this, type );
|
4640 |
+
}
|
4641 |
+
} );
|
4642 |
+
},
|
4643 |
+
dequeue: function( type ) {
|
4644 |
+
return this.each( function() {
|
4645 |
+
jQuery.dequeue( this, type );
|
4646 |
+
} );
|
4647 |
+
},
|
4648 |
+
clearQueue: function( type ) {
|
4649 |
+
return this.queue( type || "fx", [] );
|
4650 |
+
},
|
4651 |
+
|
4652 |
+
// Get a promise resolved when queues of a certain type
|
4653 |
+
// are emptied (fx is the type by default)
|
4654 |
+
promise: function( type, obj ) {
|
4655 |
+
var tmp,
|
4656 |
+
count = 1,
|
4657 |
+
defer = jQuery.Deferred(),
|
4658 |
+
elements = this,
|
4659 |
+
i = this.length,
|
4660 |
+
resolve = function() {
|
4661 |
+
if ( !( --count ) ) {
|
4662 |
+
defer.resolveWith( elements, [ elements ] );
|
4663 |
+
}
|
4664 |
+
};
|
4665 |
Â
|
4666 |
+
if ( typeof type !== "string" ) {
|
4667 |
+
obj = type;
|
4668 |
+
type = undefined;
|
4669 |
+
}
|
4670 |
+
type = type || "fx";
|
4671 |
Â
|
4672 |
+
while ( i-- ) {
|
4673 |
+
tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
|
4674 |
+
if ( tmp && tmp.empty ) {
|
4675 |
+
count++;
|
4676 |
+
tmp.empty.add( resolve );
|
Â
|
|
4677 |
Â
}
|
Â
|
|
Â
|
|
4678 |
Â
}
|
4679 |
+
resolve();
|
4680 |
+
return defer.promise( obj );
|
4681 |
+
}
|
4682 |
+
} );
|
4683 |
+
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
|
4684 |
Â
|
4685 |
+
var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
|
4686 |
Â
|
Â
|
|
4687 |
Â
|
4688 |
+
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
Â
|
|
Â
|
|
4689 |
Â
|
4690 |
+
var isHiddenWithinTree = function( elem, el ) {
|
Â
|
|
Â
|
|
4691 |
Â
|
4692 |
+
// isHiddenWithinTree might be called from jQuery#filter function;
|
4693 |
+
// in that case, element will be second argument
|
4694 |
+
elem = el || elem;
|
Â
|
|
Â
|
|
4695 |
Â
|
4696 |
+
// Inline style trumps all
|
4697 |
+
return elem.style.display === "none" ||
|
4698 |
+
elem.style.display === "" &&
|
4699 |
Â
|
4700 |
+
// Otherwise, check computed style
|
4701 |
+
// Support: Firefox <=43 - 45
|
4702 |
+
// Disconnected elements can have computed display: none, so first confirm that elem is
|
4703 |
+
// in the document.
|
4704 |
+
jQuery.contains( elem.ownerDocument, elem ) &&
|
4705 |
Â
|
4706 |
+
jQuery.css( elem, "display" ) === "none";
|
4707 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
4708 |
Â
|
4709 |
+
var swap = function( elem, options, callback, args ) {
|
4710 |
+
var ret, name,
|
4711 |
+
old = {};
|
4712 |
Â
|
4713 |
+
// Remember the old values, and insert the new ones
|
4714 |
+
for ( name in options ) {
|
4715 |
+
old[ name ] = elem.style[ name ];
|
4716 |
+
elem.style[ name ] = options[ name ];
|
4717 |
+
}
|
4718 |
Â
|
4719 |
+
ret = callback.apply( elem, args || [] );
|
Â
|
|
4720 |
Â
|
4721 |
+
// Revert the old values
|
4722 |
+
for ( name in options ) {
|
4723 |
+
elem.style[ name ] = old[ name ];
|
4724 |
+
}
|
4725 |
Â
|
4726 |
+
return ret;
|
4727 |
+
};
|
4728 |
Â
|
4729 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4730 |
Â
|
Â
|
|
Â
|
|
Â
|
|
4731 |
Â
|
4732 |
+
function adjustCSS( elem, prop, valueParts, tween ) {
|
4733 |
+
var adjusted, scale,
|
4734 |
+
maxIterations = 20,
|
4735 |
+
currentValue = tween ?
|
4736 |
+
function() {
|
4737 |
+
return tween.cur();
|
4738 |
+
} :
|
4739 |
+
function() {
|
4740 |
+
return jQuery.css( elem, prop, "" );
|
4741 |
+
},
|
4742 |
+
initial = currentValue(),
|
4743 |
+
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
4744 |
Â
|
4745 |
+
// Starting value computation is required for potential unit mismatches
|
4746 |
+
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
4747 |
+
rcssNum.exec( jQuery.css( elem, prop ) );
|
4748 |
Â
|
4749 |
+
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
Â
|
|
4750 |
Â
|
4751 |
+
// Support: Firefox <=54
|
4752 |
+
// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
|
4753 |
+
initial = initial / 2;
|
4754 |
Â
|
4755 |
+
// Trust units reported by jQuery.css
|
4756 |
+
unit = unit || initialInUnit[ 3 ];
|
4757 |
Â
|
4758 |
+
// Iteratively approximate from a nonzero starting point
|
4759 |
+
initialInUnit = +initial || 1;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4760 |
Â
|
4761 |
+
while ( maxIterations-- ) {
|
4762 |
Â
|
4763 |
+
// Evaluate and update our best guess (doubling guesses that zero out).
|
4764 |
+
// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
|
4765 |
Â
jQuery.style( elem, prop, initialInUnit + unit );
|
4766 |
+
if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
|
4767 |
+
maxIterations = 0;
|
4768 |
+
}
|
4769 |
+
initialInUnit = initialInUnit / scale;
|
4770 |
Â
|
Â
|
|
Â
|
|
4771 |
Â
}
|
4772 |
Â
|
4773 |
+
initialInUnit = initialInUnit * 2;
|
4774 |
+
jQuery.style( elem, prop, initialInUnit + unit );
|
4775 |
Â
|
4776 |
+
// Make sure we update the tween properties later on
|
4777 |
+
valueParts = valueParts || [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4778 |
Â
}
|
4779 |
Â
|
4780 |
+
if ( valueParts ) {
|
4781 |
+
initialInUnit = +initialInUnit || +initial || 0;
|
4782 |
Â
|
4783 |
+
// Apply relative offset (+=/-=) if specified
|
4784 |
+
adjusted = valueParts[ 1 ] ?
|
4785 |
+
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
4786 |
+
+valueParts[ 2 ];
|
4787 |
+
if ( tween ) {
|
4788 |
+
tween.unit = unit;
|
4789 |
+
tween.start = initialInUnit;
|
4790 |
+
tween.end = adjusted;
|
Â
|
|
Â
|
|
4791 |
Â
}
|
4792 |
+
}
|
4793 |
+
return adjusted;
|
4794 |
+
}
|
4795 |
Â
|
Â
|
|
Â
|
|
4796 |
Â
|
4797 |
+
var defaultDisplayMap = {};
|
4798 |
Â
|
4799 |
+
function getDefaultDisplay( elem ) {
|
4800 |
+
var temp,
|
4801 |
+
doc = elem.ownerDocument,
|
4802 |
+
nodeName = elem.nodeName,
|
4803 |
+
display = defaultDisplayMap[ nodeName ];
|
4804 |
Â
|
4805 |
+
if ( display ) {
|
4806 |
Â
return display;
|
4807 |
Â
}
|
4808 |
Â
|
4809 |
+
temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
4810 |
+
display = jQuery.css( temp, "display" );
|
Â
|
|
Â
|
|
Â
|
|
4811 |
Â
|
4812 |
+
temp.parentNode.removeChild( temp );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4813 |
Â
|
4814 |
+
if ( display === "none" ) {
|
4815 |
+
display = "block";
|
4816 |
+
}
|
4817 |
+
defaultDisplayMap[ nodeName ] = display;
|
4818 |
Â
|
4819 |
+
return display;
|
4820 |
+
}
|
4821 |
+
|
4822 |
+
function showHide( elements, show ) {
|
4823 |
+
var display, elem,
|
4824 |
+
values = [],
|
4825 |
+
index = 0,
|
4826 |
+
length = elements.length;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4827 |
Â
|
4828 |
+
// Determine new display value for elements that need to change
|
4829 |
+
for ( ; index < length; index++ ) {
|
4830 |
+
elem = elements[ index ];
|
4831 |
+
if ( !elem.style ) {
|
4832 |
+
continue;
|
4833 |
+
}
|
4834 |
+
|
4835 |
+
display = elem.style.display;
|
4836 |
+
if ( show ) {
|
4837 |
+
|
4838 |
+
// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
|
4839 |
+
// check is required in this first loop unless we have a nonempty display value (either
|
4840 |
+
// inline or about-to-be-restored)
|
4841 |
+
if ( display === "none" ) {
|
4842 |
+
values[ index ] = dataPriv.get( elem, "display" ) || null;
|
4843 |
+
if ( !values[ index ] ) {
|
4844 |
+
elem.style.display = "";
|
4845 |
Â
}
|
4846 |
Â
}
|
4847 |
+
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
|
4848 |
+
values[ index ] = getDefaultDisplay( elem );
|
4849 |
+
}
|
4850 |
+
} else {
|
4851 |
+
if ( display !== "none" ) {
|
4852 |
+
values[ index ] = "none";
|
4853 |
Â
|
4854 |
+
// Remember what we're overwriting
|
4855 |
+
dataPriv.set( elem, "display", display );
|
Â
|
|
Â
|
|
4856 |
Â
}
|
4857 |
Â
}
|
4858 |
+
}
|
4859 |
Â
|
4860 |
+
// Set the display of the elements in a second loop to avoid constant reflow
|
4861 |
+
for ( index = 0; index < length; index++ ) {
|
4862 |
+
if ( values[ index ] != null ) {
|
4863 |
+
elements[ index ].style.display = values[ index ];
|
4864 |
+
}
|
4865 |
Â
}
|
4866 |
Â
|
4867 |
+
return elements;
|
4868 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4869 |
Â
|
4870 |
+
jQuery.fn.extend( {
|
4871 |
+
show: function() {
|
4872 |
+
return showHide( this, true );
|
4873 |
+
},
|
4874 |
+
hide: function() {
|
4875 |
+
return showHide( this );
|
4876 |
+
},
|
4877 |
+
toggle: function( state ) {
|
4878 |
+
if ( typeof state === "boolean" ) {
|
4879 |
+
return state ? this.show() : this.hide();
|
4880 |
Â
}
|
Â
|
|
Â
|
|
4881 |
Â
|
4882 |
+
return this.each( function() {
|
4883 |
+
if ( isHiddenWithinTree( this ) ) {
|
4884 |
+
jQuery( this ).show();
|
4885 |
+
} else {
|
4886 |
+
jQuery( this ).hide();
|
4887 |
+
}
|
4888 |
+
} );
|
4889 |
+
}
|
4890 |
+
} );
|
4891 |
+
var rcheckableType = ( /^(?:checkbox|radio)$/i );
|
4892 |
Â
|
4893 |
+
var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
|
4894 |
Â
|
4895 |
+
var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
4896 |
Â
|
4897 |
Â
|
Â
|
|
Â
|
|
4898 |
Â
|
4899 |
+
// We have to close these tags to support XHTML (#13200)
|
4900 |
+
var wrapMap = {
|
4901 |
Â
|
4902 |
+
// Support: IE <=9 only
|
4903 |
+
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4904 |
Â
|
4905 |
+
// XHTML parsers do not magically insert elements in the
|
4906 |
+
// same way that tag soup parsers do. So we cannot shorten
|
4907 |
+
// this by omitting <tbody> or other required elements.
|
4908 |
+
thead: [ 1, "<table>", "</table>" ],
|
4909 |
+
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
4910 |
+
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
4911 |
+
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
4912 |
Â
|
4913 |
+
_default: [ 0, "", "" ]
|
4914 |
+
};
|
4915 |
Â
|
4916 |
+
// Support: IE <=9 only
|
4917 |
+
wrapMap.optgroup = wrapMap.option;
|
4918 |
Â
|
4919 |
+
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
4920 |
+
wrapMap.th = wrapMap.td;
|
4921 |
Â
|
Â
|
|
4922 |
Â
|
4923 |
+
function getAll( context, tag ) {
|
Â
|
|
Â
|
|
4924 |
Â
|
4925 |
+
// Support: IE <=9 - 11 only
|
4926 |
+
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
4927 |
+
var ret;
|
4928 |
Â
|
4929 |
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
4930 |
+
ret = context.getElementsByTagName( tag || "*" );
|
4931 |
Â
|
4932 |
+
} else if ( typeof context.querySelectorAll !== "undefined" ) {
|
4933 |
+
ret = context.querySelectorAll( tag || "*" );
|
Â
|
|
4934 |
Â
|
4935 |
+
} else {
|
4936 |
+
ret = [];
|
4937 |
+
}
|
4938 |
Â
|
4939 |
+
if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
4940 |
+
return jQuery.merge( [ context ], ret );
|
4941 |
Â
}
|
4942 |
Â
|
4943 |
+
return ret;
|
4944 |
+
}
|
4945 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4946 |
Â
|
4947 |
+
// Mark scripts as having already been evaluated
|
4948 |
+
function setGlobalEval( elems, refElements ) {
|
4949 |
+
var i = 0,
|
4950 |
+
l = elems.length;
|
4951 |
+
|
4952 |
+
for ( ; i < l; i++ ) {
|
4953 |
+
dataPriv.set(
|
4954 |
+
elems[ i ],
|
4955 |
+
"globalEval",
|
4956 |
+
!refElements || dataPriv.get( refElements[ i ], "globalEval" )
|
4957 |
+
);
|
4958 |
Â
}
|
4959 |
+
}
|
4960 |
Â
|
4961 |
Â
|
4962 |
+
var rhtml = /<|&#?\w+;/;
|
4963 |
Â
|
4964 |
+
function buildFragment( elems, context, scripts, selection, ignored ) {
|
4965 |
+
var elem, tmp, tag, wrap, contains, j,
|
4966 |
+
fragment = context.createDocumentFragment(),
|
4967 |
+
nodes = [],
|
4968 |
+
i = 0,
|
4969 |
+
l = elems.length;
|
4970 |
Â
|
4971 |
+
for ( ; i < l; i++ ) {
|
4972 |
+
elem = elems[ i ];
|
4973 |
Â
|
4974 |
+
if ( elem || elem === 0 ) {
|
4975 |
Â
|
4976 |
+
// Add nodes directly
|
4977 |
+
if ( toType( elem ) === "object" ) {
|
4978 |
Â
|
4979 |
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
4980 |
+
// push.apply(_, arraylike) throws on ancient WebKit
|
4981 |
+
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
4982 |
Â
|
4983 |
+
// Convert non-html into a text node
|
4984 |
+
} else if ( !rhtml.test( elem ) ) {
|
4985 |
+
nodes.push( context.createTextNode( elem ) );
|
4986 |
Â
|
4987 |
+
// Convert html into DOM nodes
|
4988 |
+
} else {
|
4989 |
+
tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
|
4990 |
Â
|
4991 |
+
// Deserialize a standard representation
|
4992 |
+
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
|
4993 |
+
wrap = wrapMap[ tag ] || wrapMap._default;
|
4994 |
+
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
|
4995 |
Â
|
4996 |
+
// Descend through wrappers to the right content
|
4997 |
+
j = wrap[ 0 ];
|
4998 |
+
while ( j-- ) {
|
4999 |
+
tmp = tmp.lastChild;
|
5000 |
+
}
|
5001 |
Â
|
5002 |
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
5003 |
+
// push.apply(_, arraylike) throws on ancient WebKit
|
5004 |
+
jQuery.merge( nodes, tmp.childNodes );
|
5005 |
Â
|
5006 |
+
// Remember the top-level container
|
5007 |
+
tmp = fragment.firstChild;
|
5008 |
Â
|
5009 |
+
// Ensure the created nodes are orphaned (#12392)
|
5010 |
+
tmp.textContent = "";
|
Â
|
|
5011 |
Â
}
|
5012 |
Â
}
|
5013 |
+
}
|
5014 |
Â
|
5015 |
+
// Remove wrapper from fragment
|
5016 |
+
fragment.textContent = "";
|
5017 |
Â
|
5018 |
+
i = 0;
|
5019 |
+
while ( ( elem = nodes[ i++ ] ) ) {
|
5020 |
Â
|
5021 |
+
// Skip elements already in the context collection (trac-4087)
|
5022 |
+
if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
|
5023 |
+
if ( ignored ) {
|
5024 |
+
ignored.push( elem );
|
Â
|
|
Â
|
|
5025 |
Â
}
|
5026 |
+
continue;
|
5027 |
+
}
|
5028 |
Â
|
5029 |
+
contains = jQuery.contains( elem.ownerDocument, elem );
|
5030 |
Â
|
5031 |
+
// Append to fragment
|
5032 |
+
tmp = getAll( fragment.appendChild( elem ), "script" );
|
5033 |
Â
|
5034 |
+
// Preserve script evaluation history
|
5035 |
+
if ( contains ) {
|
5036 |
+
setGlobalEval( tmp );
|
5037 |
+
}
|
5038 |
Â
|
5039 |
+
// Capture executables
|
5040 |
+
if ( scripts ) {
|
5041 |
+
j = 0;
|
5042 |
+
while ( ( elem = tmp[ j++ ] ) ) {
|
5043 |
+
if ( rscriptType.test( elem.type || "" ) ) {
|
5044 |
+
scripts.push( elem );
|
Â
|
|
5045 |
Â
}
|
5046 |
Â
}
|
5047 |
Â
}
|
Â
|
|
Â
|
|
5048 |
Â
}
|
5049 |
Â
|
5050 |
+
return fragment;
|
5051 |
+
}
|
5052 |
+
|
5053 |
Â
|
5054 |
+
( function() {
|
5055 |
+
var fragment = document.createDocumentFragment(),
|
5056 |
+
div = fragment.appendChild( document.createElement( "div" ) ),
|
5057 |
+
input = document.createElement( "input" );
|
5058 |
Â
|
5059 |
+
// Support: Android 4.0 - 4.3 only
|
5060 |
+
// Check state lost if the name is set (#11217)
|
5061 |
+
// Support: Windows Web Apps (WWA)
|
5062 |
+
// `name` and `type` must use .setAttribute for WWA (#14901)
|
5063 |
+
input.setAttribute( "type", "radio" );
|
5064 |
+
input.setAttribute( "checked", "checked" );
|
5065 |
+
input.setAttribute( "name", "t" );
|
5066 |
Â
|
5067 |
+
div.appendChild( input );
|
5068 |
Â
|
5069 |
+
// Support: Android <=4.1 only
|
5070 |
+
// Older WebKit doesn't clone checked state correctly in fragments
|
5071 |
+
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
5072 |
Â
|
5073 |
+
// Support: IE <=11 only
|
5074 |
+
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
5075 |
+
div.innerHTML = "<textarea>x</textarea>";
|
5076 |
+
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
5077 |
+
} )();
|
5078 |
+
var documentElement = document.documentElement;
|
5079 |
Â
|
5080 |
Â
|
5081 |
Â
|
5082 |
+
var
|
5083 |
+
rkeyEvent = /^key/,
|
5084 |
+
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
5085 |
+
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
5086 |
Â
|
5087 |
+
function returnTrue() {
|
5088 |
+
return true;
|
5089 |
+
}
|
5090 |
Â
|
5091 |
+
function returnFalse() {
|
5092 |
+
return false;
|
5093 |
+
}
|
5094 |
Â
|
5095 |
+
// Support: IE <=9 only
|
5096 |
+
// See #13393 for more info
|
5097 |
+
function safeActiveElement() {
|
5098 |
+
try {
|
5099 |
+
return document.activeElement;
|
5100 |
+
} catch ( err ) { }
|
5101 |
+
}
|
5102 |
Â
|
5103 |
+
function on( elem, types, selector, data, fn, one ) {
|
5104 |
+
var origFn, type;
|
5105 |
Â
|
5106 |
+
// Types can be a map of types/handlers
|
5107 |
+
if ( typeof types === "object" ) {
|
5108 |
Â
|
5109 |
+
// ( types-Object, selector, data )
|
5110 |
+
if ( typeof selector !== "string" ) {
|
5111 |
Â
|
5112 |
+
// ( types-Object, data )
|
5113 |
+
data = data || selector;
|
5114 |
+
selector = undefined;
|
5115 |
+
}
|
5116 |
+
for ( type in types ) {
|
5117 |
+
on( elem, type, selector, data, types[ type ], one );
|
Â
|
|
Â
|
|
5118 |
Â
}
|
5119 |
+
return elem;
|
5120 |
+
}
|
5121 |
Â
|
5122 |
+
if ( data == null && fn == null ) {
|
5123 |
Â
|
5124 |
+
// ( types, fn )
|
5125 |
+
fn = selector;
|
5126 |
+
data = selector = undefined;
|
5127 |
+
} else if ( fn == null ) {
|
5128 |
+
if ( typeof selector === "string" ) {
|
5129 |
Â
|
5130 |
+
// ( types, selector, fn )
|
5131 |
+
fn = data;
|
5132 |
+
data = undefined;
|
5133 |
+
} else {
|
5134 |
Â
|
5135 |
+
// ( types, data, fn )
|
5136 |
+
fn = data;
|
5137 |
+
data = selector;
|
5138 |
+
selector = undefined;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5139 |
Â
}
|
5140 |
+
}
|
5141 |
+
if ( fn === false ) {
|
5142 |
+
fn = returnFalse;
|
5143 |
+
} else if ( !fn ) {
|
5144 |
+
return elem;
|
5145 |
+
}
|
5146 |
Â
|
5147 |
+
if ( one === 1 ) {
|
5148 |
+
origFn = fn;
|
5149 |
+
fn = function( event ) {
|
5150 |
Â
|
5151 |
+
// Can use an empty set, since event contains the info
|
5152 |
+
jQuery().off( event );
|
5153 |
+
return origFn.apply( this, arguments );
|
5154 |
+
};
|
5155 |
Â
|
5156 |
+
// Use same guid so caller can remove using origFn
|
5157 |
+
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5158 |
Â
}
|
5159 |
+
return elem.each( function() {
|
5160 |
+
jQuery.event.add( this, types, fn, data, selector );
|
5161 |
+
} );
|
5162 |
+
}
|
5163 |
Â
|
5164 |
+
/*
|
5165 |
+
* Helper functions for managing events -- not part of the public interface.
|
5166 |
+
* Props to Dean Edwards' addEvent library for many of the ideas.
|
5167 |
+
*/
|
5168 |
+
jQuery.event = {
|
5169 |
Â
|
5170 |
+
global: {},
|
5171 |
Â
|
5172 |
+
add: function( elem, types, handler, data, selector ) {
|
5173 |
Â
|
5174 |
+
var handleObjIn, eventHandle, tmp,
|
5175 |
+
events, t, handleObj,
|
5176 |
+
special, handlers, type, namespaces, origType,
|
5177 |
+
elemData = dataPriv.get( elem );
|
5178 |
Â
|
5179 |
+
// Don't attach events to noData or text/comment nodes (but allow plain objects)
|
5180 |
+
if ( !elemData ) {
|
5181 |
+
return;
|
5182 |
+
}
|
5183 |
Â
|
5184 |
+
// Caller can pass in an object of custom data in lieu of the handler
|
5185 |
+
if ( handler.handler ) {
|
5186 |
+
handleObjIn = handler;
|
5187 |
+
handler = handleObjIn.handler;
|
5188 |
+
selector = handleObjIn.selector;
|
5189 |
+
}
|
5190 |
Â
|
5191 |
+
// Ensure that invalid selectors throw exceptions at attach time
|
5192 |
+
// Evaluate against documentElement in case elem is a non-element node (e.g., document)
|
5193 |
+
if ( selector ) {
|
5194 |
+
jQuery.find.matchesSelector( documentElement, selector );
|
5195 |
+
}
|
5196 |
Â
|
5197 |
+
// Make sure that the handler has a unique ID, used to find/remove it later
|
5198 |
+
if ( !handler.guid ) {
|
5199 |
+
handler.guid = jQuery.guid++;
|
5200 |
+
}
|
5201 |
Â
|
5202 |
+
// Init the element's event structure and main handler, if this is the first
|
5203 |
+
if ( !( events = elemData.events ) ) {
|
5204 |
+
events = elemData.events = {};
|
5205 |
+
}
|
5206 |
+
if ( !( eventHandle = elemData.handle ) ) {
|
5207 |
+
eventHandle = elemData.handle = function( e ) {
|
5208 |
Â
|
5209 |
+
// Discard the second event of a jQuery.event.trigger() and
|
5210 |
+
// when an event is called after a page has unloaded
|
5211 |
+
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
|
5212 |
+
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
|
5213 |
+
};
|
5214 |
+
}
|
5215 |
Â
|
5216 |
+
// Handle multiple events separated by a space
|
5217 |
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
5218 |
+
t = types.length;
|
5219 |
+
while ( t-- ) {
|
5220 |
+
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
5221 |
+
type = origType = tmp[ 1 ];
|
5222 |
+
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
5223 |
Â
|
5224 |
+
// There *must* be a type, no attaching namespace-only handlers
|
5225 |
+
if ( !type ) {
|
5226 |
+
continue;
|
5227 |
+
}
|
5228 |
Â
|
5229 |
+
// If event changes its type, use the special event handlers for the changed type
|
5230 |
+
special = jQuery.event.special[ type ] || {};
|
5231 |
Â
|
5232 |
+
// If selector defined, determine special event api type, otherwise given type
|
5233 |
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
5234 |
Â
|
5235 |
+
// Update special based on newly reset type
|
5236 |
+
special = jQuery.event.special[ type ] || {};
|
5237 |
Â
|
5238 |
+
// handleObj is passed to all event handlers
|
5239 |
+
handleObj = jQuery.extend( {
|
5240 |
+
type: type,
|
5241 |
+
origType: origType,
|
5242 |
+
data: data,
|
5243 |
+
handler: handler,
|
5244 |
+
guid: handler.guid,
|
5245 |
+
selector: selector,
|
5246 |
+
needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
|
5247 |
+
namespace: namespaces.join( "." )
|
5248 |
+
}, handleObjIn );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5249 |
Â
|
5250 |
+
// Init the event handler queue if we're the first
|
5251 |
+
if ( !( handlers = events[ type ] ) ) {
|
5252 |
+
handlers = events[ type ] = [];
|
5253 |
+
handlers.delegateCount = 0;
|
5254 |
Â
|
5255 |
+
// Only use addEventListener if the special events handler returns false
|
5256 |
+
if ( !special.setup ||
|
5257 |
+
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
5258 |
+
|
5259 |
+
if ( elem.addEventListener ) {
|
5260 |
+
elem.addEventListener( type, eventHandle );
|
5261 |
Â
}
|
5262 |
Â
}
|
5263 |
+
}
|
5264 |
Â
|
5265 |
+
if ( special.add ) {
|
5266 |
+
special.add.call( elem, handleObj );
|
5267 |
+
|
5268 |
+
if ( !handleObj.handler.guid ) {
|
5269 |
+
handleObj.handler.guid = handler.guid;
|
5270 |
Â
}
|
5271 |
+
}
|
5272 |
Â
|
5273 |
+
// Add to the element's handler list, delegates in front
|
5274 |
+
if ( selector ) {
|
5275 |
+
handlers.splice( handlers.delegateCount++, 0, handleObj );
|
5276 |
+
} else {
|
5277 |
+
handlers.push( handleObj );
|
5278 |
Â
}
|
5279 |
Â
|
5280 |
+
// Keep track of which events have ever been used, for event optimization
|
5281 |
+
jQuery.event.global[ type ] = true;
|
5282 |
+
}
|
5283 |
Â
|
5284 |
+
},
|
Â
|
|
5285 |
Â
|
5286 |
+
// Detach an event or set of events from an element
|
5287 |
+
remove: function( elem, types, handler, selector, mappedTypes ) {
|
Â
|
|
Â
|
|
5288 |
Â
|
5289 |
+
var j, origCount, tmp,
|
5290 |
+
events, t, handleObj,
|
5291 |
+
special, handlers, type, namespaces, origType,
|
5292 |
+
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
|
5293 |
+
|
5294 |
+
if ( !elemData || !( events = elemData.events ) ) {
|
5295 |
+
return;
|
5296 |
+
}
|
5297 |
Â
|
5298 |
+
// Once for each type.namespace in types; type may be omitted
|
5299 |
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
5300 |
+
t = types.length;
|
5301 |
+
while ( t-- ) {
|
5302 |
+
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
5303 |
+
type = origType = tmp[ 1 ];
|
5304 |
+
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
5305 |
Â
|
5306 |
+
// Unbind all events (on this namespace, if provided) for the element
|
5307 |
+
if ( !type ) {
|
5308 |
+
for ( type in events ) {
|
5309 |
+
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
Â
|
|
Â
|
|
5310 |
Â
}
|
5311 |
+
continue;
|
5312 |
+
}
|
5313 |
Â
|
5314 |
+
special = jQuery.event.special[ type ] || {};
|
5315 |
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
5316 |
+
handlers = events[ type ] || [];
|
5317 |
+
tmp = tmp[ 2 ] &&
|
5318 |
+
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
|
5319 |
Â
|
5320 |
+
// Remove matching events
|
5321 |
+
origCount = j = handlers.length;
|
5322 |
+
while ( j-- ) {
|
5323 |
+
handleObj = handlers[ j ];
|
5324 |
Â
|
5325 |
+
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
5326 |
+
( !handler || handler.guid === handleObj.guid ) &&
|
5327 |
+
( !tmp || tmp.test( handleObj.namespace ) ) &&
|
5328 |
+
( !selector || selector === handleObj.selector ||
|
5329 |
+
selector === "**" && handleObj.selector ) ) {
|
5330 |
+
handlers.splice( j, 1 );
|
5331 |
Â
|
5332 |
+
if ( handleObj.selector ) {
|
5333 |
+
handlers.delegateCount--;
|
5334 |
+
}
|
5335 |
+
if ( special.remove ) {
|
5336 |
+
special.remove.call( elem, handleObj );
|
Â
|
|
5337 |
Â
}
|
5338 |
Â
}
|
5339 |
+
}
|
5340 |
Â
|
5341 |
+
// Remove generic event handler if we removed something and no more handlers exist
|
5342 |
+
// (avoids potential for endless recursion during removal of special event handlers)
|
5343 |
+
if ( origCount && !handlers.length ) {
|
5344 |
+
if ( !special.teardown ||
|
5345 |
+
special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
Â
|
|
Â
|
|
Â
|
|
5346 |
Â
|
5347 |
+
jQuery.removeEvent( elem, type, elemData.handle );
|
5348 |
Â
}
|
Â
|
|
5349 |
Â
|
5350 |
+
delete events[ type ];
|
Â
|
|
Â
|
|
5351 |
Â
}
|
5352 |
+
}
|
5353 |
Â
|
5354 |
+
// Remove data and the expando if it's no longer used
|
5355 |
+
if ( jQuery.isEmptyObject( events ) ) {
|
5356 |
+
dataPriv.remove( elem, "handle events" );
|
5357 |
+
}
|
5358 |
+
},
|
5359 |
Â
|
5360 |
+
dispatch: function( nativeEvent ) {
|
Â
|
|
5361 |
Â
|
5362 |
+
// Make a writable jQuery.Event from the native event object
|
5363 |
+
var event = jQuery.event.fix( nativeEvent );
|
Â
|
|
Â
|
|
5364 |
Â
|
5365 |
+
var i, j, ret, matched, handleObj, handlerQueue,
|
5366 |
+
args = new Array( arguments.length ),
|
5367 |
+
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
|
5368 |
+
special = jQuery.event.special[ event.type ] || {};
|
5369 |
Â
|
5370 |
+
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
5371 |
+
args[ 0 ] = event;
|
Â
|
|
5372 |
Â
|
5373 |
+
for ( i = 1; i < arguments.length; i++ ) {
|
5374 |
+
args[ i ] = arguments[ i ];
|
5375 |
+
}
|
5376 |
Â
|
5377 |
+
event.delegateTarget = this;
|
Â
|
|
Â
|
|
Â
|
|
5378 |
Â
|
5379 |
+
// Call the preDispatch hook for the mapped type, and let it bail if desired
|
5380 |
+
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
|
5381 |
+
return;
|
5382 |
+
}
|
5383 |
Â
|
5384 |
+
// Determine handlers
|
5385 |
+
handlerQueue = jQuery.event.handlers.call( this, event, handlers );
|
Â
|
|
Â
|
|
5386 |
Â
|
5387 |
+
// Run delegates first; they may want to stop propagation beneath us
|
5388 |
+
i = 0;
|
5389 |
+
while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
|
5390 |
+
event.currentTarget = matched.elem;
|
5391 |
Â
|
5392 |
+
j = 0;
|
5393 |
+
while ( ( handleObj = matched.handlers[ j++ ] ) &&
|
5394 |
+
!event.isImmediatePropagationStopped() ) {
|
5395 |
Â
|
5396 |
+
// Triggered event must either 1) have no namespace, or 2) have namespace(s)
|
5397 |
+
// a subset or equal to those in the bound event (both can have no namespace).
|
5398 |
+
if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
|
5399 |
Â
|
5400 |
+
event.handleObj = handleObj;
|
5401 |
+
event.data = handleObj.data;
|
5402 |
Â
|
5403 |
+
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
|
5404 |
+
handleObj.handler ).apply( matched.elem, args );
|
5405 |
+
|
5406 |
+
if ( ret !== undefined ) {
|
5407 |
+
if ( ( event.result = ret ) === false ) {
|
5408 |
+
event.preventDefault();
|
5409 |
+
event.stopPropagation();
|
5410 |
Â
}
|
5411 |
Â
}
|
5412 |
Â
}
|
5413 |
Â
}
|
5414 |
+
}
|
5415 |
Â
|
5416 |
+
// Call the postDispatch hook for the mapped type
|
5417 |
+
if ( special.postDispatch ) {
|
5418 |
+
special.postDispatch.call( this, event );
|
5419 |
+
}
|
5420 |
Â
|
5421 |
+
return event.result;
|
5422 |
+
},
|
5423 |
Â
|
5424 |
+
handlers: function( event, handlers ) {
|
5425 |
+
var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
5426 |
+
handlerQueue = [],
|
5427 |
+
delegateCount = handlers.delegateCount,
|
5428 |
+
cur = event.target;
|
5429 |
+
|
5430 |
+
// Find delegate handlers
|
5431 |
+
if ( delegateCount &&
|
5432 |
+
|
5433 |
+
// Support: IE <=9
|
5434 |
+
// Black-hole SVG <use> instance trees (trac-13180)
|
5435 |
+
cur.nodeType &&
|
5436 |
+
|
5437 |
+
// Support: Firefox <=42
|
5438 |
+
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
|
5439 |
+
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
|
5440 |
+
// Support: IE 11 only
|
5441 |
+
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
|
5442 |
+
!( event.type === "click" && event.button >= 1 ) ) {
|
5443 |
+
|
5444 |
+
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
5445 |
+
|
5446 |
+
// Don't check non-elements (#13208)
|
5447 |
+
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
5448 |
+
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
5449 |
+
matchedHandlers = [];
|
5450 |
+
matchedSelectors = {};
|
5451 |
+
for ( i = 0; i < delegateCount; i++ ) {
|
5452 |
+
handleObj = handlers[ i ];
|
5453 |
+
|
5454 |
+
// Don't conflict with Object.prototype properties (#13203)
|
5455 |
+
sel = handleObj.selector + " ";
|
5456 |
+
|
5457 |
+
if ( matchedSelectors[ sel ] === undefined ) {
|
5458 |
+
matchedSelectors[ sel ] = handleObj.needsContext ?
|
5459 |
+
jQuery( sel, this ).index( cur ) > -1 :
|
5460 |
+
jQuery.find( sel, this, null, [ cur ] ).length;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5461 |
Â
}
|
5462 |
+
if ( matchedSelectors[ sel ] ) {
|
5463 |
+
matchedHandlers.push( handleObj );
|
5464 |
Â
}
|
5465 |
Â
}
|
5466 |
+
if ( matchedHandlers.length ) {
|
5467 |
+
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
5468 |
+
}
|
5469 |
Â
}
|
5470 |
Â
}
|
5471 |
+
}
|
5472 |
Â
|
5473 |
+
// Add the remaining (directly-bound) handlers
|
5474 |
+
cur = this;
|
5475 |
+
if ( delegateCount < handlers.length ) {
|
5476 |
+
handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
5477 |
+
}
|
5478 |
Â
|
5479 |
+
return handlerQueue;
|
5480 |
+
},
|
5481 |
Â
|
5482 |
+
addProp: function( name, hook ) {
|
5483 |
+
Object.defineProperty( jQuery.Event.prototype, name, {
|
5484 |
+
enumerable: true,
|
5485 |
+
configurable: true,
|
5486 |
Â
|
5487 |
+
get: isFunction( hook ) ?
|
5488 |
+
function() {
|
5489 |
+
if ( this.originalEvent ) {
|
5490 |
+
return hook( this.originalEvent );
|
5491 |
+
}
|
5492 |
+
} :
|
5493 |
+
function() {
|
5494 |
+
if ( this.originalEvent ) {
|
5495 |
+
return this.originalEvent[ name ];
|
5496 |
+
}
|
5497 |
+
},
|
5498 |
Â
|
5499 |
+
set: function( value ) {
|
5500 |
+
Object.defineProperty( this, name, {
|
5501 |
+
enumerable: true,
|
5502 |
+
configurable: true,
|
5503 |
+
writable: true,
|
5504 |
+
value: value
|
5505 |
+
} );
|
5506 |
+
}
|
5507 |
+
} );
|
5508 |
+
},
|
5509 |
Â
|
5510 |
+
fix: function( originalEvent ) {
|
5511 |
+
return originalEvent[ jQuery.expando ] ?
|
5512 |
+
originalEvent :
|
5513 |
+
new jQuery.Event( originalEvent );
|
5514 |
+
},
|
5515 |
Â
|
5516 |
+
special: {
|
5517 |
+
load: {
|
5518 |
Â
|
5519 |
+
// Prevent triggered image.load events from bubbling to window.load
|
5520 |
+
noBubble: true
|
5521 |
+
},
|
5522 |
+
focus: {
|
5523 |
Â
|
5524 |
+
// Fire native event if possible so blur/focus sequence is correct
|
5525 |
+
trigger: function() {
|
5526 |
+
if ( this !== safeActiveElement() && this.focus ) {
|
5527 |
+
this.focus();
|
5528 |
+
return false;
|
5529 |
+
}
|
Â
|
|
Â
|
|
5530 |
Â
},
|
5531 |
+
delegateType: "focusin"
|
5532 |
+
},
|
5533 |
+
blur: {
|
5534 |
+
trigger: function() {
|
5535 |
+
if ( this === safeActiveElement() && this.blur ) {
|
5536 |
+
this.blur();
|
5537 |
+
return false;
|
5538 |
+
}
|
5539 |
Â
},
|
5540 |
+
delegateType: "focusout"
|
5541 |
+
},
|
5542 |
+
click: {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5543 |
Â
|
5544 |
+
// For checkbox, fire native event so checked state will be right
|
5545 |
+
trigger: function() {
|
5546 |
+
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
5547 |
+
this.click();
|
5548 |
+
return false;
|
5549 |
Â
}
|
5550 |
Â
},
|
5551 |
Â
|
5552 |
+
// For cross-browser consistency, don't fire native .click() on links
|
5553 |
+
_default: function( event ) {
|
5554 |
+
return nodeName( event.target, "a" );
|
5555 |
+
}
|
5556 |
+
},
|
5557 |
Â
|
5558 |
+
beforeunload: {
|
5559 |
+
postDispatch: function( event ) {
|
5560 |
+
|
5561 |
+
// Support: Firefox 20+
|
5562 |
+
// Firefox doesn't alert if the returnValue field is not set.
|
5563 |
+
if ( event.result !== undefined && event.originalEvent ) {
|
5564 |
+
event.originalEvent.returnValue = event.result;
|
5565 |
Â
}
|
5566 |
Â
}
|
5567 |
Â
}
|
5568 |
+
}
|
5569 |
+
};
|
Â
|
|
5570 |
Â
|
5571 |
+
jQuery.removeEvent = function( elem, type, handle ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5572 |
Â
|
5573 |
+
// This "if" is needed for plain objects
|
5574 |
+
if ( elem.removeEventListener ) {
|
5575 |
+
elem.removeEventListener( type, handle );
|
5576 |
+
}
|
5577 |
+
};
|
5578 |
Â
|
5579 |
+
jQuery.Event = function( src, props ) {
|
Â
|
|
Â
|
|
Â
|
|
5580 |
Â
|
5581 |
+
// Allow instantiation without the 'new' keyword
|
5582 |
+
if ( !( this instanceof jQuery.Event ) ) {
|
5583 |
+
return new jQuery.Event( src, props );
|
5584 |
+
}
|
5585 |
Â
|
5586 |
+
// Event object
|
5587 |
+
if ( src && src.type ) {
|
5588 |
+
this.originalEvent = src;
|
5589 |
+
this.type = src.type;
|
5590 |
Â
|
5591 |
+
// Events bubbling up the document may have been marked as prevented
|
5592 |
+
// by a handler lower down the tree; reflect the correct value.
|
5593 |
+
this.isDefaultPrevented = src.defaultPrevented ||
|
5594 |
+
src.defaultPrevented === undefined &&
|
5595 |
Â
|
5596 |
+
// Support: Android <=2.3 only
|
5597 |
+
src.returnValue === false ?
|
5598 |
+
returnTrue :
|
5599 |
+
returnFalse;
|
Â
|
|
Â
|
|
5600 |
Â
|
5601 |
+
// Create target properties
|
5602 |
+
// Support: Safari <=6 - 7 only
|
5603 |
+
// Target should not be a text node (#504, #13143)
|
5604 |
+
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
5605 |
+
src.target.parentNode :
|
5606 |
+
src.target;
|
5607 |
Â
|
5608 |
+
this.currentTarget = src.currentTarget;
|
5609 |
+
this.relatedTarget = src.relatedTarget;
|
Â
|
|
Â
|
|
5610 |
Â
|
5611 |
+
// Event type
|
5612 |
+
} else {
|
5613 |
+
this.type = src;
|
5614 |
+
}
|
5615 |
Â
|
5616 |
+
// Put explicitly provided properties onto the event object
|
5617 |
+
if ( props ) {
|
5618 |
+
jQuery.extend( this, props );
|
5619 |
+
}
|
5620 |
Â
|
5621 |
+
// Create a timestamp if incoming event doesn't have one
|
5622 |
+
this.timeStamp = src && src.timeStamp || Date.now();
|
Â
|
|
5623 |
Â
|
5624 |
+
// Mark it as fixed
|
5625 |
+
this[ jQuery.expando ] = true;
|
5626 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5627 |
Â
|
5628 |
+
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
5629 |
+
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
5630 |
+
jQuery.Event.prototype = {
|
5631 |
+
constructor: jQuery.Event,
|
5632 |
+
isDefaultPrevented: returnFalse,
|
5633 |
+
isPropagationStopped: returnFalse,
|
5634 |
+
isImmediatePropagationStopped: returnFalse,
|
5635 |
+
isSimulated: false,
|
5636 |
Â
|
5637 |
+
preventDefault: function() {
|
5638 |
+
var e = this.originalEvent;
|
5639 |
Â
|
5640 |
+
this.isDefaultPrevented = returnTrue;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5641 |
Â
|
5642 |
+
if ( e && !this.isSimulated ) {
|
5643 |
+
e.preventDefault();
|
5644 |
+
}
|
5645 |
+
},
|
5646 |
+
stopPropagation: function() {
|
5647 |
+
var e = this.originalEvent;
|
5648 |
Â
|
5649 |
+
this.isPropagationStopped = returnTrue;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5650 |
Â
|
5651 |
+
if ( e && !this.isSimulated ) {
|
5652 |
+
e.stopPropagation();
|
5653 |
+
}
|
5654 |
+
},
|
5655 |
+
stopImmediatePropagation: function() {
|
5656 |
+
var e = this.originalEvent;
|
5657 |
Â
|
5658 |
+
this.isImmediatePropagationStopped = returnTrue;
|
Â
|
|
Â
|
|
5659 |
Â
|
5660 |
+
if ( e && !this.isSimulated ) {
|
5661 |
+
e.stopImmediatePropagation();
|
5662 |
Â
}
|
Â
|
|
5663 |
Â
|
5664 |
+
this.stopPropagation();
|
5665 |
+
}
|
5666 |
+
};
|
5667 |
+
|
5668 |
+
// Includes all common event props including KeyEvent and MouseEvent specific props
|
5669 |
+
jQuery.each( {
|
5670 |
+
altKey: true,
|
5671 |
+
bubbles: true,
|
5672 |
+
cancelable: true,
|
5673 |
+
changedTouches: true,
|
5674 |
+
ctrlKey: true,
|
5675 |
+
detail: true,
|
5676 |
+
eventPhase: true,
|
5677 |
+
metaKey: true,
|
5678 |
+
pageX: true,
|
5679 |
+
pageY: true,
|
5680 |
+
shiftKey: true,
|
5681 |
+
view: true,
|
5682 |
+
"char": true,
|
5683 |
+
charCode: true,
|
5684 |
+
key: true,
|
5685 |
+
keyCode: true,
|
5686 |
+
button: true,
|
5687 |
+
buttons: true,
|
5688 |
+
clientX: true,
|
5689 |
+
clientY: true,
|
5690 |
+
offsetX: true,
|
5691 |
+
offsetY: true,
|
5692 |
+
pointerId: true,
|
5693 |
+
pointerType: true,
|
5694 |
+
screenX: true,
|
5695 |
+
screenY: true,
|
5696 |
+
targetTouches: true,
|
5697 |
+
toElement: true,
|
5698 |
+
touches: true,
|
5699 |
+
|
5700 |
+
which: function( event ) {
|
5701 |
+
var button = event.button;
|
5702 |
+
|
5703 |
+
// Add which for key events
|
5704 |
+
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
5705 |
+
return event.charCode != null ? event.charCode : event.keyCode;
|
5706 |
+
}
|
5707 |
+
|
5708 |
+
// Add which for click: 1 === left; 2 === middle; 3 === right
|
5709 |
+
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
5710 |
+
if ( button & 1 ) {
|
5711 |
+
return 1;
|
5712 |
+
}
|
5713 |
+
|
5714 |
+
if ( button & 2 ) {
|
5715 |
+
return 3;
|
5716 |
+
}
|
5717 |
+
|
5718 |
+
if ( button & 4 ) {
|
5719 |
+
return 2;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5720 |
Â
}
|
Â
|
|
Â
|
|
5721 |
Â
|
5722 |
+
return 0;
|
5723 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5724 |
Â
|
5725 |
+
return event.which;
|
5726 |
+
}
|
5727 |
+
}, jQuery.event.addProp );
|
5728 |
+
|
5729 |
+
// Create mouseenter/leave events using mouseover/out and event-time checks
|
5730 |
+
// so that event delegation works in jQuery.
|
5731 |
+
// Do the same for pointerenter/pointerleave and pointerover/pointerout
|
5732 |
+
//
|
5733 |
+
// Support: Safari 7 only
|
5734 |
+
// Safari sends mouseenter too often; see:
|
5735 |
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
|
5736 |
+
// for the description of the bug (it existed in older Chrome versions as well).
|
5737 |
+
jQuery.each( {
|
5738 |
+
mouseenter: "mouseover",
|
5739 |
+
mouseleave: "mouseout",
|
5740 |
+
pointerenter: "pointerover",
|
5741 |
+
pointerleave: "pointerout"
|
5742 |
+
}, function( orig, fix ) {
|
5743 |
+
jQuery.event.special[ orig ] = {
|
5744 |
+
delegateType: fix,
|
5745 |
+
bindType: fix,
|
5746 |
+
|
5747 |
+
handle: function( event ) {
|
5748 |
+
var ret,
|
5749 |
+
target = this,
|
5750 |
+
related = event.relatedTarget,
|
5751 |
+
handleObj = event.handleObj;
|
5752 |
+
|
5753 |
+
// For mouseenter/leave call the handler if related is outside the target.
|
5754 |
+
// NB: No relatedTarget if the mouse left/entered the browser window
|
5755 |
+
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
5756 |
+
event.type = handleObj.origType;
|
5757 |
+
ret = handleObj.handler.apply( this, arguments );
|
5758 |
+
event.type = fix;
|
5759 |
Â
}
|
5760 |
+
return ret;
|
5761 |
+
}
|
5762 |
+
};
|
5763 |
+
} );
|
5764 |
+
|
5765 |
+
jQuery.fn.extend( {
|
5766 |
+
|
5767 |
+
on: function( types, selector, data, fn ) {
|
5768 |
+
return on( this, types, selector, data, fn );
|
5769 |
+
},
|
5770 |
+
one: function( types, selector, data, fn ) {
|
5771 |
+
return on( this, types, selector, data, fn, 1 );
|
5772 |
+
},
|
5773 |
+
off: function( types, selector, fn ) {
|
5774 |
+
var handleObj, type;
|
5775 |
+
if ( types && types.preventDefault && types.handleObj ) {
|
5776 |
+
|
5777 |
+
// ( event ) dispatched jQuery.Event
|
5778 |
+
handleObj = types.handleObj;
|
5779 |
+
jQuery( types.delegateTarget ).off(
|
5780 |
+
handleObj.namespace ?
|
5781 |
+
handleObj.origType + "." + handleObj.namespace :
|
5782 |
+
handleObj.origType,
|
5783 |
+
handleObj.selector,
|
5784 |
+
handleObj.handler
|
5785 |
+
);
|
5786 |
+
return this;
|
5787 |
+
}
|
5788 |
+
if ( typeof types === "object" ) {
|
5789 |
Â
|
5790 |
+
// ( types-object [, selector] )
|
5791 |
+
for ( type in types ) {
|
5792 |
+
this.off( type, selector, types[ type ] );
|
Â
|
|
Â
|
|
Â
|
|
5793 |
Â
}
|
5794 |
+
return this;
|
Â
|
|
Â
|
|
5795 |
Â
}
|
5796 |
+
if ( selector === false || typeof selector === "function" ) {
|
5797 |
Â
|
5798 |
+
// ( types [, fn] )
|
5799 |
+
fn = selector;
|
5800 |
+
selector = undefined;
|
5801 |
+
}
|
5802 |
+
if ( fn === false ) {
|
5803 |
+
fn = returnFalse;
|
5804 |
+
}
|
5805 |
+
return this.each( function() {
|
5806 |
+
jQuery.event.remove( this, types, fn, selector );
|
5807 |
+
} );
|
5808 |
+
}
|
5809 |
+
} );
|
5810 |
Â
|
Â
|
|
5811 |
Â
|
5812 |
+
var
|
5813 |
Â
|
5814 |
+
/* eslint-disable max-len */
|
Â
|
|
5815 |
Â
|
5816 |
+
// See https://github.com/eslint/eslint/issues/3229
|
5817 |
+
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
5818 |
Â
|
5819 |
+
/* eslint-enable */
|
Â
|
|
Â
|
|
Â
|
|
5820 |
Â
|
5821 |
+
// Support: IE <=10 - 11, Edge 12 - 13 only
|
5822 |
+
// In IE/Edge using regex groups here causes severe slowdowns.
|
5823 |
+
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
5824 |
+
rnoInnerhtml = /<script|<style|<link/i,
|
5825 |
Â
|
5826 |
+
// checked="checked" or checked
|
5827 |
+
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5828 |
+
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
Â
|
|
5829 |
Â
|
5830 |
+
// Prefer a tbody over its parent table for containing new rows
|
5831 |
+
function manipulationTarget( elem, content ) {
|
5832 |
+
if ( nodeName( elem, "table" ) &&
|
5833 |
+
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
5834 |
Â
|
5835 |
+
return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
|
5836 |
Â
}
|
5837 |
Â
|
5838 |
+
return elem;
|
5839 |
+
}
|
5840 |
+
|
5841 |
+
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
5842 |
+
function disableScript( elem ) {
|
5843 |
+
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
|
5844 |
+
return elem;
|
5845 |
+
}
|
5846 |
+
function restoreScript( elem ) {
|
5847 |
+
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
|
5848 |
+
elem.type = elem.type.slice( 5 );
|
5849 |
+
} else {
|
5850 |
+
elem.removeAttribute( "type" );
|
5851 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5852 |
Â
|
5853 |
+
return elem;
|
5854 |
+
}
|
5855 |
Â
|
5856 |
+
function cloneCopyEvent( src, dest ) {
|
5857 |
+
var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
|
5858 |
Â
|
5859 |
+
if ( dest.nodeType !== 1 ) {
|
5860 |
+
return;
|
5861 |
+
}
|
5862 |
Â
|
5863 |
+
// 1. Copy private data: events, handlers, etc.
|
5864 |
+
if ( dataPriv.hasData( src ) ) {
|
5865 |
+
pdataOld = dataPriv.access( src );
|
5866 |
+
pdataCur = dataPriv.set( dest, pdataOld );
|
5867 |
+
events = pdataOld.events;
|
5868 |
Â
|
5869 |
+
if ( events ) {
|
5870 |
+
delete pdataCur.handle;
|
5871 |
+
pdataCur.events = {};
|
5872 |
Â
|
5873 |
+
for ( type in events ) {
|
5874 |
+
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
5875 |
+
jQuery.event.add( dest, type, events[ type ][ i ] );
|
Â
|
|
5876 |
Â
}
|
5877 |
Â
}
|
5878 |
Â
}
|
5879 |
+
}
|
5880 |
Â
|
5881 |
+
// 2. Copy user data
|
5882 |
+
if ( dataUser.hasData( src ) ) {
|
5883 |
+
udataOld = dataUser.access( src );
|
5884 |
+
udataCur = jQuery.extend( {}, udataOld );
|
5885 |
Â
|
5886 |
+
dataUser.set( dest, udataCur );
|
Â
|
|
5887 |
Â
}
|
5888 |
+
}
|
5889 |
Â
|
5890 |
+
// Fix IE bugs, see support tests
|
5891 |
+
function fixInput( src, dest ) {
|
5892 |
+
var nodeName = dest.nodeName.toLowerCase();
|
5893 |
Â
|
5894 |
+
// Fails to persist the checked state of a cloned checkbox or radio button.
|
5895 |
+
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
5896 |
+
dest.checked = src.checked;
|
5897 |
Â
|
5898 |
+
// Fails to return the selected option to the default selected state when cloning options
|
5899 |
+
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
5900 |
+
dest.defaultValue = src.defaultValue;
|
5901 |
+
}
|
5902 |
+
}
|
5903 |
+
|
5904 |
+
function domManip( collection, args, callback, ignored ) {
|
5905 |
+
|
5906 |
+
// Flatten any nested arrays
|
5907 |
+
args = concat.apply( [], args );
|
5908 |
+
|
5909 |
+
var fragment, first, scripts, hasScripts, node, doc,
|
5910 |
+
i = 0,
|
5911 |
+
l = collection.length,
|
5912 |
+
iNoClone = l - 1,
|
5913 |
+
value = args[ 0 ],
|
5914 |
+
valueIsFunction = isFunction( value );
|
5915 |
+
|
5916 |
+
// We can't cloneNode fragments that contain checked, in WebKit
|
5917 |
+
if ( valueIsFunction ||
|
5918 |
+
( l > 1 && typeof value === "string" &&
|
5919 |
+
!support.checkClone && rchecked.test( value ) ) ) {
|
5920 |
+
return collection.each( function( index ) {
|
5921 |
+
var self = collection.eq( index );
|
5922 |
+
if ( valueIsFunction ) {
|
5923 |
+
args[ 0 ] = value.call( this, index, self.html() );
|
5924 |
+
}
|
5925 |
+
domManip( self, args, callback, ignored );
|
5926 |
+
} );
|
5927 |
Â
}
|
5928 |
Â
|
5929 |
+
if ( l ) {
|
5930 |
+
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
|
5931 |
+
first = fragment.firstChild;
|
Â
|
|
5932 |
Â
|
5933 |
+
if ( fragment.childNodes.length === 1 ) {
|
5934 |
+
fragment = first;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5935 |
Â
}
|
5936 |
Â
|
5937 |
+
// Require either new content or an interest in ignored elements to invoke the callback
|
5938 |
+
if ( first || ignored ) {
|
5939 |
+
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
5940 |
+
hasScripts = scripts.length;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5941 |
Â
|
5942 |
+
// Use the original fragment for the last item
|
5943 |
+
// instead of the first because it can end up
|
5944 |
+
// being emptied incorrectly in certain situations (#8070).
|
5945 |
+
for ( ; i < l; i++ ) {
|
5946 |
+
node = fragment;
|
5947 |
Â
|
5948 |
+
if ( i !== iNoClone ) {
|
5949 |
+
node = jQuery.clone( node, true, true );
|
5950 |
Â
|
5951 |
+
// Keep references to cloned scripts for later restoration
|
5952 |
+
if ( hasScripts ) {
|
5953 |
Â
|
5954 |
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
5955 |
+
// push.apply(_, arraylike) throws on ancient WebKit
|
5956 |
+
jQuery.merge( scripts, getAll( node, "script" ) );
|
Â
|
|
5957 |
Â
}
|
Â
|
|
Â
|
|
5958 |
Â
}
|
5959 |
Â
|
5960 |
+
callback.call( collection[ i ], node, i );
|
5961 |
+
}
|
5962 |
Â
|
5963 |
+
if ( hasScripts ) {
|
5964 |
+
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
5965 |
Â
|
5966 |
+
// Reenable scripts
|
5967 |
+
jQuery.map( scripts, restoreScript );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5968 |
Â
|
5969 |
+
// Evaluate executable scripts on first document insertion
|
5970 |
+
for ( i = 0; i < hasScripts; i++ ) {
|
5971 |
+
node = scripts[ i ];
|
5972 |
+
if ( rscriptType.test( node.type || "" ) &&
|
5973 |
+
!dataPriv.access( node, "globalEval" ) &&
|
5974 |
+
jQuery.contains( doc, node ) ) {
|
5975 |
Â
|
5976 |
+
if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
|
5977 |
+
|
5978 |
+
// Optional AJAX dependency, but won't run scripts if not present
|
5979 |
+
if ( jQuery._evalUrl ) {
|
5980 |
+
jQuery._evalUrl( node.src );
|
Â
|
|
5981 |
Â
}
|
5982 |
+
} else {
|
5983 |
+
DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node );
|
5984 |
Â
}
|
5985 |
Â
}
|
5986 |
Â
}
|
5987 |
Â
}
|
5988 |
Â
}
|
Â
|
|
Â
|
|
5989 |
Â
}
|
5990 |
Â
|
5991 |
+
return collection;
|
5992 |
+
}
|
Â
|
|
Â
|
|
5993 |
Â
|
5994 |
+
function remove( elem, selector, keepData ) {
|
5995 |
+
var node,
|
5996 |
+
nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
5997 |
+
i = 0;
|
5998 |
Â
|
5999 |
+
for ( ; ( node = nodes[ i ] ) != null; i++ ) {
|
6000 |
+
if ( !keepData && node.nodeType === 1 ) {
|
6001 |
+
jQuery.cleanData( getAll( node ) );
|
Â
|
|
Â
|
|
Â
|
|
6002 |
Â
}
|
6003 |
Â
|
6004 |
+
if ( node.parentNode ) {
|
6005 |
+
if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
|
6006 |
+
setGlobalEval( getAll( node, "script" ) );
|
6007 |
+
}
|
6008 |
+
node.parentNode.removeChild( node );
|
6009 |
+
}
|
6010 |
Â
}
|
6011 |
Â
|
6012 |
+
return elem;
|
6013 |
+
}
|
Â
|
|
Â
|
|
6014 |
Â
|
6015 |
+
jQuery.extend( {
|
6016 |
+
htmlPrefilter: function( html ) {
|
6017 |
+
return html.replace( rxhtmlTag, "<$1></$2>" );
|
6018 |
+
},
|
6019 |
Â
|
6020 |
+
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
6021 |
+
var i, l, srcElements, destElements,
|
6022 |
+
clone = elem.cloneNode( true ),
|
6023 |
+
inPage = jQuery.contains( elem.ownerDocument, elem );
|
6024 |
Â
|
6025 |
+
// Fix IE cloning issues
|
6026 |
+
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
6027 |
+
!jQuery.isXMLDoc( elem ) ) {
|
6028 |
Â
|
6029 |
+
// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
|
6030 |
+
destElements = getAll( clone );
|
6031 |
+
srcElements = getAll( elem );
|
6032 |
+
|
6033 |
+
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
6034 |
+
fixInput( srcElements[ i ], destElements[ i ] );
|
6035 |
Â
}
|
6036 |
+
}
|
6037 |
Â
|
6038 |
+
// Copy the events from the original to the clone
|
6039 |
+
if ( dataAndEvents ) {
|
6040 |
+
if ( deepDataAndEvents ) {
|
6041 |
+
srcElements = srcElements || getAll( elem );
|
6042 |
+
destElements = destElements || getAll( clone );
|
6043 |
Â
|
6044 |
+
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
6045 |
+
cloneCopyEvent( srcElements[ i ], destElements[ i ] );
|
Â
|
|
Â
|
|
Â
|
|
6046 |
Â
}
|
6047 |
+
} else {
|
6048 |
+
cloneCopyEvent( elem, clone );
|
6049 |
Â
}
|
6050 |
+
}
|
6051 |
Â
|
6052 |
+
// Preserve script evaluation history
|
6053 |
+
destElements = getAll( clone, "script" );
|
6054 |
+
if ( destElements.length > 0 ) {
|
6055 |
+
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
6056 |
+
}
|
6057 |
Â
|
6058 |
+
// Return the cloned set
|
6059 |
+
return clone;
|
6060 |
+
},
|
6061 |
Â
|
6062 |
+
cleanData: function( elems ) {
|
6063 |
+
var data, elem, type,
|
6064 |
+
special = jQuery.event.special,
|
6065 |
+
i = 0;
|
6066 |
Â
|
6067 |
+
for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
|
6068 |
+
if ( acceptData( elem ) ) {
|
6069 |
+
if ( ( data = elem[ dataPriv.expando ] ) ) {
|
6070 |
+
if ( data.events ) {
|
6071 |
+
for ( type in data.events ) {
|
6072 |
+
if ( special[ type ] ) {
|
6073 |
+
jQuery.event.remove( elem, type );
|
6074 |
Â
|
6075 |
+
// This is a shortcut to avoid jQuery.event.remove's overhead
|
6076 |
+
} else {
|
6077 |
+
jQuery.removeEvent( elem, type, data.handle );
|
Â
|
|
6078 |
Â
}
|
6079 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6080 |
Â
}
|
Â
|
|
6081 |
Â
|
6082 |
+
// Support: Chrome <=35 - 45+
|
6083 |
+
// Assign undefined instead of using delete, see Data#remove
|
6084 |
+
elem[ dataPriv.expando ] = undefined;
|
6085 |
+
}
|
6086 |
+
if ( elem[ dataUser.expando ] ) {
|
6087 |
+
|
6088 |
+
// Support: Chrome <=35 - 45+
|
6089 |
+
// Assign undefined instead of using delete, see Data#remove
|
6090 |
+
elem[ dataUser.expando ] = undefined;
|
6091 |
Â
}
|
6092 |
Â
}
|
6093 |
Â
}
|
6094 |
+
}
|
6095 |
+
} );
|
6096 |
Â
|
6097 |
+
jQuery.fn.extend( {
|
6098 |
+
detach: function( selector ) {
|
6099 |
+
return remove( this, selector, true );
|
6100 |
+
},
|
6101 |
Â
|
6102 |
+
remove: function( selector ) {
|
6103 |
+
return remove( this, selector );
|
6104 |
+
},
|
6105 |
Â
|
6106 |
+
text: function( value ) {
|
6107 |
+
return access( this, function( value ) {
|
6108 |
+
return value === undefined ?
|
6109 |
+
jQuery.text( this ) :
|
6110 |
+
this.empty().each( function() {
|
6111 |
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
6112 |
+
this.textContent = value;
|
6113 |
+
}
|
6114 |
+
} );
|
6115 |
+
}, null, value, arguments.length );
|
6116 |
+
},
|
6117 |
Â
|
6118 |
+
append: function() {
|
6119 |
+
return domManip( this, arguments, function( elem ) {
|
6120 |
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
6121 |
+
var target = manipulationTarget( this, elem );
|
6122 |
+
target.appendChild( elem );
|
6123 |
+
}
|
6124 |
+
} );
|
6125 |
+
},
|
6126 |
Â
|
6127 |
+
prepend: function() {
|
6128 |
+
return domManip( this, arguments, function( elem ) {
|
6129 |
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
6130 |
+
var target = manipulationTarget( this, elem );
|
6131 |
+
target.insertBefore( elem, target.firstChild );
|
6132 |
+
}
|
6133 |
+
} );
|
6134 |
+
},
|
6135 |
Â
|
6136 |
+
before: function() {
|
6137 |
+
return domManip( this, arguments, function( elem ) {
|
6138 |
+
if ( this.parentNode ) {
|
6139 |
+
this.parentNode.insertBefore( elem, this );
|
6140 |
+
}
|
6141 |
+
} );
|
6142 |
+
},
|
6143 |
Â
|
6144 |
+
after: function() {
|
6145 |
+
return domManip( this, arguments, function( elem ) {
|
6146 |
+
if ( this.parentNode ) {
|
6147 |
+
this.parentNode.insertBefore( elem, this.nextSibling );
|
6148 |
+
}
|
6149 |
+
} );
|
6150 |
+
},
|
6151 |
Â
|
6152 |
+
empty: function() {
|
6153 |
+
var elem,
|
6154 |
+
i = 0;
|
6155 |
Â
|
6156 |
+
for ( ; ( elem = this[ i ] ) != null; i++ ) {
|
6157 |
+
if ( elem.nodeType === 1 ) {
|
6158 |
Â
|
6159 |
+
// Prevent memory leaks
|
6160 |
+
jQuery.cleanData( getAll( elem, false ) );
|
6161 |
Â
|
6162 |
+
// Remove any remaining nodes
|
6163 |
+
elem.textContent = "";
|
Â
|
|
6164 |
Â
}
|
6165 |
+
}
|
6166 |
Â
|
6167 |
+
return this;
|
6168 |
+
},
|
6169 |
Â
|
6170 |
+
clone: function( dataAndEvents, deepDataAndEvents ) {
|
6171 |
+
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
6172 |
+
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
6173 |
Â
|
6174 |
+
return this.map( function() {
|
6175 |
+
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
6176 |
+
} );
|
6177 |
+
},
|
6178 |
Â
|
6179 |
+
html: function( value ) {
|
6180 |
+
return access( this, function( value ) {
|
6181 |
+
var elem = this[ 0 ] || {},
|
6182 |
+
i = 0,
|
6183 |
+
l = this.length;
|
6184 |
Â
|
6185 |
+
if ( value === undefined && elem.nodeType === 1 ) {
|
6186 |
+
return elem.innerHTML;
|
6187 |
+
}
|
6188 |
Â
|
6189 |
+
// See if we can take a shortcut and just use innerHTML
|
6190 |
+
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
6191 |
+
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
|
6192 |
Â
|
6193 |
+
value = jQuery.htmlPrefilter( value );
|
6194 |
Â
|
6195 |
+
try {
|
6196 |
+
for ( ; i < l; i++ ) {
|
6197 |
+
elem = this[ i ] || {};
|
6198 |
Â
|
6199 |
+
// Remove element nodes and prevent memory leaks
|
6200 |
+
if ( elem.nodeType === 1 ) {
|
6201 |
+
jQuery.cleanData( getAll( elem, false ) );
|
6202 |
+
elem.innerHTML = value;
|
Â
|
|
6203 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6204 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6205 |
Â
|
6206 |
+
elem = 0;
|
Â
|
|
Â
|
|
6207 |
Â
|
6208 |
+
// If using innerHTML throws an exception, use the fallback method
|
6209 |
+
} catch ( e ) {}
|
Â
|
|
6210 |
Â
}
|
6211 |
Â
|
6212 |
+
if ( elem ) {
|
6213 |
+
this.empty().append( value );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6214 |
Â
}
|
6215 |
+
}, null, value, arguments.length );
|
6216 |
+
},
|
6217 |
Â
|
6218 |
+
replaceWith: function() {
|
6219 |
+
var ignored = [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6220 |
Â
|
6221 |
+
// Make the changes, replacing each non-ignored context element with the new content
|
6222 |
+
return domManip( this, arguments, function( elem ) {
|
6223 |
+
var parent = this.parentNode;
|
6224 |
Â
|
6225 |
+
if ( jQuery.inArray( this, ignored ) < 0 ) {
|
6226 |
+
jQuery.cleanData( getAll( this ) );
|
6227 |
+
if ( parent ) {
|
6228 |
+
parent.replaceChild( elem, this );
|
6229 |
+
}
|
6230 |
Â
}
|
6231 |
Â
|
6232 |
+
// Force callback invocation
|
6233 |
+
}, ignored );
|
6234 |
+
}
|
6235 |
+
} );
|
6236 |
+
|
6237 |
+
jQuery.each( {
|
6238 |
+
appendTo: "append",
|
6239 |
+
prependTo: "prepend",
|
6240 |
+
insertBefore: "before",
|
6241 |
+
insertAfter: "after",
|
6242 |
+
replaceAll: "replaceWith"
|
6243 |
+
}, function( name, original ) {
|
6244 |
+
jQuery.fn[ name ] = function( selector ) {
|
6245 |
+
var elems,
|
6246 |
+
ret = [],
|
6247 |
+
insert = jQuery( selector ),
|
6248 |
+
last = insert.length - 1,
|
6249 |
+
i = 0;
|
6250 |
Â
|
6251 |
+
for ( ; i <= last; i++ ) {
|
6252 |
+
elems = i === last ? this : this.clone( true );
|
6253 |
+
jQuery( insert[ i ] )[ original ]( elems );
|
Â
|
|
6254 |
Â
|
6255 |
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
6256 |
+
// .get() because push.apply(_, arraylike) throws on ancient WebKit
|
6257 |
+
push.apply( ret, elems.get() );
|
6258 |
+
}
|
6259 |
Â
|
6260 |
+
return this.pushStack( ret );
|
6261 |
+
};
|
6262 |
+
} );
|
6263 |
+
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
6264 |
Â
|
6265 |
+
var getStyles = function( elem ) {
|
6266 |
Â
|
6267 |
+
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
|
6268 |
+
// IE throws on elements created in popups
|
6269 |
+
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
6270 |
+
var view = elem.ownerDocument.defaultView;
|
6271 |
Â
|
6272 |
+
if ( !view || !view.opener ) {
|
6273 |
+
view = window;
|
6274 |
Â
}
|
6275 |
Â
|
6276 |
+
return view.getComputedStyle( elem );
|
6277 |
+
};
|
Â
|
|
Â
|
|
6278 |
Â
|
6279 |
+
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
Â
|
|
Â
|
|
Â
|
|
6280 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6281 |
Â
|
6282 |
Â
|
6283 |
+
( function() {
|
Â
|
|
6284 |
Â
|
6285 |
+
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
6286 |
+
// so they're executed at the same time to save the second computation.
|
6287 |
+
function computeStyleTests() {
|
Â
|
|
Â
|
|
6288 |
Â
|
6289 |
+
// This is a singleton, we need to execute it only once
|
6290 |
+
if ( !div ) {
|
6291 |
+
return;
|
6292 |
+
}
|
6293 |
Â
|
6294 |
+
container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
|
6295 |
+
"margin-top:1px;padding:0;border:0";
|
6296 |
+
div.style.cssText =
|
6297 |
+
"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
|
6298 |
+
"margin:auto;border:1px;padding:1px;" +
|
6299 |
+
"width:60%;top:1%";
|
6300 |
+
documentElement.appendChild( container ).appendChild( div );
|
6301 |
Â
|
6302 |
+
var divStyle = window.getComputedStyle( div );
|
6303 |
+
pixelPositionVal = divStyle.top !== "1%";
|
Â
|
|
6304 |
Â
|
6305 |
+
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
|
6306 |
+
reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6307 |
Â
|
6308 |
+
// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
|
6309 |
+
// Some styles come back with percentage values, even though they shouldn't
|
6310 |
+
div.style.right = "60%";
|
6311 |
+
pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
|
6312 |
Â
|
6313 |
+
// Support: IE 9 - 11 only
|
6314 |
+
// Detect misreporting of content dimensions for box-sizing:border-box elements
|
6315 |
+
boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
|
6316 |
Â
|
6317 |
+
// Support: IE 9 only
|
6318 |
+
// Detect overflow:scroll screwiness (gh-3699)
|
6319 |
+
div.style.position = "absolute";
|
6320 |
+
scrollboxSizeVal = div.offsetWidth === 36 || "absolute";
|
Â
|
|
Â
|
|
6321 |
Â
|
6322 |
+
documentElement.removeChild( container );
|
6323 |
Â
|
6324 |
+
// Nullify the div so it wouldn't be stored in the memory and
|
6325 |
+
// it will also be a sign that checks already performed
|
6326 |
+
div = null;
|
Â
|
|
6327 |
Â
}
|
6328 |
Â
|
6329 |
+
function roundPixelMeasures( measure ) {
|
6330 |
+
return Math.round( parseFloat( measure ) );
|
6331 |
+
}
|
6332 |
Â
|
6333 |
+
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
|
6334 |
+
reliableMarginLeftVal,
|
6335 |
+
container = document.createElement( "div" ),
|
6336 |
+
div = document.createElement( "div" );
|
6337 |
Â
|
6338 |
+
// Finish early in limited (non-browser) environments
|
6339 |
+
if ( !div.style ) {
|
6340 |
+
return;
|
6341 |
+
}
|
6342 |
Â
|
6343 |
+
// Support: IE <=9 - 11 only
|
6344 |
+
// Style of cloned element affects source element cloned (#8908)
|
6345 |
+
div.style.backgroundClip = "content-box";
|
6346 |
+
div.cloneNode( true ).style.backgroundClip = "";
|
6347 |
+
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
6348 |
Â
|
6349 |
+
jQuery.extend( support, {
|
6350 |
+
boxSizingReliable: function() {
|
6351 |
+
computeStyleTests();
|
6352 |
+
return boxSizingReliableVal;
|
6353 |
+
},
|
6354 |
+
pixelBoxStyles: function() {
|
6355 |
+
computeStyleTests();
|
6356 |
+
return pixelBoxStylesVal;
|
6357 |
+
},
|
6358 |
+
pixelPosition: function() {
|
6359 |
+
computeStyleTests();
|
6360 |
+
return pixelPositionVal;
|
6361 |
+
},
|
6362 |
+
reliableMarginLeft: function() {
|
6363 |
+
computeStyleTests();
|
6364 |
+
return reliableMarginLeftVal;
|
6365 |
+
},
|
6366 |
+
scrollboxSize: function() {
|
6367 |
+
computeStyleTests();
|
6368 |
+
return scrollboxSizeVal;
|
6369 |
+
}
|
6370 |
+
} );
|
6371 |
+
} )();
|
6372 |
Â
|
6373 |
Â
|
6374 |
+
function curCSS( elem, name, computed ) {
|
6375 |
+
var width, minWidth, maxWidth, ret,
|
6376 |
Â
|
6377 |
+
// Support: Firefox 51+
|
6378 |
+
// Retrieving style before computed somehow
|
6379 |
+
// fixes an issue with getting wrong values
|
6380 |
+
// on detached elements
|
6381 |
+
style = elem.style;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6382 |
Â
|
6383 |
+
computed = computed || getStyles( elem );
|
Â
|
|
6384 |
Â
|
6385 |
+
// getPropertyValue is needed for:
|
6386 |
+
// .css('filter') (IE 9 only, #12537)
|
6387 |
+
// .css('--customProperty) (#3144)
|
6388 |
+
if ( computed ) {
|
6389 |
+
ret = computed.getPropertyValue( name ) || computed[ name ];
|
6390 |
Â
|
6391 |
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
6392 |
+
ret = jQuery.style( elem, name );
|
Â
|
|
6393 |
Â
}
|
6394 |
Â
|
6395 |
+
// A tribute to the "awesome hack by Dean Edwards"
|
6396 |
+
// Android Browser returns percentage for some values,
|
6397 |
+
// but width seems to be reliably pixels.
|
6398 |
+
// This is against the CSSOM draft spec:
|
6399 |
+
// https://drafts.csswg.org/cssom/#resolved-values
|
6400 |
+
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
|
6401 |
Â
|
6402 |
+
// Remember the original values
|
6403 |
+
width = style.width;
|
6404 |
+
minWidth = style.minWidth;
|
6405 |
+
maxWidth = style.maxWidth;
|
Â
|
|
Â
|
|
Â
|
|
6406 |
Â
|
6407 |
+
// Put in the new values to get a computed value out
|
6408 |
+
style.minWidth = style.maxWidth = style.width = ret;
|
6409 |
+
ret = computed.width;
|
6410 |
+
|
6411 |
+
// Revert the changed values
|
6412 |
+
style.width = width;
|
6413 |
+
style.minWidth = minWidth;
|
6414 |
+
style.maxWidth = maxWidth;
|
6415 |
Â
}
|
Â
|
|
6416 |
Â
}
|
6417 |
Â
|
6418 |
+
return ret !== undefined ?
|
6419 |
Â
|
6420 |
+
// Support: IE <=9 - 11 only
|
6421 |
+
// IE returns zIndex value as an integer.
|
6422 |
+
ret + "" :
|
6423 |
+
ret;
|
6424 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6425 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6426 |
Â
|
6427 |
+
function addGetHookIf( conditionFn, hookFn ) {
|
Â
|
|
Â
|
|
Â
|
|
6428 |
Â
|
6429 |
+
// Define the hook, we'll check on the first run if it's really needed.
|
6430 |
+
return {
|
6431 |
+
get: function() {
|
6432 |
+
if ( conditionFn() ) {
|
6433 |
Â
|
6434 |
+
// Hook not needed (or it's not possible to use it due
|
6435 |
+
// to missing dependency), remove it.
|
6436 |
+
delete this.get;
|
6437 |
+
return;
|
6438 |
Â
}
|
6439 |
Â
|
6440 |
+
// Hook needed; redefine it so that the support test is not executed again.
|
6441 |
+
return ( this.get = hookFn ).apply( this, arguments );
|
6442 |
+
}
|
6443 |
+
};
|
6444 |
+
}
|
6445 |
Â
|
Â
|
|
Â
|
|
6446 |
Â
|
6447 |
+
var
|
Â
|
|
Â
|
|
6448 |
Â
|
6449 |
+
// Swappable if display is none or starts with table
|
6450 |
+
// except "table", "table-cell", or "table-caption"
|
6451 |
+
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
6452 |
+
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6453 |
+
rcustomProp = /^--/,
|
6454 |
+
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6455 |
+
cssNormalTransform = {
|
6456 |
+
letterSpacing: "0",
|
6457 |
+
fontWeight: "400"
|
6458 |
+
},
|
6459 |
Â
|
6460 |
+
cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
6461 |
+
emptyStyle = document.createElement( "div" ).style;
|
Â
|
|
6462 |
Â
|
6463 |
+
// Return a css property mapped to a potentially vendor prefixed property
|
6464 |
+
function vendorPropName( name ) {
|
Â
|
|
Â
|
|
6465 |
Â
|
6466 |
+
// Shortcut for names that are not vendor prefixed
|
6467 |
+
if ( name in emptyStyle ) {
|
6468 |
+
return name;
|
6469 |
+
}
|
Â
|
|
Â
|
|
6470 |
Â
|
6471 |
+
// Check for vendor prefixed names
|
6472 |
+
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
6473 |
+
i = cssPrefixes.length;
|
6474 |
Â
|
6475 |
+
while ( i-- ) {
|
6476 |
+
name = cssPrefixes[ i ] + capName;
|
6477 |
+
if ( name in emptyStyle ) {
|
6478 |
+
return name;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6479 |
Â
}
|
Â
|
|
Â
|
|
6480 |
Â
}
|
6481 |
+
}
|
6482 |
+
|
6483 |
+
// Return a property mapped along what jQuery.cssProps suggests or to
|
6484 |
+
// a vendor prefixed property.
|
6485 |
+
function finalPropName( name ) {
|
6486 |
+
var ret = jQuery.cssProps[ name ];
|
6487 |
+
if ( !ret ) {
|
6488 |
+
ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
|
6489 |
+
}
|
6490 |
+
return ret;
|
6491 |
+
}
|
6492 |
Â
|
6493 |
+
function setPositiveNumber( elem, value, subtract ) {
|
6494 |
Â
|
6495 |
+
// Any relative (+/-) values have already been
|
6496 |
+
// normalized at this point
|
6497 |
+
var matches = rcssNum.exec( value );
|
6498 |
+
return matches ?
|
Â
|
|
6499 |
Â
|
6500 |
+
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
6501 |
+
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
6502 |
+
value;
|
6503 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6504 |
Â
|
6505 |
+
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
6506 |
+
var i = dimension === "width" ? 1 : 0,
|
6507 |
+
extra = 0,
|
6508 |
+
delta = 0;
|
6509 |
Â
|
6510 |
+
// Adjustment may not be necessary
|
6511 |
+
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
6512 |
+
return 0;
|
6513 |
+
}
|
Â
|
|
Â
|
|
6514 |
Â
|
6515 |
+
for ( ; i < 4; i += 2 ) {
|
6516 |
Â
|
6517 |
+
// Both box models exclude margin
|
6518 |
+
if ( box === "margin" ) {
|
6519 |
+
delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
6520 |
Â
}
|
6521 |
Â
|
6522 |
+
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
|
6523 |
+
if ( !isBorderBox ) {
|
6524 |
Â
|
6525 |
+
// Add padding
|
6526 |
+
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6527 |
Â
|
6528 |
+
// For "border" or "margin", add border
|
6529 |
+
if ( box !== "padding" ) {
|
6530 |
+
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
Â
|
|
Â
|
|
6531 |
Â
|
6532 |
+
// But still keep track of it otherwise
|
6533 |
+
} else {
|
6534 |
+
extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6535 |
+
}
|
6536 |
Â
|
6537 |
+
// If we get here with a border-box (content + padding + border), we're seeking "content" or
|
6538 |
+
// "padding" or "margin"
|
6539 |
+
} else {
|
Â
|
|
Â
|
|
Â
|
|
6540 |
Â
|
6541 |
+
// For "content", subtract padding
|
6542 |
+
if ( box === "content" ) {
|
6543 |
+
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
Â
|
|
Â
|
|
6544 |
Â
}
|
Â
|
|
6545 |
Â
|
6546 |
+
// For "content" or "padding", subtract border
|
6547 |
+
if ( box !== "margin" ) {
|
6548 |
+
delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6549 |
+
}
|
6550 |
+
}
|
6551 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6552 |
Â
|
6553 |
+
// Account for positive content-box scroll gutter when requested by providing computedVal
|
6554 |
+
if ( !isBorderBox && computedVal >= 0 ) {
|
6555 |
+
|
6556 |
+
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
|
6557 |
+
// Assuming integer scroll gutter, subtract the rest and round down
|
6558 |
+
delta += Math.max( 0, Math.ceil(
|
6559 |
+
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
6560 |
+
computedVal -
|
6561 |
+
delta -
|
6562 |
+
extra -
|
6563 |
+
0.5
|
6564 |
+
) );
|
6565 |
+
}
|
6566 |
Â
|
6567 |
+
return delta;
|
6568 |
+
}
|
6569 |
Â
|
6570 |
+
function getWidthOrHeight( elem, dimension, extra ) {
|
Â
|
|
Â
|
|
Â
|
|
6571 |
Â
|
6572 |
+
// Start with computed style
|
6573 |
+
var styles = getStyles( elem ),
|
6574 |
+
val = curCSS( elem, dimension, styles ),
|
6575 |
+
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6576 |
+
valueIsBorderBox = isBorderBox;
|
6577 |
Â
|
6578 |
+
// Support: Firefox <=54
|
6579 |
+
// Return a confounding non-pixel value or feign ignorance, as appropriate.
|
6580 |
+
if ( rnumnonpx.test( val ) ) {
|
6581 |
+
if ( !extra ) {
|
6582 |
+
return val;
|
6583 |
+
}
|
6584 |
+
val = "auto";
|
6585 |
+
}
|
6586 |
Â
|
6587 |
+
// Check for style in case a browser which returns unreliable values
|
6588 |
+
// for getComputedStyle silently falls back to the reliable elem.style
|
6589 |
+
valueIsBorderBox = valueIsBorderBox &&
|
6590 |
+
( support.boxSizingReliable() || val === elem.style[ dimension ] );
|
6591 |
Â
|
6592 |
+
// Fall back to offsetWidth/offsetHeight when value is "auto"
|
6593 |
+
// This happens for inline elements with no explicit setting (gh-3571)
|
6594 |
+
// Support: Android <=4.1 - 4.3 only
|
6595 |
+
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
|
6596 |
+
if ( val === "auto" ||
|
6597 |
+
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) {
|
6598 |
Â
|
6599 |
+
val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ];
|
Â
|
|
Â
|
|
6600 |
Â
|
6601 |
+
// offsetWidth/offsetHeight provide border-box values
|
6602 |
+
valueIsBorderBox = true;
|
6603 |
+
}
|
6604 |
Â
|
6605 |
+
// Normalize "" and auto
|
6606 |
+
val = parseFloat( val ) || 0;
|
6607 |
+
|
6608 |
+
// Adjust for the element's box model
|
6609 |
+
return ( val +
|
6610 |
+
boxModelAdjustment(
|
6611 |
+
elem,
|
6612 |
+
dimension,
|
6613 |
+
extra || ( isBorderBox ? "border" : "content" ),
|
6614 |
+
valueIsBorderBox,
|
6615 |
+
styles,
|
6616 |
+
|
6617 |
+
// Provide the current computed size to request scroll gutter calculation (gh-3589)
|
6618 |
+
val
|
6619 |
+
)
|
6620 |
+
) + "px";
|
6621 |
+
}
|
6622 |
+
|
6623 |
+
jQuery.extend( {
|
6624 |
+
|
6625 |
+
// Add in style property hooks for overriding the default
|
6626 |
+
// behavior of getting and setting a style property
|
6627 |
+
cssHooks: {
|
6628 |
+
opacity: {
|
6629 |
+
get: function( elem, computed ) {
|
6630 |
+
if ( computed ) {
|
6631 |
Â
|
6632 |
+
// We should always get a number back from opacity
|
6633 |
+
var ret = curCSS( elem, "opacity" );
|
6634 |
+
return ret === "" ? "1" : ret;
|
6635 |
Â
}
|
6636 |
+
}
|
6637 |
+
}
|
6638 |
+
},
|
6639 |
Â
|
6640 |
+
// Don't automatically add "px" to these possibly-unitless properties
|
6641 |
+
cssNumber: {
|
6642 |
+
"animationIterationCount": true,
|
6643 |
+
"columnCount": true,
|
6644 |
+
"fillOpacity": true,
|
6645 |
+
"flexGrow": true,
|
6646 |
+
"flexShrink": true,
|
6647 |
+
"fontWeight": true,
|
6648 |
+
"lineHeight": true,
|
6649 |
+
"opacity": true,
|
6650 |
+
"order": true,
|
6651 |
+
"orphans": true,
|
6652 |
+
"widows": true,
|
6653 |
+
"zIndex": true,
|
6654 |
+
"zoom": true
|
6655 |
+
},
|
6656 |
Â
|
6657 |
+
// Add in properties whose names you wish to fix before
|
6658 |
+
// setting or getting the value
|
6659 |
+
cssProps: {},
|
6660 |
Â
|
6661 |
+
// Get and set the style property on a DOM Node
|
6662 |
+
style: function( elem, name, value, extra ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6663 |
Â
|
6664 |
+
// Don't set styles on text and comment nodes
|
6665 |
+
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6666 |
+
return;
|
6667 |
+
}
|
6668 |
Â
|
6669 |
+
// Make sure that we're working with the right name
|
6670 |
+
var ret, type, hooks,
|
6671 |
+
origName = camelCase( name ),
|
6672 |
+
isCustomProp = rcustomProp.test( name ),
|
6673 |
+
style = elem.style;
|
6674 |
Â
|
6675 |
+
// Make sure that we're working with the right name. We don't
|
6676 |
+
// want to query the value if it is a CSS custom property
|
6677 |
+
// since they are user-defined.
|
6678 |
+
if ( !isCustomProp ) {
|
6679 |
+
name = finalPropName( origName );
|
6680 |
+
}
|
6681 |
Â
|
6682 |
+
// Gets hook for the prefixed version, then unprefixed version
|
6683 |
+
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
Â
|
|
Â
|
|
6684 |
Â
|
6685 |
+
// Check if we're setting a value
|
6686 |
+
if ( value !== undefined ) {
|
6687 |
+
type = typeof value;
|
Â
|
|
6688 |
Â
|
6689 |
+
// Convert "+=" or "-=" to relative numbers (#7345)
|
6690 |
+
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
6691 |
+
value = adjustCSS( elem, name, ret );
|
6692 |
+
|
6693 |
+
// Fixes bug #9237
|
6694 |
+
type = "number";
|
6695 |
Â
}
|
6696 |
Â
|
6697 |
+
// Make sure that null and NaN values aren't set (#7116)
|
6698 |
+
if ( value == null || value !== value ) {
|
6699 |
+
return;
|
6700 |
+
}
|
6701 |
Â
|
6702 |
+
// If a number was passed in, add the unit (except for certain CSS properties)
|
6703 |
+
if ( type === "number" ) {
|
6704 |
+
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
6705 |
Â
}
|
6706 |
Â
|
6707 |
+
// background-* props affect original clone's values
|
6708 |
+
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
6709 |
+
style[ name ] = "inherit";
|
6710 |
Â
}
|
6711 |
Â
|
6712 |
+
// If a hook was provided, use that value, otherwise just set the specified value
|
6713 |
+
if ( !hooks || !( "set" in hooks ) ||
|
6714 |
+
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
6715 |
+
|
6716 |
+
if ( isCustomProp ) {
|
6717 |
+
style.setProperty( name, value );
|
6718 |
+
} else {
|
6719 |
+
style[ name ] = value;
|
6720 |
+
}
|
6721 |
Â
}
|
6722 |
Â
|
6723 |
+
} else {
|
6724 |
+
|
6725 |
+
// If a hook was provided get the non-computed value from there
|
6726 |
+
if ( hooks && "get" in hooks &&
|
6727 |
+
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
6728 |
+
|
6729 |
+
return ret;
|
6730 |
Â
}
|
6731 |
Â
|
6732 |
+
// Otherwise just get the value from the style object
|
6733 |
+
return style[ name ];
|
6734 |
Â
}
|
6735 |
+
},
|
6736 |
Â
|
6737 |
+
css: function( elem, name, extra, styles ) {
|
6738 |
+
var val, num, hooks,
|
6739 |
+
origName = camelCase( name ),
|
6740 |
+
isCustomProp = rcustomProp.test( name );
|
6741 |
Â
|
6742 |
+
// Make sure that we're working with the right name. We don't
|
6743 |
+
// want to modify the value if it is a CSS custom property
|
6744 |
+
// since they are user-defined.
|
6745 |
+
if ( !isCustomProp ) {
|
6746 |
+
name = finalPropName( origName );
|
6747 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6748 |
Â
|
6749 |
+
// Try prefixed name followed by the unprefixed name
|
6750 |
+
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6751 |
Â
|
6752 |
+
// If a hook was provided get the computed value from there
|
6753 |
+
if ( hooks && "get" in hooks ) {
|
6754 |
+
val = hooks.get( elem, true, extra );
|
6755 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6756 |
Â
|
6757 |
+
// Otherwise, if a way to get the computed value exists, use that
|
6758 |
+
if ( val === undefined ) {
|
6759 |
+
val = curCSS( elem, name, styles );
|
6760 |
+
}
|
6761 |
Â
|
6762 |
+
// Convert "normal" to computed value
|
6763 |
+
if ( val === "normal" && name in cssNormalTransform ) {
|
6764 |
+
val = cssNormalTransform[ name ];
|
6765 |
+
}
|
6766 |
Â
|
6767 |
+
// Make numeric if forced or a qualifier was provided and val looks numeric
|
6768 |
+
if ( extra === "" || extra ) {
|
6769 |
+
num = parseFloat( val );
|
6770 |
+
return extra === true || isFinite( num ) ? num || 0 : val;
|
6771 |
+
}
|
6772 |
Â
|
6773 |
+
return val;
|
6774 |
+
}
|
6775 |
+
} );
|
6776 |
+
|
6777 |
+
jQuery.each( [ "height", "width" ], function( i, dimension ) {
|
6778 |
+
jQuery.cssHooks[ dimension ] = {
|
6779 |
+
get: function( elem, computed, extra ) {
|
6780 |
Â
if ( computed ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6781 |
Â
|
6782 |
+
// Certain elements can have dimension info if we invisibly show them
|
6783 |
+
// but it must have a current display style that would benefit
|
6784 |
+
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
6785 |
+
|
6786 |
+
// Support: Safari 8+
|
6787 |
+
// Table columns in Safari have non-zero offsetWidth & zero
|
6788 |
+
// getBoundingClientRect().width unless display is changed.
|
6789 |
+
// Support: IE <=11 only
|
6790 |
+
// Running getBoundingClientRect on a disconnected node
|
6791 |
+
// in IE throws an error.
|
6792 |
+
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
6793 |
+
swap( elem, cssShow, function() {
|
6794 |
+
return getWidthOrHeight( elem, dimension, extra );
|
6795 |
+
} ) :
|
6796 |
+
getWidthOrHeight( elem, dimension, extra );
|
6797 |
+
}
|
6798 |
+
},
|
6799 |
+
|
6800 |
+
set: function( elem, value, extra ) {
|
6801 |
+
var matches,
|
6802 |
+
styles = getStyles( elem ),
|
6803 |
+
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6804 |
+
subtract = extra && boxModelAdjustment(
|
6805 |
+
elem,
|
6806 |
+
dimension,
|
6807 |
+
extra,
|
6808 |
+
isBorderBox,
|
6809 |
+
styles
|
6810 |
+
);
|
6811 |
Â
|
6812 |
+
// Account for unreliable border-box dimensions by comparing offset* to computed and
|
6813 |
+
// faking a content-box to get border and padding (gh-3699)
|
6814 |
+
if ( isBorderBox && support.scrollboxSize() === styles.position ) {
|
6815 |
+
subtract -= Math.ceil(
|
6816 |
+
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
6817 |
+
parseFloat( styles[ dimension ] ) -
|
6818 |
+
boxModelAdjustment( elem, dimension, "border", false, styles ) -
|
6819 |
+
0.5
|
6820 |
+
);
|
6821 |
+
}
|
6822 |
Â
|
6823 |
+
// Convert to pixels if value adjustment is needed
|
6824 |
+
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
6825 |
+
( matches[ 3 ] || "px" ) !== "px" ) {
|
Â
|
|
6826 |
Â
|
6827 |
+
elem.style[ dimension ] = value;
|
6828 |
+
value = jQuery.css( elem, dimension );
|
6829 |
Â
}
|
Â
|
|
6830 |
Â
|
6831 |
+
return setPositiveNumber( elem, value, subtract );
|
Â
|
|
6832 |
Â
}
|
6833 |
+
};
|
6834 |
+
} );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6835 |
Â
|
6836 |
+
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
6837 |
+
function( elem, computed ) {
|
6838 |
+
if ( computed ) {
|
6839 |
+
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
6840 |
+
elem.getBoundingClientRect().left -
|
6841 |
+
swap( elem, { marginLeft: 0 }, function() {
|
6842 |
+
return elem.getBoundingClientRect().left;
|
6843 |
+
} )
|
6844 |
+
) + "px";
|
6845 |
+
}
|
6846 |
+
}
|
6847 |
+
);
|
6848 |
+
|
6849 |
+
// These hooks are used by animate to expand properties
|
6850 |
+
jQuery.each( {
|
6851 |
+
margin: "",
|
6852 |
+
padding: "",
|
6853 |
+
border: "Width"
|
6854 |
+
}, function( prefix, suffix ) {
|
6855 |
+
jQuery.cssHooks[ prefix + suffix ] = {
|
6856 |
+
expand: function( value ) {
|
6857 |
+
var i = 0,
|
6858 |
+
expanded = {},
|
6859 |
Â
|
6860 |
+
// Assumes a single number if not a string
|
6861 |
+
parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
Â
|
|
6862 |
Â
|
6863 |
+
for ( ; i < 4; i++ ) {
|
6864 |
+
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
6865 |
+
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
6866 |
+
}
|
6867 |
Â
|
6868 |
+
return expanded;
|
Â
|
|
Â
|
|
Â
|
|
6869 |
Â
}
|
6870 |
+
};
|
Â
|
|
6871 |
Â
|
6872 |
+
if ( prefix !== "margin" ) {
|
6873 |
+
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
6874 |
Â
}
|
6875 |
+
} );
|
6876 |
Â
|
6877 |
+
jQuery.fn.extend( {
|
6878 |
+
css: function( name, value ) {
|
6879 |
+
return access( this, function( elem, name, value ) {
|
6880 |
+
var styles, len,
|
6881 |
+
map = {},
|
6882 |
+
i = 0;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6883 |
Â
|
6884 |
+
if ( Array.isArray( name ) ) {
|
6885 |
+
styles = getStyles( elem );
|
6886 |
+
len = name.length;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6887 |
Â
|
6888 |
+
for ( ; i < len; i++ ) {
|
6889 |
+
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
6890 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6891 |
Â
|
6892 |
+
return map;
|
Â
|
|
6893 |
Â
}
|
6894 |
Â
|
6895 |
+
return value !== undefined ?
|
6896 |
+
jQuery.style( elem, name, value ) :
|
6897 |
+
jQuery.css( elem, name );
|
6898 |
+
}, name, value, arguments.length > 1 );
|
6899 |
+
}
|
6900 |
+
} );
|
6901 |
+
|
6902 |
+
|
6903 |
+
function Tween( elem, options, prop, end, easing ) {
|
6904 |
+
return new Tween.prototype.init( elem, options, prop, end, easing );
|
6905 |
+
}
|
6906 |
+
jQuery.Tween = Tween;
|
6907 |
+
|
6908 |
+
Tween.prototype = {
|
6909 |
+
constructor: Tween,
|
6910 |
+
init: function( elem, options, prop, end, easing, unit ) {
|
6911 |
+
this.elem = elem;
|
6912 |
+
this.prop = prop;
|
6913 |
+
this.easing = easing || jQuery.easing._default;
|
6914 |
+
this.options = options;
|
6915 |
+
this.start = this.now = this.cur();
|
6916 |
+
this.end = end;
|
6917 |
+
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
6918 |
+
},
|
6919 |
+
cur: function() {
|
6920 |
+
var hooks = Tween.propHooks[ this.prop ];
|
6921 |
+
|
6922 |
+
return hooks && hooks.get ?
|
6923 |
+
hooks.get( this ) :
|
6924 |
+
Tween.propHooks._default.get( this );
|
6925 |
+
},
|
6926 |
+
run: function( percent ) {
|
6927 |
+
var eased,
|
6928 |
+
hooks = Tween.propHooks[ this.prop ];
|
6929 |
+
|
6930 |
+
if ( this.options.duration ) {
|
6931 |
+
this.pos = eased = jQuery.easing[ this.easing ](
|
6932 |
+
percent, this.options.duration * percent, 0, 1, this.options.duration
|
6933 |
+
);
|
6934 |
+
} else {
|
6935 |
+
this.pos = eased = percent;
|
6936 |
Â
}
|
6937 |
+
this.now = ( this.end - this.start ) * eased + this.start;
|
6938 |
Â
|
6939 |
+
if ( this.options.step ) {
|
6940 |
+
this.options.step.call( this.elem, this.now, this );
|
6941 |
+
}
|
6942 |
Â
|
6943 |
+
if ( hooks && hooks.set ) {
|
6944 |
+
hooks.set( this );
|
6945 |
+
} else {
|
6946 |
+
Tween.propHooks._default.set( this );
|
6947 |
+
}
|
6948 |
+
return this;
|
6949 |
+
}
|
6950 |
+
};
|
6951 |
Â
|
6952 |
+
Tween.prototype.init.prototype = Tween.prototype;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6953 |
Â
|
6954 |
+
Tween.propHooks = {
|
6955 |
+
_default: {
|
6956 |
+
get: function( tween ) {
|
6957 |
+
var result;
|
Â
|
|
6958 |
Â
|
6959 |
+
// Use a property on the element directly when it is not a DOM element,
|
6960 |
+
// or when there is no matching style property that exists.
|
6961 |
+
if ( tween.elem.nodeType !== 1 ||
|
6962 |
+
tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
6963 |
+
return tween.elem[ tween.prop ];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
6964 |
Â
}
|
Â
|
|
Â
|
|
6965 |
Â
|
6966 |
+
// Passing an empty string as a 3rd parameter to .css will automatically
|
6967 |
+
// attempt a parseFloat and fallback to a string if the parse fails.
|
6968 |
+
// Simple values such as "10px" are parsed to Float;
|
6969 |
+
// complex values such as "rotate(1rad)" are returned as-is.
|
6970 |
+
result = jQuery.css( tween.elem, tween.prop, "" );
|
6971 |
+
|
6972 |
+
// Empty strings, null, undefined and "auto" are converted to 0.
|
6973 |
+
return !result || result === "auto" ? 0 : result;
|
6974 |
+
},
|
6975 |
Â
set: function( tween ) {
|
6976 |
+
|
6977 |
+
// Use step hook for back compat.
|
6978 |
+
// Use cssHook if its there.
|
6979 |
+
// Use .style if available and use plain properties where available.
|
6980 |
+
if ( jQuery.fx.step[ tween.prop ] ) {
|
6981 |
+
jQuery.fx.step[ tween.prop ]( tween );
|
6982 |
+
} else if ( tween.elem.nodeType === 1 &&
|
6983 |
+
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
|
6984 |
+
jQuery.cssHooks[ tween.prop ] ) ) {
|
6985 |
+
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
6986 |
+
} else {
|
6987 |
Â
tween.elem[ tween.prop ] = tween.now;
|
6988 |
Â
}
|
6989 |
Â
}
|
6990 |
+
}
|
6991 |
+
};
|
6992 |
Â
|
6993 |
+
// Support: IE <=9 only
|
6994 |
+
// Panic based approach to setting things on disconnected nodes
|
6995 |
+
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
6996 |
+
set: function( tween ) {
|
6997 |
+
if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
6998 |
+
tween.elem[ tween.prop ] = tween.now;
|
6999 |
+
}
|
7000 |
+
}
|
7001 |
+
};
|
7002 |
Â
|
7003 |
+
jQuery.easing = {
|
7004 |
+
linear: function( p ) {
|
7005 |
+
return p;
|
7006 |
+
},
|
7007 |
+
swing: function( p ) {
|
7008 |
+
return 0.5 - Math.cos( p * Math.PI ) / 2;
|
7009 |
+
},
|
7010 |
+
_default: "swing"
|
7011 |
+
};
|
7012 |
Â
|
7013 |
+
jQuery.fx = Tween.prototype.init;
|
Â
|
|
7014 |
Â
|
7015 |
+
// Back compat <1.8 extension point
|
7016 |
+
jQuery.fx.step = {};
|
7017 |
Â
|
7018 |
Â
|
7019 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7020 |
Â
|
7021 |
+
var
|
7022 |
+
fxNow, inProgress,
|
7023 |
+
rfxtypes = /^(?:toggle|show|hide)$/,
|
7024 |
+
rrun = /queueHooks$/;
|
Â
|
|
Â
|
|
Â
|
|
7025 |
Â
|
7026 |
+
function schedule() {
|
7027 |
+
if ( inProgress ) {
|
7028 |
+
if ( document.hidden === false && window.requestAnimationFrame ) {
|
7029 |
+
window.requestAnimationFrame( schedule );
|
7030 |
+
} else {
|
7031 |
+
window.setTimeout( schedule, jQuery.fx.interval );
|
7032 |
Â
}
|
Â
|
|
7033 |
Â
|
7034 |
+
jQuery.fx.tick();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7035 |
Â
}
|
7036 |
+
}
|
7037 |
Â
|
7038 |
+
// Animations created synchronously will run synchronously
|
7039 |
+
function createFxNow() {
|
7040 |
+
window.setTimeout( function() {
|
7041 |
+
fxNow = undefined;
|
7042 |
+
} );
|
7043 |
+
return ( fxNow = Date.now() );
|
7044 |
+
}
|
7045 |
+
|
7046 |
+
// Generate parameters to create a standard animation
|
7047 |
+
function genFx( type, includeWidth ) {
|
7048 |
+
var which,
|
7049 |
+
i = 0,
|
7050 |
+
attrs = { height: type };
|
7051 |
+
|
7052 |
+
// If we include width, step value is 1 to do all cssExpand values,
|
7053 |
+
// otherwise step value is 2 to skip over Left and Right
|
7054 |
+
includeWidth = includeWidth ? 1 : 0;
|
7055 |
+
for ( ; i < 4; i += 2 - includeWidth ) {
|
7056 |
+
which = cssExpand[ i ];
|
7057 |
+
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
|
7058 |
+
}
|
7059 |
Â
|
7060 |
+
if ( includeWidth ) {
|
7061 |
+
attrs.opacity = attrs.width = type;
|
7062 |
Â
}
|
7063 |
Â
|
7064 |
+
return attrs;
|
7065 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7066 |
Â
|
7067 |
+
function createTween( value, prop, animation ) {
|
7068 |
+
var tween,
|
7069 |
+
collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
|
7070 |
+
index = 0,
|
7071 |
+
length = collection.length;
|
7072 |
+
for ( ; index < length; index++ ) {
|
7073 |
+
if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
|
7074 |
+
|
7075 |
+
// We're done with this property
|
7076 |
+
return tween;
|
7077 |
Â
}
|
7078 |
Â
}
|
7079 |
+
}
|
7080 |
+
|
7081 |
+
function defaultPrefilter( elem, props, opts ) {
|
7082 |
+
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
|
7083 |
+
isBox = "width" in props || "height" in props,
|
7084 |
+
anim = this,
|
7085 |
+
orig = {},
|
7086 |
+
style = elem.style,
|
7087 |
+
hidden = elem.nodeType && isHiddenWithinTree( elem ),
|
7088 |
+
dataShow = dataPriv.get( elem, "fxshow" );
|
7089 |
+
|
7090 |
+
// Queue-skipping animations hijack the fx hooks
|
7091 |
+
if ( !opts.queue ) {
|
7092 |
+
hooks = jQuery._queueHooks( elem, "fx" );
|
7093 |
+
if ( hooks.unqueued == null ) {
|
7094 |
+
hooks.unqueued = 0;
|
7095 |
+
oldfire = hooks.empty.fire;
|
7096 |
+
hooks.empty.fire = function() {
|
7097 |
+
if ( !hooks.unqueued ) {
|
7098 |
+
oldfire();
|
7099 |
+
}
|
7100 |
+
};
|
7101 |
+
}
|
7102 |
+
hooks.unqueued++;
|
7103 |
Â
|
7104 |
+
anim.always( function() {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7105 |
Â
|
7106 |
+
// Ensure the complete handler is called before this completes
|
7107 |
Â
anim.always( function() {
|
7108 |
+
hooks.unqueued--;
|
7109 |
+
if ( !jQuery.queue( elem, "fx" ).length ) {
|
7110 |
+
hooks.empty.fire();
|
7111 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7112 |
Â
} );
|
7113 |
+
} );
|
7114 |
+
}
|
7115 |
Â
|
7116 |
+
// Detect show/hide animations
|
7117 |
+
for ( prop in props ) {
|
7118 |
+
value = props[ prop ];
|
7119 |
+
if ( rfxtypes.test( value ) ) {
|
7120 |
+
delete props[ prop ];
|
7121 |
+
toggle = toggle || value === "toggle";
|
7122 |
+
if ( value === ( hidden ? "hide" : "show" ) ) {
|
7123 |
Â
|
7124 |
+
// Pretend to be hidden if this is a "show" and
|
7125 |
+
// there is still data from a stopped show/hide
|
7126 |
+
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
|
7127 |
+
hidden = true;
|
7128 |
Â
|
7129 |
+
// Ignore all other no-op show/hide data
|
7130 |
+
} else {
|
7131 |
+
continue;
|
Â
|
|
7132 |
Â
}
|
Â
|
|
7133 |
Â
}
|
7134 |
+
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
|
7135 |
Â
}
|
7136 |
+
}
|
7137 |
Â
|
7138 |
+
// Bail out if this is a no-op like .hide().hide()
|
7139 |
+
propTween = !jQuery.isEmptyObject( props );
|
7140 |
+
if ( !propTween && jQuery.isEmptyObject( orig ) ) {
|
7141 |
+
return;
|
7142 |
+
}
|
7143 |
Â
|
7144 |
+
// Restrict "overflow" and "display" styles during box animations
|
7145 |
+
if ( isBox && elem.nodeType === 1 ) {
|
7146 |
Â
|
7147 |
+
// Support: IE <=9 - 11, Edge 12 - 15
|
7148 |
+
// Record all 3 overflow attributes because IE does not infer the shorthand
|
7149 |
+
// from identically-valued overflowX and overflowY and Edge just mirrors
|
7150 |
+
// the overflowX value there.
|
7151 |
+
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
|
7152 |
Â
|
7153 |
+
// Identify a display type, preferring old show/hide data over the CSS cascade
|
7154 |
+
restoreDisplay = dataShow && dataShow.display;
|
7155 |
+
if ( restoreDisplay == null ) {
|
7156 |
+
restoreDisplay = dataPriv.get( elem, "display" );
|
7157 |
+
}
|
7158 |
+
display = jQuery.css( elem, "display" );
|
7159 |
+
if ( display === "none" ) {
|
7160 |
+
if ( restoreDisplay ) {
|
7161 |
+
display = restoreDisplay;
|
7162 |
+
} else {
|
7163 |
Â
|
7164 |
+
// Get nonempty value(s) by temporarily forcing visibility
|
7165 |
+
showHide( [ elem ], true );
|
7166 |
+
restoreDisplay = elem.style.display || restoreDisplay;
|
7167 |
+
display = jQuery.css( elem, "display" );
|
7168 |
+
showHide( [ elem ] );
|
Â
|
|
7169 |
Â
}
|
7170 |
+
}
|
7171 |
Â
|
7172 |
+
// Animate inline elements as inline-block
|
7173 |
+
if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
|
7174 |
+
if ( jQuery.css( elem, "float" ) === "none" ) {
|
7175 |
Â
|
7176 |
+
// Restore the original display value at the end of pure show/hide animations
|
7177 |
+
if ( !propTween ) {
|
7178 |
+
anim.done( function() {
|
7179 |
+
style.display = restoreDisplay;
|
7180 |
+
} );
|
7181 |
+
if ( restoreDisplay == null ) {
|
7182 |
+
display = style.display;
|
7183 |
+
restoreDisplay = display === "none" ? "" : display;
|
Â
|
|
7184 |
Â
}
|
Â
|
|
7185 |
Â
}
|
7186 |
+
style.display = "inline-block";
|
7187 |
Â
}
|
7188 |
Â
}
|
7189 |
+
}
|
7190 |
Â
|
7191 |
+
if ( opts.overflow ) {
|
7192 |
+
style.overflow = "hidden";
|
7193 |
+
anim.always( function() {
|
7194 |
+
style.overflow = opts.overflow[ 0 ];
|
7195 |
+
style.overflowX = opts.overflow[ 1 ];
|
7196 |
+
style.overflowY = opts.overflow[ 2 ];
|
7197 |
+
} );
|
7198 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7199 |
Â
|
7200 |
+
// Implement show/hide animations
|
7201 |
+
propTween = false;
|
7202 |
+
for ( prop in orig ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7203 |
Â
|
7204 |
+
// General show/hide setup for this element animation
|
7205 |
+
if ( !propTween ) {
|
7206 |
+
if ( dataShow ) {
|
7207 |
+
if ( "hidden" in dataShow ) {
|
7208 |
+
hidden = dataShow.hidden;
|
7209 |
Â
}
|
7210 |
+
} else {
|
7211 |
+
dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
|
7212 |
+
}
|
7213 |
Â
|
7214 |
+
// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
|
7215 |
+
if ( toggle ) {
|
7216 |
+
dataShow.hidden = !hidden;
|
7217 |
+
}
|
7218 |
Â
|
7219 |
+
// Show elements before animating them
|
7220 |
+
if ( hidden ) {
|
7221 |
+
showHide( [ elem ], true );
|
7222 |
+
}
|
7223 |
Â
|
7224 |
+
/* eslint-disable no-loop-func */
|
7225 |
Â
|
7226 |
+
anim.done( function() {
|
7227 |
Â
|
7228 |
+
/* eslint-enable no-loop-func */
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7229 |
Â
|
7230 |
+
// The final step of a "hide" animation is actually hiding the element
|
7231 |
+
if ( !hidden ) {
|
7232 |
+
showHide( [ elem ] );
|
7233 |
+
}
|
7234 |
+
dataPriv.remove( elem, "fxshow" );
|
7235 |
+
for ( prop in orig ) {
|
7236 |
+
jQuery.style( elem, prop, orig[ prop ] );
|
7237 |
Â
}
|
7238 |
+
} );
|
7239 |
+
}
|
7240 |
+
|
7241 |
+
// Per-property setup
|
7242 |
+
propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
|
7243 |
+
if ( !( prop in dataShow ) ) {
|
7244 |
+
dataShow[ prop ] = propTween.start;
|
7245 |
+
if ( hidden ) {
|
7246 |
+
propTween.end = propTween.start;
|
7247 |
+
propTween.start = 0;
|
7248 |
Â
}
|
7249 |
Â
}
|
7250 |
Â
}
|
7251 |
+
}
|
7252 |
Â
|
7253 |
+
function propFilter( props, specialEasing ) {
|
7254 |
+
var index, name, easing, value, hooks;
|
7255 |
Â
|
7256 |
+
// camelCase, specialEasing and expand cssHook pass
|
7257 |
+
for ( index in props ) {
|
7258 |
+
name = camelCase( index );
|
7259 |
+
easing = specialEasing[ name ];
|
7260 |
+
value = props[ index ];
|
7261 |
+
if ( Array.isArray( value ) ) {
|
7262 |
+
easing = value[ 1 ];
|
7263 |
+
value = props[ index ] = value[ 0 ];
|
7264 |
+
}
|
7265 |
Â
|
7266 |
+
if ( index !== name ) {
|
7267 |
+
props[ name ] = value;
|
7268 |
+
delete props[ index ];
|
7269 |
+
}
|
7270 |
Â
|
7271 |
+
hooks = jQuery.cssHooks[ name ];
|
7272 |
+
if ( hooks && "expand" in hooks ) {
|
7273 |
+
value = hooks.expand( value );
|
7274 |
+
delete props[ name ];
|
7275 |
Â
|
7276 |
+
// Not quite $.extend, this won't overwrite existing keys.
|
7277 |
+
// Reusing 'index' because we have the correct "name"
|
7278 |
+
for ( index in value ) {
|
7279 |
+
if ( !( index in props ) ) {
|
7280 |
+
props[ index ] = value[ index ];
|
7281 |
+
specialEasing[ index ] = easing;
|
Â
|
|
7282 |
Â
}
|
Â
|
|
Â
|
|
7283 |
Â
}
|
7284 |
+
} else {
|
7285 |
+
specialEasing[ name ] = easing;
|
7286 |
Â
}
|
7287 |
Â
}
|
7288 |
+
}
|
7289 |
+
|
7290 |
+
function Animation( elem, properties, options ) {
|
7291 |
+
var result,
|
7292 |
+
stopped,
|
7293 |
+
index = 0,
|
7294 |
+
length = Animation.prefilters.length,
|
7295 |
+
deferred = jQuery.Deferred().always( function() {
|
7296 |
+
|
7297 |
+
// Don't match elem in the :animated selector
|
7298 |
+
delete tick.elem;
|
7299 |
+
} ),
|
7300 |
+
tick = function() {
|
7301 |
+
if ( stopped ) {
|
7302 |
+
return false;
|
7303 |
+
}
|
7304 |
+
var currentTime = fxNow || createFxNow(),
|
7305 |
+
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
7306 |
Â
|
7307 |
+
// Support: Android 2.3 only
|
7308 |
+
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
|
7309 |
+
temp = remaining / animation.duration || 0,
|
7310 |
+
percent = 1 - temp,
|
7311 |
+
index = 0,
|
7312 |
+
length = animation.tweens.length;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7313 |
Â
|
7314 |
+
for ( ; index < length; index++ ) {
|
7315 |
+
animation.tweens[ index ].run( percent );
|
7316 |
+
}
|
7317 |
Â
|
7318 |
+
deferred.notifyWith( elem, [ animation, percent, remaining ] );
|
7319 |
Â
|
7320 |
+
// If there's more to do, yield
|
7321 |
+
if ( percent < 1 && length ) {
|
7322 |
+
return remaining;
|
7323 |
+
}
|
7324 |
Â
|
7325 |
+
// If this was an empty animation, synthesize a final progress notification
|
7326 |
+
if ( !length ) {
|
7327 |
+
deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
7328 |
+
}
|
7329 |
Â
|
7330 |
+
// Resolve the animation and report its conclusion
|
7331 |
+
deferred.resolveWith( elem, [ animation ] );
|
7332 |
+
return false;
|
7333 |
+
},
|
7334 |
+
animation = deferred.promise( {
|
7335 |
+
elem: elem,
|
7336 |
+
props: jQuery.extend( {}, properties ),
|
7337 |
+
opts: jQuery.extend( true, {
|
7338 |
+
specialEasing: {},
|
7339 |
+
easing: jQuery.easing._default
|
7340 |
+
}, options ),
|
7341 |
+
originalProperties: properties,
|
7342 |
+
originalOptions: options,
|
7343 |
+
startTime: fxNow || createFxNow(),
|
7344 |
+
duration: options.duration,
|
7345 |
+
tweens: [],
|
7346 |
+
createTween: function( prop, end ) {
|
7347 |
+
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
7348 |
+
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
7349 |
+
animation.tweens.push( tween );
|
7350 |
+
return tween;
|
7351 |
Â
},
|
7352 |
+
stop: function( gotoEnd ) {
|
7353 |
+
var index = 0,
|
7354 |
+
|
7355 |
+
// If we are going to the end, we want to run all the tweens
|
7356 |
+
// otherwise we skip this part
|
7357 |
+
length = gotoEnd ? animation.tweens.length : 0;
|
7358 |
+
if ( stopped ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7359 |
Â
return this;
|
7360 |
Â
}
|
7361 |
+
stopped = true;
|
7362 |
+
for ( ; index < length; index++ ) {
|
7363 |
+
animation.tweens[ index ].run( 1 );
|
7364 |
+
}
|
7365 |
Â
|
7366 |
+
// Resolve when we played the last frame; otherwise, reject
|
7367 |
+
if ( gotoEnd ) {
|
7368 |
+
deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
7369 |
+
deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
7370 |
+
} else {
|
7371 |
+
deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
7372 |
Â
}
|
7373 |
+
return this;
|
7374 |
Â
}
|
7375 |
+
} ),
|
7376 |
+
props = animation.props;
|
7377 |
Â
|
7378 |
+
propFilter( props, animation.opts.specialEasing );
|
7379 |
Â
|
7380 |
+
for ( ; index < length; index++ ) {
|
7381 |
+
result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
|
7382 |
+
if ( result ) {
|
7383 |
+
if ( isFunction( result.stop ) ) {
|
7384 |
+
jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
|
7385 |
+
result.stop.bind( result );
|
7386 |
+
}
|
7387 |
+
return result;
|
7388 |
Â
}
|
7389 |
+
}
|
7390 |
Â
|
7391 |
+
jQuery.map( props, createTween, animation );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7392 |
Â
|
7393 |
+
if ( isFunction( animation.opts.start ) ) {
|
7394 |
+
animation.opts.start.call( elem, animation );
|
7395 |
Â
}
|
7396 |
Â
|
7397 |
+
// Attach callbacks from options
|
7398 |
+
animation
|
7399 |
+
.progress( animation.opts.progress )
|
7400 |
+
.done( animation.opts.done, animation.opts.complete )
|
7401 |
+
.fail( animation.opts.fail )
|
7402 |
+
.always( animation.opts.always );
|
7403 |
+
|
7404 |
+
jQuery.fx.timer(
|
7405 |
+
jQuery.extend( tick, {
|
7406 |
+
elem: elem,
|
7407 |
+
anim: animation,
|
7408 |
+
queue: animation.opts.queue
|
7409 |
+
} )
|
7410 |
+
);
|
7411 |
Â
|
7412 |
+
return animation;
|
7413 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7414 |
Â
|
7415 |
+
jQuery.Animation = jQuery.extend( Animation, {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7416 |
Â
|
7417 |
+
tweeners: {
|
7418 |
+
"*": [ function( prop, value ) {
|
7419 |
+
var tween = this.createTween( prop, value );
|
7420 |
+
adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
|
7421 |
+
return tween;
|
7422 |
+
} ]
|
7423 |
+
},
|
7424 |
Â
|
7425 |
+
tweener: function( props, callback ) {
|
7426 |
+
if ( isFunction( props ) ) {
|
7427 |
+
callback = props;
|
7428 |
+
props = [ "*" ];
|
7429 |
+
} else {
|
7430 |
+
props = props.match( rnothtmlwhite );
|
7431 |
+
}
|
7432 |
Â
|
7433 |
+
var prop,
|
7434 |
+
index = 0,
|
7435 |
+
length = props.length;
|
7436 |
Â
|
7437 |
+
for ( ; index < length; index++ ) {
|
7438 |
+
prop = props[ index ];
|
7439 |
+
Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
|
7440 |
+
Animation.tweeners[ prop ].unshift( callback );
|
Â
|
|
Â
|
|
7441 |
Â
}
|
7442 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7443 |
Â
|
7444 |
+
prefilters: [ defaultPrefilter ],
|
Â
|
|
Â
|
|
7445 |
Â
|
7446 |
+
prefilter: function( callback, prepend ) {
|
7447 |
+
if ( prepend ) {
|
7448 |
+
Animation.prefilters.unshift( callback );
|
7449 |
Â
} else {
|
7450 |
+
Animation.prefilters.push( callback );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7451 |
Â
}
|
7452 |
+
}
|
7453 |
+
} );
|
7454 |
+
|
7455 |
+
jQuery.speed = function( speed, easing, fn ) {
|
7456 |
+
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
7457 |
+
complete: fn || !fn && easing ||
|
7458 |
+
isFunction( speed ) && speed,
|
7459 |
+
duration: speed,
|
7460 |
+
easing: fn && easing || easing && !isFunction( easing ) && easing
|
7461 |
+
};
|
7462 |
Â
|
7463 |
+
// Go to the end state if fx are off
|
7464 |
+
if ( jQuery.fx.off ) {
|
7465 |
+
opt.duration = 0;
|
Â
|
|
7466 |
Â
|
7467 |
+
} else {
|
7468 |
+
if ( typeof opt.duration !== "number" ) {
|
7469 |
+
if ( opt.duration in jQuery.fx.speeds ) {
|
7470 |
+
opt.duration = jQuery.fx.speeds[ opt.duration ];
|
7471 |
Â
|
7472 |
+
} else {
|
7473 |
+
opt.duration = jQuery.fx.speeds._default;
|
Â
|
|
7474 |
Â
}
|
7475 |
+
}
|
7476 |
+
}
|
7477 |
Â
|
7478 |
+
// Normalize opt.queue - true/undefined/null -> "fx"
|
7479 |
+
if ( opt.queue == null || opt.queue === true ) {
|
7480 |
+
opt.queue = "fx";
|
7481 |
+
}
|
7482 |
+
|
7483 |
+
// Queueing
|
7484 |
+
opt.old = opt.complete;
|
7485 |
Â
|
7486 |
+
opt.complete = function() {
|
7487 |
+
if ( isFunction( opt.old ) ) {
|
7488 |
+
opt.old.call( this );
|
7489 |
+
}
|
7490 |
+
|
7491 |
+
if ( opt.queue ) {
|
7492 |
+
jQuery.dequeue( this, opt.queue );
|
7493 |
+
}
|
7494 |
Â
};
|
7495 |
Â
|
7496 |
+
return opt;
|
7497 |
+
};
|
7498 |
Â
|
7499 |
+
jQuery.fn.extend( {
|
7500 |
+
fadeTo: function( speed, to, easing, callback ) {
|
7501 |
Â
|
7502 |
+
// Show any hidden elements after setting opacity to 0
|
7503 |
+
return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7504 |
Â
|
7505 |
+
// Animate to the value specified
|
7506 |
+
.end().animate( { opacity: to }, speed, easing, callback );
|
7507 |
+
},
|
7508 |
+
animate: function( prop, speed, easing, callback ) {
|
7509 |
+
var empty = jQuery.isEmptyObject( prop ),
|
7510 |
+
optall = jQuery.speed( speed, easing, callback ),
|
7511 |
+
doAnimation = function() {
|
7512 |
Â
|
7513 |
+
// Operate on a copy of prop so per-property easing won't be lost
|
7514 |
+
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7515 |
Â
|
7516 |
+
// Empty animations, or finishing resolves immediately
|
7517 |
+
if ( empty || dataPriv.get( this, "finish" ) ) {
|
7518 |
+
anim.stop( true );
|
7519 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7520 |
Â
};
|
7521 |
+
doAnimation.finish = doAnimation;
|
7522 |
+
|
7523 |
+
return empty || optall.queue === false ?
|
7524 |
+
this.each( doAnimation ) :
|
7525 |
+
this.queue( optall.queue, doAnimation );
|
7526 |
+
},
|
7527 |
+
stop: function( type, clearQueue, gotoEnd ) {
|
7528 |
+
var stopQueue = function( hooks ) {
|
7529 |
+
var stop = hooks.stop;
|
7530 |
+
delete hooks.stop;
|
7531 |
+
stop( gotoEnd );
|
7532 |
+
};
|
7533 |
Â
|
7534 |
+
if ( typeof type !== "string" ) {
|
7535 |
+
gotoEnd = clearQueue;
|
7536 |
+
clearQueue = type;
|
7537 |
+
type = undefined;
|
7538 |
+
}
|
7539 |
+
if ( clearQueue && type !== false ) {
|
7540 |
+
this.queue( type || "fx", [] );
|
7541 |
+
}
|
7542 |
Â
|
7543 |
+
return this.each( function() {
|
7544 |
+
var dequeue = true,
|
7545 |
+
index = type != null && type + "queueHooks",
|
7546 |
+
timers = jQuery.timers,
|
7547 |
+
data = dataPriv.get( this );
|
7548 |
Â
|
7549 |
+
if ( index ) {
|
7550 |
+
if ( data[ index ] && data[ index ].stop ) {
|
7551 |
+
stopQueue( data[ index ] );
|
7552 |
+
}
|
7553 |
+
} else {
|
7554 |
+
for ( index in data ) {
|
7555 |
+
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
7556 |
Â
stopQueue( data[ index ] );
|
7557 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7558 |
Â
}
|
7559 |
+
}
|
7560 |
Â
|
7561 |
+
for ( index = timers.length; index--; ) {
|
7562 |
+
if ( timers[ index ].elem === this &&
|
7563 |
+
( type == null || timers[ index ].queue === type ) ) {
|
7564 |
Â
|
7565 |
+
timers[ index ].anim.stop( gotoEnd );
|
7566 |
+
dequeue = false;
|
7567 |
+
timers.splice( index, 1 );
|
Â
|
|
7568 |
Â
}
|
7569 |
+
}
|
7570 |
Â
|
7571 |
+
// Start the next in the queue if the last step wasn't forced.
|
7572 |
+
// Timers currently will call their complete callbacks, which
|
7573 |
+
// will dequeue but only if they were gotoEnd.
|
7574 |
+
if ( dequeue || !gotoEnd ) {
|
7575 |
+
jQuery.dequeue( this, type );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7576 |
Â
}
|
7577 |
+
} );
|
7578 |
+
},
|
7579 |
+
finish: function( type ) {
|
7580 |
+
if ( type !== false ) {
|
7581 |
+
type = type || "fx";
|
7582 |
+
}
|
7583 |
+
return this.each( function() {
|
7584 |
+
var index,
|
7585 |
+
data = dataPriv.get( this ),
|
7586 |
+
queue = data[ type + "queue" ],
|
7587 |
+
hooks = data[ type + "queueHooks" ],
|
7588 |
+
timers = jQuery.timers,
|
7589 |
+
length = queue ? queue.length : 0;
|
7590 |
Â
|
7591 |
+
// Enable finishing flag on private data
|
7592 |
+
data.finish = true;
|
7593 |
Â
|
7594 |
+
// Empty the queue first
|
7595 |
+
jQuery.queue( this, type, [] );
|
7596 |
Â
|
7597 |
+
if ( hooks && hooks.stop ) {
|
7598 |
+
hooks.stop.call( this, true );
|
7599 |
+
}
|
7600 |
Â
|
7601 |
+
// Look for any active animations, and finish them
|
7602 |
+
for ( index = timers.length; index--; ) {
|
7603 |
+
if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
|
7604 |
+
timers[ index ].anim.stop( true );
|
7605 |
+
timers.splice( index, 1 );
|
Â
|
|
7606 |
Â
}
|
7607 |
+
}
|
7608 |
Â
|
7609 |
+
// Look for any animations in the old queue and finish them
|
7610 |
+
for ( index = 0; index < length; index++ ) {
|
7611 |
+
if ( queue[ index ] && queue[ index ].finish ) {
|
7612 |
+
queue[ index ].finish.call( this );
|
Â
|
|
7613 |
Â
}
|
7614 |
+
}
|
7615 |
Â
|
7616 |
+
// Turn off finishing flag
|
7617 |
+
delete data.finish;
|
7618 |
+
} );
|
7619 |
+
}
|
7620 |
+
} );
|
7621 |
+
|
7622 |
+
jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
|
7623 |
+
var cssFn = jQuery.fn[ name ];
|
7624 |
+
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7625 |
+
return speed == null || typeof speed === "boolean" ?
|
7626 |
+
cssFn.apply( this, arguments ) :
|
7627 |
+
this.animate( genFx( name, true ), speed, easing, callback );
|
7628 |
+
};
|
7629 |
+
} );
|
7630 |
+
|
7631 |
+
// Generate shortcuts for custom animations
|
7632 |
+
jQuery.each( {
|
7633 |
+
slideDown: genFx( "show" ),
|
7634 |
+
slideUp: genFx( "hide" ),
|
7635 |
+
slideToggle: genFx( "toggle" ),
|
7636 |
+
fadeIn: { opacity: "show" },
|
7637 |
+
fadeOut: { opacity: "hide" },
|
7638 |
+
fadeToggle: { opacity: "toggle" }
|
7639 |
+
}, function( name, props ) {
|
7640 |
+
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7641 |
+
return this.animate( props, speed, easing, callback );
|
7642 |
+
};
|
7643 |
+
} );
|
7644 |
Â
|
7645 |
+
jQuery.timers = [];
|
7646 |
+
jQuery.fx.tick = function() {
|
7647 |
+
var timer,
|
7648 |
+
i = 0,
|
7649 |
+
timers = jQuery.timers;
|
7650 |
Â
|
7651 |
+
fxNow = Date.now();
|
7652 |
Â
|
7653 |
+
for ( ; i < timers.length; i++ ) {
|
7654 |
+
timer = timers[ i ];
|
7655 |
Â
|
7656 |
+
// Run the timer and safely remove it when done (allowing for external removal)
|
7657 |
+
if ( !timer() && timers[ i ] === timer ) {
|
7658 |
+
timers.splice( i--, 1 );
|
Â
|
|
7659 |
Â
}
|
7660 |
+
}
|
7661 |
Â
|
7662 |
+
if ( !timers.length ) {
|
7663 |
+
jQuery.fx.stop();
|
7664 |
+
}
|
7665 |
+
fxNow = undefined;
|
7666 |
+
};
|
7667 |
+
|
7668 |
+
jQuery.fx.timer = function( timer ) {
|
7669 |
+
jQuery.timers.push( timer );
|
7670 |
+
jQuery.fx.start();
|
7671 |
+
};
|
7672 |
+
|
7673 |
+
jQuery.fx.interval = 13;
|
7674 |
+
jQuery.fx.start = function() {
|
7675 |
+
if ( inProgress ) {
|
7676 |
+
return;
|
7677 |
+
}
|
7678 |
Â
|
7679 |
+
inProgress = true;
|
7680 |
+
schedule();
|
7681 |
+
};
|
Â
|
|
7682 |
Â
|
7683 |
+
jQuery.fx.stop = function() {
|
7684 |
+
inProgress = null;
|
7685 |
+
};
|
Â
|
|
Â
|
|
7686 |
Â
|
7687 |
+
jQuery.fx.speeds = {
|
7688 |
+
slow: 600,
|
7689 |
+
fast: 200,
|
7690 |
Â
|
7691 |
+
// Default speed
|
7692 |
+
_default: 400
|
7693 |
+
};
|
7694 |
Â
|
Â
|
|
Â
|
|
Â
|
|
7695 |
Â
|
7696 |
+
// Based off of the plugin by Clint Helfers, with permission.
|
7697 |
+
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
|
7698 |
+
jQuery.fn.delay = function( time, type ) {
|
7699 |
+
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
7700 |
+
type = type || "fx";
|
7701 |
Â
|
7702 |
+
return this.queue( type, function( next, hooks ) {
|
7703 |
+
var timeout = window.setTimeout( next, time );
|
7704 |
+
hooks.stop = function() {
|
7705 |
+
window.clearTimeout( timeout );
|
7706 |
+
};
|
7707 |
+
} );
|
7708 |
+
};
|
7709 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7710 |
Â
|
7711 |
+
( function() {
|
7712 |
+
var input = document.createElement( "input" ),
|
7713 |
+
select = document.createElement( "select" ),
|
7714 |
+
opt = select.appendChild( document.createElement( "option" ) );
|
Â
|
|
Â
|
|
Â
|
|
7715 |
Â
|
7716 |
+
input.type = "checkbox";
|
7717 |
Â
|
7718 |
+
// Support: Android <=4.3 only
|
7719 |
+
// Default value for a checkbox should be "on"
|
7720 |
+
support.checkOn = input.value !== "";
|
Â
|
|
7721 |
Â
|
7722 |
+
// Support: IE <=11 only
|
7723 |
+
// Must access selectedIndex to make default options select
|
7724 |
+
support.optSelected = opt.selected;
|
7725 |
Â
|
7726 |
+
// Support: IE <=11 only
|
7727 |
+
// An input loses its value after becoming a radio
|
7728 |
+
input = document.createElement( "input" );
|
7729 |
+
input.value = "t";
|
7730 |
+
input.type = "radio";
|
7731 |
+
support.radioValue = input.value === "t";
|
7732 |
+
} )();
|
7733 |
Â
|
Â
|
|
Â
|
|
Â
|
|
7734 |
Â
|
7735 |
+
var boolHook,
|
7736 |
+
attrHandle = jQuery.expr.attrHandle;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7737 |
Â
|
7738 |
+
jQuery.fn.extend( {
|
7739 |
+
attr: function( name, value ) {
|
7740 |
+
return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
7741 |
+
},
|
7742 |
Â
|
7743 |
+
removeAttr: function( name ) {
|
7744 |
+
return this.each( function() {
|
7745 |
+
jQuery.removeAttr( this, name );
|
7746 |
+
} );
|
7747 |
+
}
|
7748 |
+
} );
|
7749 |
Â
|
7750 |
+
jQuery.extend( {
|
7751 |
+
attr: function( elem, name, value ) {
|
7752 |
+
var ret, hooks,
|
7753 |
+
nType = elem.nodeType;
|
7754 |
Â
|
7755 |
+
// Don't get/set attributes on text, comment and attribute nodes
|
7756 |
+
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
7757 |
+
return;
|
Â
|
|
7758 |
Â
}
|
Â
|
|
7759 |
Â
|
7760 |
+
// Fallback to prop when attributes are not supported
|
7761 |
+
if ( typeof elem.getAttribute === "undefined" ) {
|
7762 |
+
return jQuery.prop( elem, name, value );
|
7763 |
+
}
|
7764 |
Â
|
7765 |
+
// Attribute hooks are determined by the lowercase version
|
7766 |
+
// Grab necessary hook if one is defined
|
7767 |
+
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
7768 |
+
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
7769 |
+
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
7770 |
+
}
|
7771 |
Â
|
7772 |
+
if ( value !== undefined ) {
|
7773 |
+
if ( value === null ) {
|
7774 |
+
jQuery.removeAttr( elem, name );
|
7775 |
+
return;
|
7776 |
Â
}
|
7777 |
Â
|
7778 |
+
if ( hooks && "set" in hooks &&
|
7779 |
+
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7780 |
+
return ret;
|
Â
|
|
Â
|
|
7781 |
Â
}
|
7782 |
Â
|
7783 |
+
elem.setAttribute( name, value + "" );
|
7784 |
+
return value;
|
7785 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7786 |
Â
|
7787 |
+
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
7788 |
+
return ret;
|
7789 |
+
}
|
7790 |
Â
|
7791 |
+
ret = jQuery.find.attr( elem, name );
|
7792 |
Â
|
7793 |
+
// Non-existent attributes return null, we normalize to undefined
|
7794 |
+
return ret == null ? undefined : ret;
|
7795 |
+
},
|
7796 |
Â
|
7797 |
+
attrHooks: {
|
7798 |
+
type: {
|
7799 |
+
set: function( elem, value ) {
|
7800 |
+
if ( !support.radioValue && value === "radio" &&
|
7801 |
+
nodeName( elem, "input" ) ) {
|
7802 |
+
var val = elem.value;
|
7803 |
+
elem.setAttribute( "type", value );
|
7804 |
+
if ( val ) {
|
7805 |
+
elem.value = val;
|
Â
|
|
Â
|
|
7806 |
Â
}
|
7807 |
+
return value;
|
7808 |
Â
}
|
7809 |
Â
}
|
7810 |
+
}
|
7811 |
+
},
|
7812 |
Â
|
7813 |
+
removeAttr: function( elem, value ) {
|
7814 |
+
var name,
|
7815 |
+
i = 0,
|
7816 |
Â
|
7817 |
+
// Attribute names can contain non-HTML whitespace characters
|
7818 |
+
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
7819 |
+
attrNames = value && value.match( rnothtmlwhite );
|
7820 |
Â
|
7821 |
+
if ( attrNames && elem.nodeType === 1 ) {
|
7822 |
+
while ( ( name = attrNames[ i++ ] ) ) {
|
7823 |
+
elem.removeAttribute( name );
|
Â
|
|
7824 |
Â
}
|
7825 |
Â
}
|
7826 |
+
}
|
7827 |
+
} );
|
7828 |
Â
|
7829 |
+
// Hooks for boolean attributes
|
7830 |
+
boolHook = {
|
7831 |
+
set: function( elem, value, name ) {
|
7832 |
+
if ( value === false ) {
|
7833 |
Â
|
7834 |
+
// Remove boolean attributes when set to false
|
7835 |
+
jQuery.removeAttr( elem, name );
|
7836 |
+
} else {
|
7837 |
+
elem.setAttribute( name, name );
|
Â
|
|
Â
|
|
7838 |
Â
}
|
7839 |
+
return name;
|
7840 |
+
}
|
7841 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7842 |
Â
|
7843 |
+
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
7844 |
+
var getter = attrHandle[ name ] || jQuery.find.attr;
|
7845 |
Â
|
7846 |
+
attrHandle[ name ] = function( elem, name, isXML ) {
|
7847 |
+
var ret, handle,
|
7848 |
+
lowercaseName = name.toLowerCase();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7849 |
Â
|
7850 |
+
if ( !isXML ) {
|
7851 |
Â
|
7852 |
+
// Avoid an infinite loop by temporarily removing this function from the getter
|
7853 |
+
handle = attrHandle[ lowercaseName ];
|
7854 |
+
attrHandle[ lowercaseName ] = ret;
|
7855 |
+
ret = getter( elem, name, isXML ) != null ?
|
7856 |
+
lowercaseName :
|
7857 |
+
null;
|
7858 |
+
attrHandle[ lowercaseName ] = handle;
|
7859 |
+
}
|
7860 |
+
return ret;
|
7861 |
+
};
|
7862 |
+
} );
|
7863 |
Â
|
7864 |
Â
|
Â
|
|
Â
|
|
7865 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7866 |
Â
|
7867 |
+
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
7868 |
+
rclickable = /^(?:a|area)$/i;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7869 |
Â
|
7870 |
+
jQuery.fn.extend( {
|
7871 |
+
prop: function( name, value ) {
|
7872 |
+
return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
7873 |
+
},
|
7874 |
Â
|
7875 |
+
removeProp: function( name ) {
|
7876 |
+
return this.each( function() {
|
7877 |
+
delete this[ jQuery.propFix[ name ] || name ];
|
7878 |
+
} );
|
7879 |
+
}
|
7880 |
+
} );
|
7881 |
Â
|
7882 |
+
jQuery.extend( {
|
7883 |
+
prop: function( elem, name, value ) {
|
7884 |
+
var ret, hooks,
|
7885 |
+
nType = elem.nodeType;
|
7886 |
Â
|
7887 |
+
// Don't get/set properties on text, comment and attribute nodes
|
7888 |
+
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
7889 |
+
return;
|
7890 |
+
}
|
7891 |
Â
|
7892 |
+
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7893 |
Â
|
7894 |
+
// Fix name and attach hooks
|
7895 |
+
name = jQuery.propFix[ name ] || name;
|
7896 |
+
hooks = jQuery.propHooks[ name ];
|
7897 |
+
}
|
7898 |
Â
|
7899 |
+
if ( value !== undefined ) {
|
7900 |
+
if ( hooks && "set" in hooks &&
|
7901 |
+
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7902 |
Â
return ret;
|
7903 |
Â
}
|
7904 |
Â
|
7905 |
+
return ( elem[ name ] = value );
|
7906 |
+
}
|
7907 |
Â
|
7908 |
+
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
7909 |
+
return ret;
|
7910 |
+
}
|
7911 |
Â
|
7912 |
+
return elem[ name ];
|
7913 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7914 |
Â
|
7915 |
+
propHooks: {
|
7916 |
+
tabIndex: {
|
7917 |
+
get: function( elem ) {
|
7918 |
Â
|
7919 |
+
// Support: IE <=9 - 11 only
|
7920 |
+
// elem.tabIndex doesn't always return the
|
7921 |
+
// correct value when it hasn't been explicitly set
|
7922 |
+
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
7923 |
+
// Use proper attribute retrieval(#12072)
|
7924 |
+
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
Â
|
|
7925 |
Â
|
7926 |
+
if ( tabindex ) {
|
7927 |
+
return parseInt( tabindex, 10 );
|
7928 |
Â
}
|
Â
|
|
Â
|
|
7929 |
Â
|
7930 |
+
if (
|
7931 |
+
rfocusable.test( elem.nodeName ) ||
|
7932 |
+
rclickable.test( elem.nodeName ) &&
|
7933 |
+
elem.href
|
7934 |
+
) {
|
7935 |
+
return 0;
|
7936 |
+
}
|
7937 |
Â
|
7938 |
+
return -1;
|
7939 |
+
}
|
7940 |
+
}
|
7941 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
7942 |
Â
|
7943 |
+
propFix: {
|
7944 |
+
"for": "htmlFor",
|
7945 |
+
"class": "className"
|
7946 |
+
}
|
7947 |
+
} );
|
7948 |
+
|
7949 |
+
// Support: IE <=11 only
|
7950 |
+
// Accessing the selectedIndex property
|
7951 |
+
// forces the browser to respect setting selected
|
7952 |
+
// on the option
|
7953 |
+
// The getter ensures a default option is selected
|
7954 |
+
// when in an optgroup
|
7955 |
+
// eslint rule "no-unused-expressions" is disabled for this code
|
7956 |
+
// since it considers such accessions noop
|
7957 |
+
if ( !support.optSelected ) {
|
7958 |
+
jQuery.propHooks.selected = {
|
7959 |
+
get: function( elem ) {
|
7960 |
+
|
7961 |
+
/* eslint no-unused-expressions: "off" */
|
7962 |
Â
|
7963 |
+
var parent = elem.parentNode;
|
7964 |
+
if ( parent && parent.parentNode ) {
|
7965 |
+
parent.parentNode.selectedIndex;
|
7966 |
+
}
|
7967 |
+
return null;
|
7968 |
+
},
|
7969 |
+
set: function( elem ) {
|
7970 |
Â
|
7971 |
+
/* eslint no-unused-expressions: "off" */
|
7972 |
Â
|
7973 |
+
var parent = elem.parentNode;
|
7974 |
+
if ( parent ) {
|
7975 |
+
parent.selectedIndex;
|
7976 |
Â
|
7977 |
+
if ( parent.parentNode ) {
|
7978 |
+
parent.parentNode.selectedIndex;
|
Â
|
|
7979 |
Â
}
|
7980 |
Â
}
|
7981 |
+
}
|
7982 |
+
};
|
7983 |
+
}
|
7984 |
+
|
7985 |
+
jQuery.each( [
|
7986 |
+
"tabIndex",
|
7987 |
+
"readOnly",
|
7988 |
+
"maxLength",
|
7989 |
+
"cellSpacing",
|
7990 |
+
"cellPadding",
|
7991 |
+
"rowSpan",
|
7992 |
+
"colSpan",
|
7993 |
+
"useMap",
|
7994 |
+
"frameBorder",
|
7995 |
+
"contentEditable"
|
7996 |
+
], function() {
|
7997 |
+
jQuery.propFix[ this.toLowerCase() ] = this;
|
7998 |
+
} );
|
7999 |
+
|
8000 |
+
|
8001 |
+
|
8002 |
+
|
8003 |
+
// Strip and collapse whitespace according to HTML spec
|
8004 |
+
// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
|
8005 |
+
function stripAndCollapse( value ) {
|
8006 |
+
var tokens = value.match( rnothtmlwhite ) || [];
|
8007 |
+
return tokens.join( " " );
|
8008 |
Â
}
|
8009 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8010 |
Â
|
8011 |
+
function getClass( elem ) {
|
8012 |
+
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
8013 |
+
}
|
8014 |
Â
|
8015 |
+
function classesToArray( value ) {
|
8016 |
+
if ( Array.isArray( value ) ) {
|
8017 |
+
return value;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8018 |
Â
}
|
8019 |
+
if ( typeof value === "string" ) {
|
8020 |
+
return value.match( rnothtmlwhite ) || [];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8021 |
Â
}
|
8022 |
+
return [];
|
8023 |
+
}
|
8024 |
Â
|
8025 |
+
jQuery.fn.extend( {
|
8026 |
+
addClass: function( value ) {
|
8027 |
+
var classes, elem, cur, curValue, clazz, j, finalValue,
|
8028 |
+
i = 0;
|
8029 |
Â
|
8030 |
+
if ( isFunction( value ) ) {
|
8031 |
+
return this.each( function( j ) {
|
8032 |
+
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
8033 |
+
} );
|
8034 |
+
}
|
8035 |
Â
|
8036 |
+
classes = classesToArray( value );
|
8037 |
Â
|
8038 |
+
if ( classes.length ) {
|
8039 |
+
while ( ( elem = this[ i++ ] ) ) {
|
8040 |
+
curValue = getClass( elem );
|
8041 |
+
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
8042 |
Â
|
8043 |
+
if ( cur ) {
|
8044 |
+
j = 0;
|
8045 |
+
while ( ( clazz = classes[ j++ ] ) ) {
|
8046 |
+
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
8047 |
+
cur += clazz + " ";
|
Â
|
|
8048 |
Â
}
|
8049 |
+
}
|
8050 |
Â
|
8051 |
+
// Only assign if different to avoid unneeded rendering.
|
8052 |
+
finalValue = stripAndCollapse( cur );
|
8053 |
+
if ( curValue !== finalValue ) {
|
8054 |
+
elem.setAttribute( "class", finalValue );
|
Â
|
|
8055 |
Â
}
|
8056 |
Â
}
|
8057 |
Â
}
|
8058 |
+
}
|
8059 |
Â
|
8060 |
+
return this;
|
8061 |
+
},
|
8062 |
Â
|
8063 |
+
removeClass: function( value ) {
|
8064 |
+
var classes, elem, cur, curValue, clazz, j, finalValue,
|
8065 |
+
i = 0;
|
8066 |
Â
|
8067 |
+
if ( isFunction( value ) ) {
|
8068 |
+
return this.each( function( j ) {
|
8069 |
+
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
8070 |
+
} );
|
8071 |
+
}
|
8072 |
Â
|
8073 |
+
if ( !arguments.length ) {
|
8074 |
+
return this.attr( "class", "" );
|
8075 |
+
}
|
8076 |
Â
|
8077 |
+
classes = classesToArray( value );
|
8078 |
Â
|
8079 |
+
if ( classes.length ) {
|
8080 |
+
while ( ( elem = this[ i++ ] ) ) {
|
8081 |
+
curValue = getClass( elem );
|
8082 |
Â
|
8083 |
+
// This expression is here for better compressibility (see addClass)
|
8084 |
+
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
8085 |
Â
|
8086 |
+
if ( cur ) {
|
8087 |
+
j = 0;
|
8088 |
+
while ( ( clazz = classes[ j++ ] ) ) {
|
8089 |
Â
|
8090 |
+
// Remove *all* instances
|
8091 |
+
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
8092 |
+
cur = cur.replace( " " + clazz + " ", " " );
|
Â
|
|
8093 |
Â
}
|
8094 |
+
}
|
8095 |
Â
|
8096 |
+
// Only assign if different to avoid unneeded rendering.
|
8097 |
+
finalValue = stripAndCollapse( cur );
|
8098 |
+
if ( curValue !== finalValue ) {
|
8099 |
+
elem.setAttribute( "class", finalValue );
|
Â
|
|
8100 |
Â
}
|
8101 |
Â
}
|
8102 |
Â
}
|
8103 |
+
}
|
8104 |
Â
|
8105 |
+
return this;
|
8106 |
+
},
|
8107 |
Â
|
8108 |
+
toggleClass: function( value, stateVal ) {
|
8109 |
+
var type = typeof value,
|
8110 |
+
isValidValue = type === "string" || Array.isArray( value );
|
8111 |
Â
|
8112 |
+
if ( typeof stateVal === "boolean" && isValidValue ) {
|
8113 |
+
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
8114 |
+
}
|
8115 |
Â
|
8116 |
+
if ( isFunction( value ) ) {
|
8117 |
+
return this.each( function( i ) {
|
8118 |
+
jQuery( this ).toggleClass(
|
8119 |
+
value.call( this, i, getClass( this ), stateVal ),
|
8120 |
+
stateVal
|
8121 |
+
);
|
8122 |
+
} );
|
8123 |
+
}
|
8124 |
Â
|
8125 |
+
return this.each( function() {
|
8126 |
+
var className, i, self, classNames;
|
8127 |
Â
|
8128 |
+
if ( isValidValue ) {
|
8129 |
Â
|
8130 |
+
// Toggle individual class names
|
8131 |
+
i = 0;
|
8132 |
+
self = jQuery( this );
|
8133 |
+
classNames = classesToArray( value );
|
8134 |
Â
|
8135 |
+
while ( ( className = classNames[ i++ ] ) ) {
|
8136 |
Â
|
8137 |
+
// Check each className given, space separated list
|
8138 |
+
if ( self.hasClass( className ) ) {
|
8139 |
+
self.removeClass( className );
|
8140 |
+
} else {
|
8141 |
+
self.addClass( className );
|
Â
|
|
8142 |
Â
}
|
8143 |
+
}
|
8144 |
Â
|
8145 |
+
// Toggle whole class name
|
8146 |
+
} else if ( value === undefined || type === "boolean" ) {
|
8147 |
+
className = getClass( this );
|
8148 |
+
if ( className ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8149 |
Â
|
8150 |
+
// Store className if set
|
8151 |
+
dataPriv.set( this, "__className__", className );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8152 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8153 |
Â
|
8154 |
+
// If the element has a class name or if we're passed `false`,
|
8155 |
+
// then remove the whole classname (if there was one, the above saved it).
|
8156 |
+
// Otherwise bring back whatever was previously saved (if anything),
|
8157 |
+
// falling back to the empty string if nothing was stored.
|
8158 |
+
if ( this.setAttribute ) {
|
8159 |
+
this.setAttribute( "class",
|
8160 |
+
className || value === false ?
|
8161 |
+
"" :
|
8162 |
+
dataPriv.get( this, "__className__" ) || ""
|
8163 |
+
);
|
8164 |
Â
}
|
8165 |
Â
}
|
8166 |
+
} );
|
8167 |
+
},
|
8168 |
Â
|
8169 |
+
hasClass: function( selector ) {
|
8170 |
+
var className, elem,
|
8171 |
+
i = 0;
|
8172 |
+
|
8173 |
+
className = " " + selector + " ";
|
8174 |
+
while ( ( elem = this[ i++ ] ) ) {
|
8175 |
+
if ( elem.nodeType === 1 &&
|
8176 |
+
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
8177 |
+
return true;
|
8178 |
+
}
|
8179 |
Â
}
|
Â
|
|
8180 |
Â
|
8181 |
+
return false;
|
8182 |
+
}
|
8183 |
+
} );
|
8184 |
Â
|
8185 |
Â
|
8186 |
Â
|
Â
|
|
8187 |
Â
|
8188 |
+
var rreturn = /\r/g;
|
Â
|
|
Â
|
|
Â
|
|
8189 |
Â
|
8190 |
+
jQuery.fn.extend( {
|
8191 |
+
val: function( value ) {
|
8192 |
+
var hooks, ret, valueIsFunction,
|
8193 |
+
elem = this[ 0 ];
|
8194 |
Â
|
8195 |
+
if ( !arguments.length ) {
|
8196 |
+
if ( elem ) {
|
8197 |
+
hooks = jQuery.valHooks[ elem.type ] ||
|
8198 |
+
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
Â
|
|
Â
|
|
8199 |
Â
|
8200 |
+
if ( hooks &&
|
8201 |
+
"get" in hooks &&
|
8202 |
+
( ret = hooks.get( elem, "value" ) ) !== undefined
|
8203 |
+
) {
|
8204 |
+
return ret;
|
8205 |
+
}
|
8206 |
Â
|
8207 |
+
ret = elem.value;
|
Â
|
|
Â
|
|
Â
|
|
8208 |
Â
|
8209 |
+
// Handle most common string cases
|
8210 |
+
if ( typeof ret === "string" ) {
|
8211 |
+
return ret.replace( rreturn, "" );
|
8212 |
Â
}
|
8213 |
Â
|
8214 |
+
// Handle cases where value is null/undef or number
|
8215 |
+
return ret == null ? "" : ret;
|
8216 |
Â
}
|
8217 |
Â
|
8218 |
+
return;
|
8219 |
+
}
|
8220 |
Â
|
8221 |
+
valueIsFunction = isFunction( value );
|
Â
|
|
8222 |
Â
|
8223 |
+
return this.each( function( i ) {
|
8224 |
+
var val;
|
Â
|
|
8225 |
Â
|
8226 |
+
if ( this.nodeType !== 1 ) {
|
8227 |
+
return;
|
8228 |
+
}
|
Â
|
|
Â
|
|
8229 |
Â
|
8230 |
+
if ( valueIsFunction ) {
|
8231 |
+
val = value.call( this, i, jQuery( this ).val() );
|
8232 |
+
} else {
|
8233 |
+
val = value;
|
8234 |
+
}
|
8235 |
Â
|
8236 |
+
// Treat null/undefined as ""; convert numbers to string
|
8237 |
+
if ( val == null ) {
|
8238 |
+
val = "";
|
8239 |
Â
|
8240 |
+
} else if ( typeof val === "number" ) {
|
8241 |
+
val += "";
|
Â
|
|
Â
|
|
Â
|
|
8242 |
Â
|
8243 |
+
} else if ( Array.isArray( val ) ) {
|
8244 |
+
val = jQuery.map( val, function( value ) {
|
8245 |
+
return value == null ? "" : value + "";
|
8246 |
+
} );
|
8247 |
+
}
|
8248 |
Â
|
8249 |
+
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8250 |
Â
|
8251 |
+
// If set returns undefined, fall back to normal setting
|
8252 |
+
if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
8253 |
+
this.value = val;
|
8254 |
+
}
|
8255 |
+
} );
|
8256 |
+
}
|
8257 |
+
} );
|
8258 |
Â
|
8259 |
+
jQuery.extend( {
|
8260 |
+
valHooks: {
|
8261 |
+
option: {
|
8262 |
+
get: function( elem ) {
|
8263 |
Â
|
8264 |
+
var val = jQuery.find.attr( elem, "value" );
|
8265 |
+
return val != null ?
|
8266 |
+
val :
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8267 |
Â
|
8268 |
+
// Support: IE <=10 - 11 only
|
8269 |
+
// option.text throws exceptions (#14686, #14858)
|
8270 |
+
// Strip and collapse whitespace
|
8271 |
+
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
8272 |
+
stripAndCollapse( jQuery.text( elem ) );
|
8273 |
+
}
|
8274 |
+
},
|
8275 |
+
select: {
|
8276 |
+
get: function( elem ) {
|
8277 |
+
var value, option, i,
|
8278 |
+
options = elem.options,
|
8279 |
+
index = elem.selectedIndex,
|
8280 |
+
one = elem.type === "select-one",
|
8281 |
+
values = one ? null : [],
|
8282 |
+
max = one ? index + 1 : options.length;
|
8283 |
Â
|
8284 |
+
if ( index < 0 ) {
|
8285 |
+
i = max;
|
8286 |
+
|
8287 |
+
} else {
|
8288 |
+
i = one ? index : 0;
|
8289 |
+
}
|
8290 |
Â
|
8291 |
+
// Loop through all the selected options
|
8292 |
+
for ( ; i < max; i++ ) {
|
8293 |
+
option = options[ i ];
|
8294 |
Â
|
8295 |
+
// Support: IE <=9 only
|
8296 |
+
// IE8-9 doesn't update selected after form reset (#2551)
|
8297 |
+
if ( ( option.selected || i === index ) &&
|
Â
|
|
8298 |
Â
|
8299 |
+
// Don't return options that are disabled or in a disabled optgroup
|
8300 |
+
!option.disabled &&
|
8301 |
+
( !option.parentNode.disabled ||
|
8302 |
+
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
8303 |
Â
|
8304 |
+
// Get the specific value for the option
|
8305 |
+
value = jQuery( option ).val();
|
Â
|
|
Â
|
|
8306 |
Â
|
8307 |
+
// We don't need an array for one selects
|
8308 |
+
if ( one ) {
|
8309 |
+
return value;
|
8310 |
Â
}
|
Â
|
|
8311 |
Â
|
8312 |
+
// Multi-Selects return an array
|
8313 |
+
values.push( value );
|
8314 |
+
}
|
8315 |
+
}
|
8316 |
Â
|
8317 |
+
return values;
|
8318 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
8319 |
Â
|
8320 |
+
set: function( elem, value ) {
|
8321 |
+
var optionSet, option,
|
8322 |
+
options = elem.options,
|
8323 |
+
values = jQuery.makeArray( value ),
|
8324 |
+
i = options.length;
|
8325 |
Â
|
8326 |
+
while ( i-- ) {
|
8327 |
+
option = options[ i ];
|
8328 |
Â
|
8329 |
+
/* eslint-disable no-cond-assign */
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8330 |
Â
|
8331 |
+
if ( option.selected =
|
8332 |
+
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
8333 |
+
) {
|
8334 |
+
optionSet = true;
|
8335 |
Â
}
|
8336 |
Â
|
8337 |
+
/* eslint-enable no-cond-assign */
|
8338 |
+
}
|
8339 |
+
|
8340 |
+
// Force browsers to behave consistently when non-matching value is set
|
8341 |
+
if ( !optionSet ) {
|
8342 |
+
elem.selectedIndex = -1;
|
8343 |
Â
}
|
8344 |
+
return values;
|
8345 |
Â
}
|
8346 |
Â
}
|
8347 |
+
}
|
8348 |
+
} );
|
8349 |
Â
|
8350 |
+
// Radios and checkboxes getter/setter
|
8351 |
+
jQuery.each( [ "radio", "checkbox" ], function() {
|
8352 |
+
jQuery.valHooks[ this ] = {
|
8353 |
+
set: function( elem, value ) {
|
8354 |
+
if ( Array.isArray( value ) ) {
|
8355 |
+
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
Â
|
|
8356 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8357 |
Â
}
|
8358 |
+
};
|
8359 |
+
if ( !support.checkOn ) {
|
8360 |
+
jQuery.valHooks[ this ].get = function( elem ) {
|
8361 |
+
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
8362 |
+
};
|
8363 |
+
}
|
8364 |
+
} );
|
8365 |
Â
|
8366 |
Â
|
8367 |
Â
|
8368 |
Â
|
8369 |
+
// Return jQuery for attributes-only inclusion
|
8370 |
Â
|
8371 |
Â
|
8372 |
+
support.focusin = "onfocusin" in window;
|
8373 |
Â
|
8374 |
Â
|
8375 |
+
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
8376 |
+
stopPropagationCallback = function( e ) {
|
8377 |
+
e.stopPropagation();
|
8378 |
+
};
|
8379 |
Â
|
8380 |
+
jQuery.extend( jQuery.event, {
|
8381 |
Â
|
8382 |
+
trigger: function( event, data, elem, onlyHandlers ) {
|
8383 |
Â
|
8384 |
+
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
|
8385 |
+
eventPath = [ elem || document ],
|
8386 |
+
type = hasOwn.call( event, "type" ) ? event.type : event,
|
8387 |
+
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
|
8388 |
Â
|
8389 |
+
cur = lastElement = tmp = elem = elem || document;
|
8390 |
Â
|
8391 |
+
// Don't do events on text and comment nodes
|
8392 |
+
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
8393 |
+
return;
|
8394 |
+
}
|
8395 |
Â
|
8396 |
+
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
8397 |
+
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
8398 |
+
return;
|
8399 |
+
}
|
8400 |
Â
|
8401 |
+
if ( type.indexOf( "." ) > -1 ) {
|
8402 |
Â
|
8403 |
+
// Namespaced trigger; create a regexp to match event type in handle()
|
8404 |
+
namespaces = type.split( "." );
|
8405 |
+
type = namespaces.shift();
|
8406 |
+
namespaces.sort();
|
8407 |
+
}
|
8408 |
+
ontype = type.indexOf( ":" ) < 0 && "on" + type;
|
8409 |
Â
|
8410 |
+
// Caller can pass in a jQuery.Event object, Object, or just an event type string
|
8411 |
+
event = event[ jQuery.expando ] ?
|
8412 |
+
event :
|
8413 |
+
new jQuery.Event( type, typeof event === "object" && event );
|
8414 |
Â
|
8415 |
+
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
|
8416 |
+
event.isTrigger = onlyHandlers ? 2 : 3;
|
8417 |
+
event.namespace = namespaces.join( "." );
|
8418 |
+
event.rnamespace = event.namespace ?
|
8419 |
+
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
|
8420 |
+
null;
|
8421 |
Â
|
8422 |
+
// Clean up the event in case it is being reused
|
8423 |
+
event.result = undefined;
|
8424 |
+
if ( !event.target ) {
|
8425 |
+
event.target = elem;
|
8426 |
+
}
|
8427 |
Â
|
8428 |
+
// Clone any incoming data and prepend the event, creating the handler arg list
|
8429 |
+
data = data == null ?
|
8430 |
+
[ event ] :
|
8431 |
+
jQuery.makeArray( data, [ event ] );
|
8432 |
Â
|
8433 |
+
// Allow special events to draw outside the lines
|
8434 |
+
special = jQuery.event.special[ type ] || {};
|
8435 |
+
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
8436 |
+
return;
|
8437 |
+
}
|
8438 |
+
|
8439 |
+
// Determine event propagation path in advance, per W3C events spec (#9951)
|
8440 |
+
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
8441 |
+
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
|
8442 |
+
|
8443 |
+
bubbleType = special.delegateType || type;
|
8444 |
+
if ( !rfocusMorph.test( bubbleType + type ) ) {
|
8445 |
+
cur = cur.parentNode;
|
8446 |
+
}
|
8447 |
+
for ( ; cur; cur = cur.parentNode ) {
|
8448 |
+
eventPath.push( cur );
|
8449 |
+
tmp = cur;
|
8450 |
Â
}
|
8451 |
Â
|
8452 |
+
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
8453 |
+
if ( tmp === ( elem.ownerDocument || document ) ) {
|
8454 |
+
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
8455 |
+
}
|
8456 |
+
}
|
8457 |
Â
|
8458 |
+
// Fire handlers on the event path
|
8459 |
+
i = 0;
|
8460 |
+
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
|
8461 |
+
lastElement = cur;
|
8462 |
+
event.type = i > 1 ?
|
8463 |
+
bubbleType :
|
8464 |
+
special.bindType || type;
|
Â
|
|
8465 |
Â
|
8466 |
+
// jQuery handler
|
8467 |
+
handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
|
8468 |
+
dataPriv.get( cur, "handle" );
|
8469 |
+
if ( handle ) {
|
8470 |
+
handle.apply( cur, data );
|
8471 |
Â
}
|
8472 |
Â
|
8473 |
+
// Native handler
|
8474 |
+
handle = ontype && cur[ ontype ];
|
8475 |
+
if ( handle && handle.apply && acceptData( cur ) ) {
|
8476 |
+
event.result = handle.apply( cur, data );
|
8477 |
+
if ( event.result === false ) {
|
8478 |
+
event.preventDefault();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8479 |
Â
}
|
8480 |
Â
}
|
8481 |
+
}
|
8482 |
+
event.type = type;
|
8483 |
Â
|
8484 |
+
// If nobody prevented the default action, do it now
|
8485 |
+
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
8486 |
Â
|
8487 |
+
if ( ( !special._default ||
|
8488 |
+
special._default.apply( eventPath.pop(), data ) === false ) &&
|
8489 |
+
acceptData( elem ) ) {
|
8490 |
Â
|
8491 |
+
// Call a native DOM method on the target with the same name as the event.
|
8492 |
+
// Don't do default actions on window, that's where global variables be (#6170)
|
8493 |
+
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
|
8494 |
Â
|
8495 |
+
// Don't re-trigger an onFOO event when we call its FOO() method
|
8496 |
+
tmp = elem[ ontype ];
|
8497 |
Â
|
8498 |
+
if ( tmp ) {
|
8499 |
+
elem[ ontype ] = null;
|
8500 |
+
}
|
8501 |
Â
|
8502 |
+
// Prevent re-triggering of the same event, since we already bubbled it above
|
8503 |
+
jQuery.event.triggered = type;
|
8504 |
Â
|
8505 |
+
if ( event.isPropagationStopped() ) {
|
8506 |
+
lastElement.addEventListener( type, stopPropagationCallback );
|
8507 |
+
}
|
8508 |
Â
|
8509 |
+
elem[ type ]();
|
8510 |
Â
|
8511 |
+
if ( event.isPropagationStopped() ) {
|
8512 |
+
lastElement.removeEventListener( type, stopPropagationCallback );
|
8513 |
+
}
|
8514 |
Â
|
8515 |
+
jQuery.event.triggered = undefined;
|
8516 |
Â
|
8517 |
+
if ( tmp ) {
|
8518 |
+
elem[ ontype ] = tmp;
|
Â
|
|
8519 |
Â
}
|
8520 |
Â
}
|
8521 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8522 |
Â
}
|
8523 |
Â
|
8524 |
+
return event.result;
|
8525 |
+
},
|
Â
|
|
8526 |
Â
|
8527 |
+
// Piggyback on a donor event to simulate a different one
|
8528 |
+
// Used only for `focus(in | out)` events
|
8529 |
+
simulate: function( type, elem, event ) {
|
8530 |
+
var e = jQuery.extend(
|
8531 |
+
new jQuery.Event(),
|
8532 |
+
event,
|
8533 |
+
{
|
8534 |
+
type: type,
|
8535 |
+
isSimulated: true
|
8536 |
Â
}
|
8537 |
+
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8538 |
Â
|
8539 |
+
jQuery.event.trigger( e, null, elem );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8540 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
8541 |
Â
|
8542 |
+
} );
|
8543 |
Â
|
8544 |
+
jQuery.fn.extend( {
|
8545 |
Â
|
8546 |
+
trigger: function( type, data ) {
|
8547 |
+
return this.each( function() {
|
8548 |
+
jQuery.event.trigger( type, data, this );
|
8549 |
+
} );
|
8550 |
+
},
|
8551 |
+
triggerHandler: function( type, data ) {
|
8552 |
+
var elem = this[ 0 ];
|
8553 |
+
if ( elem ) {
|
8554 |
+
return jQuery.event.trigger( type, data, elem, true );
|
8555 |
Â
}
|
8556 |
+
}
|
8557 |
+
} );
|
8558 |
+
|
8559 |
+
|
8560 |
+
// Support: Firefox <=44
|
8561 |
+
// Firefox doesn't have focus(in | out) events
|
8562 |
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
8563 |
+
//
|
8564 |
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
8565 |
+
// focus(in | out) events fire after focus & blur events,
|
8566 |
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
8567 |
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
8568 |
+
if ( !support.focusin ) {
|
8569 |
+
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
8570 |
+
|
8571 |
+
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
8572 |
+
var handler = function( event ) {
|
8573 |
+
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
8574 |
+
};
|
8575 |
Â
|
8576 |
+
jQuery.event.special[ fix ] = {
|
8577 |
+
setup: function() {
|
8578 |
+
var doc = this.ownerDocument || this,
|
8579 |
+
attaches = dataPriv.access( doc, fix );
|
Â
|
|
Â
|
|
Â
|
|
8580 |
Â
|
8581 |
+
if ( !attaches ) {
|
8582 |
+
doc.addEventListener( orig, handler, true );
|
8583 |
+
}
|
8584 |
+
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
8585 |
+
},
|
8586 |
+
teardown: function() {
|
8587 |
+
var doc = this.ownerDocument || this,
|
8588 |
+
attaches = dataPriv.access( doc, fix ) - 1;
|
8589 |
Â
|
8590 |
+
if ( !attaches ) {
|
8591 |
+
doc.removeEventListener( orig, handler, true );
|
8592 |
+
dataPriv.remove( doc, fix );
|
8593 |
Â
|
8594 |
+
} else {
|
8595 |
+
dataPriv.access( doc, fix, attaches );
|
8596 |
+
}
|
8597 |
+
}
|
8598 |
+
};
|
8599 |
+
} );
|
8600 |
+
}
|
8601 |
+
var location = window.location;
|
8602 |
Â
|
8603 |
+
var nonce = Date.now();
|
Â
|
|
8604 |
Â
|
8605 |
+
var rquery = ( /\?/ );
|
8606 |
Â
|
Â
|
|
Â
|
|
Â
|
|
8607 |
Â
|
Â
|
|
Â
|
|
8608 |
Â
|
8609 |
+
// Cross-browser xml parsing
|
8610 |
+
jQuery.parseXML = function( data ) {
|
8611 |
+
var xml;
|
8612 |
+
if ( !data || typeof data !== "string" ) {
|
8613 |
+
return null;
|
8614 |
+
}
|
8615 |
Â
|
8616 |
+
// Support: IE 9 - 11 only
|
8617 |
+
// IE throws on parseFromString with invalid input.
|
8618 |
+
try {
|
8619 |
+
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
8620 |
+
} catch ( e ) {
|
8621 |
+
xml = undefined;
|
8622 |
+
}
|
Â
|
|
Â
|
|
8623 |
Â
|
8624 |
+
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
8625 |
+
jQuery.error( "Invalid XML: " + data );
|
8626 |
+
}
|
8627 |
+
return xml;
|
8628 |
+
};
|
8629 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8630 |
Â
|
8631 |
+
var
|
8632 |
+
rbracket = /\[\]$/,
|
8633 |
+
rCRLF = /\r?\n/g,
|
8634 |
+
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
|
8635 |
+
rsubmittable = /^(?:input|select|textarea|keygen)/i;
|
8636 |
Â
|
8637 |
+
function buildParams( prefix, obj, traditional, add ) {
|
8638 |
+
var name;
|
Â
|
|
Â
|
|
8639 |
Â
|
8640 |
+
if ( Array.isArray( obj ) ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8641 |
Â
|
8642 |
+
// Serialize array item.
|
8643 |
+
jQuery.each( obj, function( i, v ) {
|
8644 |
+
if ( traditional || rbracket.test( prefix ) ) {
|
Â
|
|
8645 |
Â
|
8646 |
+
// Treat each array item as a scalar.
|
8647 |
+
add( prefix, v );
|
Â
|
|
8648 |
Â
|
8649 |
+
} else {
|
Â
|
|
8650 |
Â
|
8651 |
+
// Item is non-scalar (array or object), encode its numeric index.
|
8652 |
+
buildParams(
|
8653 |
+
prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
|
8654 |
+
v,
|
8655 |
+
traditional,
|
8656 |
+
add
|
8657 |
+
);
|
8658 |
+
}
|
8659 |
+
} );
|
8660 |
Â
|
8661 |
+
} else if ( !traditional && toType( obj ) === "object" ) {
|
8662 |
Â
|
8663 |
+
// Serialize object item.
|
8664 |
+
for ( name in obj ) {
|
8665 |
+
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
Â
|
|
Â
|
|
8666 |
Â
}
|
8667 |
Â
|
8668 |
+
} else {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8669 |
Â
|
8670 |
+
// Serialize scalar item.
|
8671 |
+
add( prefix, obj );
|
8672 |
+
}
|
8673 |
+
}
|
8674 |
+
|
8675 |
+
// Serialize an array of form elements or a set of
|
8676 |
+
// key/values into a query string
|
8677 |
+
jQuery.param = function( a, traditional ) {
|
8678 |
+
var prefix,
|
8679 |
+
s = [],
|
8680 |
+
add = function( key, valueOrFunction ) {
|
8681 |
+
|
8682 |
+
// If value is a function, invoke it and use its return value
|
8683 |
+
var value = isFunction( valueOrFunction ) ?
|
8684 |
+
valueOrFunction() :
|
8685 |
+
valueOrFunction;
|
8686 |
+
|
8687 |
+
s[ s.length ] = encodeURIComponent( key ) + "=" +
|
8688 |
+
encodeURIComponent( value == null ? "" : value );
|
8689 |
+
};
|
8690 |
Â
|
8691 |
+
// If an array was passed in, assume that it is an array of form elements.
|
8692 |
+
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8693 |
Â
|
8694 |
+
// Serialize the form elements
|
8695 |
+
jQuery.each( a, function() {
|
8696 |
+
add( this.name, this.value );
|
8697 |
+
} );
|
8698 |
Â
|
8699 |
+
} else {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8700 |
Â
|
8701 |
+
// If traditional, encode the "old" way (the way 1.3.2 or older
|
8702 |
+
// did it), otherwise encode params recursively.
|
8703 |
+
for ( prefix in a ) {
|
8704 |
+
buildParams( prefix, a[ prefix ], traditional, add );
|
8705 |
Â
}
|
8706 |
+
}
|
Â
|
|
8707 |
Â
|
8708 |
+
// Return the resulting serialization
|
8709 |
+
return s.join( "&" );
|
8710 |
+
};
|
8711 |
+
|
8712 |
+
jQuery.fn.extend( {
|
8713 |
+
serialize: function() {
|
8714 |
+
return jQuery.param( this.serializeArray() );
|
8715 |
+
},
|
8716 |
+
serializeArray: function() {
|
8717 |
+
return this.map( function() {
|
8718 |
+
|
8719 |
+
// Can add propHook for "elements" to filter or add form elements
|
8720 |
+
var elements = jQuery.prop( this, "elements" );
|
8721 |
+
return elements ? jQuery.makeArray( elements ) : this;
|
8722 |
+
} )
|
8723 |
+
.filter( function() {
|
8724 |
+
var type = this.type;
|
8725 |
+
|
8726 |
+
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
8727 |
+
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
8728 |
+
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
8729 |
+
( this.checked || !rcheckableType.test( type ) );
|
8730 |
+
} )
|
8731 |
+
.map( function( i, elem ) {
|
8732 |
+
var val = jQuery( this ).val();
|
8733 |
+
|
8734 |
+
if ( val == null ) {
|
8735 |
+
return null;
|
8736 |
+
}
|
8737 |
Â
|
8738 |
+
if ( Array.isArray( val ) ) {
|
8739 |
+
return jQuery.map( val, function( val ) {
|
8740 |
+
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8741 |
+
} );
|
8742 |
+
}
|
8743 |
Â
|
8744 |
+
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8745 |
+
} ).get();
|
8746 |
+
}
|
8747 |
+
} );
|
8748 |
+
|
8749 |
+
|
8750 |
+
var
|
8751 |
+
r20 = /%20/g,
|
8752 |
+
rhash = /#.*$/,
|
8753 |
+
rantiCache = /([?&])_=[^&]*/,
|
8754 |
+
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
8755 |
+
|
8756 |
+
// #7653, #8125, #8152: local protocol detection
|
8757 |
+
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
8758 |
+
rnoContent = /^(?:GET|HEAD)$/,
|
8759 |
+
rprotocol = /^\/\//,
|
8760 |
+
|
8761 |
+
/* Prefilters
|
8762 |
+
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
8763 |
+
* 2) These are called:
|
8764 |
+
* - BEFORE asking for a transport
|
8765 |
+
* - AFTER param serialization (s.data is a string if s.processData is true)
|
8766 |
+
* 3) key is the dataType
|
8767 |
+
* 4) the catchall symbol "*" can be used
|
8768 |
+
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
8769 |
+
*/
|
8770 |
+
prefilters = {},
|
8771 |
Â
|
8772 |
+
/* Transports bindings
|
8773 |
+
* 1) key is the dataType
|
8774 |
+
* 2) the catchall symbol "*" can be used
|
8775 |
+
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
8776 |
+
*/
|
8777 |
+
transports = {},
|
8778 |
Â
|
8779 |
+
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
8780 |
+
allTypes = "*/".concat( "*" ),
|
8781 |
Â
|
8782 |
+
// Anchor tag for parsing the document origin
|
8783 |
+
originAnchor = document.createElement( "a" );
|
8784 |
+
originAnchor.href = location.href;
|
8785 |
Â
|
8786 |
+
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
8787 |
+
function addToPrefiltersOrTransports( structure ) {
|
8788 |
Â
|
8789 |
+
// dataTypeExpression is optional and defaults to "*"
|
8790 |
+
return function( dataTypeExpression, func ) {
|
8791 |
Â
|
8792 |
+
if ( typeof dataTypeExpression !== "string" ) {
|
8793 |
+
func = dataTypeExpression;
|
8794 |
+
dataTypeExpression = "*";
|
8795 |
+
}
|
8796 |
Â
|
8797 |
+
var dataType,
|
8798 |
+
i = 0,
|
8799 |
+
dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
8800 |
Â
|
8801 |
+
if ( isFunction( func ) ) {
|
8802 |
Â
|
8803 |
+
// For each dataType in the dataTypeExpression
|
8804 |
+
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
8805 |
Â
|
8806 |
+
// Prepend if requested
|
8807 |
+
if ( dataType[ 0 ] === "+" ) {
|
8808 |
+
dataType = dataType.slice( 1 ) || "*";
|
8809 |
+
( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
8810 |
Â
|
8811 |
+
// Otherwise append
|
8812 |
+
} else {
|
8813 |
+
( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
|
Â
|
|
8814 |
Â
}
|
8815 |
Â
}
|
8816 |
+
}
|
8817 |
+
};
|
8818 |
+
}
|
Â
|
|
Â
|
|
8819 |
Â
|
8820 |
+
// Base inspection function for prefilters and transports
|
8821 |
+
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
8822 |
Â
|
8823 |
+
var inspected = {},
|
8824 |
+
seekingTransport = ( structure === transports );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8825 |
Â
|
8826 |
+
function inspect( dataType ) {
|
8827 |
+
var selected;
|
8828 |
+
inspected[ dataType ] = true;
|
8829 |
+
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
8830 |
+
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
8831 |
+
if ( typeof dataTypeOrTransport === "string" &&
|
8832 |
+
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
Â
|
|
Â
|
|
8833 |
Â
|
8834 |
+
options.dataTypes.unshift( dataTypeOrTransport );
|
8835 |
+
inspect( dataTypeOrTransport );
|
8836 |
+
return false;
|
8837 |
+
} else if ( seekingTransport ) {
|
8838 |
+
return !( selected = dataTypeOrTransport );
|
8839 |
+
}
|
8840 |
+
} );
|
8841 |
+
return selected;
|
8842 |
Â
}
|
8843 |
Â
|
8844 |
+
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
8845 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8846 |
Â
|
8847 |
+
// A special extend for ajax options
|
8848 |
+
// that takes "flat" options (not to be deep extended)
|
8849 |
+
// Fixes #9887
|
8850 |
+
function ajaxExtend( target, src ) {
|
8851 |
+
var key, deep,
|
8852 |
+
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
Â
|
|
Â
|
|
8853 |
Â
|
8854 |
+
for ( key in src ) {
|
8855 |
+
if ( src[ key ] !== undefined ) {
|
8856 |
+
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
|
8857 |
+
}
|
8858 |
+
}
|
8859 |
+
if ( deep ) {
|
8860 |
+
jQuery.extend( true, target, deep );
|
8861 |
Â
}
|
8862 |
Â
|
8863 |
+
return target;
|
8864 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
8865 |
Â
|
8866 |
+
/* Handles responses to an ajax request:
|
8867 |
+
* - finds the right dataType (mediates between content-type and expected dataType)
|
8868 |
+
* - returns the corresponding response
|
8869 |
+
*/
|
8870 |
+
function ajaxHandleResponses( s, jqXHR, responses ) {
|
8871 |
Â
|
8872 |
+
var ct, type, finalDataType, firstDataType,
|
8873 |
+
contents = s.contents,
|
8874 |
+
dataTypes = s.dataTypes;
|
8875 |
+
|
8876 |
+
// Remove auto dataType and get content-type in the process
|
8877 |
+
while ( dataTypes[ 0 ] === "*" ) {
|
8878 |
+
dataTypes.shift();
|
8879 |
+
if ( ct === undefined ) {
|
8880 |
+
ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
|
8881 |
Â
}
|
8882 |
+
}
|
8883 |
Â
|
8884 |
+
// Check if we're dealing with a known content-type
|
8885 |
+
if ( ct ) {
|
8886 |
+
for ( type in contents ) {
|
8887 |
+
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
8888 |
+
dataTypes.unshift( type );
|
8889 |
+
break;
|
Â
|
|
8890 |
Â
}
|
8891 |
Â
}
|
8892 |
+
}
|
8893 |
Â
|
8894 |
+
// Check to see if we have a response for the expected dataType
|
8895 |
+
if ( dataTypes[ 0 ] in responses ) {
|
8896 |
+
finalDataType = dataTypes[ 0 ];
|
8897 |
+
} else {
|
8898 |
Â
|
8899 |
+
// Try convertible dataTypes
|
8900 |
+
for ( type in responses ) {
|
8901 |
+
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
8902 |
+
finalDataType = type;
|
8903 |
+
break;
|
8904 |
+
}
|
8905 |
+
if ( !firstDataType ) {
|
8906 |
+
firstDataType = type;
|
Â
|
|
8907 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
8908 |
Â
}
|
8909 |
Â
|
8910 |
+
// Or just use first one
|
8911 |
+
finalDataType = finalDataType || firstDataType;
|
8912 |
+
}
|
8913 |
+
|
8914 |
+
// If we found a dataType
|
8915 |
+
// We add the dataType to the list if needed
|
8916 |
+
// and return the corresponding response
|
8917 |
+
if ( finalDataType ) {
|
8918 |
+
if ( finalDataType !== dataTypes[ 0 ] ) {
|
8919 |
+
dataTypes.unshift( finalDataType );
|
8920 |
Â
}
|
8921 |
+
return responses[ finalDataType ];
|
8922 |
Â
}
|
8923 |
+
}
|
8924 |
Â
|
8925 |
+
/* Chain conversions given the request and the original response
|
8926 |
+
* Also sets the responseXXX fields on the jqXHR instance
|
8927 |
+
*/
|
8928 |
+
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
8929 |
+
var conv2, current, conv, tmp, prev,
|
8930 |
+
converters = {},
|
8931 |
Â
|
8932 |
+
// Work with a copy of dataTypes in case we need to modify it for conversion
|
8933 |
+
dataTypes = s.dataTypes.slice();
|
8934 |
Â
|
8935 |
+
// Create converters map with lowercased keys
|
8936 |
+
if ( dataTypes[ 1 ] ) {
|
8937 |
+
for ( conv in s.converters ) {
|
8938 |
+
converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
Â
|
|
8939 |
Â
}
|
8940 |
+
}
|
8941 |
Â
|
8942 |
+
current = dataTypes.shift();
|
8943 |
Â
|
8944 |
+
// Convert to each sequential dataType
|
8945 |
+
while ( current ) {
|
8946 |
Â
|
8947 |
+
if ( s.responseFields[ current ] ) {
|
8948 |
+
jqXHR[ s.responseFields[ current ] ] = response;
|
8949 |
+
}
|
8950 |
Â
|
8951 |
+
// Apply the dataFilter if provided
|
8952 |
+
if ( !prev && isSuccess && s.dataFilter ) {
|
8953 |
+
response = s.dataFilter( response, s.dataType );
|
8954 |
+
}
|
8955 |
Â
|
8956 |
+
prev = current;
|
8957 |
+
current = dataTypes.shift();
|
8958 |
Â
|
8959 |
+
if ( current ) {
|
8960 |
Â
|
8961 |
+
// There's only work to do if current dataType is non-auto
|
8962 |
+
if ( current === "*" ) {
|
8963 |
Â
|
8964 |
+
current = prev;
|
8965 |
Â
|
8966 |
+
// Convert response if prev dataType is non-auto and differs from current
|
8967 |
+
} else if ( prev !== "*" && prev !== current ) {
|
8968 |
Â
|
8969 |
+
// Seek a direct converter
|
8970 |
+
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
8971 |
Â
|
8972 |
+
// If none found, seek a pair
|
8973 |
+
if ( !conv ) {
|
8974 |
+
for ( conv2 in converters ) {
|
8975 |
Â
|
8976 |
+
// If conv2 outputs current
|
8977 |
+
tmp = conv2.split( " " );
|
8978 |
+
if ( tmp[ 1 ] === current ) {
|
8979 |
Â
|
8980 |
+
// If prev can be converted to accepted input
|
8981 |
+
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
8982 |
+
converters[ "* " + tmp[ 0 ] ];
|
8983 |
+
if ( conv ) {
|
8984 |
Â
|
8985 |
+
// Condense equivalence converters
|
8986 |
+
if ( conv === true ) {
|
8987 |
+
conv = converters[ conv2 ];
|
8988 |
Â
|
8989 |
+
// Otherwise, insert the intermediate dataType
|
8990 |
+
} else if ( converters[ conv2 ] !== true ) {
|
8991 |
+
current = tmp[ 0 ];
|
8992 |
+
dataTypes.unshift( tmp[ 1 ] );
|
Â
|
|
Â
|
|
8993 |
Â
}
|
8994 |
+
break;
|
8995 |
Â
}
|
8996 |
Â
}
|
8997 |
Â
}
|
8998 |
+
}
|
8999 |
Â
|
9000 |
+
// Apply converter (if not an equivalence)
|
9001 |
+
if ( conv !== true ) {
|
9002 |
Â
|
9003 |
+
// Unless errors are allowed to bubble, catch and return them
|
9004 |
+
if ( conv && s.throws ) {
|
9005 |
+
response = conv( response );
|
9006 |
+
} else {
|
9007 |
+
try {
|
9008 |
Â
response = conv( response );
|
9009 |
+
} catch ( e ) {
|
9010 |
+
return {
|
9011 |
+
state: "parsererror",
|
9012 |
+
error: conv ? e : "No conversion from " + prev + " to " + current
|
9013 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9014 |
Â
}
|
9015 |
Â
}
|
9016 |
Â
}
|
9017 |
Â
}
|
9018 |
Â
}
|
Â
|
|
Â
|
|
9019 |
Â
}
|
9020 |
Â
|
9021 |
+
return { state: "success", data: response };
|
9022 |
+
}
|
9023 |
+
|
9024 |
+
jQuery.extend( {
|
9025 |
+
|
9026 |
+
// Counter for holding the number of active queries
|
9027 |
+
active: 0,
|
9028 |
+
|
9029 |
+
// Last-Modified header cache for next request
|
9030 |
+
lastModified: {},
|
9031 |
+
etag: {},
|
9032 |
+
|
9033 |
+
ajaxSettings: {
|
9034 |
+
url: location.href,
|
9035 |
+
type: "GET",
|
9036 |
+
isLocal: rlocalProtocol.test( location.protocol ),
|
9037 |
+
global: true,
|
9038 |
+
processData: true,
|
9039 |
+
async: true,
|
9040 |
+
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
9041 |
+
|
9042 |
+
/*
|
9043 |
+
timeout: 0,
|
9044 |
+
data: null,
|
9045 |
+
dataType: null,
|
9046 |
+
username: null,
|
9047 |
+
password: null,
|
9048 |
+
cache: null,
|
9049 |
+
throws: false,
|
9050 |
+
traditional: false,
|
9051 |
+
headers: {},
|
9052 |
+
*/
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9053 |
Â
|
9054 |
+
accepts: {
|
9055 |
+
"*": allTypes,
|
9056 |
+
text: "text/plain",
|
9057 |
+
html: "text/html",
|
9058 |
+
xml: "application/xml, text/xml",
|
9059 |
+
json: "application/json, text/javascript"
|
9060 |
+
},
|
9061 |
Â
|
9062 |
+
contents: {
|
9063 |
+
xml: /\bxml\b/,
|
9064 |
+
html: /\bhtml/,
|
9065 |
+
json: /\bjson\b/
|
9066 |
+
},
|
9067 |
Â
|
9068 |
+
responseFields: {
|
9069 |
+
xml: "responseXML",
|
9070 |
+
text: "responseText",
|
9071 |
+
json: "responseJSON"
|
9072 |
+
},
|
9073 |
Â
|
9074 |
+
// Data converters
|
9075 |
+
// Keys separate source (or catchall "*") and destination types with a single space
|
9076 |
+
converters: {
|
9077 |
Â
|
9078 |
+
// Convert anything to text
|
9079 |
+
"* text": String,
|
9080 |
Â
|
9081 |
+
// Text to html (true = no transformation)
|
9082 |
+
"text html": true,
|
9083 |
Â
|
9084 |
+
// Evaluate text as a json expression
|
9085 |
+
"text json": JSON.parse,
|
Â
|
|
9086 |
Â
|
9087 |
+
// Parse text as xml
|
9088 |
+
"text xml": jQuery.parseXML
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9089 |
Â
},
|
9090 |
Â
|
9091 |
+
// For options that shouldn't be deep extended:
|
9092 |
+
// you can add your own custom options here if
|
9093 |
+
// and when you create one that shouldn't be
|
9094 |
+
// deep extended (see ajaxExtend)
|
9095 |
+
flatOptions: {
|
9096 |
+
url: true,
|
9097 |
+
context: true
|
9098 |
+
}
|
9099 |
+
},
|
9100 |
Â
|
9101 |
+
// Creates a full fledged settings object into target
|
9102 |
+
// with both ajaxSettings and settings fields.
|
9103 |
+
// If target is omitted, writes into ajaxSettings.
|
9104 |
+
ajaxSetup: function( target, settings ) {
|
9105 |
+
return settings ?
|
9106 |
Â
|
9107 |
+
// Building a settings object
|
9108 |
+
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
Â
|
|
9109 |
Â
|
9110 |
+
// Extending ajaxSettings
|
9111 |
+
ajaxExtend( jQuery.ajaxSettings, target );
|
9112 |
+
},
|
9113 |
Â
|
9114 |
+
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
9115 |
+
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
9116 |
Â
|
9117 |
+
// Main method
|
9118 |
+
ajax: function( url, options ) {
|
Â
|
|
Â
|
|
Â
|
|
9119 |
Â
|
9120 |
+
// If url is an object, simulate pre-1.5 signature
|
9121 |
+
if ( typeof url === "object" ) {
|
9122 |
+
options = url;
|
9123 |
+
url = undefined;
|
9124 |
+
}
|
9125 |
Â
|
9126 |
+
// Force options to be an object
|
9127 |
+
options = options || {};
|
9128 |
Â
|
9129 |
+
var transport,
|
Â
|
|
9130 |
Â
|
9131 |
+
// URL without anti-cache param
|
9132 |
+
cacheURL,
|
Â
|
|
9133 |
Â
|
9134 |
+
// Response headers
|
9135 |
+
responseHeadersString,
|
9136 |
+
responseHeaders,
|
9137 |
Â
|
9138 |
+
// timeout handle
|
9139 |
+
timeoutTimer,
|
9140 |
Â
|
9141 |
+
// Url cleanup var
|
9142 |
+
urlAnchor,
|
9143 |
Â
|
9144 |
+
// Request state (becomes false upon send and true upon completion)
|
9145 |
+
completed,
|
9146 |
Â
|
9147 |
+
// To know if global events are to be dispatched
|
9148 |
+
fireGlobals,
|
9149 |
Â
|
9150 |
+
// Loop variable
|
9151 |
+
i,
|
9152 |
Â
|
9153 |
+
// uncached part of the url
|
9154 |
+
uncached,
|
9155 |
Â
|
9156 |
+
// Create the final options object
|
9157 |
+
s = jQuery.ajaxSetup( {}, options ),
|
9158 |
Â
|
9159 |
+
// Callbacks context
|
9160 |
+
callbackContext = s.context || s,
|
Â
|
|
Â
|
|
Â
|
|
9161 |
Â
|
9162 |
+
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
9163 |
+
globalEventContext = s.context &&
|
9164 |
+
( callbackContext.nodeType || callbackContext.jquery ) ?
|
9165 |
+
jQuery( callbackContext ) :
|
9166 |
+
jQuery.event,
|
9167 |
Â
|
9168 |
+
// Deferreds
|
9169 |
+
deferred = jQuery.Deferred(),
|
9170 |
+
completeDeferred = jQuery.Callbacks( "once memory" ),
|
9171 |
Â
|
9172 |
+
// Status-dependent callbacks
|
9173 |
+
statusCode = s.statusCode || {},
|
Â
|
|
9174 |
Â
|
9175 |
+
// Headers (they are sent all at once)
|
9176 |
+
requestHeaders = {},
|
9177 |
+
requestHeadersNames = {},
|
9178 |
Â
|
9179 |
+
// Default abort message
|
9180 |
+
strAbort = "canceled",
|
Â
|
|
9181 |
Â
|
9182 |
+
// Fake xhr
|
9183 |
+
jqXHR = {
|
9184 |
+
readyState: 0,
|
9185 |
+
|
9186 |
+
// Builds headers hashtable if needed
|
9187 |
+
getResponseHeader: function( key ) {
|
9188 |
+
var match;
|
9189 |
+
if ( completed ) {
|
9190 |
+
if ( !responseHeaders ) {
|
9191 |
+
responseHeaders = {};
|
9192 |
+
while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
9193 |
+
responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
|
9194 |
Â
}
|
Â
|
|
9195 |
Â
}
|
9196 |
+
match = responseHeaders[ key.toLowerCase() ];
|
9197 |
+
}
|
9198 |
+
return match == null ? null : match;
|
9199 |
+
},
|
9200 |
Â
|
9201 |
+
// Raw string
|
9202 |
+
getAllResponseHeaders: function() {
|
9203 |
+
return completed ? responseHeadersString : null;
|
9204 |
+
},
|
9205 |
Â
|
9206 |
+
// Caches the header
|
9207 |
+
setRequestHeader: function( name, value ) {
|
9208 |
+
if ( completed == null ) {
|
9209 |
+
name = requestHeadersNames[ name.toLowerCase() ] =
|
9210 |
+
requestHeadersNames[ name.toLowerCase() ] || name;
|
9211 |
+
requestHeaders[ name ] = value;
|
9212 |
+
}
|
9213 |
+
return this;
|
9214 |
+
},
|
9215 |
Â
|
9216 |
+
// Overrides response content-type header
|
9217 |
+
overrideMimeType: function( type ) {
|
9218 |
+
if ( completed == null ) {
|
9219 |
+
s.mimeType = type;
|
9220 |
+
}
|
9221 |
+
return this;
|
9222 |
+
},
|
9223 |
Â
|
9224 |
+
// Status-dependent callbacks
|
9225 |
+
statusCode: function( map ) {
|
9226 |
+
var code;
|
9227 |
+
if ( map ) {
|
9228 |
+
if ( completed ) {
|
9229 |
Â
|
9230 |
+
// Execute the appropriate callbacks
|
9231 |
+
jqXHR.always( map[ jqXHR.status ] );
|
9232 |
+
} else {
|
9233 |
Â
|
9234 |
+
// Lazy-add the new callbacks in a way that preserves old ones
|
9235 |
+
for ( code in map ) {
|
9236 |
+
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
Â
|
|
9237 |
Â
}
|
9238 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9239 |
Â
}
|
9240 |
+
return this;
|
9241 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9242 |
Â
|
9243 |
+
// Cancel the request
|
9244 |
+
abort: function( statusText ) {
|
9245 |
+
var finalText = statusText || strAbort;
|
9246 |
+
if ( transport ) {
|
9247 |
+
transport.abort( finalText );
|
9248 |
+
}
|
9249 |
+
done( 0, finalText );
|
9250 |
+
return this;
|
9251 |
+
}
|
9252 |
+
};
|
9253 |
Â
|
9254 |
+
// Attach deferreds
|
9255 |
+
deferred.promise( jqXHR );
|
9256 |
Â
|
9257 |
+
// Add protocol if not provided (prefilters might expect it)
|
9258 |
+
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
9259 |
+
// We also use the url parameter if available
|
9260 |
+
s.url = ( ( url || s.url || location.href ) + "" )
|
9261 |
+
.replace( rprotocol, location.protocol + "//" );
|
9262 |
Â
|
9263 |
+
// Alias method option to type as per ticket #12004
|
9264 |
+
s.type = options.method || options.type || s.method || s.type;
|
Â
|
|
Â
|
|
Â
|
|
9265 |
Â
|
9266 |
+
// Extract dataTypes list
|
9267 |
+
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9268 |
Â
|
9269 |
+
// A cross-domain request is in order when the origin doesn't match the current origin.
|
9270 |
+
if ( s.crossDomain == null ) {
|
9271 |
+
urlAnchor = document.createElement( "a" );
|
Â
|
|
Â
|
|
9272 |
Â
|
9273 |
+
// Support: IE <=8 - 11, Edge 12 - 15
|
9274 |
+
// IE throws exception on accessing the href property if url is malformed,
|
9275 |
+
// e.g. http://example.com:80x/
|
9276 |
+
try {
|
9277 |
+
urlAnchor.href = s.url;
|
9278 |
Â
|
9279 |
+
// Support: IE <=8 - 11 only
|
9280 |
+
// Anchor's host property isn't correctly set when s.url is relative
|
9281 |
+
urlAnchor.href = urlAnchor.href;
|
9282 |
+
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
9283 |
+
urlAnchor.protocol + "//" + urlAnchor.host;
|
9284 |
+
} catch ( e ) {
|
9285 |
Â
|
9286 |
+
// If there is an error parsing the URL, assume it is crossDomain,
|
9287 |
+
// it can be rejected by the transport if it is invalid
|
9288 |
+
s.crossDomain = true;
|
9289 |
Â
}
|
9290 |
+
}
|
9291 |
Â
|
9292 |
+
// Convert data if not already a string
|
9293 |
+
if ( s.data && s.processData && typeof s.data !== "string" ) {
|
9294 |
+
s.data = jQuery.param( s.data, s.traditional );
|
9295 |
+
}
|
9296 |
Â
|
9297 |
+
// Apply prefilters
|
9298 |
+
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
Â
|
|
Â
|
|
9299 |
Â
|
9300 |
+
// If request was aborted inside a prefilter, stop there
|
9301 |
+
if ( completed ) {
|
9302 |
+
return jqXHR;
|
9303 |
+
}
|
9304 |
Â
|
9305 |
+
// We can fire global events as of now if asked to
|
9306 |
+
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
9307 |
+
fireGlobals = jQuery.event && s.global;
|
9308 |
Â
|
9309 |
+
// Watch for a new set of requests
|
9310 |
+
if ( fireGlobals && jQuery.active++ === 0 ) {
|
9311 |
+
jQuery.event.trigger( "ajaxStart" );
|
9312 |
+
}
|
9313 |
Â
|
9314 |
+
// Uppercase the type
|
9315 |
+
s.type = s.type.toUpperCase();
|
9316 |
Â
|
9317 |
+
// Determine if request has content
|
9318 |
+
s.hasContent = !rnoContent.test( s.type );
|
9319 |
Â
|
9320 |
+
// Save the URL in case we're toying with the If-Modified-Since
|
9321 |
+
// and/or If-None-Match header later on
|
9322 |
+
// Remove hash to simplify url manipulation
|
9323 |
+
cacheURL = s.url.replace( rhash, "" );
|
9324 |
Â
|
9325 |
+
// More options handling for requests with no content
|
9326 |
+
if ( !s.hasContent ) {
|
Â
|
|
9327 |
Â
|
9328 |
+
// Remember the hash so we can put it back
|
9329 |
+
uncached = s.url.slice( cacheURL.length );
|
Â
|
|
Â
|
|
Â
|
|
9330 |
Â
|
9331 |
+
// If data is available and should be processed, append data to url
|
9332 |
+
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
|
9333 |
+
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
9334 |
Â
|
9335 |
+
// #9682: remove data so that it's not used in an eventual retry
|
9336 |
+
delete s.data;
|
Â
|
|
Â
|
|
9337 |
Â
}
|
9338 |
Â
|
9339 |
+
// Add or update anti-cache param if needed
|
9340 |
+
if ( s.cache === false ) {
|
9341 |
+
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
9342 |
+
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9343 |
Â
}
|
9344 |
Â
|
9345 |
+
// Put hash and anti-cache on the URL that will be requested (gh-1732)
|
9346 |
+
s.url = cacheURL + uncached;
|
Â
|
|
Â
|
|
9347 |
Â
|
9348 |
+
// Change '%20' to '+' if this is encoded form body content (gh-2658)
|
9349 |
+
} else if ( s.data && s.processData &&
|
9350 |
+
( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
|
9351 |
+
s.data = s.data.replace( r20, "+" );
|
9352 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
9353 |
Â
|
9354 |
+
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
9355 |
+
if ( s.ifModified ) {
|
9356 |
+
if ( jQuery.lastModified[ cacheURL ] ) {
|
9357 |
+
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
9358 |
+
}
|
9359 |
+
if ( jQuery.etag[ cacheURL ] ) {
|
9360 |
+
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
9361 |
Â
}
|
9362 |
+
}
|
9363 |
Â
|
9364 |
+
// Set the correct header, if data is being sent
|
9365 |
+
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
9366 |
+
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
9367 |
+
}
|
9368 |
Â
|
9369 |
+
// Set the Accepts header for the server, depending on the dataType
|
9370 |
+
jqXHR.setRequestHeader(
|
9371 |
+
"Accept",
|
9372 |
+
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
9373 |
+
s.accepts[ s.dataTypes[ 0 ] ] +
|
9374 |
+
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
9375 |
+
s.accepts[ "*" ]
|
9376 |
+
);
|
9377 |
Â
|
9378 |
+
// Check for headers option
|
9379 |
+
for ( i in s.headers ) {
|
9380 |
+
jqXHR.setRequestHeader( i, s.headers[ i ] );
|
9381 |
+
}
|
9382 |
Â
|
9383 |
+
// Allow custom headers/mimetypes and early abort
|
9384 |
+
if ( s.beforeSend &&
|
9385 |
+
( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
|
Â
|
|
9386 |
Â
|
9387 |
+
// Abort if not done already and return
|
9388 |
+
return jqXHR.abort();
|
9389 |
+
}
|
9390 |
Â
|
9391 |
+
// Aborting is no longer a cancellation
|
9392 |
+
strAbort = "abort";
|
Â
|
|
Â
|
|
Â
|
|
9393 |
Â
|
9394 |
+
// Install callbacks on deferreds
|
9395 |
+
completeDeferred.add( s.complete );
|
9396 |
+
jqXHR.done( s.success );
|
9397 |
+
jqXHR.fail( s.error );
|
9398 |
Â
|
9399 |
+
// Get transport
|
9400 |
+
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
Â
|
|
Â
|
|
9401 |
Â
|
9402 |
+
// If no transport, we auto-abort
|
9403 |
+
if ( !transport ) {
|
9404 |
+
done( -1, "No Transport" );
|
9405 |
+
} else {
|
9406 |
+
jqXHR.readyState = 1;
|
Â
|
|
9407 |
Â
|
9408 |
+
// Send global event
|
9409 |
+
if ( fireGlobals ) {
|
9410 |
+
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
9411 |
+
}
|
9412 |
Â
|
9413 |
+
// If request was aborted inside ajaxSend, stop there
|
9414 |
+
if ( completed ) {
|
9415 |
+
return jqXHR;
|
9416 |
+
}
|
9417 |
Â
|
9418 |
+
// Timeout
|
9419 |
+
if ( s.async && s.timeout > 0 ) {
|
9420 |
+
timeoutTimer = window.setTimeout( function() {
|
9421 |
+
jqXHR.abort( "timeout" );
|
9422 |
+
}, s.timeout );
|
9423 |
Â
}
|
9424 |
Â
|
9425 |
+
try {
|
9426 |
+
completed = false;
|
9427 |
+
transport.send( requestHeaders, done );
|
9428 |
+
} catch ( e ) {
|
9429 |
Â
|
9430 |
+
// Rethrow post-completion exceptions
|
9431 |
Â
if ( completed ) {
|
9432 |
+
throw e;
|
9433 |
Â
}
|
9434 |
Â
|
9435 |
+
// Propagate others as results
|
9436 |
+
done( -1, e );
|
9437 |
+
}
|
9438 |
+
}
|
9439 |
Â
|
9440 |
+
// Callback for when everything is done
|
9441 |
+
function done( status, nativeStatusText, responses, headers ) {
|
9442 |
+
var isSuccess, success, error, response, modified,
|
9443 |
+
statusText = nativeStatusText;
|
9444 |
Â
|
9445 |
+
// Ignore repeat invocations
|
9446 |
+
if ( completed ) {
|
9447 |
+
return;
|
9448 |
+
}
|
9449 |
Â
|
9450 |
+
completed = true;
|
Â
|
|
9451 |
Â
|
9452 |
+
// Clear timeout if it exists
|
9453 |
+
if ( timeoutTimer ) {
|
9454 |
+
window.clearTimeout( timeoutTimer );
|
9455 |
+
}
|
9456 |
Â
|
9457 |
+
// Dereference transport for early garbage collection
|
9458 |
+
// (no matter how long the jqXHR object will be used)
|
9459 |
+
transport = undefined;
|
9460 |
Â
|
9461 |
+
// Cache response headers
|
9462 |
+
responseHeadersString = headers || "";
|
Â
|
|
Â
|
|
9463 |
Â
|
9464 |
+
// Set readyState
|
9465 |
+
jqXHR.readyState = status > 0 ? 4 : 0;
|
9466 |
Â
|
9467 |
+
// Determine if successful
|
9468 |
+
isSuccess = status >= 200 && status < 300 || status === 304;
|
9469 |
Â
|
9470 |
+
// Get response data
|
9471 |
+
if ( responses ) {
|
9472 |
+
response = ajaxHandleResponses( s, jqXHR, responses );
|
9473 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9474 |
Â
|
9475 |
+
// Convert no matter what (that way responseXXX fields are always set)
|
9476 |
+
response = ajaxConvert( s, response, jqXHR, isSuccess );
|
Â
|
|
9477 |
Â
|
9478 |
+
// If successful, handle type chaining
|
9479 |
+
if ( isSuccess ) {
|
Â
|
|
9480 |
Â
|
9481 |
+
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
9482 |
+
if ( s.ifModified ) {
|
9483 |
+
modified = jqXHR.getResponseHeader( "Last-Modified" );
|
9484 |
+
if ( modified ) {
|
9485 |
+
jQuery.lastModified[ cacheURL ] = modified;
|
Â
|
|
9486 |
Â
}
|
9487 |
+
modified = jqXHR.getResponseHeader( "etag" );
|
9488 |
+
if ( modified ) {
|
9489 |
+
jQuery.etag[ cacheURL ] = modified;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9490 |
Â
}
|
9491 |
Â
}
|
9492 |
Â
|
9493 |
+
// if no content
|
9494 |
+
if ( status === 204 || s.type === "HEAD" ) {
|
9495 |
+
statusText = "nocontent";
|
9496 |
+
|
9497 |
+
// if not modified
|
9498 |
+
} else if ( status === 304 ) {
|
9499 |
+
statusText = "notmodified";
|
9500 |
Â
|
9501 |
+
// If we have data, let's convert it
|
Â
|
|
Â
|
|
9502 |
Â
} else {
|
9503 |
+
statusText = response.state;
|
9504 |
+
success = response.data;
|
9505 |
+
error = response.error;
|
9506 |
+
isSuccess = !error;
|
9507 |
Â
}
|
9508 |
+
} else {
|
9509 |
Â
|
9510 |
+
// Extract error from statusText and normalize for non-aborts
|
9511 |
+
error = statusText;
|
9512 |
+
if ( status || !statusText ) {
|
9513 |
+
statusText = "error";
|
9514 |
+
if ( status < 0 ) {
|
9515 |
+
status = 0;
|
9516 |
+
}
|
9517 |
Â
}
|
9518 |
+
}
|
9519 |
Â
|
9520 |
+
// Set data for the fake xhr object
|
9521 |
+
jqXHR.status = status;
|
9522 |
+
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
Â
|
|
Â
|
|
9523 |
Â
|
9524 |
+
// Success/Error
|
9525 |
+
if ( isSuccess ) {
|
9526 |
+
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
9527 |
+
} else {
|
9528 |
+
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
9529 |
Â
}
|
9530 |
Â
|
9531 |
+
// Status-dependent callbacks
|
9532 |
+
jqXHR.statusCode( statusCode );
|
9533 |
+
statusCode = undefined;
|
9534 |
Â
|
9535 |
+
if ( fireGlobals ) {
|
9536 |
+
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
9537 |
+
[ jqXHR, s, isSuccess ? success : error ] );
|
9538 |
+
}
|
9539 |
Â
|
9540 |
+
// Complete
|
9541 |
+
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
Â
|
|
Â
|
|
9542 |
Â
|
9543 |
+
if ( fireGlobals ) {
|
9544 |
+
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
9545 |
Â
|
9546 |
+
// Handle the global AJAX counter
|
9547 |
+
if ( !( --jQuery.active ) ) {
|
9548 |
+
jQuery.event.trigger( "ajaxStop" );
|
9549 |
+
}
|
Â
|
|
9550 |
Â
}
|
9551 |
+
}
|
9552 |
Â
|
9553 |
+
return jqXHR;
|
9554 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9555 |
Â
|
9556 |
+
getJSON: function( url, data, callback ) {
|
9557 |
+
return jQuery.get( url, data, callback, "json" );
|
9558 |
+
},
|
9559 |
Â
|
9560 |
+
getScript: function( url, callback ) {
|
9561 |
+
return jQuery.get( url, undefined, callback, "script" );
|
9562 |
+
}
|
9563 |
+
} );
|
9564 |
Â
|
9565 |
+
jQuery.each( [ "get", "post" ], function( i, method ) {
|
9566 |
+
jQuery[ method ] = function( url, data, callback, type ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9567 |
Â
|
9568 |
+
// Shift arguments if data argument was omitted
|
9569 |
+
if ( isFunction( data ) ) {
|
9570 |
+
type = type || callback;
|
9571 |
+
callback = data;
|
9572 |
+
data = undefined;
|
9573 |
+
}
|
9574 |
Â
|
9575 |
+
// The url can be an options object (which then must have .url)
|
9576 |
+
return jQuery.ajax( jQuery.extend( {
|
9577 |
+
url: url,
|
9578 |
+
type: method,
|
9579 |
+
dataType: type,
|
9580 |
+
data: data,
|
9581 |
+
success: callback
|
9582 |
+
}, jQuery.isPlainObject( url ) && url ) );
|
9583 |
+
};
|
9584 |
+
} );
|
9585 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9586 |
Â
|
9587 |
+
jQuery._evalUrl = function( url ) {
|
9588 |
+
return jQuery.ajax( {
|
9589 |
+
url: url,
|
9590 |
Â
|
9591 |
+
// Make this explicit, since user can override this through ajaxSetup (#11264)
|
9592 |
+
type: "GET",
|
9593 |
+
dataType: "script",
|
9594 |
+
cache: true,
|
9595 |
+
async: false,
|
9596 |
+
global: false,
|
9597 |
+
"throws": true
|
9598 |
+
} );
|
9599 |
+
};
|
9600 |
Â
|
Â
|
|
Â
|
|
9601 |
Â
|
9602 |
+
jQuery.fn.extend( {
|
9603 |
+
wrapAll: function( html ) {
|
9604 |
+
var wrap;
|
9605 |
Â
|
9606 |
+
if ( this[ 0 ] ) {
|
9607 |
+
if ( isFunction( html ) ) {
|
9608 |
+
html = html.call( this[ 0 ] );
|
9609 |
Â
}
|
9610 |
Â
|
9611 |
+
// The elements to wrap the target around
|
9612 |
+
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
9613 |
Â
|
9614 |
+
if ( this[ 0 ].parentNode ) {
|
9615 |
+
wrap.insertBefore( this[ 0 ] );
|
Â
|
|
Â
|
|
Â
|
|
9616 |
Â
}
|
9617 |
Â
|
9618 |
+
wrap.map( function() {
|
9619 |
+
var elem = this;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9620 |
Â
|
9621 |
+
while ( elem.firstElementChild ) {
|
9622 |
+
elem = elem.firstElementChild;
|
9623 |
Â
}
|
Â
|
|
Â
|
|
9624 |
Â
|
9625 |
+
return elem;
|
9626 |
+
} ).append( this );
|
9627 |
+
}
|
9628 |
Â
|
9629 |
+
return this;
|
9630 |
+
},
|
Â
|
|
Â
|
|
9631 |
Â
|
9632 |
+
wrapInner: function( html ) {
|
9633 |
+
if ( isFunction( html ) ) {
|
9634 |
+
return this.each( function( i ) {
|
9635 |
+
jQuery( this ).wrapInner( html.call( this, i ) );
|
9636 |
Â
} );
|
Â
|
|
9637 |
Â
}
|
Â
|
|
9638 |
Â
|
9639 |
+
return this.each( function() {
|
9640 |
+
var self = jQuery( this ),
|
9641 |
+
contents = self.contents();
|
9642 |
Â
|
9643 |
+
if ( contents.length ) {
|
9644 |
+
contents.wrapAll( html );
|
9645 |
+
|
9646 |
+
} else {
|
9647 |
+
self.append( html );
|
9648 |
+
}
|
9649 |
+
} );
|
9650 |
+
},
|
9651 |
Â
|
9652 |
+
wrap: function( html ) {
|
9653 |
+
var htmlIsFunction = isFunction( html );
|
9654 |
Â
|
9655 |
+
return this.each( function( i ) {
|
9656 |
+
jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
|
9657 |
+
} );
|
9658 |
+
},
|
9659 |
Â
|
9660 |
+
unwrap: function( selector ) {
|
9661 |
+
this.parent( selector ).not( "body" ).each( function() {
|
9662 |
+
jQuery( this ).replaceWith( this.childNodes );
|
9663 |
+
} );
|
9664 |
+
return this;
|
9665 |
+
}
|
9666 |
+
} );
|
9667 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9668 |
Â
|
9669 |
+
jQuery.expr.pseudos.hidden = function( elem ) {
|
9670 |
+
return !jQuery.expr.pseudos.visible( elem );
|
9671 |
+
};
|
9672 |
+
jQuery.expr.pseudos.visible = function( elem ) {
|
9673 |
+
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
9674 |
+
};
|
9675 |
Â
|
Â
|
|
Â
|
|
9676 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9677 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9678 |
Â
|
9679 |
+
jQuery.ajaxSettings.xhr = function() {
|
9680 |
+
try {
|
9681 |
+
return new window.XMLHttpRequest();
|
9682 |
+
} catch ( e ) {}
|
9683 |
+
};
|
9684 |
Â
|
9685 |
+
var xhrSuccessStatus = {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9686 |
Â
|
9687 |
+
// File protocol always yields status code 0, assume 200
|
9688 |
+
0: 200,
|
9689 |
+
|
9690 |
+
// Support: IE <=9 only
|
9691 |
+
// #1450: sometimes IE returns 1223 when it should be 204
|
9692 |
+
1223: 204
|
9693 |
+
},
|
9694 |
+
xhrSupported = jQuery.ajaxSettings.xhr();
|
9695 |
+
|
9696 |
+
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
9697 |
+
support.ajax = xhrSupported = !!xhrSupported;
|
9698 |
+
|
9699 |
+
jQuery.ajaxTransport( function( options ) {
|
9700 |
+
var callback, errorCallback;
|
9701 |
+
|
9702 |
+
// Cross domain only allowed if supported through XMLHttpRequest
|
9703 |
+
if ( support.cors || xhrSupported && !options.crossDomain ) {
|
9704 |
+
return {
|
9705 |
+
send: function( headers, complete ) {
|
9706 |
+
var i,
|
9707 |
+
xhr = options.xhr();
|
9708 |
+
|
9709 |
+
xhr.open(
|
9710 |
+
options.type,
|
9711 |
+
options.url,
|
9712 |
+
options.async,
|
9713 |
+
options.username,
|
9714 |
+
options.password
|
9715 |
+
);
|
9716 |
+
|
9717 |
+
// Apply custom fields if provided
|
9718 |
+
if ( options.xhrFields ) {
|
9719 |
+
for ( i in options.xhrFields ) {
|
9720 |
+
xhr[ i ] = options.xhrFields[ i ];
|
9721 |
Â
}
|
9722 |
+
}
|
9723 |
Â
|
9724 |
+
// Override mime type if needed
|
9725 |
+
if ( options.mimeType && xhr.overrideMimeType ) {
|
9726 |
+
xhr.overrideMimeType( options.mimeType );
|
9727 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
9728 |
Â
|
9729 |
+
// X-Requested-With header
|
9730 |
+
// For cross-domain requests, seeing as conditions for a preflight are
|
9731 |
+
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
9732 |
+
// (it can always be set on a per-request basis or even using ajaxSetup)
|
9733 |
+
// For same-domain requests, won't change header if already provided.
|
9734 |
+
if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
|
9735 |
+
headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
9736 |
+
}
|
9737 |
Â
|
9738 |
+
// Set headers
|
9739 |
+
for ( i in headers ) {
|
9740 |
+
xhr.setRequestHeader( i, headers[ i ] );
|
9741 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
9742 |
Â
|
9743 |
+
// Callback
|
9744 |
+
callback = function( type ) {
|
9745 |
+
return function() {
|
9746 |
+
if ( callback ) {
|
9747 |
+
callback = errorCallback = xhr.onload =
|
9748 |
+
xhr.onerror = xhr.onabort = xhr.ontimeout =
|
9749 |
+
xhr.onreadystatechange = null;
|
9750 |
+
|
9751 |
+
if ( type === "abort" ) {
|
9752 |
+
xhr.abort();
|
9753 |
+
} else if ( type === "error" ) {
|
9754 |
+
|
9755 |
+
// Support: IE <=9 only
|
9756 |
+
// On a manual native abort, IE9 throws
|
9757 |
+
// errors on any property access that is not readyState
|
9758 |
+
if ( typeof xhr.status !== "number" ) {
|
9759 |
+
complete( 0, "error" );
|
9760 |
Â
} else {
|
9761 |
Â
complete(
|
9762 |
+
|
9763 |
+
// File: protocol always yields status 0; see #8605, #14207
|
9764 |
+
xhr.status,
|
9765 |
+
xhr.statusText
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9766 |
Â
);
|
9767 |
Â
}
|
9768 |
+
} else {
|
9769 |
+
complete(
|
9770 |
+
xhrSuccessStatus[ xhr.status ] || xhr.status,
|
9771 |
+
xhr.statusText,
|
9772 |
+
|
9773 |
+
// Support: IE <=9 only
|
9774 |
+
// IE9 has no XHR2 but throws on binary (trac-11426)
|
9775 |
+
// For XHR2 non-text, let the caller handle it (gh-2498)
|
9776 |
+
( xhr.responseType || "text" ) !== "text" ||
|
9777 |
+
typeof xhr.responseText !== "string" ?
|
9778 |
+
{ binary: xhr.response } :
|
9779 |
+
{ text: xhr.responseText },
|
9780 |
+
xhr.getAllResponseHeaders()
|
9781 |
+
);
|
9782 |
Â
}
|
9783 |
+
}
|
9784 |
Â
};
|
9785 |
+
};
|
9786 |
Â
|
9787 |
+
// Listen to events
|
9788 |
+
xhr.onload = callback();
|
9789 |
+
errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9790 |
Â
|
9791 |
+
// Support: IE 9 only
|
9792 |
+
// Use onreadystatechange to replace onabort
|
9793 |
+
// to handle uncaught aborts
|
9794 |
+
if ( xhr.onabort !== undefined ) {
|
9795 |
+
xhr.onabort = errorCallback;
|
9796 |
+
} else {
|
9797 |
+
xhr.onreadystatechange = function() {
|
9798 |
+
|
9799 |
+
// Check readyState before timeout as it changes
|
9800 |
+
if ( xhr.readyState === 4 ) {
|
9801 |
+
|
9802 |
+
// Allow onerror to be called first,
|
9803 |
+
// but that will not handle a native abort
|
9804 |
+
// Also, save errorCallback to a variable
|
9805 |
+
// as xhr.onerror cannot be accessed
|
9806 |
+
window.setTimeout( function() {
|
9807 |
+
if ( callback ) {
|
9808 |
+
errorCallback();
|
9809 |
+
}
|
9810 |
+
} );
|
9811 |
+
}
|
9812 |
+
};
|
9813 |
+
}
|
9814 |
Â
|
9815 |
+
// Create the abort callback
|
9816 |
+
callback = callback( "abort" );
|
9817 |
Â
|
9818 |
+
try {
|
Â
|
|
Â
|
|
9819 |
Â
|
9820 |
+
// Do send the request (this may raise an exception)
|
9821 |
+
xhr.send( options.hasContent && options.data || null );
|
9822 |
+
} catch ( e ) {
|
Â
|
|
Â
|
|
Â
|
|
9823 |
Â
|
9824 |
+
// #14683: Only rethrow if this hasn't been notified as an error yet
|
9825 |
Â
if ( callback ) {
|
9826 |
+
throw e;
|
9827 |
Â
}
|
9828 |
Â
}
|
9829 |
+
},
|
Â
|
|
Â
|
|
9830 |
Â
|
9831 |
+
abort: function() {
|
9832 |
+
if ( callback ) {
|
9833 |
+
callback();
|
9834 |
+
}
|
9835 |
+
}
|
9836 |
+
};
|
9837 |
+
}
|
9838 |
+
} );
|
9839 |
Â
|
9840 |
Â
|
9841 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9842 |
Â
|
9843 |
+
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
|
9844 |
+
jQuery.ajaxPrefilter( function( s ) {
|
9845 |
+
if ( s.crossDomain ) {
|
9846 |
+
s.contents.script = false;
|
9847 |
+
}
|
9848 |
+
} );
|
9849 |
+
|
9850 |
+
// Install script dataType
|
9851 |
+
jQuery.ajaxSetup( {
|
9852 |
+
accepts: {
|
9853 |
+
script: "text/javascript, application/javascript, " +
|
9854 |
+
"application/ecmascript, application/x-ecmascript"
|
9855 |
+
},
|
9856 |
+
contents: {
|
9857 |
+
script: /\b(?:java|ecma)script\b/
|
9858 |
+
},
|
9859 |
+
converters: {
|
9860 |
+
"text script": function( text ) {
|
9861 |
+
jQuery.globalEval( text );
|
9862 |
+
return text;
|
9863 |
Â
}
|
9864 |
+
}
|
9865 |
+
} );
|
9866 |
Â
|
9867 |
+
// Handle cache's special case and crossDomain
|
9868 |
+
jQuery.ajaxPrefilter( "script", function( s ) {
|
9869 |
+
if ( s.cache === undefined ) {
|
9870 |
+
s.cache = false;
|
9871 |
+
}
|
9872 |
+
if ( s.crossDomain ) {
|
9873 |
+
s.type = "GET";
|
9874 |
+
}
|
9875 |
+
} );
|
9876 |
Â
|
9877 |
+
// Bind script tag hack transport
|
9878 |
+
jQuery.ajaxTransport( "script", function( s ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9879 |
Â
|
9880 |
+
// This transport only deals with cross domain requests
|
9881 |
+
if ( s.crossDomain ) {
|
9882 |
+
var script, callback;
|
9883 |
+
return {
|
9884 |
+
send: function( _, complete ) {
|
9885 |
+
script = jQuery( "<script>" ).prop( {
|
9886 |
+
charset: s.scriptCharset,
|
9887 |
+
src: s.url
|
9888 |
+
} ).on(
|
9889 |
+
"load error",
|
9890 |
+
callback = function( evt ) {
|
9891 |
+
script.remove();
|
9892 |
+
callback = null;
|
9893 |
+
if ( evt ) {
|
9894 |
+
complete( evt.type === "error" ? 404 : 200, evt.type );
|
9895 |
+
}
|
9896 |
Â
}
|
9897 |
+
);
|
Â
|
|
Â
|
|
Â
|
|
9898 |
Â
|
9899 |
+
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
9900 |
+
document.head.appendChild( script[ 0 ] );
|
9901 |
+
},
|
9902 |
+
abort: function() {
|
9903 |
+
if ( callback ) {
|
9904 |
+
callback();
|
9905 |
+
}
|
9906 |
+
}
|
9907 |
+
};
|
9908 |
+
}
|
9909 |
+
} );
|
9910 |
Â
|
9911 |
Â
|
9912 |
Â
|
Â
|
|
Â
|
|
9913 |
Â
|
9914 |
+
var oldCallbacks = [],
|
9915 |
+
rjsonp = /(=)\?(?=&|$)|\?\?/;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9916 |
Â
|
9917 |
+
// Default jsonp settings
|
9918 |
+
jQuery.ajaxSetup( {
|
9919 |
+
jsonp: "callback",
|
9920 |
+
jsonpCallback: function() {
|
9921 |
+
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
9922 |
+
this[ callback ] = true;
|
9923 |
+
return callback;
|
9924 |
+
}
|
9925 |
+
} );
|
9926 |
+
|
9927 |
+
// Detect, normalize options and install callbacks for jsonp requests
|
9928 |
+
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
9929 |
+
|
9930 |
+
var callbackName, overwritten, responseContainer,
|
9931 |
+
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
9932 |
+
"url" :
|
9933 |
+
typeof s.data === "string" &&
|
9934 |
+
( s.contentType || "" )
|
9935 |
+
.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
9936 |
+
rjsonp.test( s.data ) && "data"
|
9937 |
+
);
|
9938 |
Â
|
9939 |
+
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
9940 |
+
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9941 |
Â
|
9942 |
+
// Get callback name, remembering preexisting value associated with it
|
9943 |
+
callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
|
9944 |
+
s.jsonpCallback() :
|
9945 |
+
s.jsonpCallback;
|
9946 |
Â
|
9947 |
+
// Insert callback into url or form data
|
9948 |
+
if ( jsonProp ) {
|
9949 |
+
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
|
9950 |
+
} else if ( s.jsonp !== false ) {
|
9951 |
+
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
9952 |
+
}
|
9953 |
Â
|
9954 |
+
// Use data converter to retrieve json after script execution
|
9955 |
+
s.converters[ "script json" ] = function() {
|
9956 |
+
if ( !responseContainer ) {
|
9957 |
+
jQuery.error( callbackName + " was not called" );
|
Â
|
|
9958 |
Â
}
|
9959 |
+
return responseContainer[ 0 ];
|
9960 |
+
};
|
9961 |
Â
|
9962 |
+
// Force json dataType
|
9963 |
+
s.dataTypes[ 0 ] = "json";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
9964 |
Â
|
9965 |
+
// Install callback
|
9966 |
+
overwritten = window[ callbackName ];
|
9967 |
+
window[ callbackName ] = function() {
|
9968 |
+
responseContainer = arguments;
|
9969 |
+
};
|
9970 |
Â
|
9971 |
+
// Clean-up function (fires after converters)
|
9972 |
+
jqXHR.always( function() {
|
9973 |
Â
|
9974 |
+
// If previous value didn't exist - remove it
|
9975 |
+
if ( overwritten === undefined ) {
|
9976 |
+
jQuery( window ).removeProp( callbackName );
|
9977 |
Â
|
9978 |
+
// Otherwise restore preexisting value
|
9979 |
+
} else {
|
9980 |
+
window[ callbackName ] = overwritten;
|
9981 |
+
}
|
9982 |
Â
|
9983 |
+
// Save back as free
|
9984 |
+
if ( s[ callbackName ] ) {
|
9985 |
Â
|
9986 |
+
// Make sure that re-using the options doesn't screw things around
|
9987 |
+
s.jsonpCallback = originalSettings.jsonpCallback;
|
9988 |
Â
|
9989 |
+
// Save the callback name for future use
|
9990 |
+
oldCallbacks.push( callbackName );
|
9991 |
+
}
|
9992 |
Â
|
9993 |
+
// Call if it was a function and we have a response
|
9994 |
+
if ( responseContainer && isFunction( overwritten ) ) {
|
9995 |
+
overwritten( responseContainer[ 0 ] );
|
9996 |
+
}
|
9997 |
Â
|
9998 |
+
responseContainer = overwritten = undefined;
|
9999 |
+
} );
|
10000 |
Â
|
10001 |
+
// Delegate to script
|
10002 |
+
return "script";
|
10003 |
+
}
|
10004 |
+
} );
|
10005 |
Â
|
10006 |
Â
|
10007 |
Â
|
10008 |
Â
|
10009 |
+
// Support: Safari 8 only
|
10010 |
+
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
10011 |
+
// collapse sibling forms: the second one becomes a child of the first one.
|
10012 |
+
// Because of that, this security measure has to be disabled in Safari 8.
|
10013 |
+
// https://bugs.webkit.org/show_bug.cgi?id=137337
|
10014 |
+
support.createHTMLDocument = ( function() {
|
10015 |
+
var body = document.implementation.createHTMLDocument( "" ).body;
|
10016 |
+
body.innerHTML = "<form></form><form></form>";
|
10017 |
+
return body.childNodes.length === 2;
|
10018 |
+
} )();
|
10019 |
Â
|
10020 |
Â
|
10021 |
+
// Argument "data" should be string of html
|
10022 |
+
// context (optional): If specified, the fragment will be created in this context,
|
10023 |
+
// defaults to document
|
10024 |
+
// keepScripts (optional): If true, will include scripts passed in the html string
|
10025 |
+
jQuery.parseHTML = function( data, context, keepScripts ) {
|
10026 |
+
if ( typeof data !== "string" ) {
|
10027 |
+
return [];
|
10028 |
+
}
|
10029 |
+
if ( typeof context === "boolean" ) {
|
10030 |
+
keepScripts = context;
|
10031 |
+
context = false;
|
10032 |
+
}
|
10033 |
Â
|
10034 |
+
var base, parsed, scripts;
|
10035 |
Â
|
10036 |
+
if ( !context ) {
|
10037 |
Â
|
10038 |
+
// Stop scripts or inline event handlers from being executed immediately
|
10039 |
+
// by using document.implementation
|
10040 |
+
if ( support.createHTMLDocument ) {
|
10041 |
+
context = document.implementation.createHTMLDocument( "" );
|
10042 |
Â
|
10043 |
+
// Set the base href for the created document
|
10044 |
+
// so any parsed elements with URLs
|
10045 |
+
// are based on the document's URL (gh-2965)
|
10046 |
+
base = context.createElement( "base" );
|
10047 |
+
base.href = document.location.href;
|
10048 |
+
context.head.appendChild( base );
|
10049 |
+
} else {
|
10050 |
+
context = document;
|
Â
|
|
10051 |
Â
}
|
10052 |
+
}
|
10053 |
Â
|
10054 |
+
parsed = rsingleTag.exec( data );
|
10055 |
+
scripts = !keepScripts && [];
|
10056 |
Â
|
10057 |
+
// Single tag
|
10058 |
+
if ( parsed ) {
|
10059 |
+
return [ context.createElement( parsed[ 1 ] ) ];
|
10060 |
+
}
|
10061 |
Â
|
10062 |
+
parsed = buildFragment( [ data ], context, scripts );
|
10063 |
Â
|
10064 |
+
if ( scripts && scripts.length ) {
|
10065 |
+
jQuery( scripts ).remove();
|
10066 |
+
}
|
10067 |
Â
|
10068 |
+
return jQuery.merge( [], parsed.childNodes );
|
10069 |
+
};
|
10070 |
Â
|
10071 |
Â
|
10072 |
+
/**
|
10073 |
+
* Load a url into a page
|
10074 |
+
*/
|
10075 |
+
jQuery.fn.load = function( url, params, callback ) {
|
10076 |
+
var selector, type, response,
|
10077 |
+
self = this,
|
10078 |
+
off = url.indexOf( " " );
|
10079 |
Â
|
10080 |
+
if ( off > -1 ) {
|
10081 |
+
selector = stripAndCollapse( url.slice( off ) );
|
10082 |
+
url = url.slice( 0, off );
|
10083 |
+
}
|
10084 |
Â
|
10085 |
+
// If it's a function
|
10086 |
+
if ( isFunction( params ) ) {
|
10087 |
Â
|
10088 |
+
// We assume that it's the callback
|
10089 |
+
callback = params;
|
10090 |
+
params = undefined;
|
10091 |
Â
|
10092 |
+
// Otherwise, build a param string
|
10093 |
+
} else if ( params && typeof params === "object" ) {
|
10094 |
+
type = "POST";
|
10095 |
+
}
|
10096 |
Â
|
10097 |
+
// If we have elements to modify, make the request
|
10098 |
+
if ( self.length > 0 ) {
|
10099 |
+
jQuery.ajax( {
|
10100 |
+
url: url,
|
10101 |
Â
|
10102 |
+
// If "type" variable is undefined, then "GET" method will be used.
|
10103 |
+
// Make value of this field explicit since
|
10104 |
+
// user can override it through ajaxSetup method
|
10105 |
+
type: type || "GET",
|
10106 |
+
dataType: "html",
|
10107 |
+
data: params
|
10108 |
+
} ).done( function( responseText ) {
|
10109 |
Â
|
10110 |
+
// Save response for use in complete callback
|
10111 |
+
response = arguments;
|
10112 |
Â
|
10113 |
+
self.html( selector ?
|
10114 |
Â
|
10115 |
+
// If a selector was specified, locate the right elements in a dummy div
|
10116 |
+
// Exclude scripts to avoid IE 'Permission Denied' errors
|
10117 |
+
jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
|
10118 |
Â
|
10119 |
+
// Otherwise use the full result
|
10120 |
+
responseText );
|
10121 |
Â
|
10122 |
+
// If the request succeeds, this function gets "data", "status", "jqXHR"
|
10123 |
+
// but they are ignored because response was set above.
|
10124 |
+
// If it fails, this function gets "jqXHR", "status", "error"
|
10125 |
+
} ).always( callback && function( jqXHR, status ) {
|
10126 |
+
self.each( function() {
|
10127 |
+
callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
|
Â
|
|
10128 |
Â
} );
|
10129 |
+
} );
|
10130 |
+
}
|
10131 |
Â
|
10132 |
+
return this;
|
10133 |
+
};
|
10134 |
Â
|
10135 |
Â
|
10136 |
Â
|
10137 |
Â
|
10138 |
+
// Attach a bunch of functions for handling common AJAX events
|
10139 |
+
jQuery.each( [
|
10140 |
+
"ajaxStart",
|
10141 |
+
"ajaxStop",
|
10142 |
+
"ajaxComplete",
|
10143 |
+
"ajaxError",
|
10144 |
+
"ajaxSuccess",
|
10145 |
+
"ajaxSend"
|
10146 |
+
], function( i, type ) {
|
10147 |
+
jQuery.fn[ type ] = function( fn ) {
|
10148 |
+
return this.on( type, fn );
|
10149 |
+
};
|
10150 |
+
} );
|
10151 |
Â
|
10152 |
Â
|
10153 |
Â
|
10154 |
Â
|
10155 |
+
jQuery.expr.pseudos.animated = function( elem ) {
|
10156 |
+
return jQuery.grep( jQuery.timers, function( fn ) {
|
10157 |
+
return elem === fn.elem;
|
10158 |
+
} ).length;
|
10159 |
+
};
|
10160 |
Â
|
10161 |
Â
|
10162 |
Â
|
10163 |
Â
|
10164 |
+
jQuery.offset = {
|
10165 |
+
setOffset: function( elem, options, i ) {
|
10166 |
+
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
10167 |
+
position = jQuery.css( elem, "position" ),
|
10168 |
+
curElem = jQuery( elem ),
|
10169 |
+
props = {};
|
10170 |
Â
|
10171 |
+
// Set position first, in-case top/left are set even on static elem
|
10172 |
+
if ( position === "static" ) {
|
10173 |
+
elem.style.position = "relative";
|
10174 |
+
}
|
10175 |
Â
|
10176 |
+
curOffset = curElem.offset();
|
10177 |
+
curCSSTop = jQuery.css( elem, "top" );
|
10178 |
+
curCSSLeft = jQuery.css( elem, "left" );
|
10179 |
+
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
10180 |
+
( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
|
10181 |
Â
|
10182 |
+
// Need to be able to calculate position if either
|
10183 |
+
// top or left is auto and position is either absolute or fixed
|
10184 |
+
if ( calculatePosition ) {
|
10185 |
+
curPosition = curElem.position();
|
10186 |
+
curTop = curPosition.top;
|
10187 |
+
curLeft = curPosition.left;
|
10188 |
Â
|
10189 |
+
} else {
|
10190 |
+
curTop = parseFloat( curCSSTop ) || 0;
|
10191 |
+
curLeft = parseFloat( curCSSLeft ) || 0;
|
10192 |
+
}
|
10193 |
Â
|
10194 |
+
if ( isFunction( options ) ) {
|
10195 |
Â
|
10196 |
+
// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
|
10197 |
+
options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
|
10198 |
+
}
|
10199 |
Â
|
10200 |
+
if ( options.top != null ) {
|
10201 |
+
props.top = ( options.top - curOffset.top ) + curTop;
|
10202 |
+
}
|
10203 |
+
if ( options.left != null ) {
|
10204 |
+
props.left = ( options.left - curOffset.left ) + curLeft;
|
10205 |
+
}
|
10206 |
Â
|
10207 |
+
if ( "using" in options ) {
|
10208 |
+
options.using.call( elem, props );
|
10209 |
Â
|
10210 |
+
} else {
|
10211 |
+
curElem.css( props );
|
Â
|
|
10212 |
Â
}
|
10213 |
+
}
|
10214 |
+
};
|
Â
|
|
10215 |
Â
|
10216 |
+
jQuery.fn.extend( {
|
Â
|
|
10217 |
Â
|
10218 |
+
// offset() relates an element's border box to the document origin
|
10219 |
+
offset: function( options ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10220 |
Â
|
10221 |
+
// Preserve chaining for setter
|
10222 |
+
if ( arguments.length ) {
|
10223 |
+
return options === undefined ?
|
10224 |
+
this :
|
10225 |
+
this.each( function( i ) {
|
10226 |
+
jQuery.offset.setOffset( this, options, i );
|
10227 |
+
} );
|
10228 |
+
}
|
10229 |
Â
|
10230 |
+
var rect, win,
|
10231 |
+
elem = this[ 0 ];
|
Â
|
|
10232 |
Â
|
10233 |
+
if ( !elem ) {
|
10234 |
+
return;
|
10235 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10236 |
Â
|
10237 |
+
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
10238 |
+
// Support: IE <=11 only
|
10239 |
+
// Running getBoundingClientRect on a
|
10240 |
+
// disconnected node in IE throws an error
|
10241 |
+
if ( !elem.getClientRects().length ) {
|
10242 |
+
return { top: 0, left: 0 };
|
10243 |
+
}
|
Â
|
|
10244 |
Â
|
10245 |
+
// Get document-relative position by adding viewport scroll to viewport-relative gBCR
|
10246 |
+
rect = elem.getBoundingClientRect();
|
10247 |
+
win = elem.ownerDocument.defaultView;
|
10248 |
+
return {
|
10249 |
+
top: rect.top + win.pageYOffset,
|
10250 |
+
left: rect.left + win.pageXOffset
|
10251 |
+
};
|
10252 |
+
},
|
10253 |
Â
|
10254 |
+
// position() relates an element's margin box to its offset parent's padding box
|
10255 |
+
// This corresponds to the behavior of CSS absolute positioning
|
10256 |
+
position: function() {
|
10257 |
+
if ( !this[ 0 ] ) {
|
10258 |
+
return;
|
10259 |
+
}
|
10260 |
Â
|
10261 |
+
var offsetParent, offset, doc,
|
10262 |
+
elem = this[ 0 ],
|
10263 |
+
parentOffset = { top: 0, left: 0 };
|
10264 |
Â
|
10265 |
+
// position:fixed elements are offset from the viewport, which itself always has zero offset
|
10266 |
+
if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
10267 |
Â
|
10268 |
+
// Assume position:fixed implies availability of getBoundingClientRect
|
10269 |
+
offset = elem.getBoundingClientRect();
|
10270 |
Â
|
10271 |
+
} else {
|
10272 |
+
offset = this.offset();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10273 |
Â
|
10274 |
+
// Account for the *real* offset parent, which can be the document or its root element
|
10275 |
+
// when a statically positioned element is identified
|
10276 |
+
doc = elem.ownerDocument;
|
10277 |
+
offsetParent = elem.offsetParent || doc.documentElement;
|
10278 |
+
while ( offsetParent &&
|
10279 |
+
( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
|
10280 |
+
jQuery.css( offsetParent, "position" ) === "static" ) {
|
10281 |
Â
|
10282 |
+
offsetParent = offsetParent.parentNode;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10283 |
Â
}
|
10284 |
+
if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
|
10285 |
Â
|
10286 |
+
// Incorporate borders into its offset, since they are outside its content origin
|
10287 |
+
parentOffset = jQuery( offsetParent ).offset();
|
10288 |
+
parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
|
10289 |
+
parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
|
10290 |
+
}
|
10291 |
+
}
|
10292 |
Â
|
10293 |
+
// Subtract parent offsets and element margins
|
10294 |
+
return {
|
10295 |
+
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
|
10296 |
+
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
|
10297 |
+
};
|
10298 |
+
},
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10299 |
Â
|
10300 |
+
// This method will return documentElement in the following cases:
|
10301 |
+
// 1) For the element inside the iframe without offsetParent, this method will return
|
10302 |
+
// documentElement of the parent window
|
10303 |
+
// 2) For the hidden or detached element
|
10304 |
+
// 3) For body or html element, i.e. in case of the html node - it will return itself
|
10305 |
+
//
|
10306 |
+
// but those exceptions were never presented as a real life use-cases
|
10307 |
+
// and might be considered as more preferable results.
|
10308 |
+
//
|
10309 |
+
// This logic, however, is not guaranteed and can change at any point in the future
|
10310 |
+
offsetParent: function() {
|
10311 |
+
return this.map( function() {
|
10312 |
+
var offsetParent = this.offsetParent;
|
10313 |
Â
|
10314 |
+
while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
|
10315 |
+
offsetParent = offsetParent.offsetParent;
|
10316 |
+
}
|
Â
|
|
10317 |
Â
|
10318 |
+
return offsetParent || documentElement;
|
10319 |
+
} );
|
10320 |
+
}
|
10321 |
+
} );
|
10322 |
Â
|
10323 |
+
// Create scrollLeft and scrollTop methods
|
10324 |
+
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
|
10325 |
+
var top = "pageYOffset" === prop;
|
10326 |
Â
|
10327 |
+
jQuery.fn[ method ] = function( val ) {
|
10328 |
+
return access( this, function( elem, method, val ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10329 |
Â
|
10330 |
+
// Coalesce documents and windows
|
10331 |
+
var win;
|
10332 |
+
if ( isWindow( elem ) ) {
|
10333 |
+
win = elem;
|
10334 |
+
} else if ( elem.nodeType === 9 ) {
|
10335 |
+
win = elem.defaultView;
|
10336 |
+
}
|
10337 |
Â
|
10338 |
+
if ( val === undefined ) {
|
10339 |
+
return win ? win[ prop ] : elem[ method ];
|
10340 |
+
}
|
Â
|
|
Â
|
|
10341 |
Â
|
10342 |
+
if ( win ) {
|
10343 |
+
win.scrollTo(
|
10344 |
+
!top ? val : win.pageXOffset,
|
10345 |
+
top ? val : win.pageYOffset
|
10346 |
+
);
|
Â
|
|
10347 |
Â
|
10348 |
+
} else {
|
10349 |
+
elem[ method ] = val;
|
10350 |
+
}
|
10351 |
+
}, method, val, arguments.length );
|
10352 |
+
};
|
10353 |
+
} );
|
10354 |
+
|
10355 |
+
// Support: Safari <=7 - 9.1, Chrome <=37 - 49
|
10356 |
+
// Add the top/left cssHooks using jQuery.fn.position
|
10357 |
+
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
|
10358 |
+
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
|
10359 |
+
// getComputedStyle returns percent when specified for top/left/bottom/right;
|
10360 |
+
// rather than make the css module depend on the offset module, just check for it here
|
10361 |
+
jQuery.each( [ "top", "left" ], function( i, prop ) {
|
10362 |
+
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
10363 |
+
function( elem, computed ) {
|
10364 |
+
if ( computed ) {
|
10365 |
+
computed = curCSS( elem, prop );
|
10366 |
Â
|
10367 |
+
// If curCSS returns percentage, fallback to offset
|
10368 |
+
return rnumnonpx.test( computed ) ?
|
10369 |
+
jQuery( elem ).position()[ prop ] + "px" :
|
10370 |
+
computed;
|
Â
|
|
10371 |
Â
}
|
10372 |
+
}
|
10373 |
+
);
|
10374 |
+
} );
|
10375 |
Â
|
10376 |
Â
|
10377 |
+
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
10378 |
+
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
10379 |
+
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
10380 |
+
function( defaultExtra, funcName ) {
|
10381 |
Â
|
10382 |
+
// Margin is only for outerHeight, outerWidth
|
10383 |
+
jQuery.fn[ funcName ] = function( margin, value ) {
|
10384 |
+
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
10385 |
+
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
10386 |
Â
|
10387 |
+
return access( this, function( elem, type, value ) {
|
10388 |
+
var doc;
|
10389 |
Â
|
10390 |
+
if ( isWindow( elem ) ) {
|
10391 |
Â
|
10392 |
+
// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
|
10393 |
+
return funcName.indexOf( "outer" ) === 0 ?
|
10394 |
+
elem[ "inner" + name ] :
|
10395 |
+
elem.document.documentElement[ "client" + name ];
|
10396 |
+
}
|
10397 |
Â
|
10398 |
+
// Get document width or height
|
10399 |
+
if ( elem.nodeType === 9 ) {
|
10400 |
+
doc = elem.documentElement;
|
10401 |
Â
|
10402 |
+
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
|
10403 |
+
// whichever is greatest
|
10404 |
+
return Math.max(
|
10405 |
+
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
10406 |
+
elem.body[ "offset" + name ], doc[ "offset" + name ],
|
10407 |
+
doc[ "client" + name ]
|
10408 |
+
);
|
10409 |
+
}
|
10410 |
Â
|
10411 |
+
return value === undefined ?
|
10412 |
Â
|
10413 |
+
// Get width or height on the element, requesting but not forcing parseFloat
|
10414 |
+
jQuery.css( elem, type, extra ) :
|
10415 |
Â
|
10416 |
+
// Set width or height on the element
|
10417 |
+
jQuery.style( elem, type, value, extra );
|
10418 |
+
}, type, chainable ? margin : undefined, chainable );
|
10419 |
+
};
|
Â
|
|
10420 |
Â
} );
|
10421 |
+
} );
|
10422 |
Â
|
10423 |
Â
|
10424 |
+
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
10425 |
+
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
10426 |
+
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
10427 |
+
function( i, name ) {
|
10428 |
Â
|
10429 |
+
// Handle event binding
|
10430 |
+
jQuery.fn[ name ] = function( data, fn ) {
|
10431 |
+
return arguments.length > 0 ?
|
10432 |
+
this.on( name, null, data, fn ) :
|
10433 |
+
this.trigger( name );
|
10434 |
+
};
|
10435 |
+
} );
|
10436 |
Â
|
10437 |
+
jQuery.fn.extend( {
|
10438 |
+
hover: function( fnOver, fnOut ) {
|
10439 |
+
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
10440 |
+
}
|
10441 |
+
} );
|
10442 |
Â
|
10443 |
Â
|
10444 |
Â
|
10445 |
Â
|
10446 |
+
jQuery.fn.extend( {
|
10447 |
Â
|
10448 |
+
bind: function( types, data, fn ) {
|
10449 |
+
return this.on( types, null, data, fn );
|
10450 |
+
},
|
10451 |
+
unbind: function( types, fn ) {
|
10452 |
+
return this.off( types, null, fn );
|
10453 |
+
},
|
10454 |
Â
|
10455 |
+
delegate: function( selector, types, data, fn ) {
|
10456 |
+
return this.on( types, selector, data, fn );
|
10457 |
+
},
|
10458 |
+
undelegate: function( selector, types, fn ) {
|
10459 |
Â
|
10460 |
+
// ( namespace ) or ( selector, types [, fn] )
|
10461 |
+
return arguments.length === 1 ?
|
10462 |
+
this.off( selector, "**" ) :
|
10463 |
+
this.off( types, selector || "**", fn );
|
10464 |
+
}
|
10465 |
+
} );
|
10466 |
+
|
10467 |
+
// Bind a function to a context, optionally partially applying any
|
10468 |
+
// arguments.
|
10469 |
+
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
|
10470 |
+
// However, it is not slated for removal any time soon
|
10471 |
+
jQuery.proxy = function( fn, context ) {
|
10472 |
+
var tmp, args, proxy;
|
10473 |
+
|
10474 |
+
if ( typeof context === "string" ) {
|
10475 |
+
tmp = fn[ context ];
|
10476 |
+
context = fn;
|
10477 |
+
fn = tmp;
|
10478 |
+
}
|
10479 |
Â
|
10480 |
+
// Quick check to determine if target is callable, in the spec
|
10481 |
+
// this throws a TypeError, but we will just return undefined.
|
10482 |
+
if ( !isFunction( fn ) ) {
|
10483 |
+
return undefined;
|
10484 |
+
}
|
Â
|
|
10485 |
Â
|
10486 |
+
// Simulated bind
|
10487 |
+
args = slice.call( arguments, 2 );
|
10488 |
+
proxy = function() {
|
10489 |
+
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
10490 |
+
};
|
10491 |
Â
|
10492 |
+
// Set the guid of unique handler to the same of original handler, so it can be removed
|
10493 |
+
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
Â
|
|
Â
|
|
Â
|
|
10494 |
Â
|
10495 |
+
return proxy;
|
10496 |
+
};
|
Â
|
|
Â
|
|
Â
|
|
10497 |
Â
|
10498 |
+
jQuery.holdReady = function( hold ) {
|
10499 |
+
if ( hold ) {
|
10500 |
+
jQuery.readyWait++;
|
10501 |
+
} else {
|
10502 |
+
jQuery.ready( true );
|
10503 |
+
}
|
10504 |
+
};
|
10505 |
+
jQuery.isArray = Array.isArray;
|
10506 |
+
jQuery.parseJSON = JSON.parse;
|
10507 |
+
jQuery.nodeName = nodeName;
|
10508 |
+
jQuery.isFunction = isFunction;
|
10509 |
+
jQuery.isWindow = isWindow;
|
10510 |
+
jQuery.camelCase = camelCase;
|
10511 |
+
jQuery.type = toType;
|
10512 |
Â
|
10513 |
+
jQuery.now = Date.now;
|
Â
|
|
10514 |
Â
|
10515 |
+
jQuery.isNumeric = function( obj ) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10516 |
Â
|
10517 |
+
// As of jQuery 3.0, isNumeric is limited to
|
10518 |
+
// strings and numbers (primitives or objects)
|
10519 |
+
// that can be coerced to finite numbers (gh-2662)
|
10520 |
+
var type = jQuery.type( obj );
|
10521 |
+
return ( type === "number" || type === "string" ) &&
|
10522 |
Â
|
10523 |
+
// parseFloat NaNs numeric-cast false positives ("")
|
10524 |
+
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
10525 |
+
// subtraction forces infinities to NaN
|
10526 |
+
!isNaN( obj - parseFloat( obj ) );
|
10527 |
+
};
|
10528 |
Â
|
10529 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10530 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
10531 |
Â
|
10532 |
+
// Register as a named AMD module, since jQuery can be concatenated with other
|
10533 |
+
// files that may use define, but not via a proper concatenation script that
|
10534 |
+
// understands anonymous AMD modules. A named AMD is safest and most robust
|
10535 |
+
// way to register. Lowercase jquery is used because AMD module names are
|
10536 |
+
// derived from file names, and jQuery is normally delivered in a lowercase
|
10537 |
+
// file name. Do this after creating the global so that if an AMD module wants
|
10538 |
+
// to call noConflict to hide this version of jQuery, it will work.
|
10539 |
Â
|
10540 |
+
// Note that for maximum portability, libraries that are not jQuery should
|
10541 |
+
// declare themselves as anonymous modules, and avoid setting a global if an
|
10542 |
+
// AMD loader is present. jQuery is a special case. For more information, see
|
10543 |
+
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
|
10544 |
Â
|
10545 |
+
if ( true ) {
|
10546 |
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
10547 |
+
return jQuery;
|
10548 |
+
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
10549 |
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
10550 |
+
}
|
10551 |
Â
|
10552 |
Â
|
Â
|
|
10553 |
Â
|
Â
|
|
Â
|
|
10554 |
Â
|
10555 |
+
var
|
Â
|
|
10556 |
Â
|
10557 |
+
// Map over jQuery in case of overwrite
|
10558 |
+
_jQuery = window.jQuery,
|
Â
|
|
Â
|
|
10559 |
Â
|
10560 |
+
// Map over the $ in case of overwrite
|
10561 |
+
_$ = window.$;
|
Â
|
|
10562 |
Â
|
10563 |
+
jQuery.noConflict = function( deep ) {
|
10564 |
+
if ( window.$ === jQuery ) {
|
10565 |
+
window.$ = _$;
|
10566 |
+
}
|
10567 |
Â
|
10568 |
+
if ( deep && window.jQuery === jQuery ) {
|
10569 |
+
window.jQuery = _jQuery;
|
Â
|
|
Â
|
|
Â
|
|
10570 |
Â
}
|
10571 |
Â
|
10572 |
+
return jQuery;
|
10573 |
+
};
|
10574 |
+
|
10575 |
+
// Expose jQuery and $ identifiers, even in AMD
|
10576 |
+
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
10577 |
+
// and CommonJS for browser emulators (#13566)
|
10578 |
+
if ( !noGlobal ) {
|
10579 |
+
window.jQuery = window.$ = jQuery;
|
10580 |
+
}
|
10581 |
Â
|
10582 |
Â
|
10583 |
Â
|
10584 |
+
|
10585 |
+
return jQuery;
|
10586 |
+
} );
|
10587 |
Â
|
10588 |
Â
|
10589 |
+
/***/ })
|
10590 |
Â
|
10591 |
+
/******/ });
|
10592 |
+
//# sourceMappingURL=wsal-wizard.js.map
|
js/dist/wsal-wizard.js.map
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./css/src/wsal-wizard.scss","webpack:///./js/src/wsal-wizard.js","webpack:///./node_modules/jquery/dist/jquery.js"],"names":["document","ready","click","type","attr","substr","tokenType","tokenValue","jQuery","trim","val","existing","filter","value","length","ajax","url","wsalData","ajaxURL","async","data","action","token","nonce","dataType","success","removeAttr","alert","usersError","rolesError","ipError","append","text","removeSecToken","message","error","xhr","textStatus","console","log","statusText","keydown","event","keyCode","parents","addClass","fadeOut","remove"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,yC;;;;;;;;;;;;;;ACSA;;AAEA;;;;;;AAXA;;;;;;;;AAQA;AAKA,sBAAQA,QAAR,EAAmBC,KAAnB,CAA0B,YAAW;;AAEpC;;;;;AAKA,uBAAQ,+FAAR,EAA0GC,KAA1G,CAAiH,YAAW;AAC3H,MAAMC,OAAO,sBAAQ,IAAR,EAAeC,IAAf,CAAqB,IAArB,EAA4BC,MAA5B,CAAoC,CAApC,EAAuC,CAAvC,CAAb;AACA,MAAMC,YAAY,sBAAQ,IAAR,EAAeF,IAAf,CAAqB,IAArB,EAA4BC,MAA5B,CAAoC,CAApC,EAAuC,CAAvC,CAAlB;AACA,MAAME,aAAaC,iBAAOC,IAAP,CAAa,4BAAYN,IAAZ,SAAoBG,SAApB,WAAsCI,GAAtC,EAAb,CAAnB;AACA,MAAMC,WAAW,4BAAYR,IAAZ,kBAAgCS,MAAhC,CAAwC,YAAW;AACnE,UAAO,KAAKC,KAAL,KAAeN,UAAtB;AACA,GAFgB,CAAjB;;AAIA,MAAK,CAAEA,UAAF,IAAgBI,SAASG,MAA9B,EAAuC;AACtC;AACA,GAV0H,CAUzH;;AAEF;AACA,8BAAYX,IAAZ,SAAoBG,SAApB,eAAuCH,IAAvC,SAA+CG,SAA/C,WAAiEF,IAAjE,CAAuE,UAAvE,EAAmF,IAAnF;;AAEAI,mBAAOO,IAAP,CAAY;AACXZ,SAAM,MADK;AAEXa,QAAKC,SAASC,OAFH;AAGXC,UAAO,IAHI;AAIXC,SAAM;AACLC,YAAQ,4BADH;AAELC,WAAOf,UAFF;AAGLgB,WAAON,SAASM;AAHX,IAJK;AASXC,aAAU,MATC;AAUXC,YAAS,iBAAUL,IAAV,EAAiB;;AAEzB;AACA,gCAAYjB,IAAZ,SAAoBG,SAApB,eAAuCH,IAAvC,SAA+CG,SAA/C,WAAiEoB,UAAjE,CAA6E,UAA7E;AACA,gCAAYvB,IAAZ,SAAoBG,SAApB,WAAsCI,GAAtC,CAA2C,EAA3C;;AAEA,QAAKU,KAAKK,OAAV,EAAoB;;AAEnB;AACA,SAAK,YAAYL,KAAKd,SAAjB,KAAgC,YAAYA,SAAZ,IAAyB,aAAaH,IAAtE,CAAL,EAAoF;AACnFwB,YAAOV,SAASW,UAAhB;AACA;AACA,MAHD,MAGO,IAAK,YAAYR,KAAKd,SAAjB,KAAgC,YAAYA,SAAZ,IAAyB,aAAaH,IAAtE,CAAL,EAAoF;AAC1FwB,YAAOV,SAASY,UAAhB;AACA;AACA,MAHM,MAGA,IAAK,YAAYT,KAAKd,SAAjB,KAAgC,SAASA,SAAT,IAAsB,aAAaH,IAAnE,CAAL,EAAiF;AACvFwB,YAAOV,SAASa,OAAhB;AACA;AACA;;AAED,iCAAY3B,IAAZ,YAA0B4B,MAA1B,CAAkC,iDAAiCX,KAAKd,SAAtC,UAAuD0B,IAAvD,CAA6DZ,KAAKE,KAAlE,EAA0ES,MAA1E,CACjC,sDAAsC5B,IAAtC,aAAqDO,GAArD,CAA0DU,KAAKE,KAA/D,CADiC,EAEjC,sBAAQ,mDAAR,EAA8DpB,KAA9D,CAAqE+B,cAArE,CAFiC,CAAlC;AAIA,KAlBD,MAkBO;AACNN,WAAOP,KAAKc,OAAZ;AACA;AACD,IArCU;AAsCXC,UAAO,eAAUC,GAAV,EAAeC,UAAf,EAA2BF,MAA3B,EAAmC;AACzCG,YAAQC,GAAR,CAAaH,IAAII,UAAjB;AACAF,YAAQC,GAAR,CAAaF,UAAb;AACAC,YAAQC,GAAR,CAAaJ,MAAb;AACA;AA1CU,GAAZ;AA4CA,EA3DD;;AA6DA,uBAAQ,+FAAR,EAA0GM,OAA1G,CAAmH,UAAUC,KAAV,EAAkB;AACpI,MAAK,OAAOA,MAAMC,OAAlB,EAA4B;AAC3B,OAAMxC,OAAO,sBAAQ,IAAR,EAAeC,IAAf,CAAqB,IAArB,EAA4BC,MAA5B,CAAoC,CAApC,EAAuC,CAAvC,CAAb;AACA,OAAMC,YAAY,sBAAQ,IAAR,EAAeF,IAAf,CAAqB,IAArB,EAA4BC,MAA5B,CAAoC,CAApC,EAAuC,CAAvC,CAAlB;AACA,+BAAYF,IAAZ,SAAoBG,SAApB,WAAsCJ,KAAtC;AACA,UAAO,KAAP;AACA;AACD,EAPD;;AASA;;;AAGA,uBAAQ,oFAAR,EAA+FA,KAA/F,CAAsG+B,cAAtG;AACA,UAASA,cAAT,GAA0B;AACzB,MAAMX,QAAQ,sBAAQ,IAAR,EAAesB,OAAf,CAAwB,YAAxB,CAAd;AACAtB,QAAMuB,QAAN,CAAgB,cAAhB,EAAiCC,OAAjC,CAA0C,MAA1C,EAAkD,YAAW;AAC5DxB,SAAMyB,MAAN;AACA,GAFD;AAGA;AACD,CAvFD,E;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,YAAY;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,YAAY;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,YAAY;AACtB;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,gBAAgB,IAAI;;AAEpB;AACA;;AAEA;;AAEA;AACA;AACA,wCAAwC,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS;;AAET;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ,6BAA6B;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,eAAe;;AAEf,SAAS;;AAET;AACA,QAAQ,iCAAiC;AACzC,QAAQ,oBAAoB;AAC5B,QAAQ,sCAAsC;AAC9C,QAAQ;AACR,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA,gBAAgB,aAAa,EAAE;AAC/B;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,4DAA4D;;AAE5D;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;AACP;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gEAAgE;;AAEhE;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,iEAAiE,UAAU;AAC3E,sCAAsC,2BAA2B;AACjE;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,UAAU,UAAU;AACpB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA,YAAY,uEAAuE;AACnF;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,SAAS;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,QAAQ,SAAS;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,SAAS;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,QAAQ,SAAS;AACjB;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,iDAAiD;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD,UAAU,wCAAwC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA,CAAC;;;;AAID;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA,QAAQ,GAAG;AACX;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;;;AAIA;;AAEA;;AAEA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,OAAO;AACjB,0BAA0B,wBAAwB;;AAElD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA,0CAA0C;AAC1C,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;;;AAIA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,OAAO;AACP,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,wCAAwC,sCAAsC;AAC9E,oCAAoC,uCAAuC;AAC3E,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,OAAO;AACP;AACA,MAAM;AACN,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;;AAEX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC,qCAAqC;AACrC,oCAAoC;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,EAAE;AACF;;;;;AAKA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,aAAa;AACpC,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ,EAAE;AACF;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;AAGA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;AAEA;;AAEA;;;;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,EAAE;AACF;;AAEA,EAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,QAAQ,OAAO;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,OAAO;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;AAIA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE,gBAAgB;AAClB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA,WAAW;;AAEX;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;;AAEA,cAAc,sBAAsB;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,+DAA+D;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,cAAc;;AAExB;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,uCAAuC;AACjE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,uDAAuD;AAC9E;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qCAAqC,cAAc;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;;AAGD;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ,+BAA+B;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,SAAS,qCAAqC;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;;AAEA,SAAS,8BAA8B;AACvC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,WAAW;AACpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;AAIA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,+CAA+C,cAAc,WAAW;AACxE,mBAAmB,UAAU;AAC7B;AACA,sBAAsB,cAAc,sBAAsB,gBAAgB;AAC1E,gBAAgB,WAAW,YAAY;AACvC,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;AACF,CAAC;;;AAGD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,+DAA+D;AAC3E;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ,OAAO;;AAEf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;;AAEA,UAAU,OAAO;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA,WAAW,SAAS;AACpB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,QAAQ,OAAO;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,iDAAiD,0BAA0B;AAC3E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,gBAAgB;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,2BAA2B;AAC3B;AACA,qBAAqB;AACrB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,SAAS,gBAAgB;AACzB;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE;AACF;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,cAAc;AAClC,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,SAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B,WAAW,kBAAkB;AAC7B,cAAc;AACd,CAAC;AACD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAmB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;;;AAKD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,iCAAiC;AACjC;AACA;;AAEA,IAAI;AACJ;;AAEA,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA;AACA,WAAW,SAAS;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;;;AAGA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;;AAEA;;AAEA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA,UAAU,KAAK;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;;AAEpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb,KAAK;AACL;;AAEA,WAAW;AACX,GAAG;AACH;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB,gDAAgD;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB;AACjB,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,2BAA2B;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC;;AAElC;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,IAAI;AACJ;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,yBAAyB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI;AACJ,GAAG;AACH;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;AACA;AACA;AACA,EAAE;AACF;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA,cAAc,sDAAsD;AACpE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,cAAc,mCAAmC;AACjD,eAAe,6DAA6D;AAC5E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,EAAE;AACF,CAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;;;;AAKD;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AAAA;AACF;;;;;AAKA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA,CAAC","file":"wsal-wizard.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 = \"./js/src/wsal-wizard.js\");\n","// removed by extract-text-webpack-plugin","/**\n * WSAL Wizard\n *\n * Entry file for webpack.\n *\n * @since 3.2.3\n */\n\n// Wizard styles.\nimport '../../css/src/wsal-wizard.scss';\n\nimport jQuery from 'jquery';\n\njQuery( document ).ready( function() {\n\n\t/**\n\t * Step: `Access`\n\t *\n\t * Usernames & roles access setting.\n\t */\n\tjQuery( '#editor-users-add, #editor-roles-add, #exuser-query-add, #exrole-query-add, #ipaddr-query-add' ).click( function() {\n\t\tconst type = jQuery( this ).attr( 'id' ).substr( 0, 6 );\n\t\tconst tokenType = jQuery( this ).attr( 'id' ).substr( 7, 5 );\n\t\tconst tokenValue = jQuery.trim( jQuery( `#${type}-${tokenType}-box` ).val() );\n\t\tconst existing = jQuery( `#${type}-list input` ).filter( function() {\n\t\t\treturn this.value === tokenValue;\n\t\t});\n\n\t\tif ( ! tokenValue || existing.length ) {\n\t\t\treturn;\n\t\t} // if value is empty or already used, stop here\n\n\t\t// checkDataToken( 'user' );\n\t\tjQuery( `#${type}-${tokenType}-box, #${type}-${tokenType}-add` ).attr( 'disabled', true );\n\n\t\tjQuery.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: wsalData.ajaxURL,\n\t\t\tasync: true,\n\t\t\tdata: {\n\t\t\t\taction: 'setup_check_security_token',\n\t\t\t\ttoken: tokenValue,\n\t\t\t\tnonce: wsalData.nonce\n\t\t\t},\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function( data ) {\n\n\t\t\t\t// Remove disabled attribute.\n\t\t\t\tjQuery( `#${type}-${tokenType}-box, #${type}-${tokenType}-add` ).removeAttr( 'disabled' );\n\t\t\t\tjQuery( `#${type}-${tokenType}-box` ).val( '' );\n\n\t\t\t\tif ( data.success ) {\n\n\t\t\t\t\t// Error handling.\n\t\t\t\t\tif ( 'other' === data.tokenType && ( 'users' === tokenType || 'exuser' === type ) ) {\n\t\t\t\t\t\talert( wsalData.usersError );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if ( 'other' === data.tokenType && ( 'roles' === tokenType || 'exrole' === type ) ) {\n\t\t\t\t\t\talert( wsalData.rolesError );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if ( 'other' === data.tokenType && ( 'ip' === tokenType || 'ipaddr' === type ) ) {\n\t\t\t\t\t\talert( wsalData.ipError );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery( `#${type}-list` ).append( jQuery( `<span class=\"sectoken-${data.tokenType}\"/>` ).text( data.token ).append(\n\t\t\t\t\t\tjQuery( `<input type=\"hidden\" name=\"${type}s[]\"/>` ).val( data.token ),\n\t\t\t\t\t\tjQuery( '<a href=\"javascript:;\" title=\"Remove\">×</a>' ).click( removeSecToken )\n\t\t\t\t\t) );\n\t\t\t\t} else {\n\t\t\t\t\talert( data.message );\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function( xhr, textStatus, error ) {\n\t\t\t\tconsole.log( xhr.statusText );\n\t\t\t\tconsole.log( textStatus );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t});\n\t});\n\n\tjQuery( '#editor-users-box, #editor-roles-box, #exuser-query-box, #exrole-query-box, #ipaddr-query-box' ).keydown( function( event ) {\n\t\tif ( 13 === event.keyCode ) {\n\t\t\tconst type = jQuery( this ).attr( 'id' ).substr( 0, 6 );\n\t\t\tconst tokenType = jQuery( this ).attr( 'id' ).substr( 7, 5 );\n\t\t\tjQuery( `#${type}-${tokenType}-add` ).click();\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t/**\n\t * Remove access settings token.\n\t */\n\tjQuery( '#editor-list>span>a, #exuser-list>span>a, #exrole-list>span>a, #ipaddr-list>span>a' ).click( removeSecToken );\n\tfunction removeSecToken() {\n\t\tconst token = jQuery( this ).parents( 'span:first' );\n\t\ttoken.addClass( 'sectoken-del' ).fadeOut( 'fast', function() {\n\t\t\ttoken.remove();\n\t\t});\n\t};\n});\n\n","/*!\n * jQuery JavaScript Library v3.3.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2018-01-20T17:24Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML <object> elements\n // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n // We don't want to classify *any* DOM node as a function.\n return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, doc, node ) {\n\t\tdoc = doc || document;\n\n\t\tvar i,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\t\t\t\tif ( node[ i ] ) {\n\t\t\t\t\tscript[ i ] = node[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.3.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android <=4.0 only\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && Array.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\n\t\t/* eslint-disable no-unused-vars */\n\t\t// See https://github.com/eslint/eslint/issues/6125\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tDOMEval( code );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android <=4.0 only\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.3\n * https://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-08-08\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tdisabledAncestor = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && (\"form\" in elem || \"label\" in elem);\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tdisabledAncestor( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( el ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( el ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\t
|