All-in-One WP Migration - Version 7.32

Version Description

Added

  • Update javascript dependencies
  • Turn on WP_IMPORTING on export and import
Download this release

Release Info

Developer bangelov
Plugin Icon 128x128 All-in-One WP Migration
Version 7.32
Comparing to
See all releases

Code changes from version 7.31 to 7.32

all-in-one-wp-migration.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
- * Version: 7.31
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
+ * Version: 7.32
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
constants.php CHANGED
@@ -35,7 +35,7 @@ define( 'AI1WM_DEBUG', false );
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
- define( 'AI1WM_VERSION', '7.31' );
39
 
40
  // ===============
41
  // = Plugin Name =
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
+ define( 'AI1WM_VERSION', '7.32' );
39
 
40
  // ===============
41
  // = Plugin Name =
lib/controller/class-ai1wm-export-controller.php CHANGED
@@ -104,7 +104,7 @@ class Ai1wm_Export_Controller {
104
  }
105
 
106
  wp_remote_post(
107
- apply_filters( 'ai1wm_http_export_url', admin_url( 'admin-ajax.php?action=ai1wm_export' ) ),
108
  array(
109
  'timeout' => apply_filters( 'ai1wm_http_export_timeout', 10 ),
110
  'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ),
104
  }
105
 
106
  wp_remote_post(
107
+ apply_filters( 'ai1wm_http_export_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ),
108
  array(
109
  'timeout' => apply_filters( 'ai1wm_http_export_timeout', 10 ),
110
  'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ),
lib/controller/class-ai1wm-import-controller.php CHANGED
@@ -121,7 +121,7 @@ class Ai1wm_Import_Controller {
121
  }
122
 
123
  wp_remote_post(
124
- apply_filters( 'ai1wm_http_import_url', admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
125
  array(
126
  'timeout' => apply_filters( 'ai1wm_http_import_timeout', 10 ),
127
  'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ),
121
  }
122
 
123
  wp_remote_post(
124
+ apply_filters( 'ai1wm_http_import_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ),
125
  array(
126
  'timeout' => apply_filters( 'ai1wm_http_import_timeout', 10 ),
127
  'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ),
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -723,10 +723,10 @@ class Ai1wm_Main_Controller {
723
  'ai1wm_export',
724
  array(
725
  'ajax' => array(
726
- 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_export' ) ),
727
  ),
728
  'status' => array(
729
- 'url' => wp_make_link_relative( add_query_arg( array( 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
730
  ),
731
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
732
  )
@@ -815,7 +815,7 @@ class Ai1wm_Main_Controller {
815
  'ai1wm_uploader',
816
  array(
817
  'max_file_size' => wp_max_upload_size(),
818
- 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
819
  'params' => array(
820
  'priority' => 5,
821
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
@@ -993,10 +993,10 @@ class Ai1wm_Main_Controller {
993
  'ai1wm_export',
994
  array(
995
  'ajax' => array(
996
- 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_export' ) ),
997
  ),
998
  'status' => array(
999
- 'url' => wp_make_link_relative( add_query_arg( array( 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
1000
  ),
1001
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
1002
  )
723
  'ai1wm_export',
724
  array(
725
  'ajax' => array(
726
+ 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ),
727
  ),
728
  'status' => array(
729
+ 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
730
  ),
731
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
732
  )
815
  'ai1wm_uploader',
816
  array(
817
  'max_file_size' => wp_max_upload_size(),
818
+ 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ),
819
  'params' => array(
820
  'priority' => 5,
821
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
993
  'ai1wm_export',
994
  array(
995
  'ajax' => array(
996
+ 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ),
997
  ),
998
  'status' => array(
999
+ 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
1000
  ),
1001
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
1002
  )
lib/view/assets/css/import.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide,div.ai1wm-expandable input{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;left:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;text-align:center;width:0}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
1
+ @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide,div.ai1wm-expandable input{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;left:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
lib/view/assets/css/import.min.rtl.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:left}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;left:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide,div.ai1wm-expandable input{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;right:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-init{position:absolute;top:10px;right:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:right;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;text-align:center;width:0}.ai1wm-progress-bar-percent{position:absolute;width:50px;right:50%;-webkit-transform:translate(24px,0);transform:translate(24px,0);font-size:.5em;background:100% 0}
1
+ @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:left}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;left:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide,div.ai1wm-expandable input{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;right:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-init{position:absolute;top:10px;right:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:right;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-percent{position:absolute;width:50px;right:50%;-webkit-transform:translate(24px,0);transform:translate(24px,0);font-size:.5em;background:100% 0}
lib/view/assets/javascript/backups.min.js CHANGED
@@ -1,101 +1,48 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 7);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ([
67
- /* 0 */
68
- /***/ (function(module, exports) {
69
-
70
- var g;
71
-
72
- // This works in non-strict mode
73
- g = (function() {
74
- return this;
75
- })();
76
-
77
- try {
78
- // This works if eval is allowed (see CSP)
79
- g = g || Function("return this")() || (1,eval)("this");
80
- } catch(e) {
81
- // This works if the window reference is available
82
- if(typeof window === "object")
83
- g = window;
84
- }
85
-
86
- // g can still be undefined, but nothing to do about it...
87
- // We return undefined, instead of nothing here, so it's
88
- // easier to handle this case. if(!global) { ...}
89
-
90
- module.exports = g;
91
 
 
 
92
 
93
- /***/ }),
94
- /* 1 */
95
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
- "use strict";
 
 
98
 
 
 
99
 
100
  /**
101
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -120,101 +67,309 @@ module.exports = g;
120
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
121
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
122
  */
 
 
123
 
124
- jQuery(document).ready(function ($) {
125
- 'use strict';
126
-
127
- // Idea
128
-
129
- $('#ai1wm-feedback-type-link-1').click(function () {
130
- var radio = $('#ai1wm-feedback-type-1');
131
- if (radio.is(':checked')) {
132
- radio.attr('checked', false);
133
- } else {
134
- radio.attr('checked', true);
135
- }
136
- });
137
-
138
- // Help
139
- $('#ai1wm-feedback-type-2').click(function () {
140
- // Hide other options
141
- $('#ai1wm-feedback-type-1').closest('li').hide();
142
-
143
- // Change placeholder message
144
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
145
-
146
- // Show feedback form
147
- $('.ai1wm-feedback-form').fadeIn();
148
- });
149
-
150
- // Cancel feedback form
151
- $('#ai1wm-feedback-cancel').click(function (e) {
152
- $('.ai1wm-feedback-form').fadeOut(function () {
153
- $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
154
- });
155
-
156
- e.preventDefault();
157
- });
158
-
159
- // Send feedback form
160
- $('#ai1wm-feedback-submit').click(function (e) {
161
- var self = $(this);
162
-
163
- var spinner = self.next();
164
- var type = $('.ai1wm-feedback-type:checked').val();
165
- var email = $('.ai1wm-feedback-email').val();
166
- var message = $('.ai1wm-feedback-message').val();
167
- var terms = $('.ai1wm-feedback-terms').is(':checked');
168
-
169
- self.attr('disabled', true);
170
- spinner.css('visibility', 'visible');
171
-
172
- $.ajax({
173
- url: ai1wm_feedback.ajax.url,
174
- type: 'POST',
175
- dataType: 'json',
176
- async: true,
177
- data: {
178
- secret_key: ai1wm_feedback.secret_key,
179
- ai1wm_type: type,
180
- ai1wm_email: email,
181
- ai1wm_message: message,
182
- ai1wm_terms: +terms
183
- },
184
- dataFilter: function dataFilter(data) {
185
- return Ai1wm.Util.json(data);
186
- }
187
- }).done(function (data) {
188
- self.attr('disabled', false);
189
- spinner.css('visibility', 'hidden');
190
-
191
- if (data.errors.length > 0) {
192
- $('.ai1wm-feedback .ai1wm-message').remove();
193
-
194
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
195
- $.each(data.errors, function (key, value) {
196
- errorMessage.append($('<p />').text(value));
197
- });
198
-
199
- $('.ai1wm-feedback').prepend(errorMessage);
200
- } else {
201
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
202
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
203
-
204
- $('.ai1wm-feedback').html(successMessage);
205
- }
206
- });
207
-
208
- e.preventDefault();
209
- });
210
- });
211
 
212
- /***/ }),
213
- /* 2 */
214
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
- "use strict";
 
 
217
 
 
 
218
 
219
  /**
220
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -239,83 +394,182 @@ jQuery(document).ready(function ($) {
239
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
240
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
241
  */
 
242
 
243
- jQuery(document).ready(function ($) {
244
- 'use strict';
245
-
246
- $('#ai1wm-report-problem-button').click(function (e) {
247
- $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
248
-
249
- e.preventDefault();
250
- });
251
-
252
- $('#ai1wm-report-cancel').click(function (e) {
253
- $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
254
-
255
- e.preventDefault();
256
- });
257
-
258
- $('#ai1wm-report-submit').click(function (e) {
259
- var self = $(this);
260
-
261
- var spinner = self.next();
262
- var email = $('.ai1wm-report-email').val();
263
- var message = $('.ai1wm-report-message').val();
264
- var terms = $('.ai1wm-report-terms').is(':checked');
265
-
266
- self.attr('disabled', true);
267
- spinner.css('visibility', 'visible');
268
-
269
- $.ajax({
270
- url: ai1wm_report.ajax.url,
271
- type: 'POST',
272
- dataType: 'json',
273
- async: true,
274
- data: {
275
- secret_key: ai1wm_report.secret_key,
276
- ai1wm_email: email,
277
- ai1wm_message: message,
278
- ai1wm_terms: +terms
279
- },
280
- dataFilter: function dataFilter(data) {
281
- return Ai1wm.Util.json(data);
282
- }
283
- }).done(function (data) {
284
- self.attr('disabled', false);
285
- spinner.css('visibility', 'hidden');
286
-
287
- if (data.errors.length > 0) {
288
- $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
289
-
290
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
291
- $.each(data.errors, function (key, value) {
292
- errorMessage.append($('<p />').text(value));
293
- });
294
-
295
- $('.ai1wm-report-problem-dialog').prepend(errorMessage);
296
- } else {
297
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
298
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
299
-
300
- $('.ai1wm-report-problem-dialog').html(successMessage);
301
-
302
- // Hide message
303
- setTimeout(function () {
304
- $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
305
- }, 2000);
306
- }
307
- });
308
-
309
- e.preventDefault();
310
- });
311
- });
312
 
313
- /***/ }),
314
- /* 3 */
315
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
 
317
- "use strict";
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
 
320
  /**
321
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -340,486 +594,497 @@ jQuery(document).ready(function ($) {
340
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
341
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
342
  */
343
-
344
- var Modal = __webpack_require__(4),
345
  $ = jQuery;
346
 
347
  var Import = function Import() {
348
- var self = this;
 
 
 
 
 
 
 
 
349
 
350
- // Set params
351
- this.params = [];
352
 
353
- // Set modal
354
- this.modal = new Modal();
 
355
 
356
- // Set confirm listener
357
- this.modal.onConfirm = function (options) {
358
- self.onConfirm(options);
359
- };
360
 
361
- // Set blogs listener
362
- this.modal.onBlogs = function (options) {
363
- self.onBlogs(options);
364
- };
365
 
366
- // Set stop listener
367
- this.modal.onStop = function (options) {
368
- self.onStop(options);
369
- };
370
 
371
- // Set disk space listener
372
- this.modal.onDiskSpaceConfirm = function (options) {
373
- self.onDiskSpaceConfirm(options);
374
- };
375
  };
376
 
377
  Import.prototype.setParams = function (params) {
378
- this.params = Ai1wm.Util.list(params);
379
  };
380
 
381
  Import.prototype.start = function (options, retries) {
382
- var self = this;
383
- retries = retries || 0;
384
-
385
- // Reset stop flag
386
- if (retries === 0) {
387
- this.stopImport(false);
388
- }
389
-
390
- // Stop running import
391
- if (this.isImportStopped()) {
392
- return;
393
- }
394
-
395
- // Initializing beforeunload event
396
- $(window).bind('beforeunload', function () {
397
- return ai1wm_locale.stop_importing_your_website;
398
- });
399
-
400
- // Set initial status
401
- this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_import });
402
-
403
- // Set params
404
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
405
-
406
- // Set additional params
407
- if (options) {
408
- params = params.concat(Ai1wm.Util.list(options));
409
- }
410
-
411
- // Import
412
- $.ajax({
413
- url: ai1wm_import.ajax.url,
414
- type: 'POST',
415
- dataType: 'json',
416
- data: params,
417
- dataFilter: function dataFilter(data) {
418
- return Ai1wm.Util.json(data);
419
- }
420
- }).done(function () {
421
- self.getStatus();
422
- }).done(function (result) {
423
- if (result) {
424
- self.run(result);
425
- }
426
- }).fail(function (xhr) {
427
- var timeout = retries * 1000;
428
-
429
- try {
430
- var json = Ai1wm.Util.json(xhr.responseText);
431
- if (json) {
432
- var result = JSON.parse(json);
433
- var error = result.errors.pop();
434
- if (error.message) {
435
- self.stopImport(true);
436
- self.setStatus({
437
- type: 'error',
438
- title: ai1wm_locale.unable_to_import,
439
- message: error.message
440
- });
441
- return;
442
- }
443
- }
444
- } catch (e) {}
445
-
446
- if (retries >= 5) {
447
- self.stopImport(true);
448
- self.setStatus({
449
- type: 'error',
450
- title: ai1wm_locale.unable_to_import,
451
- message: ai1wm_locale.unable_to_start_the_import
452
- });
453
- return;
454
- }
455
-
456
- retries++;
457
-
458
- setTimeout(self.start.bind(self, options, retries), timeout);
459
- });
 
 
 
460
  };
461
 
462
  Import.prototype.run = function (params, retries) {
463
- var self = this;
464
- retries = retries || 0;
465
-
466
- // Stop running import
467
- if (this.isImportStopped()) {
468
- return;
469
- }
470
-
471
- // Import
472
- $.ajax({
473
- url: ai1wm_import.ajax.url,
474
- type: 'POST',
475
- dataType: 'json',
476
- data: params,
477
- dataFilter: function dataFilter(data) {
478
- return Ai1wm.Util.json(data);
479
- }
480
- }).done(function (result) {
481
- if (result) {
482
- self.run(result);
483
- }
484
- }).fail(function (xhr) {
485
- var timeout = retries * 1000;
486
-
487
- try {
488
- var json = Ai1wm.Util.json(xhr.responseText);
489
- if (json) {
490
- var result = JSON.parse(json);
491
- var error = result.errors.pop();
492
- if (error.message) {
493
- self.stopImport(true);
494
- self.setStatus({
495
- type: 'error',
496
- title: ai1wm_locale.unable_to_import,
497
- message: error.message
498
- });
499
- return;
500
- }
501
- }
502
- } catch (e) {}
503
-
504
- retries++;
505
-
506
- setTimeout(self.run.bind(self, params, retries), timeout);
507
- });
508
  };
509
 
510
  Import.prototype.confirm = function (options, retries) {
511
- var self = this;
512
- retries = retries || 0;
513
-
514
- // Stop running import
515
- if (this.isImportStopped()) {
516
- return;
517
- }
518
-
519
- // Set params
520
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
521
-
522
- // Set additional params
523
- if (options) {
524
- params = params.concat(Ai1wm.Util.list(options));
525
- }
526
-
527
- // Confirm
528
- $.ajax({
529
- url: ai1wm_import.ajax.url,
530
- type: 'POST',
531
- dataType: 'json',
532
- data: params,
533
- dataFilter: function dataFilter(data) {
534
- return Ai1wm.Util.json(data);
535
- }
536
- }).done(function () {
537
- self.getStatus();
538
- }).done(function (result) {
539
- if (result) {
540
- self.run(result);
541
- }
542
- }).fail(function (xhr) {
543
- var timeout = retries * 1000;
544
-
545
- try {
546
- var json = Ai1wm.Util.json(xhr.responseText);
547
- if (json) {
548
- var result = JSON.parse(json);
549
- var error = result.errors.pop();
550
- if (error.message) {
551
- self.stopImport(true);
552
- self.setStatus({
553
- type: 'error',
554
- title: ai1wm_locale.unable_to_import,
555
- message: error.message
556
- });
557
- return;
558
- }
559
- }
560
- } catch (e) {}
561
-
562
- if (retries >= 5) {
563
- self.stopImport(true);
564
- self.setStatus({
565
- type: 'error',
566
- title: ai1wm_locale.unable_to_import,
567
- message: ai1wm_locale.unable_to_confirm_the_import
568
- });
569
- return;
570
- }
571
-
572
- retries++;
573
-
574
- setTimeout(self.confirm.bind(self, options, retries), timeout);
575
- });
 
 
 
 
 
576
  };
577
 
578
  Import.prototype.checkDiskSpace = function (fileSize, callback) {
579
- this.diskSpaceCallback = callback;
580
-
581
- var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10);
582
- var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10);
583
- var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10);
584
-
585
- if (diskSpaceFree >= 0) {
586
- var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra;
587
- if (diskSpaceRequired > diskSpaceFree) {
588
- this.setStatus({
589
- type: 'disk_space_confirm',
590
- message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree))
591
- });
592
- return;
593
- }
594
- }
595
-
596
- callback();
597
  };
598
 
599
  Import.prototype.blogs = function (options, retries) {
600
- var self = this;
601
- retries = retries || 0;
602
-
603
- // Stop running import
604
- if (this.isImportStopped()) {
605
- return;
606
- }
607
-
608
- // Set params
609
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
610
-
611
- // Set additional params
612
- if (options) {
613
- params = params.concat(Ai1wm.Util.list(options));
614
- }
615
-
616
- // Blogs
617
- $.ajax({
618
- url: ai1wm_import.ajax.url,
619
- type: 'POST',
620
- dataType: 'json',
621
- data: params,
622
- dataFilter: function dataFilter(data) {
623
- return Ai1wm.Util.json(data);
624
- }
625
- }).done(function () {
626
- self.getStatus();
627
- }).done(function (result) {
628
- if (result) {
629
- self.run(result);
630
- }
631
- }).fail(function (xhr) {
632
- var timeout = retries * 1000;
633
-
634
- try {
635
- var json = Ai1wm.Util.json(xhr.responseText);
636
- if (json) {
637
- var result = JSON.parse(json);
638
- var error = result.errors.pop();
639
- if (error.message) {
640
- self.stopImport(true);
641
- self.setStatus({
642
- type: 'error',
643
- title: ai1wm_locale.unable_to_import,
644
- message: error.message
645
- });
646
- return;
647
- }
648
- }
649
- } catch (e) {}
650
-
651
- if (retries >= 5) {
652
- self.stopImport(true);
653
- self.setStatus({
654
- type: 'error',
655
- title: ai1wm_locale.unable_to_import,
656
- message: ai1wm_locale.unable_to_prepare_blogs_on_import
657
- });
658
- return;
659
- }
660
-
661
- retries++;
662
-
663
- setTimeout(self.blogs.bind(self, options, retries), timeout);
664
- });
 
 
 
 
 
665
  };
666
 
667
  Import.prototype.clean = function (options, retries) {
668
- var self = this;
669
- retries = retries || 0;
670
-
671
- // Reset stop flag
672
- if (retries === 0) {
673
- this.stopImport(true);
674
- }
675
-
676
- // Set initial status
677
- this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_import });
678
-
679
- // Set params
680
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
681
-
682
- // Set additional params
683
- if (options) {
684
- params = params.concat(Ai1wm.Util.list(options));
685
- }
686
-
687
- // Clean
688
- $.ajax({
689
- url: ai1wm_import.ajax.url,
690
- type: 'POST',
691
- dataType: 'json',
692
- data: params,
693
- dataFilter: function dataFilter(data) {
694
- return Ai1wm.Util.json(data);
695
- }
696
- }).done(function () {
697
- // Unbinding the beforeunload event when we stop importing
698
- $(window).unbind('beforeunload');
699
-
700
- // Destroy modal
701
- self.modal.destroy();
702
- }).fail(function (xhr) {
703
- var timeout = retries * 1000;
704
-
705
- try {
706
- var json = Ai1wm.Util.json(xhr.responseText);
707
- if (json) {
708
- var result = JSON.parse(json);
709
- var error = result.errors.pop();
710
- if (error.message) {
711
- self.stopImport(true);
712
- self.setStatus({
713
- type: 'error',
714
- title: ai1wm_locale.unable_to_import,
715
- message: error.message
716
- });
717
- return;
718
- }
719
- }
720
- } catch (e) {}
721
-
722
- if (retries >= 5) {
723
- self.stopImport(true);
724
- self.setStatus({
725
- type: 'error',
726
- title: ai1wm_locale.unable_to_import,
727
- message: ai1wm_locale.unable_to_stop_the_import
728
- });
729
- return;
730
- }
731
-
732
- retries++;
733
-
734
- setTimeout(self.clean.bind(self, options, retries), timeout);
735
- });
 
 
 
 
 
 
736
  };
737
 
738
  Import.prototype.getStatus = function () {
739
- var self = this;
740
-
741
- // Stop getting status
742
- if (this.isImportStopped()) {
743
- return;
744
- }
745
-
746
- this.statusXhr = $.ajax({
747
- url: ai1wm_import.status.url,
748
- type: 'GET',
749
- dataType: 'json',
750
- cache: false,
751
- dataFilter: function dataFilter(data) {
752
- return Ai1wm.Util.json(data);
753
- }
754
- }).done(function (params) {
755
- if (params) {
756
- self.setStatus(params);
757
-
758
- // Next status
759
- switch (params.type) {
760
- case 'done':
761
- case 'error':
762
- // Unbinding the beforeunload event when any case is performed
763
- $(window).unbind('beforeunload');
764
- return;
765
-
766
- case 'confirm':
767
- case 'disk_space_confirm':
768
- case 'blogs':
769
- return;
770
- }
771
- }
772
-
773
- // Import is not done yet, let's check status in 3 seconds
774
- setTimeout(self.getStatus.bind(self), 3000);
775
- }).fail(function () {
776
- // Import is not done yet, let's check status in 3 seconds
777
- setTimeout(self.getStatus.bind(self), 3000);
778
- });
779
  };
780
 
781
  Import.prototype.setStatus = function (params) {
782
- this.modal.render(params);
783
  };
784
 
785
  Import.prototype.onConfirm = function (options) {
786
- this.confirm(options);
787
  };
788
 
789
  Import.prototype.onBlogs = function (options) {
790
- this.blogs(options);
791
  };
792
 
793
  Import.prototype.onStop = function (options) {
794
- this.clean(options);
795
  };
796
 
797
  Import.prototype.onDiskSpaceConfirm = function (options) {
798
- this.diskSpaceCallback(options);
799
  };
800
 
801
  Import.prototype.stopImport = function (isStopped) {
802
- try {
803
- if (isStopped && this.statusXhr) {
804
- this.statusXhr.abort();
805
- }
806
- } finally {
807
- this.isStopped = isStopped;
808
- }
809
  };
810
 
811
  Import.prototype.isImportStopped = function () {
812
- return this.isStopped;
813
  };
814
 
815
  module.exports = Import;
816
 
817
  /***/ }),
818
- /* 4 */
819
- /***/ (function(module, exports, __webpack_require__) {
820
-
821
- "use strict";
822
 
 
 
823
 
824
  /**
825
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -844,814 +1109,376 @@ module.exports = Import;
844
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
845
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
846
  */
847
-
848
  var $ = jQuery;
849
 
850
  var Modal = function Modal() {
851
- var self = this;
852
-
853
- // Error Modal
854
- this.error = function (params) {
855
- // Create the modal container
856
- var container = $('<div></div>');
857
-
858
- // Create section to hold title, message and action
859
- var section = $('<section></section>');
860
-
861
- // Create header to hold title
862
- var header = $('<h1></h1>');
863
 
864
- // Create paragraph to hold mesage
865
- var message = $('<p></p>').html(params.message);
 
866
 
867
- // Create action section
868
- var action = $('<div></div>');
869
 
870
- // Create title
871
- var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
872
 
873
- // Create close button
874
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
875
- self.destroy();
876
- });
877
 
878
- // Append text to close button
879
- closeButton.append(ai1wm_locale.close_import);
880
 
881
- // Append close button to action
882
- action.append(closeButton);
883
 
884
- // Append title to section
885
- header.append(title);
 
886
 
887
- // Append header and message to section
888
- section.append(header).append(message);
889
 
890
- // Append section and action to container
891
- container.append(section).append(action);
892
 
893
- // Render modal
894
- self.modal.html(container).show();
895
- self.modal.focus();
896
- self.overlay.show();
897
- };
898
 
899
- // Progress Modal
900
- this.progress = function (params) {
901
- // Update progress bar meter
902
- if (this.progress.progressBarMeter) {
903
- this.progress.progressBarMeter.width(params.percent + '%');
904
- }
905
 
906
- // Update progress bar percent
907
- if (this.progress.progressBarPercent) {
908
- this.progress.progressBarPercent.text(params.percent + '%');
909
- return;
910
- }
911
 
912
- // Create the modal container
913
- var container = $('<div></div>');
 
 
914
 
915
- // Create section to hold title, message and action
916
- var section = $('<section></section>');
917
 
918
- // Create header to hold progress bar
919
- var header = $('<h1></h1>');
 
 
 
920
 
921
- // Create action section
922
- var action = $('<div></div>');
923
 
924
- // Create progress bar
925
- var progressBar = $('<span class="ai1wm-progress-bar"></span>');
 
 
926
 
927
- // Create progress bar meter
928
- this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
929
 
930
- // Create progress bar percent
931
- this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%');
932
 
933
- // Create stop import
934
- var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
935
- stopButton.attr('disabled', 'disabled');
936
- self.onStop();
937
- });
938
 
939
- // Append text to stop button
940
- stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import);
941
 
942
- // Append progress meter and progress percent
943
- progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
944
 
945
- // Append stop button to action
946
- action.append(stopButton);
947
 
948
- // Append progress bar to section
949
- header.append(progressBar);
950
 
951
- // Append header to section
952
- section.append(header);
953
 
954
- // Append section and action to container
955
- container.append(section).append(action);
 
 
956
 
957
- // Render modal
958
- self.modal.html(container).show();
959
- self.modal.focus();
960
- self.overlay.show();
961
- };
962
 
963
- // Pro Modal
964
- this.pro = function (params) {
965
- // Create the modal container
966
- var container = $('<div></div>');
967
 
968
- // Create section to hold title, message and action
969
- var section = $('<section></section>');
970
 
971
- // Create header to hold warning
972
- var header = $('<h1></h1>');
973
 
974
- // Create paragraph to hold mesage
975
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
976
 
977
- // Create action section
978
- var action = $('<div></div>');
979
 
980
- // Create warning
981
- var warning = $('<i class="ai1wm-icon-notification"></i>');
 
 
982
 
983
- // Create close button
984
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
985
- self.destroy();
986
- });
987
 
988
- // Append text to close button
989
- closeButton.append(ai1wm_locale.close_import);
 
990
 
991
- // Append close button to action
992
- action.append(closeButton);
993
 
994
- // Append warning to section
995
- header.append(warning);
996
 
997
- // Append header and message to section
998
- section.append(header).append(message);
999
 
1000
- // Append section and action to container
1001
- container.append(section).append(action);
1002
 
1003
- // Render modal
1004
- self.modal.html(container).show();
1005
- self.modal.focus();
1006
- self.overlay.show();
1007
- };
1008
 
1009
- // Confirm Modal
1010
- this.confirm = function (params) {
1011
- // Create the modal container
1012
- var container = $('<div></div>');
1013
 
1014
- // Create section to hold title, message and action
1015
- var section = $('<section></section>');
1016
 
1017
- // Create header to hold warning
1018
- var header = $('<h1></h1>');
1019
 
1020
- // Create paragraph to hold mesage
1021
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
1022
 
1023
- // Create action section
1024
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1025
 
1026
- // Create warning
1027
- var warning = $('<i class="ai1wm-icon-notification"></i>');
1028
 
1029
- // Create close button
1030
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1031
- closeButton.attr('disabled', 'disabled');
1032
- self.onStop();
1033
- });
1034
 
1035
- // Create confirm button
1036
- var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1037
- confirmButton.attr('disabled', 'disabled');
1038
- self.onConfirm();
1039
- });
1040
 
1041
- // Append text to close button
1042
- closeButton.append(ai1wm_locale.close_import);
 
1043
 
1044
- // Append text to confirm button
1045
- confirmButton.append(ai1wm_locale.confirm_import + ' &gt;');
1046
 
1047
- // Append close button to action
1048
- action.append(closeButton);
1049
 
1050
- // Append confirm button to action
1051
- action.append(confirmButton);
1052
 
1053
- // Append warning to section
1054
- header.append(warning);
1055
 
1056
- // Append header and message to section
1057
- section.append(header).append(message);
1058
 
1059
- // Append section and action to container
1060
- container.append(section).append(action);
 
 
1061
 
1062
- // Render modal
1063
- self.modal.html(container).show();
1064
- self.modal.focus();
1065
- self.overlay.show();
1066
- };
1067
 
1068
- // Disk space Confirm Modal
1069
- this.diskSpaceConfirm = function (params) {
1070
- // Create the modal container
1071
- var container = $('<div></div>');
1072
 
1073
- // Create section to hold title, message and action
1074
- var section = $('<section></section>');
1075
 
1076
- // Create header to hold warning
1077
- var header = $('<h1></h1>');
1078
 
1079
- // Create paragraph to hold mesage
1080
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
1081
 
1082
- // Create action section
1083
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1084
 
1085
- // Create warning
1086
- var warning = $('<i class="ai1wm-icon-notification"></i>');
1087
 
1088
- // Create close button
1089
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1090
- self.destroy();
1091
- });
1092
 
1093
- // Create confirm button
1094
- var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1095
- $(this).attr('disabled', 'disabled');
1096
- self.onDiskSpaceConfirm();
1097
- });
1098
 
1099
- // Append text to close button
1100
- closeButton.append(ai1wm_locale.close_import);
1101
 
1102
- // Append text to confirm button
1103
- confirmButton.append(ai1wm_locale.confirm_disk_space);
 
1104
 
1105
- // Append close button to action
1106
- action.append(closeButton);
1107
 
1108
- // Append confirm button to action
1109
- action.append(confirmButton);
1110
 
1111
- // Append warning to section
1112
- header.append(warning);
1113
 
1114
- // Append header and message to section
1115
- section.append(header).append(message);
1116
 
1117
- // Append section and action to container
1118
- container.append(section).append(action);
1119
 
1120
- // Render modal
1121
- self.modal.html(container).show();
1122
- self.modal.focus();
1123
- self.overlay.show();
1124
- };
1125
 
1126
- // Blogs Modal
1127
- this.blogs = function (params) {
1128
- // Create the modal container
1129
- var container = $('<form></form>').on('submit', function (e) {
1130
- e.preventDefault();
1131
- continueButton.attr('disabled', 'disabled');
1132
- self.onBlogs(container.serializeArray());
1133
- });
1134
 
1135
- // Create section to hold title, message and action
1136
- var section = $('<section></section>');
1137
 
1138
- // Create header to hold title
1139
- var header = $('<h1></h1>');
1140
 
1141
- // Create paragraph to hold mesage
1142
- var message = $('<p></p>').html(params.message);
1143
 
1144
- // Create action section
1145
- var action = $('<div></div>');
1146
 
1147
- // Create title
1148
- var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
1149
 
1150
- // Create continue button
1151
- var continueButton = $('<button type="submit" class="ai1wm-button-green"></button>');
1152
 
1153
- // Append text to continue button
1154
- continueButton.append(ai1wm_locale.continue_import);
1155
 
1156
- // Append continue button to action
1157
- action.append(continueButton);
 
 
1158
 
1159
- // Append title to section
1160
- header.append(title);
1161
 
1162
- // Append header and message to section
1163
- section.append(header).append(message);
 
 
 
 
 
1164
 
1165
- // Append section and action to container
1166
- container.append(section).append(action);
1167
 
1168
- // Render modal
1169
- self.modal.html(container).show();
1170
- self.modal.focus();
1171
- self.overlay.show();
1172
- };
1173
 
1174
- // Info Modal
1175
- this.info = function (params) {
1176
- // Create the modal container
1177
- var container = $('<div></div>');
1178
 
1179
- // Create section to hold title, message and action
1180
- var section = $('<section></section>');
1181
 
1182
- // Create header to hold loader
1183
- var header = $('<h1></h1>');
1184
 
1185
- // Create paragraph to hold mesage
1186
- var message = $('<p></p>').html(params.message);
1187
 
1188
- // Create action section
1189
- var action = $('<div></div>');
1190
 
1191
- // Create loader
1192
- var loader = $('<span class="ai1wm-loader"></span>');
1193
 
1194
- // Create warning
1195
- var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser);
1196
 
1197
- // Create notice to be displayed during import process
1198
- var notice = $('<div class="ai1wm-import-modal-notice"></div>');
1199
 
1200
- // Append warning to notice
1201
- notice.append(warning);
1202
 
1203
- // Append stop button to action
1204
- action.append(notice);
 
 
1205
 
1206
- // Append loader to header
1207
- header.append(loader);
1208
 
1209
- // Append header and message to section
1210
- section.append(header).append(message);
 
1211
 
1212
- // Append section and action to container
1213
- container.append(section).append(action);
1214
 
1215
- // Render modal
1216
- self.modal.html(container).show();
1217
- self.modal.focus();
1218
- self.overlay.show();
1219
- };
1220
 
1221
- // Done Modal
1222
- this.done = function (params) {
1223
- // Create the modal container
1224
- var container = $('<div></div>');
1225
 
1226
- // Create section to hold title, message and action
1227
- var section = $('<section></section>');
1228
 
1229
- // Create header to hold title
1230
- var header = $('<h1></h1>');
1231
 
1232
- // Create paragraph to hold mesage
1233
- var message = $('<p class="ai1wm-import-modal-content-done"></p>').html(params.message);
1234
 
1235
- // Create action section
1236
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1237
 
1238
- // Create title
1239
- var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
1240
 
1241
- // Create close button
1242
- var closeButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1243
- self.destroy();
1244
- });
1245
 
1246
- // Append text to close button
1247
- closeButton.append(ai1wm_locale.finish_import + ' &gt;');
1248
 
1249
- // Append close button to action
1250
- action.append(closeButton);
1251
 
1252
- // Append title to section
1253
- header.append(title);
1254
 
1255
- // Append header and message to section
1256
- section.append(header).append(message);
 
 
1257
 
1258
- // Append section and action to container
1259
- container.append(section).append(action);
1260
 
1261
- // Render modal
1262
- self.modal.html(container).show();
1263
- self.modal.focus();
1264
- self.overlay.show();
1265
- };
1266
 
1267
- // Create the overlay
1268
- this.overlay = $('<div class="ai1wm-overlay"></div>');
1269
 
1270
- // Create the modal container
1271
- this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
1272
 
1273
- $('body').append(this.overlay) // Append overlay to body
1274
- .append(this.modal); // Append modal to body
1275
- };
1276
 
1277
- Modal.prototype.render = function (params) {
1278
- $(document).trigger('ai1wm-import-status', params);
1279
-
1280
- // Show modal
1281
- switch (params.type) {
1282
- case 'pro':
1283
- this.pro(params);
1284
- break;
1285
-
1286
- case 'error':
1287
- this.error(params);
1288
- break;
1289
-
1290
- case 'confirm':
1291
- this.confirm(params);
1292
- break;
1293
-
1294
- case 'disk_space_confirm':
1295
- this.diskSpaceConfirm(params);
1296
- break;
1297
-
1298
- case 'blogs':
1299
- this.blogs(params);
1300
- break;
1301
-
1302
- case 'progress':
1303
- this.progress(params);
1304
- break;
1305
-
1306
- case 'info':
1307
- this.info(params);
1308
- break;
1309
-
1310
- case 'done':
1311
- this.done(params);
1312
- break;
1313
- }
1314
- };
1315
 
1316
- Modal.prototype.destroy = function () {
1317
- this.modal.hide();
1318
- this.overlay.hide();
1319
- };
1320
 
1321
- module.exports = Modal;
 
 
1322
 
1323
- /***/ }),
1324
- /* 5 */
1325
- /***/ (function(module, exports, __webpack_require__) {
1326
 
1327
- "use strict";
1328
 
 
1329
 
1330
- /**
1331
- * Copyright (C) 2014-2020 ServMask Inc.
1332
- *
1333
- * This program is free software: you can redistribute it and/or modify
1334
- * it under the terms of the GNU General Public License as published by
1335
- * the Free Software Foundation, either version 3 of the License, or
1336
- * (at your option) any later version.
1337
- *
1338
- * This program is distributed in the hope that it will be useful,
1339
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1340
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1341
- * GNU General Public License for more details.
1342
- *
1343
- * You should have received a copy of the GNU General Public License
1344
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1345
- *
1346
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
1347
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
1348
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
1349
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
1350
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1351
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1352
- */
1353
 
1354
- var Modal = __webpack_require__(6),
1355
- $ = jQuery;
1356
 
1357
- var Export = function Export() {
1358
- var self = this;
 
 
1359
 
1360
- // Set params
1361
- this.params = [];
1362
 
1363
- // Set modal
1364
- this.modal = new Modal();
1365
 
1366
- // Set stop listener
1367
- this.modal.onStop = function (options) {
1368
- self.onStop(options);
1369
- };
1370
  };
1371
 
1372
- Export.prototype.setParams = function (params) {
1373
- this.params = Ai1wm.Util.list(params);
1374
- };
1375
 
1376
- Export.prototype.start = function (options, retries) {
1377
- var self = this;
1378
- retries = retries || 0;
1379
-
1380
- // Reset stop flag
1381
- if (retries === 0) {
1382
- this.stopExport(false);
1383
- }
1384
-
1385
- // Stop running export
1386
- if (this.isExportStopped()) {
1387
- return;
1388
- }
1389
-
1390
- // Initializing beforeunload event
1391
- $(window).bind('beforeunload', function () {
1392
- return ai1wm_locale.stop_exporting_your_website;
1393
- });
1394
-
1395
- // Set initial status
1396
- this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_export });
1397
-
1398
- // Set params
1399
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
1400
-
1401
- // Set additional params
1402
- if (options) {
1403
- params = params.concat(Ai1wm.Util.list(options));
1404
- }
1405
-
1406
- // Export
1407
- $.ajax({
1408
- url: ai1wm_export.ajax.url,
1409
- type: 'POST',
1410
- dataType: 'json',
1411
- data: params,
1412
- dataFilter: function dataFilter(data) {
1413
- return Ai1wm.Util.json(data);
1414
- }
1415
- }).done(function () {
1416
- self.getStatus();
1417
- }).done(function (result) {
1418
- if (result) {
1419
- self.run(result);
1420
- }
1421
- }).fail(function (xhr) {
1422
- var timeout = retries * 1000;
1423
-
1424
- try {
1425
- var json = Ai1wm.Util.json(xhr.responseText);
1426
- if (json) {
1427
- var result = JSON.parse(json);
1428
- var error = result.errors.pop();
1429
- if (error.message) {
1430
- self.stopExport(true);
1431
- self.setStatus({
1432
- type: 'error',
1433
- title: ai1wm_locale.unable_to_export,
1434
- message: error.message
1435
- });
1436
- return;
1437
- }
1438
- }
1439
- } catch (e) {}
1440
-
1441
- if (retries >= 5) {
1442
- self.stopExport(true);
1443
- self.setStatus({
1444
- type: 'error',
1445
- title: ai1wm_locale.unable_to_export,
1446
- message: ai1wm_locale.unable_to_start_the_export
1447
- });
1448
- return;
1449
- }
1450
-
1451
- retries++;
1452
-
1453
- setTimeout(self.start.bind(self, options, retries), timeout);
1454
- });
1455
- };
1456
 
1457
- Export.prototype.run = function (params, retries) {
1458
- var self = this;
1459
- retries = retries || 0;
1460
-
1461
- // Stop running export
1462
- if (this.isExportStopped()) {
1463
- return;
1464
- }
1465
-
1466
- // Export
1467
- $.ajax({
1468
- url: ai1wm_export.ajax.url,
1469
- type: 'POST',
1470
- dataType: 'json',
1471
- data: params,
1472
- dataFilter: function dataFilter(data) {
1473
- return Ai1wm.Util.json(data);
1474
- }
1475
- }).done(function (result) {
1476
- if (result) {
1477
- self.run(result);
1478
- }
1479
- }).fail(function (xhr) {
1480
- var timeout = retries * 1000;
1481
-
1482
- try {
1483
- var json = Ai1wm.Util.json(xhr.responseText);
1484
- if (json) {
1485
- var result = JSON.parse(json);
1486
- var error = result.errors.pop();
1487
- if (error.message) {
1488
- self.stopExport(true);
1489
- self.setStatus({
1490
- type: 'error',
1491
- title: ai1wm_locale.unable_to_export,
1492
- message: error.message
1493
- });
1494
- return;
1495
- }
1496
- }
1497
- } catch (e) {}
1498
-
1499
- if (retries >= 5) {
1500
- self.stopExport(true);
1501
- self.setStatus({
1502
- type: 'error',
1503
- title: ai1wm_locale.unable_to_export,
1504
- message: ai1wm_locale.unable_to_run_the_export
1505
- });
1506
- return;
1507
- }
1508
-
1509
- retries++;
1510
-
1511
- setTimeout(self.run.bind(self, params, retries), timeout);
1512
- });
1513
- };
1514
 
1515
- Export.prototype.clean = function (options, retries) {
1516
- var self = this;
1517
- retries = retries || 0;
1518
-
1519
- // Reset stop flag
1520
- if (retries === 0) {
1521
- this.stopExport(true);
1522
- }
1523
-
1524
- // Set initial status
1525
- this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_export });
1526
-
1527
- // Set params
1528
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
1529
-
1530
- // Set additional params
1531
- if (options) {
1532
- params = params.concat(Ai1wm.Util.list(options));
1533
- }
1534
-
1535
- // Clean
1536
- $.ajax({
1537
- url: ai1wm_export.ajax.url,
1538
- type: 'POST',
1539
- dataType: 'json',
1540
- data: params,
1541
- dataFilter: function dataFilter(data) {
1542
- return Ai1wm.Util.json(data);
1543
- }
1544
- }).done(function () {
1545
- // Unbinding the beforeunload event when we stop exporting
1546
- $(window).unbind('beforeunload');
1547
-
1548
- // Destroy modal
1549
- self.modal.destroy();
1550
- }).fail(function (xhr) {
1551
- var timeout = retries * 1000;
1552
-
1553
- try {
1554
- var json = Ai1wm.Util.json(xhr.responseText);
1555
- if (json) {
1556
- var result = JSON.parse(json);
1557
- var error = result.errors.pop();
1558
- if (error.message) {
1559
- self.stopExport(true);
1560
- self.setStatus({
1561
- type: 'error',
1562
- title: ai1wm_locale.unable_to_export,
1563
- message: error.message
1564
- });
1565
- return;
1566
- }
1567
- }
1568
- } catch (e) {}
1569
-
1570
- if (retries >= 5) {
1571
- self.stopExport(true);
1572
- self.setStatus({
1573
- type: 'error',
1574
- title: ai1wm_locale.unable_to_export,
1575
- message: ai1wm_locale.unable_to_stop_the_export
1576
- });
1577
- return;
1578
- }
1579
-
1580
- retries++;
1581
-
1582
- setTimeout(self.clean.bind(self, options, retries), timeout);
1583
- });
1584
- };
1585
 
1586
- Export.prototype.getStatus = function () {
1587
- var self = this;
1588
-
1589
- // Stop getting status
1590
- if (this.isExportStopped()) {
1591
- return;
1592
- }
1593
-
1594
- this.statusXhr = $.ajax({
1595
- url: ai1wm_export.status.url,
1596
- type: 'GET',
1597
- dataType: 'json',
1598
- cache: false,
1599
- dataFilter: function dataFilter(data) {
1600
- return Ai1wm.Util.json(data);
1601
- }
1602
- }).done(function (params) {
1603
- if (params) {
1604
- self.setStatus(params);
1605
-
1606
- // Next status
1607
- switch (params.type) {
1608
- case 'done':
1609
- case 'error':
1610
- case 'download':
1611
- // Unbinding beforeunload event when any case is performed
1612
- $(window).unbind('beforeunload');
1613
- return;
1614
- }
1615
- }
1616
-
1617
- // Export is not done yet, let's check status in 3 seconds
1618
- setTimeout(self.getStatus.bind(self), 3000);
1619
- }).fail(function () {
1620
- // Export is not done yet, let's check status in 3 seconds
1621
- setTimeout(self.getStatus.bind(self), 3000);
1622
- });
1623
- };
1624
 
1625
- Export.prototype.setStatus = function (params) {
1626
- this.modal.render(params);
1627
- };
1628
 
1629
- Export.prototype.onStop = function (options) {
1630
- this.clean(options);
1631
- };
1632
 
1633
- Export.prototype.stopExport = function (isStopped) {
1634
- try {
1635
- if (isStopped && this.statusXhr) {
1636
- this.statusXhr.abort();
1637
- }
1638
- } finally {
1639
- this.isStopped = isStopped;
1640
- }
1641
  };
1642
 
1643
- Export.prototype.isExportStopped = function () {
1644
- return this.isStopped;
 
1645
  };
1646
 
1647
- module.exports = Export;
1648
 
1649
  /***/ }),
1650
- /* 6 */
1651
- /***/ (function(module, exports, __webpack_require__) {
1652
-
1653
- "use strict";
1654
 
 
 
1655
 
1656
  /**
1657
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -1676,234 +1503,84 @@ module.exports = Export;
1676
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1677
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1678
  */
1679
-
1680
- var $ = jQuery;
1681
-
1682
- var Modal = function Modal() {
1683
- var self = this;
1684
-
1685
- // Error Modal
1686
- this.error = function (params) {
1687
- // Create the modal container
1688
- var container = $('<div></div>');
1689
-
1690
- // Create section to hold title, message and action
1691
- var section = $('<section></section>');
1692
-
1693
- // Create header to hold title
1694
- var header = $('<h1></h1>');
1695
-
1696
- // Create paragraph to hold mesage
1697
- var message = $('<p></p>').html(params.message);
1698
-
1699
- // Create action section
1700
- var action = $('<div></div>');
1701
-
1702
- // Create title
1703
- var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
1704
-
1705
- // Create close button
1706
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1707
- self.destroy();
1708
- });
1709
-
1710
- // Append text to close button
1711
- closeButton.append(ai1wm_locale.close_export);
1712
-
1713
- // Append close button to action
1714
- action.append(closeButton);
1715
-
1716
- // Append title to section
1717
- header.append(title);
1718
-
1719
- // Append header and message to section
1720
- section.append(header).append(message);
1721
-
1722
- // Append section and action to container
1723
- container.append(section).append(action);
1724
-
1725
- // Render modal
1726
- self.modal.html(container).show();
1727
- self.modal.focus();
1728
- self.overlay.show();
1729
- };
1730
-
1731
- // Info Modal
1732
- this.info = function (params) {
1733
- // Create the modal container
1734
- var container = $('<div></div>');
1735
-
1736
- // Create section to hold title, message and action
1737
- var section = $('<section></section>');
1738
-
1739
- // Create header to hold loader
1740
- var header = $('<h1></h1>');
1741
-
1742
- // Create paragraph to hold mesage
1743
- var message = $('<p></p>').html(params.message);
1744
-
1745
- // Create action section
1746
- var action = $('<div></div>');
1747
-
1748
- // Create loader
1749
- var loader = $('<span class="ai1wm-loader"></span>');
1750
-
1751
- // Create stop export
1752
- var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1753
- stopButton.attr('disabled', 'disabled');
1754
- self.onStop();
1755
- });
1756
-
1757
- // Append text to stop button
1758
- stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_export);
1759
-
1760
- // Append stop button to action
1761
- action.append(stopButton);
1762
-
1763
- // Append loader to header
1764
- header.append(loader);
1765
-
1766
- // Append header and message to section
1767
- section.append(header).append(message);
1768
-
1769
- // Append section and action to container
1770
- container.append(section).append(action);
1771
-
1772
- // Render modal
1773
- self.modal.html(container).show();
1774
- self.modal.focus();
1775
- self.overlay.show();
1776
- };
1777
-
1778
- // Done Modal
1779
- this.done = function (params) {
1780
- // Create the modal container
1781
- var container = $('<div></div>');
1782
-
1783
- // Create section to hold title, message and action
1784
- var section = $('<section></section>');
1785
-
1786
- // Create header to hold title
1787
- var header = $('<h1></h1>');
1788
-
1789
- // Create paragraph to hold mesage
1790
- var message = $('<p></p>').html(params.message);
1791
-
1792
- // Create action section
1793
- var action = $('<div></div>');
1794
-
1795
- // Create title
1796
- var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
1797
-
1798
- // Create close button
1799
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1800
- self.destroy();
1801
- });
1802
-
1803
- // Append text to close button
1804
- closeButton.append(ai1wm_locale.close_export);
1805
-
1806
- // Append close button to action
1807
- action.append(closeButton);
1808
-
1809
- // Append title to section
1810
- header.append(title);
1811
-
1812
- // Append header and message to section
1813
- section.append(header).append(message);
1814
-
1815
- // Append section and action to container
1816
- container.append(section).append(action);
1817
-
1818
- // Render modal
1819
- self.modal.html(container).show();
1820
- self.modal.focus();
1821
- self.overlay.show();
1822
- };
1823
-
1824
- // Download Modal
1825
- this.download = function (params) {
1826
- // Create the modal container
1827
- var container = $('<div></div>');
1828
-
1829
- // Create section to hold title, message and action
1830
- var section = $('<section></section>');
1831
-
1832
- // Create paragraph to hold mesage
1833
- var message = $('<p></p>').html(params.message);
1834
-
1835
- // Create action section
1836
- var action = $('<div></div>');
1837
-
1838
- // Create close button
1839
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1840
- self.destroy();
1841
- });
1842
-
1843
- // Append text to close button
1844
- closeButton.append(ai1wm_locale.close_export);
1845
-
1846
- // Append close button to action
1847
- action.append(closeButton);
1848
-
1849
- // Append message to section
1850
- section.append(message);
1851
-
1852
- // Append section and action to container
1853
- container.append(section).append(action);
1854
-
1855
- // Render modal
1856
- self.modal.html(container).show();
1857
- self.modal.focus();
1858
- self.overlay.show();
1859
- };
1860
-
1861
- // Create the overlay
1862
- this.overlay = $('<div class="ai1wm-overlay"></div>');
1863
-
1864
- // Create the modal container
1865
- this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
1866
-
1867
- $('body').append(this.overlay) // Append overlay to body
1868
- .append(this.modal); // Append modal to body
1869
- };
1870
-
1871
- Modal.prototype.render = function (params) {
1872
- $(document).trigger('ai1wm-export-status', params);
1873
-
1874
- // Show modal
1875
- switch (params.type) {
1876
- case 'error':
1877
- this.error(params);
1878
- break;
1879
-
1880
- case 'info':
1881
- this.info(params);
1882
- break;
1883
-
1884
- case 'done':
1885
- this.done(params);
1886
- break;
1887
-
1888
- case 'download':
1889
- this.download(params);
1890
- break;
1891
- }
1892
- };
1893
-
1894
- Modal.prototype.destroy = function () {
1895
- this.modal.hide();
1896
- this.overlay.hide();
1897
- };
1898
-
1899
- module.exports = Modal;
1900
 
1901
  /***/ }),
1902
- /* 7 */
1903
- /***/ (function(module, exports, __webpack_require__) {
1904
 
1905
- "use strict";
1906
- /* WEBPACK VAR INJECTION */(function(global) {
1907
 
1908
  /**
1909
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -1928,182 +1605,106 @@ module.exports = Modal;
1928
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1929
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1930
  */
1931
-
1932
- var Feedback = __webpack_require__(1);
1933
- var Report = __webpack_require__(2);
1934
- var Import = __webpack_require__(3);
1935
- var Export = __webpack_require__(5);
1936
- var Restore = __webpack_require__(8);
1937
-
1938
  jQuery(document).ready(function ($) {
1939
- 'use strict';
1940
-
1941
- $('#ai1wm-backups-list').on({
1942
- mouseenter: function mouseenter() {
1943
- $(this).addClass('ai1wm-button-on');
1944
- },
1945
- mouseleave: function mouseleave() {
1946
- $(this).removeClass('ai1wm-button-on');
1947
- }
1948
- }, '.ai1wm-backup-actions > a');
1949
-
1950
- // Delete file
1951
- $('#ai1wm-backups-list').on('click', '.ai1wm-backup-delete', function (e) {
1952
- var self = $(this);
1953
-
1954
- // Delete file
1955
- /* eslint-disable no-alert */
1956
- if (confirm(ai1wm_locale.want_to_delete_this_file)) {
1957
- /* eslint-enable no-alert */
1958
- $.ajax({
1959
- url: ai1wm_backups.ajax.url,
1960
- type: 'POST',
1961
- dataType: 'json',
1962
- data: {
1963
- secret_key: ai1wm_backups.secret_key,
1964
- archive: self.data('archive')
1965
- },
1966
- dataFilter: function dataFilter(data) {
1967
- return Ai1wm.Util.json(data);
1968
- }
1969
- }).done(function (data) {
1970
- if (data.errors.length === 0) {
1971
- self.closest('tr').remove();
1972
-
1973
- if ($('.ai1wm-backups tbody tr').length === 1) {
1974
- $('.ai1wm-backups').hide();
1975
- $('.ai1wm-backups-empty').show();
1976
- }
1977
- }
1978
- });
1979
- }
1980
-
1981
- e.preventDefault();
1982
- });
1983
-
1984
- var model = new Import();
1985
-
1986
- // Restore from file
1987
- $('#ai1wm-backups-list').on('click', '.ai1wm-backup-restore', function (e) {
1988
- e.preventDefault();
1989
-
1990
- /* eslint-disable no-unused-vars */
1991
- if (Ai1wm.MultisiteExtensionRestore) {
1992
- var restore = new Ai1wm.MultisiteExtensionRestore($(this).data('archive'), $(this).data('size'));
1993
- } else if (Ai1wm.UnlimitedExtensionRestore) {
1994
- var _restore = new Ai1wm.UnlimitedExtensionRestore($(this).data('archive'), $(this).data('size'));
1995
- } else if (Ai1wm.FreeExtensionRestore) {
1996
- var _restore2 = new Ai1wm.FreeExtensionRestore($(this).data('archive'), $(this).data('size'));
1997
- } else {
1998
- var _restore3 = new Ai1wm.Restore($(this).data('archive'), $(this).data('size'));
1999
- }
2000
- /* eslint-enable no-unused-vars */
2001
- });
2002
-
2003
- $('#ai1wm-backups-list').on('click', '.ai1wm-backup-label-description, .ai1wm-backup-label-text', function () {
2004
- $(this).hide();
2005
- $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-holder').show();
2006
- $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-field').focus();
2007
- });
2008
-
2009
- $('#ai1wm-backups-list').on('keydown', '.ai1wm-backup-label-field', function (e) {
2010
- var self = $(this);
2011
- var spinner = $('<span class="spinner"></span>');
2012
-
2013
- // Update backup label
2014
- if (e.which === 13) {
2015
- e.preventDefault();
2016
- self.hide();
2017
- self.closest('.ai1wm-backup-label-holder').append(spinner);
2018
-
2019
- $.ajax({
2020
- url: ai1wm_backups.labels.url,
2021
- type: 'POST',
2022
- dataType: 'json',
2023
- data: {
2024
- secret_key: ai1wm_backups.secret_key,
2025
- archive: self.data('archive'),
2026
- label: self.val()
2027
- },
2028
- dataFilter: function dataFilter(data) {
2029
- return Ai1wm.Util.json(data);
2030
- }
2031
- }).done(function (data) {
2032
- if (data.errors.length === 0) {
2033
- spinner.remove();
2034
- self.show();
2035
-
2036
- if (self.val()) {
2037
- self.closest('.ai1wm-backup-label-holder').hide();
2038
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show();
2039
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-colored').text(self.val());
2040
- } else {
2041
- self.closest('.ai1wm-backup-label-holder').hide();
2042
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style');
2043
- }
2044
-
2045
- self.data('value', self.val());
2046
- }
2047
- });
2048
- } else if (e.which === 27) {
2049
- e.preventDefault();
2050
-
2051
- if (self.data('value')) {
2052
- self.closest('.ai1wm-backup-label-holder').hide();
2053
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show();
2054
- } else {
2055
- self.closest('.ai1wm-backup-label-holder').hide();
2056
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').hide();
2057
- self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style');
2058
- }
2059
-
2060
- self.val(self.data('value'));
2061
- }
2062
- });
2063
-
2064
- $(document).on('ai1wm-export-status', function (e, params) {
2065
- if (params.type === 'download') {
2066
- if ($('.ai1wm-backups tbody tr').length > 1) {
2067
- $('.ai1wm-backups-list-spinner-holder').show();
2068
- } else {
2069
- $('.ai1wm-backups-empty').hide();
2070
- $('.ai1wm-backups-empty-spinner-holder').show();
2071
- }
2072
-
2073
- $.get(ai1wm_backups.backups.url, { secret_key: ai1wm_backups.secret_key }).done(function (data) {
2074
- $('#ai1wm-backups-create').find('.ai1wm-backups-empty').hide();
2075
- $('#ai1wm-backups-create').find('.ai1wm-backups-empty-spinner-holder').hide();
2076
- $('#ai1wm-backups-list').html(data);
2077
- });
2078
- }
2079
- });
2080
-
2081
- model = new Export();
2082
-
2083
- $('#ai1wm-create-backup').click(function (e) {
2084
- var storage = Ai1wm.Util.random(12);
2085
- var options = Ai1wm.Util.form('#ai1wm-export-form').concat({ name: 'storage', value: storage }).concat({ name: 'file', value: 1 });
2086
-
2087
- // Set global params
2088
- model.setParams(options);
2089
-
2090
- // Start export
2091
- model.start();
2092
-
2093
- e.preventDefault();
2094
- });
2095
  });
2096
 
2097
- global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Feedback: Feedback, Report: Report, Import: Import, Restore: Restore, Export: Export });
2098
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
2099
-
2100
- /***/ }),
2101
- /* 8 */
2102
- /***/ (function(module, exports, __webpack_require__) {
2103
-
2104
- "use strict";
2105
-
2106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2107
  /**
2108
  * Copyright (C) 2014-2020 ServMask Inc.
2109
  *
@@ -2127,13 +1728,177 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Feedback: Feedback, Report: Rep
2127
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
2128
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
2129
  */
2130
- var Import = __webpack_require__(3);
2131
- var Restore = function Restore() {
2132
- var model = new Import();
2133
- model.setStatus({ type: 'pro', message: ai1wm_locale.restore_from_file });
2134
- };
2135
 
2136
- module.exports = Restore;
2137
 
2138
- /***/ })
2139
- /******/ ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ /***/ 874:
5
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6
 
7
+ /**
8
+ * Copyright (C) 2014-2020 ServMask Inc.
9
+ *
10
+ * This program is free software: you can redistribute it and/or modify
11
+ * it under the terms of the GNU General Public License as published by
12
+ * the Free Software Foundation, either version 3 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License
21
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22
+ *
23
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
24
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
25
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
26
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
27
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
28
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
29
+ */
30
+ var Import = __webpack_require__(936);
31
+
32
+ var Restore = function Restore() {
33
+ var model = new Import();
34
+ model.setStatus({
35
+ type: 'pro',
36
+ message: ai1wm_locale.restore_from_file
37
+ });
38
+ };
39
 
40
+ module.exports = Restore;
41
+
42
+ /***/ }),
43
 
44
+ /***/ 12:
45
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
46
 
47
  /**
48
  * Copyright (C) 2014-2020 ServMask Inc.
67
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
68
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
69
  */
70
+ var Modal = __webpack_require__(326),
71
+ $ = jQuery;
72
 
73
+ var Export = function Export() {
74
+ var self = this; // Set params
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
+ this.params = []; // Set modal
77
+
78
+ this.modal = new Modal(); // Set stop listener
79
+
80
+ this.modal.onStop = function (options) {
81
+ self.onStop(options);
82
+ };
83
+ };
84
+
85
+ Export.prototype.setParams = function (params) {
86
+ this.params = Ai1wm.Util.list(params);
87
+ };
88
+
89
+ Export.prototype.start = function (options, retries) {
90
+ var self = this;
91
+ retries = retries || 0; // Reset stop flag
92
+
93
+ if (retries === 0) {
94
+ this.stopExport(false);
95
+ } // Stop running export
96
+
97
+
98
+ if (this.isExportStopped()) {
99
+ return;
100
+ } // Initializing beforeunload event
101
+
102
+
103
+ $(window).bind('beforeunload', function () {
104
+ return ai1wm_locale.stop_exporting_your_website;
105
+ }); // Set initial status
106
+
107
+ this.setStatus({
108
+ type: 'info',
109
+ message: ai1wm_locale.preparing_to_export
110
+ }); // Set params
111
+
112
+ var params = this.params.concat({
113
+ name: 'secret_key',
114
+ value: ai1wm_export.secret_key
115
+ }); // Set additional params
116
+
117
+ if (options) {
118
+ params = params.concat(Ai1wm.Util.list(options));
119
+ } // Export
120
+
121
+
122
+ $.ajax({
123
+ url: ai1wm_export.ajax.url,
124
+ type: 'POST',
125
+ dataType: 'json',
126
+ data: params,
127
+ dataFilter: function dataFilter(data) {
128
+ return Ai1wm.Util.json(data);
129
+ }
130
+ }).done(function () {
131
+ self.getStatus();
132
+ }).done(function (result) {
133
+ if (result) {
134
+ self.run(result);
135
+ }
136
+ }).fail(function (xhr) {
137
+ var timeout = retries * 1000;
138
+
139
+ try {
140
+ var json = Ai1wm.Util.json(xhr.responseText);
141
+
142
+ if (json) {
143
+ var result = JSON.parse(json);
144
+ var error = result.errors.pop();
145
+
146
+ if (error.message) {
147
+ self.stopExport(true);
148
+ self.setStatus({
149
+ type: 'error',
150
+ title: ai1wm_locale.unable_to_export,
151
+ message: error.message
152
+ });
153
+ return;
154
+ }
155
+ }
156
+ } catch (e) {}
157
+
158
+ if (retries >= 5) {
159
+ self.stopExport(true);
160
+ self.setStatus({
161
+ type: 'error',
162
+ title: ai1wm_locale.unable_to_export,
163
+ message: ai1wm_locale.unable_to_start_the_export
164
+ });
165
+ return;
166
+ }
167
+
168
+ retries++;
169
+ setTimeout(self.start.bind(self, options, retries), timeout);
170
+ });
171
+ };
172
+
173
+ Export.prototype.run = function (params, retries) {
174
+ var self = this;
175
+ retries = retries || 0; // Stop running export
176
+
177
+ if (this.isExportStopped()) {
178
+ return;
179
+ } // Export
180
+
181
+
182
+ $.ajax({
183
+ url: ai1wm_export.ajax.url,
184
+ type: 'POST',
185
+ dataType: 'json',
186
+ data: params,
187
+ dataFilter: function dataFilter(data) {
188
+ return Ai1wm.Util.json(data);
189
+ }
190
+ }).done(function (result) {
191
+ if (result) {
192
+ self.run(result);
193
+ }
194
+ }).fail(function (xhr) {
195
+ var timeout = retries * 1000;
196
+
197
+ try {
198
+ var json = Ai1wm.Util.json(xhr.responseText);
199
+
200
+ if (json) {
201
+ var result = JSON.parse(json);
202
+ var error = result.errors.pop();
203
+
204
+ if (error.message) {
205
+ self.stopExport(true);
206
+ self.setStatus({
207
+ type: 'error',
208
+ title: ai1wm_locale.unable_to_export,
209
+ message: error.message
210
+ });
211
+ return;
212
+ }
213
+ }
214
+ } catch (e) {}
215
+
216
+ if (retries >= 5) {
217
+ self.stopExport(true);
218
+ self.setStatus({
219
+ type: 'error',
220
+ title: ai1wm_locale.unable_to_export,
221
+ message: ai1wm_locale.unable_to_run_the_export
222
+ });
223
+ return;
224
+ }
225
+
226
+ retries++;
227
+ setTimeout(self.run.bind(self, params, retries), timeout);
228
+ });
229
+ };
230
+
231
+ Export.prototype.clean = function (options, retries) {
232
+ var self = this;
233
+ retries = retries || 0; // Reset stop flag
234
+
235
+ if (retries === 0) {
236
+ this.stopExport(true);
237
+ } // Set initial status
238
+
239
+
240
+ this.setStatus({
241
+ type: 'info',
242
+ message: ai1wm_locale.please_wait_stopping_the_export
243
+ }); // Set params
244
+
245
+ var params = this.params.concat({
246
+ name: 'secret_key',
247
+ value: ai1wm_export.secret_key
248
+ }).concat({
249
+ name: 'priority',
250
+ value: 300
251
+ }); // Set additional params
252
+
253
+ if (options) {
254
+ params = params.concat(Ai1wm.Util.list(options));
255
+ } // Clean
256
+
257
+
258
+ $.ajax({
259
+ url: ai1wm_export.ajax.url,
260
+ type: 'POST',
261
+ dataType: 'json',
262
+ data: params,
263
+ dataFilter: function dataFilter(data) {
264
+ return Ai1wm.Util.json(data);
265
+ }
266
+ }).done(function () {
267
+ // Unbinding the beforeunload event when we stop exporting
268
+ $(window).unbind('beforeunload'); // Destroy modal
269
+
270
+ self.modal.destroy();
271
+ }).fail(function (xhr) {
272
+ var timeout = retries * 1000;
273
+
274
+ try {
275
+ var json = Ai1wm.Util.json(xhr.responseText);
276
+
277
+ if (json) {
278
+ var result = JSON.parse(json);
279
+ var error = result.errors.pop();
280
+
281
+ if (error.message) {
282
+ self.stopExport(true);
283
+ self.setStatus({
284
+ type: 'error',
285
+ title: ai1wm_locale.unable_to_export,
286
+ message: error.message
287
+ });
288
+ return;
289
+ }
290
+ }
291
+ } catch (e) {}
292
+
293
+ if (retries >= 5) {
294
+ self.stopExport(true);
295
+ self.setStatus({
296
+ type: 'error',
297
+ title: ai1wm_locale.unable_to_export,
298
+ message: ai1wm_locale.unable_to_stop_the_export
299
+ });
300
+ return;
301
+ }
302
+
303
+ retries++;
304
+ setTimeout(self.clean.bind(self, options, retries), timeout);
305
+ });
306
+ };
307
+
308
+ Export.prototype.getStatus = function () {
309
+ var self = this; // Stop getting status
310
+
311
+ if (this.isExportStopped()) {
312
+ return;
313
+ }
314
+
315
+ this.statusXhr = $.ajax({
316
+ url: ai1wm_export.status.url,
317
+ type: 'GET',
318
+ dataType: 'json',
319
+ cache: false,
320
+ dataFilter: function dataFilter(data) {
321
+ return Ai1wm.Util.json(data);
322
+ }
323
+ }).done(function (params) {
324
+ if (params) {
325
+ self.setStatus(params); // Next status
326
+
327
+ switch (params.type) {
328
+ case 'done':
329
+ case 'error':
330
+ case 'download':
331
+ // Unbinding beforeunload event when any case is performed
332
+ $(window).unbind('beforeunload');
333
+ return;
334
+ }
335
+ } // Export is not done yet, let's check status in 3 seconds
336
+
337
+
338
+ setTimeout(self.getStatus.bind(self), 3000);
339
+ }).fail(function () {
340
+ // Export is not done yet, let's check status in 3 seconds
341
+ setTimeout(self.getStatus.bind(self), 3000);
342
+ });
343
+ };
344
+
345
+ Export.prototype.setStatus = function (params) {
346
+ this.modal.render(params);
347
+ };
348
+
349
+ Export.prototype.onStop = function (options) {
350
+ this.clean(options);
351
+ };
352
+
353
+ Export.prototype.stopExport = function (isStopped) {
354
+ try {
355
+ if (isStopped && this.statusXhr) {
356
+ this.statusXhr.abort();
357
+ }
358
+ } finally {
359
+ this.isStopped = isStopped;
360
+ }
361
+ };
362
+
363
+ Export.prototype.isExportStopped = function () {
364
+ return this.isStopped;
365
+ };
366
 
367
+ module.exports = Export;
368
+
369
+ /***/ }),
370
 
371
+ /***/ 326:
372
+ /***/ (function(module) {
373
 
374
  /**
375
  * Copyright (C) 2014-2020 ServMask Inc.
394
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
395
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
396
  */
397
+ var $ = jQuery;
398
 
399
+ var Modal = function Modal() {
400
+ var self = this; // Error Modal
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
+ this.error = function (params) {
403
+ // Create the modal container
404
+ var container = $('<div></div>'); // Create section to hold title, message and action
405
+
406
+ var section = $('<section></section>'); // Create header to hold title
407
+
408
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
409
+
410
+ var message = $('<p></p>').html(params.message); // Create action section
411
+
412
+ var action = $('<div></div>'); // Create title
413
+
414
+ var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title); // Create close button
415
+
416
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
417
+ self.destroy();
418
+ }); // Append text to close button
419
+
420
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
421
+
422
+ action.append(closeButton); // Append title to section
423
+
424
+ header.append(title); // Append header and message to section
425
+
426
+ section.append(header).append(message); // Append section and action to container
427
+
428
+ container.append(section).append(action); // Render modal
429
+
430
+ self.modal.html(container).show();
431
+ self.modal.focus();
432
+ self.overlay.show();
433
+ }; // Info Modal
434
+
435
+
436
+ this.info = function (params) {
437
+ // Create the modal container
438
+ var container = $('<div></div>'); // Create section to hold title, message and action
439
+
440
+ var section = $('<section></section>'); // Create header to hold loader
441
+
442
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
443
+
444
+ var message = $('<p></p>').html(params.message); // Create action section
445
+
446
+ var action = $('<div></div>'); // Create loader
447
+
448
+ var loader = $('<span class="ai1wm-loader"></span>'); // Create stop export
449
+
450
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
451
+ stopButton.attr('disabled', 'disabled');
452
+ self.onStop();
453
+ }); // Append text to stop button
454
+
455
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_export); // Append stop button to action
456
+
457
+ action.append(stopButton); // Append loader to header
458
+
459
+ header.append(loader); // Append header and message to section
460
+
461
+ section.append(header).append(message); // Append section and action to container
462
+
463
+ container.append(section).append(action); // Render modal
464
+
465
+ self.modal.html(container).show();
466
+ self.modal.focus();
467
+ self.overlay.show();
468
+ }; // Done Modal
469
+
470
+
471
+ this.done = function (params) {
472
+ // Create the modal container
473
+ var container = $('<div></div>'); // Create section to hold title, message and action
474
+
475
+ var section = $('<section></section>'); // Create header to hold title
476
+
477
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
478
+
479
+ var message = $('<p></p>').html(params.message); // Create action section
480
+
481
+ var action = $('<div></div>'); // Create title
482
 
483
+ var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title); // Create close button
484
 
485
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
486
+ self.destroy();
487
+ }); // Append text to close button
488
+
489
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
490
+
491
+ action.append(closeButton); // Append title to section
492
+
493
+ header.append(title); // Append header and message to section
494
+
495
+ section.append(header).append(message); // Append section and action to container
496
+
497
+ container.append(section).append(action); // Render modal
498
+
499
+ self.modal.html(container).show();
500
+ self.modal.focus();
501
+ self.overlay.show();
502
+ }; // Download Modal
503
+
504
+
505
+ this.download = function (params) {
506
+ // Create the modal container
507
+ var container = $('<div></div>'); // Create section to hold title, message and action
508
+
509
+ var section = $('<section></section>'); // Create paragraph to hold mesage
510
+
511
+ var message = $('<p></p>').html(params.message); // Create action section
512
+
513
+ var action = $('<div></div>'); // Create close button
514
+
515
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
516
+ self.destroy();
517
+ }); // Append text to close button
518
+
519
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
520
+
521
+ action.append(closeButton); // Append message to section
522
+
523
+ section.append(message); // Append section and action to container
524
+
525
+ container.append(section).append(action); // Render modal
526
+
527
+ self.modal.html(container).show();
528
+ self.modal.focus();
529
+ self.overlay.show();
530
+ }; // Create the overlay
531
+
532
+
533
+ this.overlay = $('<div class="ai1wm-overlay"></div>'); // Create the modal container
534
+
535
+ this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
536
+ $('body').append(this.overlay) // Append overlay to body
537
+ .append(this.modal); // Append modal to body
538
+ };
539
+
540
+ Modal.prototype.render = function (params) {
541
+ $(document).trigger('ai1wm-export-status', params); // Show modal
542
+
543
+ switch (params.type) {
544
+ case 'error':
545
+ this.error(params);
546
+ break;
547
+
548
+ case 'info':
549
+ this.info(params);
550
+ break;
551
+
552
+ case 'done':
553
+ this.done(params);
554
+ break;
555
+
556
+ case 'download':
557
+ this.download(params);
558
+ break;
559
+ }
560
+ };
561
+
562
+ Modal.prototype.destroy = function () {
563
+ this.modal.hide();
564
+ this.overlay.hide();
565
+ };
566
+
567
+ module.exports = Modal;
568
+
569
+ /***/ }),
570
+
571
+ /***/ 936:
572
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
573
 
574
  /**
575
  * Copyright (C) 2014-2020 ServMask Inc.
594
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
595
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
596
  */
597
+ var Modal = __webpack_require__(544),
 
598
  $ = jQuery;
599
 
600
  var Import = function Import() {
601
+ var self = this; // Set params
602
+
603
+ this.params = []; // Set modal
604
+
605
+ this.modal = new Modal(); // Set confirm listener
606
+
607
+ this.modal.onConfirm = function (options) {
608
+ self.onConfirm(options);
609
+ }; // Set blogs listener
610
 
 
 
611
 
612
+ this.modal.onBlogs = function (options) {
613
+ self.onBlogs(options);
614
+ }; // Set stop listener
615
 
 
 
 
 
616
 
617
+ this.modal.onStop = function (options) {
618
+ self.onStop(options);
619
+ }; // Set disk space listener
 
620
 
 
 
 
 
621
 
622
+ this.modal.onDiskSpaceConfirm = function (options) {
623
+ self.onDiskSpaceConfirm(options);
624
+ };
 
625
  };
626
 
627
  Import.prototype.setParams = function (params) {
628
+ this.params = Ai1wm.Util.list(params);
629
  };
630
 
631
  Import.prototype.start = function (options, retries) {
632
+ var self = this;
633
+ retries = retries || 0; // Reset stop flag
634
+
635
+ if (retries === 0) {
636
+ this.stopImport(false);
637
+ } // Stop running import
638
+
639
+
640
+ if (this.isImportStopped()) {
641
+ return;
642
+ } // Initializing beforeunload event
643
+
644
+
645
+ $(window).bind('beforeunload', function () {
646
+ return ai1wm_locale.stop_importing_your_website;
647
+ }); // Set initial status
648
+
649
+ this.setStatus({
650
+ type: 'info',
651
+ message: ai1wm_locale.preparing_to_import
652
+ }); // Set params
653
+
654
+ var params = this.params.concat({
655
+ name: 'secret_key',
656
+ value: ai1wm_import.secret_key
657
+ }); // Set additional params
658
+
659
+ if (options) {
660
+ params = params.concat(Ai1wm.Util.list(options));
661
+ } // Import
662
+
663
+
664
+ $.ajax({
665
+ url: ai1wm_import.ajax.url,
666
+ type: 'POST',
667
+ dataType: 'json',
668
+ data: params,
669
+ dataFilter: function dataFilter(data) {
670
+ return Ai1wm.Util.json(data);
671
+ }
672
+ }).done(function () {
673
+ self.getStatus();
674
+ }).done(function (result) {
675
+ if (result) {
676
+ self.run(result);
677
+ }
678
+ }).fail(function (xhr) {
679
+ var timeout = retries * 1000;
680
+
681
+ try {
682
+ var json = Ai1wm.Util.json(xhr.responseText);
683
+
684
+ if (json) {
685
+ var result = JSON.parse(json);
686
+ var error = result.errors.pop();
687
+
688
+ if (error.message) {
689
+ self.stopImport(true);
690
+ self.setStatus({
691
+ type: 'error',
692
+ title: ai1wm_locale.unable_to_import,
693
+ message: error.message
694
+ });
695
+ return;
696
+ }
697
+ }
698
+ } catch (e) {}
699
+
700
+ if (retries >= 5) {
701
+ self.stopImport(true);
702
+ self.setStatus({
703
+ type: 'error',
704
+ title: ai1wm_locale.unable_to_import,
705
+ message: ai1wm_locale.unable_to_start_the_import
706
+ });
707
+ return;
708
+ }
709
+
710
+ retries++;
711
+ setTimeout(self.start.bind(self, options, retries), timeout);
712
+ });
713
  };
714
 
715
  Import.prototype.run = function (params, retries) {
716
+ var self = this;
717
+ retries = retries || 0; // Stop running import
718
+
719
+ if (this.isImportStopped()) {
720
+ return;
721
+ } // Import
722
+
723
+
724
+ $.ajax({
725
+ url: ai1wm_import.ajax.url,
726
+ type: 'POST',
727
+ dataType: 'json',
728
+ data: params,
729
+ dataFilter: function dataFilter(data) {
730
+ return Ai1wm.Util.json(data);
731
+ }
732
+ }).done(function (result) {
733
+ if (result) {
734
+ self.run(result);
735
+ }
736
+ }).fail(function (xhr) {
737
+ var timeout = retries * 1000;
738
+
739
+ try {
740
+ var json = Ai1wm.Util.json(xhr.responseText);
741
+
742
+ if (json) {
743
+ var result = JSON.parse(json);
744
+ var error = result.errors.pop();
745
+
746
+ if (error.message) {
747
+ self.stopImport(true);
748
+ self.setStatus({
749
+ type: 'error',
750
+ title: ai1wm_locale.unable_to_import,
751
+ message: error.message
752
+ });
753
+ return;
754
+ }
755
+ }
756
+ } catch (e) {}
757
+
758
+ retries++;
759
+ setTimeout(self.run.bind(self, params, retries), timeout);
760
+ });
761
  };
762
 
763
  Import.prototype.confirm = function (options, retries) {
764
+ var self = this;
765
+ retries = retries || 0; // Stop running import
766
+
767
+ if (this.isImportStopped()) {
768
+ return;
769
+ } // Set params
770
+
771
+
772
+ var params = this.params.concat({
773
+ name: 'secret_key',
774
+ value: ai1wm_import.secret_key
775
+ }).concat({
776
+ name: 'priority',
777
+ value: 150
778
+ }); // Set additional params
779
+
780
+ if (options) {
781
+ params = params.concat(Ai1wm.Util.list(options));
782
+ } // Confirm
783
+
784
+
785
+ $.ajax({
786
+ url: ai1wm_import.ajax.url,
787
+ type: 'POST',
788
+ dataType: 'json',
789
+ data: params,
790
+ dataFilter: function dataFilter(data) {
791
+ return Ai1wm.Util.json(data);
792
+ }
793
+ }).done(function () {
794
+ self.getStatus();
795
+ }).done(function (result) {
796
+ if (result) {
797
+ self.run(result);
798
+ }
799
+ }).fail(function (xhr) {
800
+ var timeout = retries * 1000;
801
+
802
+ try {
803
+ var json = Ai1wm.Util.json(xhr.responseText);
804
+
805
+ if (json) {
806
+ var result = JSON.parse(json);
807
+ var error = result.errors.pop();
808
+
809
+ if (error.message) {
810
+ self.stopImport(true);
811
+ self.setStatus({
812
+ type: 'error',
813
+ title: ai1wm_locale.unable_to_import,
814
+ message: error.message
815
+ });
816
+ return;
817
+ }
818
+ }
819
+ } catch (e) {}
820
+
821
+ if (retries >= 5) {
822
+ self.stopImport(true);
823
+ self.setStatus({
824
+ type: 'error',
825
+ title: ai1wm_locale.unable_to_import,
826
+ message: ai1wm_locale.unable_to_confirm_the_import
827
+ });
828
+ return;
829
+ }
830
+
831
+ retries++;
832
+ setTimeout(self.confirm.bind(self, options, retries), timeout);
833
+ });
834
  };
835
 
836
  Import.prototype.checkDiskSpace = function (fileSize, callback) {
837
+ this.diskSpaceCallback = callback;
838
+ var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10);
839
+ var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10);
840
+ var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10);
841
+
842
+ if (diskSpaceFree >= 0) {
843
+ var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra;
844
+
845
+ if (diskSpaceRequired > diskSpaceFree) {
846
+ this.setStatus({
847
+ type: 'disk_space_confirm',
848
+ message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree))
849
+ });
850
+ return;
851
+ }
852
+ }
853
+
854
+ callback();
855
  };
856
 
857
  Import.prototype.blogs = function (options, retries) {
858
+ var self = this;
859
+ retries = retries || 0; // Stop running import
860
+
861
+ if (this.isImportStopped()) {
862
+ return;
863
+ } // Set params
864
+
865
+
866
+ var params = this.params.concat({
867
+ name: 'secret_key',
868
+ value: ai1wm_import.secret_key
869
+ }).concat({
870
+ name: 'priority',
871
+ value: 150
872
+ }); // Set additional params
873
+
874
+ if (options) {
875
+ params = params.concat(Ai1wm.Util.list(options));
876
+ } // Blogs
877
+
878
+
879
+ $.ajax({
880
+ url: ai1wm_import.ajax.url,
881
+ type: 'POST',
882
+ dataType: 'json',
883
+ data: params,
884
+ dataFilter: function dataFilter(data) {
885
+ return Ai1wm.Util.json(data);
886
+ }
887
+ }).done(function () {
888
+ self.getStatus();
889
+ }).done(function (result) {
890
+ if (result) {
891
+ self.run(result);
892
+ }
893
+ }).fail(function (xhr) {
894
+ var timeout = retries * 1000;
895
+
896
+ try {
897
+ var json = Ai1wm.Util.json(xhr.responseText);
898
+
899
+ if (json) {
900
+ var result = JSON.parse(json);
901
+ var error = result.errors.pop();
902
+
903
+ if (error.message) {
904
+ self.stopImport(true);
905
+ self.setStatus({
906
+ type: 'error',
907
+ title: ai1wm_locale.unable_to_import,
908
+ message: error.message
909
+ });
910
+ return;
911
+ }
912
+ }
913
+ } catch (e) {}
914
+
915
+ if (retries >= 5) {
916
+ self.stopImport(true);
917
+ self.setStatus({
918
+ type: 'error',
919
+ title: ai1wm_locale.unable_to_import,
920
+ message: ai1wm_locale.unable_to_prepare_blogs_on_import
921
+ });
922
+ return;
923
+ }
924
+
925
+ retries++;
926
+ setTimeout(self.blogs.bind(self, options, retries), timeout);
927
+ });
928
  };
929
 
930
  Import.prototype.clean = function (options, retries) {
931
+ var self = this;
932
+ retries = retries || 0; // Reset stop flag
933
+
934
+ if (retries === 0) {
935
+ this.stopImport(true);
936
+ } // Set initial status
937
+
938
+
939
+ this.setStatus({
940
+ type: 'info',
941
+ message: ai1wm_locale.please_wait_stopping_the_import
942
+ }); // Set params
943
+
944
+ var params = this.params.concat({
945
+ name: 'secret_key',
946
+ value: ai1wm_import.secret_key
947
+ }).concat({
948
+ name: 'priority',
949
+ value: 400
950
+ }); // Set additional params
951
+
952
+ if (options) {
953
+ params = params.concat(Ai1wm.Util.list(options));
954
+ } // Clean
955
+
956
+
957
+ $.ajax({
958
+ url: ai1wm_import.ajax.url,
959
+ type: 'POST',
960
+ dataType: 'json',
961
+ data: params,
962
+ dataFilter: function dataFilter(data) {
963
+ return Ai1wm.Util.json(data);
964
+ }
965
+ }).done(function () {
966
+ // Unbinding the beforeunload event when we stop importing
967
+ $(window).unbind('beforeunload'); // Destroy modal
968
+
969
+ self.modal.destroy();
970
+ }).fail(function (xhr) {
971
+ var timeout = retries * 1000;
972
+
973
+ try {
974
+ var json = Ai1wm.Util.json(xhr.responseText);
975
+
976
+ if (json) {
977
+ var result = JSON.parse(json);
978
+ var error = result.errors.pop();
979
+
980
+ if (error.message) {
981
+ self.stopImport(true);
982
+ self.setStatus({
983
+ type: 'error',
984
+ title: ai1wm_locale.unable_to_import,
985
+ message: error.message
986
+ });
987
+ return;
988
+ }
989
+ }
990
+ } catch (e) {}
991
+
992
+ if (retries >= 5) {
993
+ self.stopImport(true);
994
+ self.setStatus({
995
+ type: 'error',
996
+ title: ai1wm_locale.unable_to_import,
997
+ message: ai1wm_locale.unable_to_stop_the_import
998
+ });
999
+ return;
1000
+ }
1001
+
1002
+ retries++;
1003
+ setTimeout(self.clean.bind(self, options, retries), timeout);
1004
+ });
1005
  };
1006
 
1007
  Import.prototype.getStatus = function () {
1008
+ var self = this; // Stop getting status
1009
+
1010
+ if (this.isImportStopped()) {
1011
+ return;
1012
+ }
1013
+
1014
+ this.statusXhr = $.ajax({
1015
+ url: ai1wm_import.status.url,
1016
+ type: 'GET',
1017
+ dataType: 'json',
1018
+ cache: false,
1019
+ dataFilter: function dataFilter(data) {
1020
+ return Ai1wm.Util.json(data);
1021
+ }
1022
+ }).done(function (params) {
1023
+ if (params) {
1024
+ self.setStatus(params); // Next status
1025
+
1026
+ switch (params.type) {
1027
+ case 'done':
1028
+ case 'error':
1029
+ // Unbinding the beforeunload event when any case is performed
1030
+ $(window).unbind('beforeunload');
1031
+ return;
1032
+
1033
+ case 'confirm':
1034
+ case 'disk_space_confirm':
1035
+ case 'blogs':
1036
+ return;
1037
+ }
1038
+ } // Import is not done yet, let's check status in 3 seconds
1039
+
1040
+
1041
+ setTimeout(self.getStatus.bind(self), 3000);
1042
+ }).fail(function () {
1043
+ // Import is not done yet, let's check status in 3 seconds
1044
+ setTimeout(self.getStatus.bind(self), 3000);
1045
+ });
 
 
1046
  };
1047
 
1048
  Import.prototype.setStatus = function (params) {
1049
+ this.modal.render(params);
1050
  };
1051
 
1052
  Import.prototype.onConfirm = function (options) {
1053
+ this.confirm(options);
1054
  };
1055
 
1056
  Import.prototype.onBlogs = function (options) {
1057
+ this.blogs(options);
1058
  };
1059
 
1060
  Import.prototype.onStop = function (options) {
1061
+ this.clean(options);
1062
  };
1063
 
1064
  Import.prototype.onDiskSpaceConfirm = function (options) {
1065
+ this.diskSpaceCallback(options);
1066
  };
1067
 
1068
  Import.prototype.stopImport = function (isStopped) {
1069
+ try {
1070
+ if (isStopped && this.statusXhr) {
1071
+ this.statusXhr.abort();
1072
+ }
1073
+ } finally {
1074
+ this.isStopped = isStopped;
1075
+ }
1076
  };
1077
 
1078
  Import.prototype.isImportStopped = function () {
1079
+ return this.isStopped;
1080
  };
1081
 
1082
  module.exports = Import;
1083
 
1084
  /***/ }),
 
 
 
 
1085
 
1086
+ /***/ 544:
1087
+ /***/ (function(module) {
1088
 
1089
  /**
1090
  * Copyright (C) 2014-2020 ServMask Inc.
1109
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1110
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1111
  */
 
1112
  var $ = jQuery;
1113
 
1114
  var Modal = function Modal() {
1115
+ var self = this; // Error Modal
 
 
 
 
 
 
 
 
 
 
 
1116
 
1117
+ this.error = function (params) {
1118
+ // Create the modal container
1119
+ var container = $('<div></div>'); // Create section to hold title, message and action
1120
 
1121
+ var section = $('<section></section>'); // Create header to hold title
 
1122
 
1123
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
1124
 
1125
+ var message = $('<p></p>').html(params.message); // Create action section
 
 
 
1126
 
1127
+ var action = $('<div></div>'); // Create title
 
1128
 
1129
+ var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title); // Create close button
 
1130
 
1131
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1132
+ self.destroy();
1133
+ }); // Append text to close button
1134
 
1135
+ closeButton.append(ai1wm_locale.close_import); // Append close button to action
 
1136
 
1137
+ action.append(closeButton); // Append title to section
 
1138
 
1139
+ header.append(title); // Append header and message to section
 
 
 
 
1140
 
1141
+ section.append(header).append(message); // Append section and action to container
 
 
 
 
 
1142
 
1143
+ container.append(section).append(action); // Render modal
 
 
 
 
1144
 
1145
+ self.modal.html(container).show();
1146
+ self.modal.focus();
1147
+ self.overlay.show();
1148
+ }; // Progress Modal
1149
 
 
 
1150
 
1151
+ this.progress = function (params) {
1152
+ // Update progress bar meter
1153
+ if (this.progress.progressBarMeter) {
1154
+ this.progress.progressBarMeter.width(params.percent + '%');
1155
+ } // Update progress bar percent
1156
 
 
 
1157
 
1158
+ if (this.progress.progressBarPercent) {
1159
+ this.progress.progressBarPercent.text(params.percent + '%');
1160
+ return;
1161
+ } // Create the modal container
1162
 
 
 
1163
 
1164
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
1165
 
1166
+ var section = $('<section></section>'); // Create header to hold progress bar
 
 
 
 
1167
 
1168
+ var header = $('<h1></h1>'); // Create action section
 
1169
 
1170
+ var action = $('<div></div>'); // Create progress bar
 
1171
 
1172
+ var progressBar = $('<span class="ai1wm-progress-bar"></span>'); // Create progress bar meter
 
1173
 
1174
+ this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%'); // Create progress bar percent
 
1175
 
1176
+ this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%'); // Create stop import
 
1177
 
1178
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1179
+ stopButton.attr('disabled', 'disabled');
1180
+ self.onStop();
1181
+ }); // Append text to stop button
1182
 
1183
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import); // Append progress meter and progress percent
 
 
 
 
1184
 
1185
+ progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent); // Append stop button to action
 
 
 
1186
 
1187
+ action.append(stopButton); // Append progress bar to section
 
1188
 
1189
+ header.append(progressBar); // Append header to section
 
1190
 
1191
+ section.append(header); // Append section and action to container
 
1192
 
1193
+ container.append(section).append(action); // Render modal
 
1194
 
1195
+ self.modal.html(container).show();
1196
+ self.modal.focus();
1197
+ self.overlay.show();
1198
+ }; // Pro Modal
1199
 
 
 
 
 
1200
 
1201
+ this.pro = function (params) {
1202
+ // Create the modal container
1203
+ var container = $('<div></div>'); // Create section to hold title, message and action
1204
 
1205
+ var section = $('<section></section>'); // Create header to hold warning
 
1206
 
1207
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
1208
 
1209
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
1210
 
1211
+ var action = $('<div></div>'); // Create warning
 
1212
 
1213
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
 
 
 
1214
 
1215
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1216
+ self.destroy();
1217
+ }); // Append text to close button
 
1218
 
1219
+ closeButton.append(ai1wm_locale.close_import); // Append close button to action
 
1220
 
1221
+ action.append(closeButton); // Append warning to section
 
1222
 
1223
+ header.append(warning); // Append header and message to section
 
1224
 
1225
+ section.append(header).append(message); // Append section and action to container
 
1226
 
1227
+ container.append(section).append(action); // Render modal
 
1228
 
1229
+ self.modal.html(container).show();
1230
+ self.modal.focus();
1231
+ self.overlay.show();
1232
+ }; // Confirm Modal
 
1233
 
 
 
 
 
 
1234
 
1235
+ this.confirm = function (params) {
1236
+ // Create the modal container
1237
+ var container = $('<div></div>'); // Create section to hold title, message and action
1238
 
1239
+ var section = $('<section></section>'); // Create header to hold warning
 
1240
 
1241
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
1242
 
1243
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
1244
 
1245
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create warning
 
1246
 
1247
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
1248
 
1249
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1250
+ closeButton.attr('disabled', 'disabled');
1251
+ self.onStop();
1252
+ }); // Create confirm button
1253
 
1254
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1255
+ confirmButton.attr('disabled', 'disabled');
1256
+ self.onConfirm();
1257
+ }); // Append text to close button
 
1258
 
1259
+ closeButton.append(ai1wm_locale.close_import); // Append text to confirm button
 
 
 
1260
 
1261
+ confirmButton.append(ai1wm_locale.confirm_import + ' &gt;'); // Append close button to action
 
1262
 
1263
+ action.append(closeButton); // Append confirm button to action
 
1264
 
1265
+ action.append(confirmButton); // Append warning to section
 
1266
 
1267
+ header.append(warning); // Append header and message to section
 
1268
 
1269
+ section.append(header).append(message); // Append section and action to container
 
1270
 
1271
+ container.append(section).append(action); // Render modal
 
 
 
1272
 
1273
+ self.modal.html(container).show();
1274
+ self.modal.focus();
1275
+ self.overlay.show();
1276
+ }; // Disk space Confirm Modal
 
1277
 
 
 
1278
 
1279
+ this.diskSpaceConfirm = function (params) {
1280
+ // Create the modal container
1281
+ var container = $('<div></div>'); // Create section to hold title, message and action
1282
 
1283
+ var section = $('<section></section>'); // Create header to hold warning
 
1284
 
1285
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
1286
 
1287
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
1288
 
1289
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create warning
 
1290
 
1291
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
1292
 
1293
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1294
+ self.destroy();
1295
+ }); // Create confirm button
 
 
1296
 
1297
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1298
+ $(this).attr('disabled', 'disabled');
1299
+ self.onDiskSpaceConfirm();
1300
+ }); // Append text to close button
 
 
 
 
1301
 
1302
+ closeButton.append(ai1wm_locale.close_import); // Append text to confirm button
 
1303
 
1304
+ confirmButton.append(ai1wm_locale.confirm_disk_space); // Append close button to action
 
1305
 
1306
+ action.append(closeButton); // Append confirm button to action
 
1307
 
1308
+ action.append(confirmButton); // Append warning to section
 
1309
 
1310
+ header.append(warning); // Append header and message to section
 
1311
 
1312
+ section.append(header).append(message); // Append section and action to container
 
1313
 
1314
+ container.append(section).append(action); // Render modal
 
1315
 
1316
+ self.modal.html(container).show();
1317
+ self.modal.focus();
1318
+ self.overlay.show();
1319
+ }; // Blogs Modal
1320
 
 
 
1321
 
1322
+ this.blogs = function (params) {
1323
+ // Create the modal container
1324
+ var container = $('<form></form>').on('submit', function (e) {
1325
+ e.preventDefault();
1326
+ continueButton.attr('disabled', 'disabled');
1327
+ self.onBlogs(container.serializeArray());
1328
+ }); // Create section to hold title, message and action
1329
 
1330
+ var section = $('<section></section>'); // Create header to hold title
 
1331
 
1332
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
 
 
 
1333
 
1334
+ var message = $('<p></p>').html(params.message); // Create action section
 
 
 
1335
 
1336
+ var action = $('<div></div>'); // Create title
 
1337
 
1338
+ var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title); // Create continue button
 
1339
 
1340
+ var continueButton = $('<button type="submit" class="ai1wm-button-green"></button>'); // Append text to continue button
 
1341
 
1342
+ continueButton.append(ai1wm_locale.continue_import); // Append continue button to action
 
1343
 
1344
+ action.append(continueButton); // Append title to section
 
1345
 
1346
+ header.append(title); // Append header and message to section
 
1347
 
1348
+ section.append(header).append(message); // Append section and action to container
 
1349
 
1350
+ container.append(section).append(action); // Render modal
 
1351
 
1352
+ self.modal.html(container).show();
1353
+ self.modal.focus();
1354
+ self.overlay.show();
1355
+ }; // Info Modal
1356
 
 
 
1357
 
1358
+ this.info = function (params) {
1359
+ // Create the modal container
1360
+ var container = $('<div></div>'); // Create section to hold title, message and action
1361
 
1362
+ var section = $('<section></section>'); // Create header to hold loader
 
1363
 
1364
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
 
 
 
1365
 
1366
+ var message = $('<p></p>').html(params.message); // Create action section
 
 
 
1367
 
1368
+ var action = $('<div></div>'); // Create loader
 
1369
 
1370
+ var loader = $('<span class="ai1wm-loader"></span>'); // Create warning
 
1371
 
1372
+ var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser); // Create notice to be displayed during import process
 
1373
 
1374
+ var notice = $('<div class="ai1wm-import-modal-notice"></div>'); // Append warning to notice
 
1375
 
1376
+ notice.append(warning); // Append stop button to action
 
1377
 
1378
+ action.append(notice); // Append loader to header
 
 
 
1379
 
1380
+ header.append(loader); // Append header and message to section
 
1381
 
1382
+ section.append(header).append(message); // Append section and action to container
 
1383
 
1384
+ container.append(section).append(action); // Render modal
 
1385
 
1386
+ self.modal.html(container).show();
1387
+ self.modal.focus();
1388
+ self.overlay.show();
1389
+ }; // Done Modal
1390
 
 
 
1391
 
1392
+ this.done = function (params) {
1393
+ // Create the modal container
1394
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
 
1395
 
1396
+ var section = $('<section></section>'); // Create header to hold title
 
1397
 
1398
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
1399
 
1400
+ var message = $('<p class="ai1wm-import-modal-content-done"></p>').html(params.message); // Create action section
 
 
1401
 
1402
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create title
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1403
 
1404
+ var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title); // Create close button
 
 
 
1405
 
1406
+ var closeButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1407
+ self.destroy();
1408
+ }); // Append text to close button
1409
 
1410
+ closeButton.append(ai1wm_locale.finish_import + ' &gt;'); // Append close button to action
 
 
1411
 
1412
+ action.append(closeButton); // Append title to section
1413
 
1414
+ header.append(title); // Append header and message to section
1415
 
1416
+ section.append(header).append(message); // Append section and action to container
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1417
 
1418
+ container.append(section).append(action); // Render modal
 
1419
 
1420
+ self.modal.html(container).show();
1421
+ self.modal.focus();
1422
+ self.overlay.show();
1423
+ }; // Create the overlay
1424
 
 
 
1425
 
1426
+ this.overlay = $('<div class="ai1wm-overlay"></div>'); // Create the modal container
 
1427
 
1428
+ this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
1429
+ $('body').append(this.overlay) // Append overlay to body
1430
+ .append(this.modal); // Append modal to body
 
1431
  };
1432
 
1433
+ Modal.prototype.render = function (params) {
1434
+ $(document).trigger('ai1wm-import-status', params); // Show modal
 
1435
 
1436
+ switch (params.type) {
1437
+ case 'pro':
1438
+ this.pro(params);
1439
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1440
 
1441
+ case 'error':
1442
+ this.error(params);
1443
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1444
 
1445
+ case 'confirm':
1446
+ this.confirm(params);
1447
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1448
 
1449
+ case 'disk_space_confirm':
1450
+ this.diskSpaceConfirm(params);
1451
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1452
 
1453
+ case 'blogs':
1454
+ this.blogs(params);
1455
+ break;
1456
 
1457
+ case 'progress':
1458
+ this.progress(params);
1459
+ break;
1460
 
1461
+ case 'info':
1462
+ this.info(params);
1463
+ break;
1464
+
1465
+ case 'done':
1466
+ this.done(params);
1467
+ break;
1468
+ }
1469
  };
1470
 
1471
+ Modal.prototype.destroy = function () {
1472
+ this.modal.hide();
1473
+ this.overlay.hide();
1474
  };
1475
 
1476
+ module.exports = Modal;
1477
 
1478
  /***/ }),
 
 
 
 
1479
 
1480
+ /***/ 332:
1481
+ /***/ (function() {
1482
 
1483
  /**
1484
  * Copyright (C) 2014-2020 ServMask Inc.
1503
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1504
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1505
  */
1506
+ jQuery(document).ready(function ($) {
1507
+ 'use strict'; // Idea
1508
+
1509
+ $('#ai1wm-feedback-type-link-1').click(function () {
1510
+ var radio = $('#ai1wm-feedback-type-1');
1511
+
1512
+ if (radio.is(':checked')) {
1513
+ radio.attr('checked', false);
1514
+ } else {
1515
+ radio.attr('checked', true);
1516
+ }
1517
+ }); // Help
1518
+
1519
+ $('#ai1wm-feedback-type-2').click(function () {
1520
+ // Hide other options
1521
+ $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message
1522
+
1523
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form
1524
+
1525
+ $('.ai1wm-feedback-form').fadeIn();
1526
+ }); // Cancel feedback form
1527
+
1528
+ $('#ai1wm-feedback-cancel').click(function (e) {
1529
+ $('.ai1wm-feedback-form').fadeOut(function () {
1530
+ $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
1531
+ });
1532
+ e.preventDefault();
1533
+ }); // Send feedback form
1534
+
1535
+ $('#ai1wm-feedback-submit').click(function (e) {
1536
+ var self = $(this);
1537
+ var spinner = self.next();
1538
+ var type = $('.ai1wm-feedback-type:checked').val();
1539
+ var email = $('.ai1wm-feedback-email').val();
1540
+ var message = $('.ai1wm-feedback-message').val();
1541
+ var terms = $('.ai1wm-feedback-terms').is(':checked');
1542
+ self.attr('disabled', true);
1543
+ spinner.css('visibility', 'visible');
1544
+ $.ajax({
1545
+ url: ai1wm_feedback.ajax.url,
1546
+ type: 'POST',
1547
+ dataType: 'json',
1548
+ async: true,
1549
+ data: {
1550
+ secret_key: ai1wm_feedback.secret_key,
1551
+ ai1wm_type: type,
1552
+ ai1wm_email: email,
1553
+ ai1wm_message: message,
1554
+ ai1wm_terms: +terms
1555
+ },
1556
+ dataFilter: function dataFilter(data) {
1557
+ return Ai1wm.Util.json(data);
1558
+ }
1559
+ }).done(function (data) {
1560
+ self.attr('disabled', false);
1561
+ spinner.css('visibility', 'hidden');
1562
+
1563
+ if (data.errors.length > 0) {
1564
+ $('.ai1wm-feedback .ai1wm-message').remove();
1565
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1566
+ $.each(data.errors, function (key, value) {
1567
+ errorMessage.append($('<p />').text(value));
1568
+ });
1569
+ $('.ai1wm-feedback').prepend(errorMessage);
1570
+ } else {
1571
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1572
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
1573
+ $('.ai1wm-feedback').html(successMessage);
1574
+ }
1575
+ });
1576
+ e.preventDefault();
1577
+ });
1578
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1579
 
1580
  /***/ }),
 
 
1581
 
1582
+ /***/ 947:
1583
+ /***/ (function() {
1584
 
1585
  /**
1586
  * Copyright (C) 2014-2020 ServMask Inc.
1605
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1606
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1607
  */
 
 
 
 
 
 
 
1608
  jQuery(document).ready(function ($) {
1609
+ 'use strict';
1610
+
1611
+ $('#ai1wm-report-problem-button').click(function (e) {
1612
+ $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
1613
+ e.preventDefault();
1614
+ });
1615
+ $('#ai1wm-report-cancel').click(function (e) {
1616
+ $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
1617
+ e.preventDefault();
1618
+ });
1619
+ $('#ai1wm-report-submit').click(function (e) {
1620
+ var self = $(this);
1621
+ var spinner = self.next();
1622
+ var email = $('.ai1wm-report-email').val();
1623
+ var message = $('.ai1wm-report-message').val();
1624
+ var terms = $('.ai1wm-report-terms').is(':checked');
1625
+ self.attr('disabled', true);
1626
+ spinner.css('visibility', 'visible');
1627
+ $.ajax({
1628
+ url: ai1wm_report.ajax.url,
1629
+ type: 'POST',
1630
+ dataType: 'json',
1631
+ async: true,
1632
+ data: {
1633
+ secret_key: ai1wm_report.secret_key,
1634
+ ai1wm_email: email,
1635
+ ai1wm_message: message,
1636
+ ai1wm_terms: +terms
1637
+ },
1638
+ dataFilter: function dataFilter(data) {
1639
+ return Ai1wm.Util.json(data);
1640
+ }
1641
+ }).done(function (data) {
1642
+ self.attr('disabled', false);
1643
+ spinner.css('visibility', 'hidden');
1644
+
1645
+ if (data.errors.length > 0) {
1646
+ $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
1647
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1648
+ $.each(data.errors, function (key, value) {
1649
+ errorMessage.append($('<p />').text(value));
1650
+ });
1651
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
1652
+ } else {
1653
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1654
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
1655
+ $('.ai1wm-report-problem-dialog').html(successMessage); // Hide message
1656
+
1657
+ setTimeout(function () {
1658
+ $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
1659
+ }, 2000);
1660
+ }
1661
+ });
1662
+ e.preventDefault();
1663
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1664
  });
1665
 
1666
+ /***/ })
 
 
 
 
 
 
 
 
1667
 
1668
+ /******/ });
1669
+ /************************************************************************/
1670
+ /******/ // The module cache
1671
+ /******/ var __webpack_module_cache__ = {};
1672
+ /******/
1673
+ /******/ // The require function
1674
+ /******/ function __webpack_require__(moduleId) {
1675
+ /******/ // Check if module is in cache
1676
+ /******/ if(__webpack_module_cache__[moduleId]) {
1677
+ /******/ return __webpack_module_cache__[moduleId].exports;
1678
+ /******/ }
1679
+ /******/ // Create a new module (and put it into the cache)
1680
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1681
+ /******/ // no module.id needed
1682
+ /******/ // no module.loaded needed
1683
+ /******/ exports: {}
1684
+ /******/ };
1685
+ /******/
1686
+ /******/ // Execute the module function
1687
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1688
+ /******/
1689
+ /******/ // Return the exports of the module
1690
+ /******/ return module.exports;
1691
+ /******/ }
1692
+ /******/
1693
+ /************************************************************************/
1694
+ /******/ /* webpack/runtime/global */
1695
+ /******/ !function() {
1696
+ /******/ __webpack_require__.g = (function() {
1697
+ /******/ if (typeof globalThis === 'object') return globalThis;
1698
+ /******/ try {
1699
+ /******/ return this || new Function('return this')();
1700
+ /******/ } catch (e) {
1701
+ /******/ if (typeof window === 'object') return window;
1702
+ /******/ }
1703
+ /******/ })();
1704
+ /******/ }();
1705
+ /******/
1706
+ /************************************************************************/
1707
+ !function() {
1708
  /**
1709
  * Copyright (C) 2014-2020 ServMask Inc.
1710
  *
1728
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1729
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1730
  */
1731
+ var Feedback = __webpack_require__(332);
 
 
 
 
1732
 
1733
+ var Report = __webpack_require__(947);
1734
 
1735
+ var Import = __webpack_require__(936);
1736
+
1737
+ var Export = __webpack_require__(12);
1738
+
1739
+ var Restore = __webpack_require__(874);
1740
+
1741
+ jQuery(document).ready(function ($) {
1742
+ 'use strict';
1743
+
1744
+ $('#ai1wm-backups-list').on({
1745
+ mouseenter: function mouseenter() {
1746
+ $(this).addClass('ai1wm-button-on');
1747
+ },
1748
+ mouseleave: function mouseleave() {
1749
+ $(this).removeClass('ai1wm-button-on');
1750
+ }
1751
+ }, '.ai1wm-backup-actions > a'); // Delete file
1752
+
1753
+ $('#ai1wm-backups-list').on('click', '.ai1wm-backup-delete', function (e) {
1754
+ var self = $(this); // Delete file
1755
+
1756
+ /* eslint-disable no-alert */
1757
+
1758
+ if (confirm(ai1wm_locale.want_to_delete_this_file)) {
1759
+ /* eslint-enable no-alert */
1760
+ $.ajax({
1761
+ url: ai1wm_backups.ajax.url,
1762
+ type: 'POST',
1763
+ dataType: 'json',
1764
+ data: {
1765
+ secret_key: ai1wm_backups.secret_key,
1766
+ archive: self.data('archive')
1767
+ },
1768
+ dataFilter: function dataFilter(data) {
1769
+ return Ai1wm.Util.json(data);
1770
+ }
1771
+ }).done(function (data) {
1772
+ if (data.errors.length === 0) {
1773
+ self.closest('tr').remove();
1774
+
1775
+ if ($('.ai1wm-backups tbody tr').length === 1) {
1776
+ $('.ai1wm-backups').hide();
1777
+ $('.ai1wm-backups-empty').show();
1778
+ }
1779
+ }
1780
+ });
1781
+ }
1782
+
1783
+ e.preventDefault();
1784
+ });
1785
+ var model = new Import(); // Restore from file
1786
+
1787
+ $('#ai1wm-backups-list').on('click', '.ai1wm-backup-restore', function (e) {
1788
+ e.preventDefault();
1789
+ /* eslint-disable no-unused-vars */
1790
+
1791
+ if (Ai1wm.MultisiteExtensionRestore) {
1792
+ var restore = new Ai1wm.MultisiteExtensionRestore($(this).data('archive'), $(this).data('size'));
1793
+ } else if (Ai1wm.UnlimitedExtensionRestore) {
1794
+ var _restore = new Ai1wm.UnlimitedExtensionRestore($(this).data('archive'), $(this).data('size'));
1795
+ } else if (Ai1wm.FreeExtensionRestore) {
1796
+ var _restore2 = new Ai1wm.FreeExtensionRestore($(this).data('archive'), $(this).data('size'));
1797
+ } else {
1798
+ var _restore3 = new Ai1wm.Restore($(this).data('archive'), $(this).data('size'));
1799
+ }
1800
+ /* eslint-enable no-unused-vars */
1801
+
1802
+ });
1803
+ $('#ai1wm-backups-list').on('click', '.ai1wm-backup-label-description, .ai1wm-backup-label-text', function () {
1804
+ $(this).hide();
1805
+ $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-holder').show();
1806
+ $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-field').focus();
1807
+ });
1808
+ $('#ai1wm-backups-list').on('keydown', '.ai1wm-backup-label-field', function (e) {
1809
+ var self = $(this);
1810
+ var spinner = $('<span class="spinner"></span>'); // Update backup label
1811
+
1812
+ if (e.which === 13) {
1813
+ e.preventDefault();
1814
+ self.hide();
1815
+ self.closest('.ai1wm-backup-label-holder').append(spinner);
1816
+ $.ajax({
1817
+ url: ai1wm_backups.labels.url,
1818
+ type: 'POST',
1819
+ dataType: 'json',
1820
+ data: {
1821
+ secret_key: ai1wm_backups.secret_key,
1822
+ archive: self.data('archive'),
1823
+ label: self.val()
1824
+ },
1825
+ dataFilter: function dataFilter(data) {
1826
+ return Ai1wm.Util.json(data);
1827
+ }
1828
+ }).done(function (data) {
1829
+ if (data.errors.length === 0) {
1830
+ spinner.remove();
1831
+ self.show();
1832
+
1833
+ if (self.val()) {
1834
+ self.closest('.ai1wm-backup-label-holder').hide();
1835
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show();
1836
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-colored').text(self.val());
1837
+ } else {
1838
+ self.closest('.ai1wm-backup-label-holder').hide();
1839
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style');
1840
+ }
1841
+
1842
+ self.data('value', self.val());
1843
+ }
1844
+ });
1845
+ } else if (e.which === 27) {
1846
+ e.preventDefault();
1847
+
1848
+ if (self.data('value')) {
1849
+ self.closest('.ai1wm-backup-label-holder').hide();
1850
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show();
1851
+ } else {
1852
+ self.closest('.ai1wm-backup-label-holder').hide();
1853
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').hide();
1854
+ self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style');
1855
+ }
1856
+
1857
+ self.val(self.data('value'));
1858
+ }
1859
+ });
1860
+ $(document).on('ai1wm-export-status', function (e, params) {
1861
+ if (params.type === 'download') {
1862
+ if ($('.ai1wm-backups tbody tr').length > 1) {
1863
+ $('.ai1wm-backups-list-spinner-holder').show();
1864
+ } else {
1865
+ $('.ai1wm-backups-empty').hide();
1866
+ $('.ai1wm-backups-empty-spinner-holder').show();
1867
+ }
1868
+
1869
+ $.get(ai1wm_backups.backups.url, {
1870
+ secret_key: ai1wm_backups.secret_key
1871
+ }).done(function (data) {
1872
+ $('#ai1wm-backups-create').find('.ai1wm-backups-empty').hide();
1873
+ $('#ai1wm-backups-create').find('.ai1wm-backups-empty-spinner-holder').hide();
1874
+ $('#ai1wm-backups-list').html(data);
1875
+ });
1876
+ }
1877
+ });
1878
+ model = new Export();
1879
+ $('#ai1wm-create-backup').click(function (e) {
1880
+ var storage = Ai1wm.Util.random(12);
1881
+ var options = Ai1wm.Util.form('#ai1wm-export-form').concat({
1882
+ name: 'storage',
1883
+ value: storage
1884
+ }).concat({
1885
+ name: 'file',
1886
+ value: 1
1887
+ }); // Set global params
1888
+
1889
+ model.setParams(options); // Start export
1890
+
1891
+ model.start();
1892
+ e.preventDefault();
1893
+ });
1894
+ });
1895
+ __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, {
1896
+ Feedback: Feedback,
1897
+ Report: Report,
1898
+ Import: Import,
1899
+ Restore: Restore,
1900
+ Export: Export
1901
+ });
1902
+ }();
1903
+ /******/ })()
1904
+ ;
lib/view/assets/javascript/export.min.js CHANGED
@@ -1,323 +1,8 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 9);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ([
67
- /* 0 */
68
- /***/ (function(module, exports) {
69
-
70
- var g;
71
-
72
- // This works in non-strict mode
73
- g = (function() {
74
- return this;
75
- })();
76
-
77
- try {
78
- // This works if eval is allowed (see CSP)
79
- g = g || Function("return this")() || (1,eval)("this");
80
- } catch(e) {
81
- // This works if the window reference is available
82
- if(typeof window === "object")
83
- g = window;
84
- }
85
-
86
- // g can still be undefined, but nothing to do about it...
87
- // We return undefined, instead of nothing here, so it's
88
- // easier to handle this case. if(!global) { ...}
89
-
90
- module.exports = g;
91
-
92
-
93
- /***/ }),
94
- /* 1 */
95
- /***/ (function(module, exports, __webpack_require__) {
96
-
97
- "use strict";
98
-
99
-
100
- /**
101
- * Copyright (C) 2014-2020 ServMask Inc.
102
- *
103
- * This program is free software: you can redistribute it and/or modify
104
- * it under the terms of the GNU General Public License as published by
105
- * the Free Software Foundation, either version 3 of the License, or
106
- * (at your option) any later version.
107
- *
108
- * This program is distributed in the hope that it will be useful,
109
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
110
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111
- * GNU General Public License for more details.
112
- *
113
- * You should have received a copy of the GNU General Public License
114
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
115
- *
116
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
117
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
118
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
119
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
120
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
121
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
122
- */
123
-
124
- jQuery(document).ready(function ($) {
125
- 'use strict';
126
-
127
- // Idea
128
-
129
- $('#ai1wm-feedback-type-link-1').click(function () {
130
- var radio = $('#ai1wm-feedback-type-1');
131
- if (radio.is(':checked')) {
132
- radio.attr('checked', false);
133
- } else {
134
- radio.attr('checked', true);
135
- }
136
- });
137
-
138
- // Help
139
- $('#ai1wm-feedback-type-2').click(function () {
140
- // Hide other options
141
- $('#ai1wm-feedback-type-1').closest('li').hide();
142
-
143
- // Change placeholder message
144
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
145
-
146
- // Show feedback form
147
- $('.ai1wm-feedback-form').fadeIn();
148
- });
149
-
150
- // Cancel feedback form
151
- $('#ai1wm-feedback-cancel').click(function (e) {
152
- $('.ai1wm-feedback-form').fadeOut(function () {
153
- $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
154
- });
155
-
156
- e.preventDefault();
157
- });
158
-
159
- // Send feedback form
160
- $('#ai1wm-feedback-submit').click(function (e) {
161
- var self = $(this);
162
-
163
- var spinner = self.next();
164
- var type = $('.ai1wm-feedback-type:checked').val();
165
- var email = $('.ai1wm-feedback-email').val();
166
- var message = $('.ai1wm-feedback-message').val();
167
- var terms = $('.ai1wm-feedback-terms').is(':checked');
168
-
169
- self.attr('disabled', true);
170
- spinner.css('visibility', 'visible');
171
-
172
- $.ajax({
173
- url: ai1wm_feedback.ajax.url,
174
- type: 'POST',
175
- dataType: 'json',
176
- async: true,
177
- data: {
178
- secret_key: ai1wm_feedback.secret_key,
179
- ai1wm_type: type,
180
- ai1wm_email: email,
181
- ai1wm_message: message,
182
- ai1wm_terms: +terms
183
- },
184
- dataFilter: function dataFilter(data) {
185
- return Ai1wm.Util.json(data);
186
- }
187
- }).done(function (data) {
188
- self.attr('disabled', false);
189
- spinner.css('visibility', 'hidden');
190
-
191
- if (data.errors.length > 0) {
192
- $('.ai1wm-feedback .ai1wm-message').remove();
193
-
194
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
195
- $.each(data.errors, function (key, value) {
196
- errorMessage.append($('<p />').text(value));
197
- });
198
-
199
- $('.ai1wm-feedback').prepend(errorMessage);
200
- } else {
201
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
202
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
203
-
204
- $('.ai1wm-feedback').html(successMessage);
205
- }
206
- });
207
-
208
- e.preventDefault();
209
- });
210
- });
211
-
212
- /***/ }),
213
- /* 2 */
214
- /***/ (function(module, exports, __webpack_require__) {
215
-
216
- "use strict";
217
-
218
-
219
- /**
220
- * Copyright (C) 2014-2020 ServMask Inc.
221
- *
222
- * This program is free software: you can redistribute it and/or modify
223
- * it under the terms of the GNU General Public License as published by
224
- * the Free Software Foundation, either version 3 of the License, or
225
- * (at your option) any later version.
226
- *
227
- * This program is distributed in the hope that it will be useful,
228
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
229
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
230
- * GNU General Public License for more details.
231
- *
232
- * You should have received a copy of the GNU General Public License
233
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
234
- *
235
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
236
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
237
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
238
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
239
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
240
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
241
- */
242
-
243
- jQuery(document).ready(function ($) {
244
- 'use strict';
245
-
246
- $('#ai1wm-report-problem-button').click(function (e) {
247
- $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
248
-
249
- e.preventDefault();
250
- });
251
-
252
- $('#ai1wm-report-cancel').click(function (e) {
253
- $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
254
-
255
- e.preventDefault();
256
- });
257
-
258
- $('#ai1wm-report-submit').click(function (e) {
259
- var self = $(this);
260
-
261
- var spinner = self.next();
262
- var email = $('.ai1wm-report-email').val();
263
- var message = $('.ai1wm-report-message').val();
264
- var terms = $('.ai1wm-report-terms').is(':checked');
265
-
266
- self.attr('disabled', true);
267
- spinner.css('visibility', 'visible');
268
-
269
- $.ajax({
270
- url: ai1wm_report.ajax.url,
271
- type: 'POST',
272
- dataType: 'json',
273
- async: true,
274
- data: {
275
- secret_key: ai1wm_report.secret_key,
276
- ai1wm_email: email,
277
- ai1wm_message: message,
278
- ai1wm_terms: +terms
279
- },
280
- dataFilter: function dataFilter(data) {
281
- return Ai1wm.Util.json(data);
282
- }
283
- }).done(function (data) {
284
- self.attr('disabled', false);
285
- spinner.css('visibility', 'hidden');
286
-
287
- if (data.errors.length > 0) {
288
- $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
289
-
290
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
291
- $.each(data.errors, function (key, value) {
292
- errorMessage.append($('<p />').text(value));
293
- });
294
-
295
- $('.ai1wm-report-problem-dialog').prepend(errorMessage);
296
- } else {
297
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
298
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
299
-
300
- $('.ai1wm-report-problem-dialog').html(successMessage);
301
-
302
- // Hide message
303
- setTimeout(function () {
304
- $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
305
- }, 2000);
306
- }
307
- });
308
-
309
- e.preventDefault();
310
- });
311
- });
312
-
313
- /***/ }),
314
- /* 3 */,
315
- /* 4 */,
316
- /* 5 */
317
- /***/ (function(module, exports, __webpack_require__) {
318
-
319
- "use strict";
320
 
 
 
321
 
322
  /**
323
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -342,308 +27,309 @@ jQuery(document).ready(function ($) {
342
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
343
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
344
  */
345
-
346
- var Modal = __webpack_require__(6),
347
  $ = jQuery;
348
 
349
  var Export = function Export() {
350
- var self = this;
351
 
352
- // Set params
353
- this.params = [];
354
 
355
- // Set modal
356
- this.modal = new Modal();
357
 
358
- // Set stop listener
359
- this.modal.onStop = function (options) {
360
- self.onStop(options);
361
- };
362
  };
363
 
364
  Export.prototype.setParams = function (params) {
365
- this.params = Ai1wm.Util.list(params);
366
  };
367
 
368
  Export.prototype.start = function (options, retries) {
369
- var self = this;
370
- retries = retries || 0;
371
-
372
- // Reset stop flag
373
- if (retries === 0) {
374
- this.stopExport(false);
375
- }
376
-
377
- // Stop running export
378
- if (this.isExportStopped()) {
379
- return;
380
- }
381
-
382
- // Initializing beforeunload event
383
- $(window).bind('beforeunload', function () {
384
- return ai1wm_locale.stop_exporting_your_website;
385
- });
386
-
387
- // Set initial status
388
- this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_export });
389
-
390
- // Set params
391
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
392
-
393
- // Set additional params
394
- if (options) {
395
- params = params.concat(Ai1wm.Util.list(options));
396
- }
397
-
398
- // Export
399
- $.ajax({
400
- url: ai1wm_export.ajax.url,
401
- type: 'POST',
402
- dataType: 'json',
403
- data: params,
404
- dataFilter: function dataFilter(data) {
405
- return Ai1wm.Util.json(data);
406
- }
407
- }).done(function () {
408
- self.getStatus();
409
- }).done(function (result) {
410
- if (result) {
411
- self.run(result);
412
- }
413
- }).fail(function (xhr) {
414
- var timeout = retries * 1000;
415
-
416
- try {
417
- var json = Ai1wm.Util.json(xhr.responseText);
418
- if (json) {
419
- var result = JSON.parse(json);
420
- var error = result.errors.pop();
421
- if (error.message) {
422
- self.stopExport(true);
423
- self.setStatus({
424
- type: 'error',
425
- title: ai1wm_locale.unable_to_export,
426
- message: error.message
427
- });
428
- return;
429
- }
430
- }
431
- } catch (e) {}
432
-
433
- if (retries >= 5) {
434
- self.stopExport(true);
435
- self.setStatus({
436
- type: 'error',
437
- title: ai1wm_locale.unable_to_export,
438
- message: ai1wm_locale.unable_to_start_the_export
439
- });
440
- return;
441
- }
442
-
443
- retries++;
444
-
445
- setTimeout(self.start.bind(self, options, retries), timeout);
446
- });
 
 
 
447
  };
448
 
449
  Export.prototype.run = function (params, retries) {
450
- var self = this;
451
- retries = retries || 0;
452
-
453
- // Stop running export
454
- if (this.isExportStopped()) {
455
- return;
456
- }
457
-
458
- // Export
459
- $.ajax({
460
- url: ai1wm_export.ajax.url,
461
- type: 'POST',
462
- dataType: 'json',
463
- data: params,
464
- dataFilter: function dataFilter(data) {
465
- return Ai1wm.Util.json(data);
466
- }
467
- }).done(function (result) {
468
- if (result) {
469
- self.run(result);
470
- }
471
- }).fail(function (xhr) {
472
- var timeout = retries * 1000;
473
-
474
- try {
475
- var json = Ai1wm.Util.json(xhr.responseText);
476
- if (json) {
477
- var result = JSON.parse(json);
478
- var error = result.errors.pop();
479
- if (error.message) {
480
- self.stopExport(true);
481
- self.setStatus({
482
- type: 'error',
483
- title: ai1wm_locale.unable_to_export,
484
- message: error.message
485
- });
486
- return;
487
- }
488
- }
489
- } catch (e) {}
490
-
491
- if (retries >= 5) {
492
- self.stopExport(true);
493
- self.setStatus({
494
- type: 'error',
495
- title: ai1wm_locale.unable_to_export,
496
- message: ai1wm_locale.unable_to_run_the_export
497
- });
498
- return;
499
- }
500
-
501
- retries++;
502
-
503
- setTimeout(self.run.bind(self, params, retries), timeout);
504
- });
505
  };
506
 
507
  Export.prototype.clean = function (options, retries) {
508
- var self = this;
509
- retries = retries || 0;
510
-
511
- // Reset stop flag
512
- if (retries === 0) {
513
- this.stopExport(true);
514
- }
515
-
516
- // Set initial status
517
- this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_export });
518
-
519
- // Set params
520
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
521
-
522
- // Set additional params
523
- if (options) {
524
- params = params.concat(Ai1wm.Util.list(options));
525
- }
526
-
527
- // Clean
528
- $.ajax({
529
- url: ai1wm_export.ajax.url,
530
- type: 'POST',
531
- dataType: 'json',
532
- data: params,
533
- dataFilter: function dataFilter(data) {
534
- return Ai1wm.Util.json(data);
535
- }
536
- }).done(function () {
537
- // Unbinding the beforeunload event when we stop exporting
538
- $(window).unbind('beforeunload');
539
-
540
- // Destroy modal
541
- self.modal.destroy();
542
- }).fail(function (xhr) {
543
- var timeout = retries * 1000;
544
-
545
- try {
546
- var json = Ai1wm.Util.json(xhr.responseText);
547
- if (json) {
548
- var result = JSON.parse(json);
549
- var error = result.errors.pop();
550
- if (error.message) {
551
- self.stopExport(true);
552
- self.setStatus({
553
- type: 'error',
554
- title: ai1wm_locale.unable_to_export,
555
- message: error.message
556
- });
557
- return;
558
- }
559
- }
560
- } catch (e) {}
561
-
562
- if (retries >= 5) {
563
- self.stopExport(true);
564
- self.setStatus({
565
- type: 'error',
566
- title: ai1wm_locale.unable_to_export,
567
- message: ai1wm_locale.unable_to_stop_the_export
568
- });
569
- return;
570
- }
571
-
572
- retries++;
573
-
574
- setTimeout(self.clean.bind(self, options, retries), timeout);
575
- });
 
 
 
 
 
 
576
  };
577
 
578
  Export.prototype.getStatus = function () {
579
- var self = this;
580
-
581
- // Stop getting status
582
- if (this.isExportStopped()) {
583
- return;
584
- }
585
-
586
- this.statusXhr = $.ajax({
587
- url: ai1wm_export.status.url,
588
- type: 'GET',
589
- dataType: 'json',
590
- cache: false,
591
- dataFilter: function dataFilter(data) {
592
- return Ai1wm.Util.json(data);
593
- }
594
- }).done(function (params) {
595
- if (params) {
596
- self.setStatus(params);
597
-
598
- // Next status
599
- switch (params.type) {
600
- case 'done':
601
- case 'error':
602
- case 'download':
603
- // Unbinding beforeunload event when any case is performed
604
- $(window).unbind('beforeunload');
605
- return;
606
- }
607
- }
608
-
609
- // Export is not done yet, let's check status in 3 seconds
610
- setTimeout(self.getStatus.bind(self), 3000);
611
- }).fail(function () {
612
- // Export is not done yet, let's check status in 3 seconds
613
- setTimeout(self.getStatus.bind(self), 3000);
614
- });
615
  };
616
 
617
  Export.prototype.setStatus = function (params) {
618
- this.modal.render(params);
619
  };
620
 
621
  Export.prototype.onStop = function (options) {
622
- this.clean(options);
623
  };
624
 
625
  Export.prototype.stopExport = function (isStopped) {
626
- try {
627
- if (isStopped && this.statusXhr) {
628
- this.statusXhr.abort();
629
- }
630
- } finally {
631
- this.isStopped = isStopped;
632
- }
633
  };
634
 
635
  Export.prototype.isExportStopped = function () {
636
- return this.isStopped;
637
  };
638
 
639
  module.exports = Export;
640
 
641
  /***/ }),
642
- /* 6 */
643
- /***/ (function(module, exports, __webpack_require__) {
644
-
645
- "use strict";
646
 
 
 
647
 
648
  /**
649
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -668,236 +354,182 @@ module.exports = Export;
668
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
669
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
670
  */
671
-
672
  var $ = jQuery;
673
 
674
  var Modal = function Modal() {
675
- var self = this;
676
 
677
- // Error Modal
678
- this.error = function (params) {
679
- // Create the modal container
680
- var container = $('<div></div>');
681
 
682
- // Create section to hold title, message and action
683
- var section = $('<section></section>');
684
 
685
- // Create header to hold title
686
- var header = $('<h1></h1>');
687
 
688
- // Create paragraph to hold mesage
689
- var message = $('<p></p>').html(params.message);
690
 
691
- // Create action section
692
- var action = $('<div></div>');
693
 
694
- // Create title
695
- var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
696
 
697
- // Create close button
698
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
699
- self.destroy();
700
- });
701
 
702
- // Append text to close button
703
- closeButton.append(ai1wm_locale.close_export);
704
 
705
- // Append close button to action
706
- action.append(closeButton);
707
 
708
- // Append title to section
709
- header.append(title);
710
 
711
- // Append header and message to section
712
- section.append(header).append(message);
713
 
714
- // Append section and action to container
715
- container.append(section).append(action);
716
 
717
- // Render modal
718
- self.modal.html(container).show();
719
- self.modal.focus();
720
- self.overlay.show();
721
- };
722
 
723
- // Info Modal
724
- this.info = function (params) {
725
- // Create the modal container
726
- var container = $('<div></div>');
727
 
728
- // Create section to hold title, message and action
729
- var section = $('<section></section>');
 
730
 
731
- // Create header to hold loader
732
- var header = $('<h1></h1>');
733
 
734
- // Create paragraph to hold mesage
735
- var message = $('<p></p>').html(params.message);
736
 
737
- // Create action section
738
- var action = $('<div></div>');
739
 
740
- // Create loader
741
- var loader = $('<span class="ai1wm-loader"></span>');
742
 
743
- // Create stop export
744
- var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
745
- stopButton.attr('disabled', 'disabled');
746
- self.onStop();
747
- });
748
 
749
- // Append text to stop button
750
- stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_export);
 
 
751
 
752
- // Append stop button to action
753
- action.append(stopButton);
754
 
755
- // Append loader to header
756
- header.append(loader);
757
 
758
- // Append header and message to section
759
- section.append(header).append(message);
760
 
761
- // Append section and action to container
762
- container.append(section).append(action);
763
 
764
- // Render modal
765
- self.modal.html(container).show();
766
- self.modal.focus();
767
- self.overlay.show();
768
- };
769
 
770
- // Done Modal
771
- this.done = function (params) {
772
- // Create the modal container
773
- var container = $('<div></div>');
774
 
775
- // Create section to hold title, message and action
776
- var section = $('<section></section>');
777
 
778
- // Create header to hold title
779
- var header = $('<h1></h1>');
 
780
 
781
- // Create paragraph to hold mesage
782
- var message = $('<p></p>').html(params.message);
783
 
784
- // Create action section
785
- var action = $('<div></div>');
786
 
787
- // Create title
788
- var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
789
 
790
- // Create close button
791
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
792
- self.destroy();
793
- });
794
 
795
- // Append text to close button
796
- closeButton.append(ai1wm_locale.close_export);
797
 
798
- // Append close button to action
799
- action.append(closeButton);
 
800
 
801
- // Append title to section
802
- header.append(title);
803
 
804
- // Append header and message to section
805
- section.append(header).append(message);
806
 
807
- // Append section and action to container
808
- container.append(section).append(action);
809
 
810
- // Render modal
811
- self.modal.html(container).show();
812
- self.modal.focus();
813
- self.overlay.show();
814
- };
815
 
816
- // Download Modal
817
- this.download = function (params) {
818
- // Create the modal container
819
- var container = $('<div></div>');
820
 
821
- // Create section to hold title, message and action
822
- var section = $('<section></section>');
 
 
823
 
824
- // Create paragraph to hold mesage
825
- var message = $('<p></p>').html(params.message);
826
 
827
- // Create action section
828
- var action = $('<div></div>');
 
829
 
830
- // Create close button
831
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
832
- self.destroy();
833
- });
834
 
835
- // Append text to close button
836
- closeButton.append(ai1wm_locale.close_export);
837
 
838
- // Append close button to action
839
- action.append(closeButton);
840
 
841
- // Append message to section
842
- section.append(message);
 
843
 
844
- // Append section and action to container
845
- container.append(section).append(action);
846
 
847
- // Render modal
848
- self.modal.html(container).show();
849
- self.modal.focus();
850
- self.overlay.show();
851
- };
852
 
853
- // Create the overlay
854
- this.overlay = $('<div class="ai1wm-overlay"></div>');
855
 
856
- // Create the modal container
857
- this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
858
 
859
- $('body').append(this.overlay) // Append overlay to body
860
- .append(this.modal); // Append modal to body
 
 
 
 
 
 
 
 
 
861
  };
862
 
863
  Modal.prototype.render = function (params) {
864
- $(document).trigger('ai1wm-export-status', params);
865
-
866
- // Show modal
867
- switch (params.type) {
868
- case 'error':
869
- this.error(params);
870
- break;
871
-
872
- case 'info':
873
- this.info(params);
874
- break;
875
-
876
- case 'done':
877
- this.done(params);
878
- break;
879
-
880
- case 'download':
881
- this.download(params);
882
- break;
883
- }
884
  };
885
 
886
  Modal.prototype.destroy = function () {
887
- this.modal.hide();
888
- this.overlay.hide();
889
  };
890
 
891
  module.exports = Modal;
892
 
893
  /***/ }),
894
- /* 7 */,
895
- /* 8 */,
896
- /* 9 */
897
- /***/ (function(module, exports, __webpack_require__) {
898
 
899
- "use strict";
900
- /* WEBPACK VAR INJECTION */(function(global) {
901
 
902
  /**
903
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -922,54 +554,34 @@ module.exports = Modal;
922
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
923
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
924
  */
 
 
 
 
 
925
 
926
- var Query = __webpack_require__(10),
927
- FindReplace = __webpack_require__(11),
928
- Feedback = __webpack_require__(1),
929
- Report = __webpack_require__(2),
930
- Export = __webpack_require__(5);
931
-
932
- jQuery(document).ready(function ($) {
933
- 'use strict';
934
-
935
- var model = new Export();
936
-
937
- // Export to file
938
- $('#ai1wm-export-file').click(function (e) {
939
- var storage = Ai1wm.Util.random(12);
940
- var options = Ai1wm.Util.form('#ai1wm-export-form').concat({ name: 'storage', value: storage }).concat({ name: 'file', value: 1 });
941
-
942
- // Set global params
943
- model.setParams(options);
944
-
945
- // Start export
946
- model.start();
947
-
948
- e.preventDefault();
949
- });
950
-
951
- $('.ai1wm-accordion > .ai1wm-title').click(function () {
952
- $(this).parent().toggleClass('ai1wm-active');
953
- });
954
-
955
- $('#ai1wm-add-new-replace-button').ai1wm_find_replace();
956
 
957
- $('.ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
958
- $(this).parent().toggleClass('ai1wm-open');
959
- });
960
 
961
- $('.ai1wm-query').ai1wm_query();
962
- });
 
963
 
964
- global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Query: Query, FindReplace: FindReplace, Feedback: Feedback, Report: Report, Export: Export });
965
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
 
 
 
 
 
 
 
966
 
967
  /***/ }),
968
- /* 10 */
969
- /***/ (function(module, exports, __webpack_require__) {
970
-
971
- "use strict";
972
 
 
 
973
 
974
  /**
975
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -994,34 +606,30 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Query: Query, FindReplace: Find
994
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
995
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
996
  */
997
-
998
  (function ($) {
999
  $.fn.ai1wm_query = function () {
1000
  var findInput = $(this).find('input.ai1wm-query-find-input'),
1001
  replaceInput = $(this).find('input.ai1wm-query-replace-input'),
1002
  findText = $(this).find('small.ai1wm-query-find-text'),
1003
  replaceText = $(this).find('small.ai1wm-query-replace-text');
1004
-
1005
  findInput.on('change paste input keypress keydown keyup', function () {
1006
  var _inputValue = $(this).val().length > 0 ? $(this).val() : '<text>';
 
1007
  findText.text(_inputValue);
1008
  });
1009
-
1010
  replaceInput.on('change paste input keypress keydown keyup', function () {
1011
  var _inputValue = $(this).val().length > 0 ? $(this).val() : '<another-text>';
 
1012
  replaceText.text(_inputValue);
1013
  });
1014
-
1015
  return this;
1016
  };
1017
  })(jQuery);
1018
 
1019
  /***/ }),
1020
- /* 11 */
1021
- /***/ (function(module, exports, __webpack_require__) {
1022
-
1023
- "use strict";
1024
 
 
 
1025
 
1026
  /**
1027
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -1046,38 +654,273 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Query: Query, FindReplace: Find
1046
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1047
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1048
  */
 
 
1049
 
1050
- (function ($) {
1051
- $.fn.ai1wm_find_replace = function () {
1052
- $(this).click(function (e) {
1053
- e.preventDefault();
1054
 
1055
- var row = $('#ai1wm-queries > li:first').clone();
 
 
 
 
 
1056
 
1057
- // Reset input values
1058
- row.find('input').val('');
 
1059
 
1060
- // Reset ai1wm-query-find-text
1061
- row.find('.ai1wm-query-find-text').html('&lt;text&gt;');
1062
 
1063
- // Reset ai1wm-query-replace-text
1064
- row.find('.ai1wm-query-replace-text').html('&lt;another-text&gt;');
1065
 
1066
- $('#ai1wm-queries > li').removeClass('ai1wm-open');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1067
 
1068
- $(row).addClass('ai1wm-open');
1069
 
1070
- // Add new replace fields
1071
- $('#ai1wm-queries').append(row);
1072
- $(row).ai1wm_query();
1073
- $(row).find('p:first').on('click', function () {
1074
- $(this).parent().toggleClass('ai1wm-open');
1075
- });
1076
- });
1077
 
1078
- return this;
1079
- };
1080
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1081
 
1082
  /***/ })
1083
- /******/ ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ /***/ 12:
5
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6
 
7
  /**
8
  * Copyright (C) 2014-2020 ServMask Inc.
27
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
28
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
29
  */
30
+ var Modal = __webpack_require__(326),
 
31
  $ = jQuery;
32
 
33
  var Export = function Export() {
34
+ var self = this; // Set params
35
 
36
+ this.params = []; // Set modal
 
37
 
38
+ this.modal = new Modal(); // Set stop listener
 
39
 
40
+ this.modal.onStop = function (options) {
41
+ self.onStop(options);
42
+ };
 
43
  };
44
 
45
  Export.prototype.setParams = function (params) {
46
+ this.params = Ai1wm.Util.list(params);
47
  };
48
 
49
  Export.prototype.start = function (options, retries) {
50
+ var self = this;
51
+ retries = retries || 0; // Reset stop flag
52
+
53
+ if (retries === 0) {
54
+ this.stopExport(false);
55
+ } // Stop running export
56
+
57
+
58
+ if (this.isExportStopped()) {
59
+ return;
60
+ } // Initializing beforeunload event
61
+
62
+
63
+ $(window).bind('beforeunload', function () {
64
+ return ai1wm_locale.stop_exporting_your_website;
65
+ }); // Set initial status
66
+
67
+ this.setStatus({
68
+ type: 'info',
69
+ message: ai1wm_locale.preparing_to_export
70
+ }); // Set params
71
+
72
+ var params = this.params.concat({
73
+ name: 'secret_key',
74
+ value: ai1wm_export.secret_key
75
+ }); // Set additional params
76
+
77
+ if (options) {
78
+ params = params.concat(Ai1wm.Util.list(options));
79
+ } // Export
80
+
81
+
82
+ $.ajax({
83
+ url: ai1wm_export.ajax.url,
84
+ type: 'POST',
85
+ dataType: 'json',
86
+ data: params,
87
+ dataFilter: function dataFilter(data) {
88
+ return Ai1wm.Util.json(data);
89
+ }
90
+ }).done(function () {
91
+ self.getStatus();
92
+ }).done(function (result) {
93
+ if (result) {
94
+ self.run(result);
95
+ }
96
+ }).fail(function (xhr) {
97
+ var timeout = retries * 1000;
98
+
99
+ try {
100
+ var json = Ai1wm.Util.json(xhr.responseText);
101
+
102
+ if (json) {
103
+ var result = JSON.parse(json);
104
+ var error = result.errors.pop();
105
+
106
+ if (error.message) {
107
+ self.stopExport(true);
108
+ self.setStatus({
109
+ type: 'error',
110
+ title: ai1wm_locale.unable_to_export,
111
+ message: error.message
112
+ });
113
+ return;
114
+ }
115
+ }
116
+ } catch (e) {}
117
+
118
+ if (retries >= 5) {
119
+ self.stopExport(true);
120
+ self.setStatus({
121
+ type: 'error',
122
+ title: ai1wm_locale.unable_to_export,
123
+ message: ai1wm_locale.unable_to_start_the_export
124
+ });
125
+ return;
126
+ }
127
+
128
+ retries++;
129
+ setTimeout(self.start.bind(self, options, retries), timeout);
130
+ });
131
  };
132
 
133
  Export.prototype.run = function (params, retries) {
134
+ var self = this;
135
+ retries = retries || 0; // Stop running export
136
+
137
+ if (this.isExportStopped()) {
138
+ return;
139
+ } // Export
140
+
141
+
142
+ $.ajax({
143
+ url: ai1wm_export.ajax.url,
144
+ type: 'POST',
145
+ dataType: 'json',
146
+ data: params,
147
+ dataFilter: function dataFilter(data) {
148
+ return Ai1wm.Util.json(data);
149
+ }
150
+ }).done(function (result) {
151
+ if (result) {
152
+ self.run(result);
153
+ }
154
+ }).fail(function (xhr) {
155
+ var timeout = retries * 1000;
156
+
157
+ try {
158
+ var json = Ai1wm.Util.json(xhr.responseText);
159
+
160
+ if (json) {
161
+ var result = JSON.parse(json);
162
+ var error = result.errors.pop();
163
+
164
+ if (error.message) {
165
+ self.stopExport(true);
166
+ self.setStatus({
167
+ type: 'error',
168
+ title: ai1wm_locale.unable_to_export,
169
+ message: error.message
170
+ });
171
+ return;
172
+ }
173
+ }
174
+ } catch (e) {}
175
+
176
+ if (retries >= 5) {
177
+ self.stopExport(true);
178
+ self.setStatus({
179
+ type: 'error',
180
+ title: ai1wm_locale.unable_to_export,
181
+ message: ai1wm_locale.unable_to_run_the_export
182
+ });
183
+ return;
184
+ }
185
+
186
+ retries++;
187
+ setTimeout(self.run.bind(self, params, retries), timeout);
188
+ });
189
  };
190
 
191
  Export.prototype.clean = function (options, retries) {
192
+ var self = this;
193
+ retries = retries || 0; // Reset stop flag
194
+
195
+ if (retries === 0) {
196
+ this.stopExport(true);
197
+ } // Set initial status
198
+
199
+
200
+ this.setStatus({
201
+ type: 'info',
202
+ message: ai1wm_locale.please_wait_stopping_the_export
203
+ }); // Set params
204
+
205
+ var params = this.params.concat({
206
+ name: 'secret_key',
207
+ value: ai1wm_export.secret_key
208
+ }).concat({
209
+ name: 'priority',
210
+ value: 300
211
+ }); // Set additional params
212
+
213
+ if (options) {
214
+ params = params.concat(Ai1wm.Util.list(options));
215
+ } // Clean
216
+
217
+
218
+ $.ajax({
219
+ url: ai1wm_export.ajax.url,
220
+ type: 'POST',
221
+ dataType: 'json',
222
+ data: params,
223
+ dataFilter: function dataFilter(data) {
224
+ return Ai1wm.Util.json(data);
225
+ }
226
+ }).done(function () {
227
+ // Unbinding the beforeunload event when we stop exporting
228
+ $(window).unbind('beforeunload'); // Destroy modal
229
+
230
+ self.modal.destroy();
231
+ }).fail(function (xhr) {
232
+ var timeout = retries * 1000;
233
+
234
+ try {
235
+ var json = Ai1wm.Util.json(xhr.responseText);
236
+
237
+ if (json) {
238
+ var result = JSON.parse(json);
239
+ var error = result.errors.pop();
240
+
241
+ if (error.message) {
242
+ self.stopExport(true);
243
+ self.setStatus({
244
+ type: 'error',
245
+ title: ai1wm_locale.unable_to_export,
246
+ message: error.message
247
+ });
248
+ return;
249
+ }
250
+ }
251
+ } catch (e) {}
252
+
253
+ if (retries >= 5) {
254
+ self.stopExport(true);
255
+ self.setStatus({
256
+ type: 'error',
257
+ title: ai1wm_locale.unable_to_export,
258
+ message: ai1wm_locale.unable_to_stop_the_export
259
+ });
260
+ return;
261
+ }
262
+
263
+ retries++;
264
+ setTimeout(self.clean.bind(self, options, retries), timeout);
265
+ });
266
  };
267
 
268
  Export.prototype.getStatus = function () {
269
+ var self = this; // Stop getting status
270
+
271
+ if (this.isExportStopped()) {
272
+ return;
273
+ }
274
+
275
+ this.statusXhr = $.ajax({
276
+ url: ai1wm_export.status.url,
277
+ type: 'GET',
278
+ dataType: 'json',
279
+ cache: false,
280
+ dataFilter: function dataFilter(data) {
281
+ return Ai1wm.Util.json(data);
282
+ }
283
+ }).done(function (params) {
284
+ if (params) {
285
+ self.setStatus(params); // Next status
286
+
287
+ switch (params.type) {
288
+ case 'done':
289
+ case 'error':
290
+ case 'download':
291
+ // Unbinding beforeunload event when any case is performed
292
+ $(window).unbind('beforeunload');
293
+ return;
294
+ }
295
+ } // Export is not done yet, let's check status in 3 seconds
296
+
297
+
298
+ setTimeout(self.getStatus.bind(self), 3000);
299
+ }).fail(function () {
300
+ // Export is not done yet, let's check status in 3 seconds
301
+ setTimeout(self.getStatus.bind(self), 3000);
302
+ });
 
 
303
  };
304
 
305
  Export.prototype.setStatus = function (params) {
306
+ this.modal.render(params);
307
  };
308
 
309
  Export.prototype.onStop = function (options) {
310
+ this.clean(options);
311
  };
312
 
313
  Export.prototype.stopExport = function (isStopped) {
314
+ try {
315
+ if (isStopped && this.statusXhr) {
316
+ this.statusXhr.abort();
317
+ }
318
+ } finally {
319
+ this.isStopped = isStopped;
320
+ }
321
  };
322
 
323
  Export.prototype.isExportStopped = function () {
324
+ return this.isStopped;
325
  };
326
 
327
  module.exports = Export;
328
 
329
  /***/ }),
 
 
 
 
330
 
331
+ /***/ 326:
332
+ /***/ (function(module) {
333
 
334
  /**
335
  * Copyright (C) 2014-2020 ServMask Inc.
354
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
355
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
356
  */
 
357
  var $ = jQuery;
358
 
359
  var Modal = function Modal() {
360
+ var self = this; // Error Modal
361
 
362
+ this.error = function (params) {
363
+ // Create the modal container
364
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
365
 
366
+ var section = $('<section></section>'); // Create header to hold title
 
367
 
368
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
369
 
370
+ var message = $('<p></p>').html(params.message); // Create action section
 
371
 
372
+ var action = $('<div></div>'); // Create title
 
373
 
374
+ var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title); // Create close button
 
375
 
376
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
377
+ self.destroy();
378
+ }); // Append text to close button
 
379
 
380
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
 
381
 
382
+ action.append(closeButton); // Append title to section
 
383
 
384
+ header.append(title); // Append header and message to section
 
385
 
386
+ section.append(header).append(message); // Append section and action to container
 
387
 
388
+ container.append(section).append(action); // Render modal
 
389
 
390
+ self.modal.html(container).show();
391
+ self.modal.focus();
392
+ self.overlay.show();
393
+ }; // Info Modal
 
394
 
 
 
 
 
395
 
396
+ this.info = function (params) {
397
+ // Create the modal container
398
+ var container = $('<div></div>'); // Create section to hold title, message and action
399
 
400
+ var section = $('<section></section>'); // Create header to hold loader
 
401
 
402
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
403
 
404
+ var message = $('<p></p>').html(params.message); // Create action section
 
405
 
406
+ var action = $('<div></div>'); // Create loader
 
407
 
408
+ var loader = $('<span class="ai1wm-loader"></span>'); // Create stop export
 
 
 
 
409
 
410
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
411
+ stopButton.attr('disabled', 'disabled');
412
+ self.onStop();
413
+ }); // Append text to stop button
414
 
415
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_export); // Append stop button to action
 
416
 
417
+ action.append(stopButton); // Append loader to header
 
418
 
419
+ header.append(loader); // Append header and message to section
 
420
 
421
+ section.append(header).append(message); // Append section and action to container
 
422
 
423
+ container.append(section).append(action); // Render modal
 
 
 
 
424
 
425
+ self.modal.html(container).show();
426
+ self.modal.focus();
427
+ self.overlay.show();
428
+ }; // Done Modal
429
 
 
 
430
 
431
+ this.done = function (params) {
432
+ // Create the modal container
433
+ var container = $('<div></div>'); // Create section to hold title, message and action
434
 
435
+ var section = $('<section></section>'); // Create header to hold title
 
436
 
437
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
438
 
439
+ var message = $('<p></p>').html(params.message); // Create action section
 
440
 
441
+ var action = $('<div></div>'); // Create title
 
 
 
442
 
443
+ var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title); // Create close button
 
444
 
445
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
446
+ self.destroy();
447
+ }); // Append text to close button
448
 
449
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
 
450
 
451
+ action.append(closeButton); // Append title to section
 
452
 
453
+ header.append(title); // Append header and message to section
 
454
 
455
+ section.append(header).append(message); // Append section and action to container
 
 
 
 
456
 
457
+ container.append(section).append(action); // Render modal
 
 
 
458
 
459
+ self.modal.html(container).show();
460
+ self.modal.focus();
461
+ self.overlay.show();
462
+ }; // Download Modal
463
 
 
 
464
 
465
+ this.download = function (params) {
466
+ // Create the modal container
467
+ var container = $('<div></div>'); // Create section to hold title, message and action
468
 
469
+ var section = $('<section></section>'); // Create paragraph to hold mesage
 
 
 
470
 
471
+ var message = $('<p></p>').html(params.message); // Create action section
 
472
 
473
+ var action = $('<div></div>'); // Create close button
 
474
 
475
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
476
+ self.destroy();
477
+ }); // Append text to close button
478
 
479
+ closeButton.append(ai1wm_locale.close_export); // Append close button to action
 
480
 
481
+ action.append(closeButton); // Append message to section
 
 
 
 
482
 
483
+ section.append(message); // Append section and action to container
 
484
 
485
+ container.append(section).append(action); // Render modal
 
486
 
487
+ self.modal.html(container).show();
488
+ self.modal.focus();
489
+ self.overlay.show();
490
+ }; // Create the overlay
491
+
492
+
493
+ this.overlay = $('<div class="ai1wm-overlay"></div>'); // Create the modal container
494
+
495
+ this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
496
+ $('body').append(this.overlay) // Append overlay to body
497
+ .append(this.modal); // Append modal to body
498
  };
499
 
500
  Modal.prototype.render = function (params) {
501
+ $(document).trigger('ai1wm-export-status', params); // Show modal
502
+
503
+ switch (params.type) {
504
+ case 'error':
505
+ this.error(params);
506
+ break;
507
+
508
+ case 'info':
509
+ this.info(params);
510
+ break;
511
+
512
+ case 'done':
513
+ this.done(params);
514
+ break;
515
+
516
+ case 'download':
517
+ this.download(params);
518
+ break;
519
+ }
 
520
  };
521
 
522
  Modal.prototype.destroy = function () {
523
+ this.modal.hide();
524
+ this.overlay.hide();
525
  };
526
 
527
  module.exports = Modal;
528
 
529
  /***/ }),
 
 
 
 
530
 
531
+ /***/ 813:
532
+ /***/ (function() {
533
 
534
  /**
535
  * Copyright (C) 2014-2020 ServMask Inc.
554
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
555
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
556
  */
557
+ (function ($) {
558
+ $.fn.ai1wm_find_replace = function () {
559
+ $(this).click(function (e) {
560
+ e.preventDefault();
561
+ var row = $('#ai1wm-queries > li:first').clone(); // Reset input values
562
 
563
+ row.find('input').val(''); // Reset ai1wm-query-find-text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
 
565
+ row.find('.ai1wm-query-find-text').html('&lt;text&gt;'); // Reset ai1wm-query-replace-text
 
 
566
 
567
+ row.find('.ai1wm-query-replace-text').html('&lt;another-text&gt;');
568
+ $('#ai1wm-queries > li').removeClass('ai1wm-open');
569
+ $(row).addClass('ai1wm-open'); // Add new replace fields
570
 
571
+ $('#ai1wm-queries').append(row);
572
+ $(row).ai1wm_query();
573
+ $(row).find('p:first').on('click', function () {
574
+ $(this).parent().toggleClass('ai1wm-open');
575
+ });
576
+ });
577
+ return this;
578
+ };
579
+ })(jQuery);
580
 
581
  /***/ }),
 
 
 
 
582
 
583
+ /***/ 88:
584
+ /***/ (function() {
585
 
586
  /**
587
  * Copyright (C) 2014-2020 ServMask Inc.
606
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
607
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
608
  */
 
609
  (function ($) {
610
  $.fn.ai1wm_query = function () {
611
  var findInput = $(this).find('input.ai1wm-query-find-input'),
612
  replaceInput = $(this).find('input.ai1wm-query-replace-input'),
613
  findText = $(this).find('small.ai1wm-query-find-text'),
614
  replaceText = $(this).find('small.ai1wm-query-replace-text');
 
615
  findInput.on('change paste input keypress keydown keyup', function () {
616
  var _inputValue = $(this).val().length > 0 ? $(this).val() : '<text>';
617
+
618
  findText.text(_inputValue);
619
  });
 
620
  replaceInput.on('change paste input keypress keydown keyup', function () {
621
  var _inputValue = $(this).val().length > 0 ? $(this).val() : '<another-text>';
622
+
623
  replaceText.text(_inputValue);
624
  });
 
625
  return this;
626
  };
627
  })(jQuery);
628
 
629
  /***/ }),
 
 
 
 
630
 
631
+ /***/ 332:
632
+ /***/ (function() {
633
 
634
  /**
635
  * Copyright (C) 2014-2020 ServMask Inc.
654
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
655
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
656
  */
657
+ jQuery(document).ready(function ($) {
658
+ 'use strict'; // Idea
659
 
660
+ $('#ai1wm-feedback-type-link-1').click(function () {
661
+ var radio = $('#ai1wm-feedback-type-1');
 
 
662
 
663
+ if (radio.is(':checked')) {
664
+ radio.attr('checked', false);
665
+ } else {
666
+ radio.attr('checked', true);
667
+ }
668
+ }); // Help
669
 
670
+ $('#ai1wm-feedback-type-2').click(function () {
671
+ // Hide other options
672
+ $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message
673
 
674
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form
 
675
 
676
+ $('.ai1wm-feedback-form').fadeIn();
677
+ }); // Cancel feedback form
678
 
679
+ $('#ai1wm-feedback-cancel').click(function (e) {
680
+ $('.ai1wm-feedback-form').fadeOut(function () {
681
+ $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
682
+ });
683
+ e.preventDefault();
684
+ }); // Send feedback form
685
+
686
+ $('#ai1wm-feedback-submit').click(function (e) {
687
+ var self = $(this);
688
+ var spinner = self.next();
689
+ var type = $('.ai1wm-feedback-type:checked').val();
690
+ var email = $('.ai1wm-feedback-email').val();
691
+ var message = $('.ai1wm-feedback-message').val();
692
+ var terms = $('.ai1wm-feedback-terms').is(':checked');
693
+ self.attr('disabled', true);
694
+ spinner.css('visibility', 'visible');
695
+ $.ajax({
696
+ url: ai1wm_feedback.ajax.url,
697
+ type: 'POST',
698
+ dataType: 'json',
699
+ async: true,
700
+ data: {
701
+ secret_key: ai1wm_feedback.secret_key,
702
+ ai1wm_type: type,
703
+ ai1wm_email: email,
704
+ ai1wm_message: message,
705
+ ai1wm_terms: +terms
706
+ },
707
+ dataFilter: function dataFilter(data) {
708
+ return Ai1wm.Util.json(data);
709
+ }
710
+ }).done(function (data) {
711
+ self.attr('disabled', false);
712
+ spinner.css('visibility', 'hidden');
713
+
714
+ if (data.errors.length > 0) {
715
+ $('.ai1wm-feedback .ai1wm-message').remove();
716
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
717
+ $.each(data.errors, function (key, value) {
718
+ errorMessage.append($('<p />').text(value));
719
+ });
720
+ $('.ai1wm-feedback').prepend(errorMessage);
721
+ } else {
722
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
723
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
724
+ $('.ai1wm-feedback').html(successMessage);
725
+ }
726
+ });
727
+ e.preventDefault();
728
+ });
729
+ });
730
 
731
+ /***/ }),
732
 
733
+ /***/ 947:
734
+ /***/ (function() {
 
 
 
 
 
735
 
736
+ /**
737
+ * Copyright (C) 2014-2020 ServMask Inc.
738
+ *
739
+ * This program is free software: you can redistribute it and/or modify
740
+ * it under the terms of the GNU General Public License as published by
741
+ * the Free Software Foundation, either version 3 of the License, or
742
+ * (at your option) any later version.
743
+ *
744
+ * This program is distributed in the hope that it will be useful,
745
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
746
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
747
+ * GNU General Public License for more details.
748
+ *
749
+ * You should have received a copy of the GNU General Public License
750
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
751
+ *
752
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
753
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
754
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
755
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
756
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
757
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
758
+ */
759
+ jQuery(document).ready(function ($) {
760
+ 'use strict';
761
+
762
+ $('#ai1wm-report-problem-button').click(function (e) {
763
+ $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
764
+ e.preventDefault();
765
+ });
766
+ $('#ai1wm-report-cancel').click(function (e) {
767
+ $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
768
+ e.preventDefault();
769
+ });
770
+ $('#ai1wm-report-submit').click(function (e) {
771
+ var self = $(this);
772
+ var spinner = self.next();
773
+ var email = $('.ai1wm-report-email').val();
774
+ var message = $('.ai1wm-report-message').val();
775
+ var terms = $('.ai1wm-report-terms').is(':checked');
776
+ self.attr('disabled', true);
777
+ spinner.css('visibility', 'visible');
778
+ $.ajax({
779
+ url: ai1wm_report.ajax.url,
780
+ type: 'POST',
781
+ dataType: 'json',
782
+ async: true,
783
+ data: {
784
+ secret_key: ai1wm_report.secret_key,
785
+ ai1wm_email: email,
786
+ ai1wm_message: message,
787
+ ai1wm_terms: +terms
788
+ },
789
+ dataFilter: function dataFilter(data) {
790
+ return Ai1wm.Util.json(data);
791
+ }
792
+ }).done(function (data) {
793
+ self.attr('disabled', false);
794
+ spinner.css('visibility', 'hidden');
795
+
796
+ if (data.errors.length > 0) {
797
+ $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
798
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
799
+ $.each(data.errors, function (key, value) {
800
+ errorMessage.append($('<p />').text(value));
801
+ });
802
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
803
+ } else {
804
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
805
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
806
+ $('.ai1wm-report-problem-dialog').html(successMessage); // Hide message
807
+
808
+ setTimeout(function () {
809
+ $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
810
+ }, 2000);
811
+ }
812
+ });
813
+ e.preventDefault();
814
+ });
815
+ });
816
 
817
  /***/ })
818
+
819
+ /******/ });
820
+ /************************************************************************/
821
+ /******/ // The module cache
822
+ /******/ var __webpack_module_cache__ = {};
823
+ /******/
824
+ /******/ // The require function
825
+ /******/ function __webpack_require__(moduleId) {
826
+ /******/ // Check if module is in cache
827
+ /******/ if(__webpack_module_cache__[moduleId]) {
828
+ /******/ return __webpack_module_cache__[moduleId].exports;
829
+ /******/ }
830
+ /******/ // Create a new module (and put it into the cache)
831
+ /******/ var module = __webpack_module_cache__[moduleId] = {
832
+ /******/ // no module.id needed
833
+ /******/ // no module.loaded needed
834
+ /******/ exports: {}
835
+ /******/ };
836
+ /******/
837
+ /******/ // Execute the module function
838
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
839
+ /******/
840
+ /******/ // Return the exports of the module
841
+ /******/ return module.exports;
842
+ /******/ }
843
+ /******/
844
+ /************************************************************************/
845
+ /******/ /* webpack/runtime/global */
846
+ /******/ !function() {
847
+ /******/ __webpack_require__.g = (function() {
848
+ /******/ if (typeof globalThis === 'object') return globalThis;
849
+ /******/ try {
850
+ /******/ return this || new Function('return this')();
851
+ /******/ } catch (e) {
852
+ /******/ if (typeof window === 'object') return window;
853
+ /******/ }
854
+ /******/ })();
855
+ /******/ }();
856
+ /******/
857
+ /************************************************************************/
858
+ !function() {
859
+ /**
860
+ * Copyright (C) 2014-2020 ServMask Inc.
861
+ *
862
+ * This program is free software: you can redistribute it and/or modify
863
+ * it under the terms of the GNU General Public License as published by
864
+ * the Free Software Foundation, either version 3 of the License, or
865
+ * (at your option) any later version.
866
+ *
867
+ * This program is distributed in the hope that it will be useful,
868
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
869
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
870
+ * GNU General Public License for more details.
871
+ *
872
+ * You should have received a copy of the GNU General Public License
873
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
874
+ *
875
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
876
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
877
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
878
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
879
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
880
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
881
+ */
882
+ var Query = __webpack_require__(88),
883
+ FindReplace = __webpack_require__(813),
884
+ Feedback = __webpack_require__(332),
885
+ Report = __webpack_require__(947),
886
+ Export = __webpack_require__(12);
887
+
888
+ jQuery(document).ready(function ($) {
889
+ 'use strict';
890
+
891
+ var model = new Export(); // Export to file
892
+
893
+ $('#ai1wm-export-file').click(function (e) {
894
+ var storage = Ai1wm.Util.random(12);
895
+ var options = Ai1wm.Util.form('#ai1wm-export-form').concat({
896
+ name: 'storage',
897
+ value: storage
898
+ }).concat({
899
+ name: 'file',
900
+ value: 1
901
+ }); // Set global params
902
+
903
+ model.setParams(options); // Start export
904
+
905
+ model.start();
906
+ e.preventDefault();
907
+ });
908
+ $('.ai1wm-accordion > .ai1wm-title').click(function () {
909
+ $(this).parent().toggleClass('ai1wm-active');
910
+ });
911
+ $('#ai1wm-add-new-replace-button').ai1wm_find_replace();
912
+ $('.ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
913
+ $(this).parent().toggleClass('ai1wm-open');
914
+ });
915
+ $('.ai1wm-query').ai1wm_query();
916
+ });
917
+ __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, {
918
+ Query: Query,
919
+ FindReplace: FindReplace,
920
+ Feedback: Feedback,
921
+ Report: Report,
922
+ Export: Export
923
+ });
924
+ }();
925
+ /******/ })()
926
+ ;
lib/view/assets/javascript/import.min.js CHANGED
@@ -1,101 +1,8 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 12);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ([
67
- /* 0 */
68
- /***/ (function(module, exports) {
69
-
70
- var g;
71
-
72
- // This works in non-strict mode
73
- g = (function() {
74
- return this;
75
- })();
76
-
77
- try {
78
- // This works if eval is allowed (see CSP)
79
- g = g || Function("return this")() || (1,eval)("this");
80
- } catch(e) {
81
- // This works if the window reference is available
82
- if(typeof window === "object")
83
- g = window;
84
- }
85
-
86
- // g can still be undefined, but nothing to do about it...
87
- // We return undefined, instead of nothing here, so it's
88
- // easier to handle this case. if(!global) { ...}
89
-
90
- module.exports = g;
91
-
92
-
93
- /***/ }),
94
- /* 1 */
95
- /***/ (function(module, exports, __webpack_require__) {
96
-
97
- "use strict";
98
 
 
 
99
 
100
  /**
101
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -120,706 +27,497 @@ module.exports = g;
120
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
121
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
122
  */
 
 
123
 
124
- jQuery(document).ready(function ($) {
125
- 'use strict';
126
-
127
- // Idea
128
-
129
- $('#ai1wm-feedback-type-link-1').click(function () {
130
- var radio = $('#ai1wm-feedback-type-1');
131
- if (radio.is(':checked')) {
132
- radio.attr('checked', false);
133
- } else {
134
- radio.attr('checked', true);
135
- }
136
- });
137
-
138
- // Help
139
- $('#ai1wm-feedback-type-2').click(function () {
140
- // Hide other options
141
- $('#ai1wm-feedback-type-1').closest('li').hide();
142
-
143
- // Change placeholder message
144
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
145
-
146
- // Show feedback form
147
- $('.ai1wm-feedback-form').fadeIn();
148
- });
149
-
150
- // Cancel feedback form
151
- $('#ai1wm-feedback-cancel').click(function (e) {
152
- $('.ai1wm-feedback-form').fadeOut(function () {
153
- $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
154
- });
155
-
156
- e.preventDefault();
157
- });
158
-
159
- // Send feedback form
160
- $('#ai1wm-feedback-submit').click(function (e) {
161
- var self = $(this);
162
-
163
- var spinner = self.next();
164
- var type = $('.ai1wm-feedback-type:checked').val();
165
- var email = $('.ai1wm-feedback-email').val();
166
- var message = $('.ai1wm-feedback-message').val();
167
- var terms = $('.ai1wm-feedback-terms').is(':checked');
168
-
169
- self.attr('disabled', true);
170
- spinner.css('visibility', 'visible');
171
-
172
- $.ajax({
173
- url: ai1wm_feedback.ajax.url,
174
- type: 'POST',
175
- dataType: 'json',
176
- async: true,
177
- data: {
178
- secret_key: ai1wm_feedback.secret_key,
179
- ai1wm_type: type,
180
- ai1wm_email: email,
181
- ai1wm_message: message,
182
- ai1wm_terms: +terms
183
- },
184
- dataFilter: function dataFilter(data) {
185
- return Ai1wm.Util.json(data);
186
- }
187
- }).done(function (data) {
188
- self.attr('disabled', false);
189
- spinner.css('visibility', 'hidden');
190
-
191
- if (data.errors.length > 0) {
192
- $('.ai1wm-feedback .ai1wm-message').remove();
193
-
194
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
195
- $.each(data.errors, function (key, value) {
196
- errorMessage.append($('<p />').text(value));
197
- });
198
-
199
- $('.ai1wm-feedback').prepend(errorMessage);
200
- } else {
201
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
202
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
203
-
204
- $('.ai1wm-feedback').html(successMessage);
205
- }
206
- });
207
-
208
- e.preventDefault();
209
- });
210
- });
211
-
212
- /***/ }),
213
- /* 2 */
214
- /***/ (function(module, exports, __webpack_require__) {
215
 
216
- "use strict";
217
 
 
218
 
219
- /**
220
- * Copyright (C) 2014-2020 ServMask Inc.
221
- *
222
- * This program is free software: you can redistribute it and/or modify
223
- * it under the terms of the GNU General Public License as published by
224
- * the Free Software Foundation, either version 3 of the License, or
225
- * (at your option) any later version.
226
- *
227
- * This program is distributed in the hope that it will be useful,
228
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
229
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
230
- * GNU General Public License for more details.
231
- *
232
- * You should have received a copy of the GNU General Public License
233
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
234
- *
235
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
236
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
237
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
238
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
239
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
240
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
241
- */
242
 
243
- jQuery(document).ready(function ($) {
244
- 'use strict';
245
-
246
- $('#ai1wm-report-problem-button').click(function (e) {
247
- $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
248
-
249
- e.preventDefault();
250
- });
251
-
252
- $('#ai1wm-report-cancel').click(function (e) {
253
- $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
254
-
255
- e.preventDefault();
256
- });
257
-
258
- $('#ai1wm-report-submit').click(function (e) {
259
- var self = $(this);
260
-
261
- var spinner = self.next();
262
- var email = $('.ai1wm-report-email').val();
263
- var message = $('.ai1wm-report-message').val();
264
- var terms = $('.ai1wm-report-terms').is(':checked');
265
-
266
- self.attr('disabled', true);
267
- spinner.css('visibility', 'visible');
268
-
269
- $.ajax({
270
- url: ai1wm_report.ajax.url,
271
- type: 'POST',
272
- dataType: 'json',
273
- async: true,
274
- data: {
275
- secret_key: ai1wm_report.secret_key,
276
- ai1wm_email: email,
277
- ai1wm_message: message,
278
- ai1wm_terms: +terms
279
- },
280
- dataFilter: function dataFilter(data) {
281
- return Ai1wm.Util.json(data);
282
- }
283
- }).done(function (data) {
284
- self.attr('disabled', false);
285
- spinner.css('visibility', 'hidden');
286
-
287
- if (data.errors.length > 0) {
288
- $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
289
-
290
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
291
- $.each(data.errors, function (key, value) {
292
- errorMessage.append($('<p />').text(value));
293
- });
294
-
295
- $('.ai1wm-report-problem-dialog').prepend(errorMessage);
296
- } else {
297
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
298
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
299
-
300
- $('.ai1wm-report-problem-dialog').html(successMessage);
301
-
302
- // Hide message
303
- setTimeout(function () {
304
- $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
305
- }, 2000);
306
- }
307
- });
308
-
309
- e.preventDefault();
310
- });
311
- });
312
 
313
- /***/ }),
314
- /* 3 */
315
- /***/ (function(module, exports, __webpack_require__) {
316
 
317
- "use strict";
318
 
 
 
 
319
 
320
- /**
321
- * Copyright (C) 2014-2020 ServMask Inc.
322
- *
323
- * This program is free software: you can redistribute it and/or modify
324
- * it under the terms of the GNU General Public License as published by
325
- * the Free Software Foundation, either version 3 of the License, or
326
- * (at your option) any later version.
327
- *
328
- * This program is distributed in the hope that it will be useful,
329
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
330
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
331
- * GNU General Public License for more details.
332
- *
333
- * You should have received a copy of the GNU General Public License
334
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
335
- *
336
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
337
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
338
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
339
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
340
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
341
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
342
- */
343
 
344
- var Modal = __webpack_require__(4),
345
- $ = jQuery;
346
-
347
- var Import = function Import() {
348
- var self = this;
349
-
350
- // Set params
351
- this.params = [];
352
-
353
- // Set modal
354
- this.modal = new Modal();
355
-
356
- // Set confirm listener
357
- this.modal.onConfirm = function (options) {
358
- self.onConfirm(options);
359
- };
360
-
361
- // Set blogs listener
362
- this.modal.onBlogs = function (options) {
363
- self.onBlogs(options);
364
- };
365
-
366
- // Set stop listener
367
- this.modal.onStop = function (options) {
368
- self.onStop(options);
369
- };
370
-
371
- // Set disk space listener
372
- this.modal.onDiskSpaceConfirm = function (options) {
373
- self.onDiskSpaceConfirm(options);
374
- };
375
  };
376
 
377
  Import.prototype.setParams = function (params) {
378
- this.params = Ai1wm.Util.list(params);
379
  };
380
 
381
  Import.prototype.start = function (options, retries) {
382
- var self = this;
383
- retries = retries || 0;
384
-
385
- // Reset stop flag
386
- if (retries === 0) {
387
- this.stopImport(false);
388
- }
389
-
390
- // Stop running import
391
- if (this.isImportStopped()) {
392
- return;
393
- }
394
-
395
- // Initializing beforeunload event
396
- $(window).bind('beforeunload', function () {
397
- return ai1wm_locale.stop_importing_your_website;
398
- });
399
-
400
- // Set initial status
401
- this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_import });
402
-
403
- // Set params
404
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
405
-
406
- // Set additional params
407
- if (options) {
408
- params = params.concat(Ai1wm.Util.list(options));
409
- }
410
-
411
- // Import
412
- $.ajax({
413
- url: ai1wm_import.ajax.url,
414
- type: 'POST',
415
- dataType: 'json',
416
- data: params,
417
- dataFilter: function dataFilter(data) {
418
- return Ai1wm.Util.json(data);
419
- }
420
- }).done(function () {
421
- self.getStatus();
422
- }).done(function (result) {
423
- if (result) {
424
- self.run(result);
425
- }
426
- }).fail(function (xhr) {
427
- var timeout = retries * 1000;
428
-
429
- try {
430
- var json = Ai1wm.Util.json(xhr.responseText);
431
- if (json) {
432
- var result = JSON.parse(json);
433
- var error = result.errors.pop();
434
- if (error.message) {
435
- self.stopImport(true);
436
- self.setStatus({
437
- type: 'error',
438
- title: ai1wm_locale.unable_to_import,
439
- message: error.message
440
- });
441
- return;
442
- }
443
- }
444
- } catch (e) {}
445
-
446
- if (retries >= 5) {
447
- self.stopImport(true);
448
- self.setStatus({
449
- type: 'error',
450
- title: ai1wm_locale.unable_to_import,
451
- message: ai1wm_locale.unable_to_start_the_import
452
- });
453
- return;
454
- }
455
-
456
- retries++;
457
-
458
- setTimeout(self.start.bind(self, options, retries), timeout);
459
- });
 
 
 
460
  };
461
 
462
  Import.prototype.run = function (params, retries) {
463
- var self = this;
464
- retries = retries || 0;
465
-
466
- // Stop running import
467
- if (this.isImportStopped()) {
468
- return;
469
- }
470
-
471
- // Import
472
- $.ajax({
473
- url: ai1wm_import.ajax.url,
474
- type: 'POST',
475
- dataType: 'json',
476
- data: params,
477
- dataFilter: function dataFilter(data) {
478
- return Ai1wm.Util.json(data);
479
- }
480
- }).done(function (result) {
481
- if (result) {
482
- self.run(result);
483
- }
484
- }).fail(function (xhr) {
485
- var timeout = retries * 1000;
486
-
487
- try {
488
- var json = Ai1wm.Util.json(xhr.responseText);
489
- if (json) {
490
- var result = JSON.parse(json);
491
- var error = result.errors.pop();
492
- if (error.message) {
493
- self.stopImport(true);
494
- self.setStatus({
495
- type: 'error',
496
- title: ai1wm_locale.unable_to_import,
497
- message: error.message
498
- });
499
- return;
500
- }
501
- }
502
- } catch (e) {}
503
-
504
- retries++;
505
-
506
- setTimeout(self.run.bind(self, params, retries), timeout);
507
- });
508
  };
509
 
510
  Import.prototype.confirm = function (options, retries) {
511
- var self = this;
512
- retries = retries || 0;
513
-
514
- // Stop running import
515
- if (this.isImportStopped()) {
516
- return;
517
- }
518
-
519
- // Set params
520
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
521
-
522
- // Set additional params
523
- if (options) {
524
- params = params.concat(Ai1wm.Util.list(options));
525
- }
526
-
527
- // Confirm
528
- $.ajax({
529
- url: ai1wm_import.ajax.url,
530
- type: 'POST',
531
- dataType: 'json',
532
- data: params,
533
- dataFilter: function dataFilter(data) {
534
- return Ai1wm.Util.json(data);
535
- }
536
- }).done(function () {
537
- self.getStatus();
538
- }).done(function (result) {
539
- if (result) {
540
- self.run(result);
541
- }
542
- }).fail(function (xhr) {
543
- var timeout = retries * 1000;
544
-
545
- try {
546
- var json = Ai1wm.Util.json(xhr.responseText);
547
- if (json) {
548
- var result = JSON.parse(json);
549
- var error = result.errors.pop();
550
- if (error.message) {
551
- self.stopImport(true);
552
- self.setStatus({
553
- type: 'error',
554
- title: ai1wm_locale.unable_to_import,
555
- message: error.message
556
- });
557
- return;
558
- }
559
- }
560
- } catch (e) {}
561
-
562
- if (retries >= 5) {
563
- self.stopImport(true);
564
- self.setStatus({
565
- type: 'error',
566
- title: ai1wm_locale.unable_to_import,
567
- message: ai1wm_locale.unable_to_confirm_the_import
568
- });
569
- return;
570
- }
571
-
572
- retries++;
573
-
574
- setTimeout(self.confirm.bind(self, options, retries), timeout);
575
- });
 
 
 
 
 
576
  };
577
 
578
  Import.prototype.checkDiskSpace = function (fileSize, callback) {
579
- this.diskSpaceCallback = callback;
580
-
581
- var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10);
582
- var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10);
583
- var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10);
584
-
585
- if (diskSpaceFree >= 0) {
586
- var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra;
587
- if (diskSpaceRequired > diskSpaceFree) {
588
- this.setStatus({
589
- type: 'disk_space_confirm',
590
- message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree))
591
- });
592
- return;
593
- }
594
- }
595
-
596
- callback();
597
  };
598
 
599
  Import.prototype.blogs = function (options, retries) {
600
- var self = this;
601
- retries = retries || 0;
602
-
603
- // Stop running import
604
- if (this.isImportStopped()) {
605
- return;
606
- }
607
-
608
- // Set params
609
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
610
-
611
- // Set additional params
612
- if (options) {
613
- params = params.concat(Ai1wm.Util.list(options));
614
- }
615
-
616
- // Blogs
617
- $.ajax({
618
- url: ai1wm_import.ajax.url,
619
- type: 'POST',
620
- dataType: 'json',
621
- data: params,
622
- dataFilter: function dataFilter(data) {
623
- return Ai1wm.Util.json(data);
624
- }
625
- }).done(function () {
626
- self.getStatus();
627
- }).done(function (result) {
628
- if (result) {
629
- self.run(result);
630
- }
631
- }).fail(function (xhr) {
632
- var timeout = retries * 1000;
633
-
634
- try {
635
- var json = Ai1wm.Util.json(xhr.responseText);
636
- if (json) {
637
- var result = JSON.parse(json);
638
- var error = result.errors.pop();
639
- if (error.message) {
640
- self.stopImport(true);
641
- self.setStatus({
642
- type: 'error',
643
- title: ai1wm_locale.unable_to_import,
644
- message: error.message
645
- });
646
- return;
647
- }
648
- }
649
- } catch (e) {}
650
-
651
- if (retries >= 5) {
652
- self.stopImport(true);
653
- self.setStatus({
654
- type: 'error',
655
- title: ai1wm_locale.unable_to_import,
656
- message: ai1wm_locale.unable_to_prepare_blogs_on_import
657
- });
658
- return;
659
- }
660
-
661
- retries++;
662
-
663
- setTimeout(self.blogs.bind(self, options, retries), timeout);
664
- });
 
 
 
 
 
665
  };
666
 
667
  Import.prototype.clean = function (options, retries) {
668
- var self = this;
669
- retries = retries || 0;
670
-
671
- // Reset stop flag
672
- if (retries === 0) {
673
- this.stopImport(true);
674
- }
675
-
676
- // Set initial status
677
- this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_import });
678
-
679
- // Set params
680
- var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
681
-
682
- // Set additional params
683
- if (options) {
684
- params = params.concat(Ai1wm.Util.list(options));
685
- }
686
-
687
- // Clean
688
- $.ajax({
689
- url: ai1wm_import.ajax.url,
690
- type: 'POST',
691
- dataType: 'json',
692
- data: params,
693
- dataFilter: function dataFilter(data) {
694
- return Ai1wm.Util.json(data);
695
- }
696
- }).done(function () {
697
- // Unbinding the beforeunload event when we stop importing
698
- $(window).unbind('beforeunload');
699
-
700
- // Destroy modal
701
- self.modal.destroy();
702
- }).fail(function (xhr) {
703
- var timeout = retries * 1000;
704
-
705
- try {
706
- var json = Ai1wm.Util.json(xhr.responseText);
707
- if (json) {
708
- var result = JSON.parse(json);
709
- var error = result.errors.pop();
710
- if (error.message) {
711
- self.stopImport(true);
712
- self.setStatus({
713
- type: 'error',
714
- title: ai1wm_locale.unable_to_import,
715
- message: error.message
716
- });
717
- return;
718
- }
719
- }
720
- } catch (e) {}
721
-
722
- if (retries >= 5) {
723
- self.stopImport(true);
724
- self.setStatus({
725
- type: 'error',
726
- title: ai1wm_locale.unable_to_import,
727
- message: ai1wm_locale.unable_to_stop_the_import
728
- });
729
- return;
730
- }
731
-
732
- retries++;
733
-
734
- setTimeout(self.clean.bind(self, options, retries), timeout);
735
- });
 
 
 
 
 
 
736
  };
737
 
738
  Import.prototype.getStatus = function () {
739
- var self = this;
740
-
741
- // Stop getting status
742
- if (this.isImportStopped()) {
743
- return;
744
- }
745
-
746
- this.statusXhr = $.ajax({
747
- url: ai1wm_import.status.url,
748
- type: 'GET',
749
- dataType: 'json',
750
- cache: false,
751
- dataFilter: function dataFilter(data) {
752
- return Ai1wm.Util.json(data);
753
- }
754
- }).done(function (params) {
755
- if (params) {
756
- self.setStatus(params);
757
-
758
- // Next status
759
- switch (params.type) {
760
- case 'done':
761
- case 'error':
762
- // Unbinding the beforeunload event when any case is performed
763
- $(window).unbind('beforeunload');
764
- return;
765
-
766
- case 'confirm':
767
- case 'disk_space_confirm':
768
- case 'blogs':
769
- return;
770
- }
771
- }
772
-
773
- // Import is not done yet, let's check status in 3 seconds
774
- setTimeout(self.getStatus.bind(self), 3000);
775
- }).fail(function () {
776
- // Import is not done yet, let's check status in 3 seconds
777
- setTimeout(self.getStatus.bind(self), 3000);
778
- });
779
  };
780
 
781
  Import.prototype.setStatus = function (params) {
782
- this.modal.render(params);
783
  };
784
 
785
  Import.prototype.onConfirm = function (options) {
786
- this.confirm(options);
787
  };
788
 
789
  Import.prototype.onBlogs = function (options) {
790
- this.blogs(options);
791
  };
792
 
793
  Import.prototype.onStop = function (options) {
794
- this.clean(options);
795
  };
796
 
797
  Import.prototype.onDiskSpaceConfirm = function (options) {
798
- this.diskSpaceCallback(options);
799
  };
800
 
801
  Import.prototype.stopImport = function (isStopped) {
802
- try {
803
- if (isStopped && this.statusXhr) {
804
- this.statusXhr.abort();
805
- }
806
- } finally {
807
- this.isStopped = isStopped;
808
- }
809
  };
810
 
811
  Import.prototype.isImportStopped = function () {
812
- return this.isStopped;
813
  };
814
 
815
  module.exports = Import;
816
 
817
  /***/ }),
818
- /* 4 */
819
- /***/ (function(module, exports, __webpack_require__) {
820
-
821
- "use strict";
822
 
 
 
823
 
824
  /**
825
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -844,495 +542,376 @@ module.exports = Import;
844
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
845
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
846
  */
847
-
848
  var $ = jQuery;
849
 
850
  var Modal = function Modal() {
851
- var self = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
 
853
- // Error Modal
854
- this.error = function (params) {
855
- // Create the modal container
856
- var container = $('<div></div>');
857
 
858
- // Create section to hold title, message and action
859
- var section = $('<section></section>');
860
 
861
- // Create header to hold title
862
- var header = $('<h1></h1>');
863
 
864
- // Create paragraph to hold mesage
865
- var message = $('<p></p>').html(params.message);
866
 
867
- // Create action section
868
- var action = $('<div></div>');
869
 
870
- // Create title
871
- var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
872
 
873
- // Create close button
874
- var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
875
- self.destroy();
876
- });
877
 
878
- // Append text to close button
879
- closeButton.append(ai1wm_locale.close_import);
880
 
881
- // Append close button to action
882
- action.append(closeButton);
 
 
 
883
 
884
- // Append title to section
885
- header.append(title);
886
 
887
- // Append header and message to section
888
- section.append(header).append(message);
 
 
889
 
890
- // Append section and action to container
891
- container.append(section).append(action);
892
 
893
- // Render modal
894
- self.modal.html(container).show();
895
- self.modal.focus();
896
- self.overlay.show();
897
- };
898
 
899
- // Progress Modal
900
- this.progress = function (params) {
901
- // Update progress bar meter
902
- if (this.progress.progressBarMeter) {
903
- this.progress.progressBarMeter.width(params.percent + '%');
904
- }
905
 
906
- // Update progress bar percent
907
- if (this.progress.progressBarPercent) {
908
- this.progress.progressBarPercent.text(params.percent + '%');
909
- return;
910
- }
911
 
912
- // Create the modal container
913
- var container = $('<div></div>');
914
 
915
- // Create section to hold title, message and action
916
- var section = $('<section></section>');
917
 
918
- // Create header to hold progress bar
919
- var header = $('<h1></h1>');
920
 
921
- // Create action section
922
- var action = $('<div></div>');
923
 
924
- // Create progress bar
925
- var progressBar = $('<span class="ai1wm-progress-bar"></span>');
 
 
926
 
927
- // Create progress bar meter
928
- this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
929
 
930
- // Create progress bar percent
931
- this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%');
932
 
933
- // Create stop import
934
- var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
935
- stopButton.attr('disabled', 'disabled');
936
- self.onStop();
937
- });
938
 
939
- // Append text to stop button
940
- stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import);
941
 
942
- // Append progress meter and progress percent
943
- progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
944
 
945
- // Append stop button to action
946
- action.append(stopButton);
947
 
948
- // Append progress bar to section
949
- header.append(progressBar);
 
 
950
 
951
- // Append header to section
952
- section.append(header);
953
 
954
- // Append section and action to container
955
- container.append(section).append(action);
 
956
 
957
- // Render modal
958
- self.modal.html(container).show();
959
- self.modal.focus();
960
- self.overlay.show();
961
- };
962
 
963
- // Pro Modal
964
- this.pro = function (params) {
965
- // Create the modal container
966
- var container = $('<div></div>');
967
 
968
- // Create section to hold title, message and action
969
- var section = $('<section></section>');
970
 
971
- // Create header to hold warning
972
- var header = $('<h1></h1>');
973
 
974
- // Create paragraph to hold mesage
975
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
976
 
977
- // Create action section
978
- var action = $('<div></div>');
 
979
 
980
- // Create warning
981
- var warning = $('<i class="ai1wm-icon-notification"></i>');
982
 
983
- // Create close button
984
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
985
- self.destroy();
986
- });
987
 
988
- // Append text to close button
989
- closeButton.append(ai1wm_locale.close_import);
990
 
991
- // Append close button to action
992
- action.append(closeButton);
993
 
994
- // Append warning to section
995
- header.append(warning);
996
 
997
- // Append header and message to section
998
- section.append(header).append(message);
 
 
999
 
1000
- // Append section and action to container
1001
- container.append(section).append(action);
1002
 
1003
- // Render modal
1004
- self.modal.html(container).show();
1005
- self.modal.focus();
1006
- self.overlay.show();
1007
- };
1008
 
1009
- // Confirm Modal
1010
- this.confirm = function (params) {
1011
- // Create the modal container
1012
- var container = $('<div></div>');
1013
 
1014
- // Create section to hold title, message and action
1015
- var section = $('<section></section>');
1016
 
1017
- // Create header to hold warning
1018
- var header = $('<h1></h1>');
1019
 
1020
- // Create paragraph to hold mesage
1021
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
1022
 
1023
- // Create action section
1024
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1025
 
1026
- // Create warning
1027
- var warning = $('<i class="ai1wm-icon-notification"></i>');
 
 
1028
 
1029
- // Create close button
1030
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1031
- closeButton.attr('disabled', 'disabled');
1032
- self.onStop();
1033
- });
1034
 
1035
- // Create confirm button
1036
- var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1037
- confirmButton.attr('disabled', 'disabled');
1038
- self.onConfirm();
1039
- });
1040
 
1041
- // Append text to close button
1042
- closeButton.append(ai1wm_locale.close_import);
1043
 
1044
- // Append text to confirm button
1045
- confirmButton.append(ai1wm_locale.confirm_import + ' &gt;');
1046
 
1047
- // Append close button to action
1048
- action.append(closeButton);
1049
 
1050
- // Append confirm button to action
1051
- action.append(confirmButton);
1052
 
1053
- // Append warning to section
1054
- header.append(warning);
1055
 
1056
- // Append header and message to section
1057
- section.append(header).append(message);
1058
 
1059
- // Append section and action to container
1060
- container.append(section).append(action);
 
 
1061
 
1062
- // Render modal
1063
- self.modal.html(container).show();
1064
- self.modal.focus();
1065
- self.overlay.show();
1066
- };
1067
 
1068
- // Disk space Confirm Modal
1069
- this.diskSpaceConfirm = function (params) {
1070
- // Create the modal container
1071
- var container = $('<div></div>');
1072
 
1073
- // Create section to hold title, message and action
1074
- var section = $('<section></section>');
1075
 
1076
- // Create header to hold warning
1077
- var header = $('<h1></h1>');
1078
 
1079
- // Create paragraph to hold mesage
1080
- var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message);
1081
 
1082
- // Create action section
1083
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1084
 
1085
- // Create warning
1086
- var warning = $('<i class="ai1wm-icon-notification"></i>');
1087
 
1088
- // Create close button
1089
- var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1090
- self.destroy();
1091
- });
1092
 
1093
- // Create confirm button
1094
- var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1095
- $(this).attr('disabled', 'disabled');
1096
- self.onDiskSpaceConfirm();
1097
- });
1098
 
1099
- // Append text to close button
1100
- closeButton.append(ai1wm_locale.close_import);
1101
 
1102
- // Append text to confirm button
1103
- confirmButton.append(ai1wm_locale.confirm_disk_space);
1104
 
1105
- // Append close button to action
1106
- action.append(closeButton);
1107
 
1108
- // Append confirm button to action
1109
- action.append(confirmButton);
1110
 
1111
- // Append warning to section
1112
- header.append(warning);
1113
 
1114
- // Append header and message to section
1115
- section.append(header).append(message);
1116
 
1117
- // Append section and action to container
1118
- container.append(section).append(action);
1119
 
1120
- // Render modal
1121
- self.modal.html(container).show();
1122
- self.modal.focus();
1123
- self.overlay.show();
1124
- };
1125
 
1126
- // Blogs Modal
1127
- this.blogs = function (params) {
1128
- // Create the modal container
1129
- var container = $('<form></form>').on('submit', function (e) {
1130
- e.preventDefault();
1131
- continueButton.attr('disabled', 'disabled');
1132
- self.onBlogs(container.serializeArray());
1133
- });
1134
 
1135
- // Create section to hold title, message and action
1136
- var section = $('<section></section>');
 
 
 
 
 
1137
 
1138
- // Create header to hold title
1139
- var header = $('<h1></h1>');
1140
 
1141
- // Create paragraph to hold mesage
1142
- var message = $('<p></p>').html(params.message);
1143
 
1144
- // Create action section
1145
- var action = $('<div></div>');
1146
 
1147
- // Create title
1148
- var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
1149
 
1150
- // Create continue button
1151
- var continueButton = $('<button type="submit" class="ai1wm-button-green"></button>');
1152
 
1153
- // Append text to continue button
1154
- continueButton.append(ai1wm_locale.continue_import);
1155
 
1156
- // Append continue button to action
1157
- action.append(continueButton);
1158
 
1159
- // Append title to section
1160
- header.append(title);
1161
 
1162
- // Append header and message to section
1163
- section.append(header).append(message);
1164
 
1165
- // Append section and action to container
1166
- container.append(section).append(action);
1167
 
1168
- // Render modal
1169
- self.modal.html(container).show();
1170
- self.modal.focus();
1171
- self.overlay.show();
1172
- };
1173
 
1174
- // Info Modal
1175
- this.info = function (params) {
1176
- // Create the modal container
1177
- var container = $('<div></div>');
1178
 
1179
- // Create section to hold title, message and action
1180
- var section = $('<section></section>');
1181
 
1182
- // Create header to hold loader
1183
- var header = $('<h1></h1>');
 
1184
 
1185
- // Create paragraph to hold mesage
1186
- var message = $('<p></p>').html(params.message);
1187
 
1188
- // Create action section
1189
- var action = $('<div></div>');
1190
 
1191
- // Create loader
1192
- var loader = $('<span class="ai1wm-loader"></span>');
1193
 
1194
- // Create warning
1195
- var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser);
1196
 
1197
- // Create notice to be displayed during import process
1198
- var notice = $('<div class="ai1wm-import-modal-notice"></div>');
1199
 
1200
- // Append warning to notice
1201
- notice.append(warning);
1202
 
1203
- // Append stop button to action
1204
- action.append(notice);
1205
 
1206
- // Append loader to header
1207
- header.append(loader);
1208
 
1209
- // Append header and message to section
1210
- section.append(header).append(message);
1211
 
1212
- // Append section and action to container
1213
- container.append(section).append(action);
1214
 
1215
- // Render modal
1216
- self.modal.html(container).show();
1217
- self.modal.focus();
1218
- self.overlay.show();
1219
- };
1220
 
1221
- // Done Modal
1222
- this.done = function (params) {
1223
- // Create the modal container
1224
- var container = $('<div></div>');
1225
 
1226
- // Create section to hold title, message and action
1227
- var section = $('<section></section>');
 
 
1228
 
1229
- // Create header to hold title
1230
- var header = $('<h1></h1>');
1231
 
1232
- // Create paragraph to hold mesage
1233
- var message = $('<p class="ai1wm-import-modal-content-done"></p>').html(params.message);
 
1234
 
1235
- // Create action section
1236
- var action = $('<div class="ai1wm-import-modal-actions"></div>');
1237
 
1238
- // Create title
1239
- var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
1240
 
1241
- // Create close button
1242
- var closeButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1243
- self.destroy();
1244
- });
1245
 
1246
- // Append text to close button
1247
- closeButton.append(ai1wm_locale.finish_import + ' &gt;');
1248
 
1249
- // Append close button to action
1250
- action.append(closeButton);
1251
 
1252
- // Append title to section
1253
- header.append(title);
 
1254
 
1255
- // Append header and message to section
1256
- section.append(header).append(message);
1257
 
1258
- // Append section and action to container
1259
- container.append(section).append(action);
1260
 
1261
- // Render modal
1262
- self.modal.html(container).show();
1263
- self.modal.focus();
1264
- self.overlay.show();
1265
- };
1266
 
1267
- // Create the overlay
1268
- this.overlay = $('<div class="ai1wm-overlay"></div>');
1269
 
1270
- // Create the modal container
1271
- this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
1272
 
1273
- $('body').append(this.overlay) // Append overlay to body
1274
- .append(this.modal); // Append modal to body
 
 
 
 
 
 
 
 
 
1275
  };
1276
 
1277
  Modal.prototype.render = function (params) {
1278
- $(document).trigger('ai1wm-import-status', params);
1279
-
1280
- // Show modal
1281
- switch (params.type) {
1282
- case 'pro':
1283
- this.pro(params);
1284
- break;
1285
-
1286
- case 'error':
1287
- this.error(params);
1288
- break;
1289
-
1290
- case 'confirm':
1291
- this.confirm(params);
1292
- break;
1293
-
1294
- case 'disk_space_confirm':
1295
- this.diskSpaceConfirm(params);
1296
- break;
1297
-
1298
- case 'blogs':
1299
- this.blogs(params);
1300
- break;
1301
-
1302
- case 'progress':
1303
- this.progress(params);
1304
- break;
1305
-
1306
- case 'info':
1307
- this.info(params);
1308
- break;
1309
-
1310
- case 'done':
1311
- this.done(params);
1312
- break;
1313
- }
1314
  };
1315
 
1316
  Modal.prototype.destroy = function () {
1317
- this.modal.hide();
1318
- this.overlay.hide();
1319
  };
1320
 
1321
  module.exports = Modal;
1322
 
1323
  /***/ }),
1324
- /* 5 */,
1325
- /* 6 */,
1326
- /* 7 */,
1327
- /* 8 */,
1328
- /* 9 */,
1329
- /* 10 */,
1330
- /* 11 */,
1331
- /* 12 */
1332
- /***/ (function(module, exports, __webpack_require__) {
1333
-
1334
- "use strict";
1335
- /* WEBPACK VAR INJECTION */(function(global) {
1336
 
1337
  /**
1338
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -1357,43 +936,225 @@ module.exports = Modal;
1357
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1358
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1359
  */
 
 
1360
 
1361
- var FileUploader = __webpack_require__(13),
1362
- Feedback = __webpack_require__(1),
1363
- Report = __webpack_require__(2),
1364
- Import = __webpack_require__(3);
1365
 
1366
- jQuery(document).ready(function ($) {
1367
- 'use strict';
 
 
1368
 
1369
- var uploader = void 0;
1370
- if (Ai1wm.MultisiteExtensionUploader) {
1371
- uploader = new Ai1wm.MultisiteExtensionUploader();
1372
- } else if (Ai1wm.UnlimitedExtensionUploader) {
1373
- uploader = new Ai1wm.UnlimitedExtensionUploader();
1374
- } else if (Ai1wm.FileExtensionUploader) {
1375
- uploader = new Ai1wm.FileExtensionUploader();
1376
- } else {
1377
- uploader = new Ai1wm.FileUploader();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1378
  }
 
1379
 
1380
- uploader.init();
1381
 
1382
- // Expands/Collapses Import from
1383
- $('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
1384
- $(this).parent().toggleClass('ai1wm-open');
 
 
 
 
 
 
 
 
 
1385
  });
1386
- });
1387
 
1388
- global.Ai1wm = jQuery.extend({}, global.Ai1wm, { FileUploader: FileUploader, Feedback: Feedback, Report: Report, Import: Import });
1389
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1390
 
1391
- /***/ }),
1392
- /* 13 */
1393
- /***/ (function(module, exports, __webpack_require__) {
 
1394
 
1395
- "use strict";
 
 
1396
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1397
 
1398
  /**
1399
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -1418,195 +1179,263 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { FileUploader: FileUploader, Fee
1418
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1419
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1420
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1421
 
1422
- var Import = __webpack_require__(3),
1423
- $ = jQuery;
1424
-
1425
- var FileUploader = function FileUploader() {};
1426
-
1427
- FileUploader.prototype.setDefaultValues = function () {
1428
- this.model = new Import();
1429
- this.stopUpload = false;
1430
- };
1431
-
1432
- FileUploader.prototype.init = function () {
1433
- var _this = this;
1434
-
1435
- var formElement = $('#ai1wm-import-form');
1436
- var selectElement = $('#ai1wm-import-file');
1437
- var dropElement = $('#ai1wm-drag-drop-area');
1438
-
1439
- selectElement.on('change', function (e) {
1440
- _this.setDefaultValues();
1441
-
1442
- var file = e.target.files.item(0);
1443
- if (file) {
1444
- _this.fileSize = file.size;
1445
- if (_this.fileSize > ai1wm_uploader.max_file_size) {
1446
- _this.model.setStatus({ type: 'pro', message: ai1wm_locale.import_from_file });
1447
- } else {
1448
- _this.model.checkDiskSpace(_this.fileSize, function () {
1449
- try {
1450
- _this.onFilesAdded(file);
1451
- _this.onBeforeUpload(file);
1452
- _this.upload(file);
1453
- } catch (error) {
1454
- _this.onError(error);
1455
- }
1456
- });
1457
- }
1458
- }
1459
-
1460
- formElement.trigger('reset');
1461
- e.preventDefault();
1462
- });
1463
-
1464
- dropElement.on('dragenter', function (e) {
1465
- dropElement.addClass('ai1wm-drag-over');
1466
- e.preventDefault();
1467
- });
1468
-
1469
- dropElement.on('dragover', function (e) {
1470
- dropElement.addClass('ai1wm-drag-over');
1471
- e.preventDefault();
1472
- });
1473
-
1474
- dropElement.on('dragleave', function (e) {
1475
- dropElement.removeClass('ai1wm-drag-over');
1476
- e.preventDefault();
1477
- });
1478
-
1479
- dropElement.on('drop', function (e) {
1480
- _this.setDefaultValues();
1481
- dropElement.removeClass('ai1wm-drag-over');
1482
-
1483
- var file = e.originalEvent.dataTransfer.files.item(0);
1484
- if (file) {
1485
- _this.fileSize = file.size;
1486
- if (_this.fileSize > ai1wm_uploader.max_file_size) {
1487
- _this.model.setStatus({ type: 'pro', message: ai1wm_locale.import_from_file });
1488
- } else {
1489
- _this.model.checkDiskSpace(_this.fileSize, function () {
1490
- try {
1491
- _this.onFilesAdded(file);
1492
- _this.onBeforeUpload(file);
1493
- _this.upload(file);
1494
- } catch (error) {
1495
- _this.onError(error);
1496
- }
1497
- });
1498
- }
1499
- }
1500
-
1501
- formElement.trigger('reset');
1502
- e.preventDefault();
1503
- });
1504
- };
1505
-
1506
- // Check extension
1507
- FileUploader.prototype.c1 = function (file) {
1508
- if (file.name.substr(-6) !== 'wpress') {
1509
- throw new Error(ai1wm_locale.invalid_archive_extension);
1510
- }
1511
- };
1512
-
1513
- // Check compatibility
1514
- FileUploader.prototype.c3 = function () {
1515
- if (ai1wm_compatibility.messages.length > 0) {
1516
- throw new Error(ai1wm_compatibility.messages.join());
1517
- }
1518
- };
1519
-
1520
- FileUploader.prototype.onFilesAdded = function (file) {
1521
- this.c1(file);
1522
- this.c3(file);
1523
-
1524
- // Initializing beforeunload event
1525
- $(window).bind('beforeunload', function () {
1526
- return ai1wm_locale.stop_importing_your_website;
1527
- });
1528
- };
1529
-
1530
- FileUploader.prototype.onBeforeUpload = function (file) {
1531
- var self = this;
1532
-
1533
- var storage = Ai1wm.Util.random(12);
1534
- var options = Ai1wm.Util.form('#ai1wm-import-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: file.name }).concat({ name: 'file', value: 1 });
1535
-
1536
- // Set global params
1537
- this.model.setParams(options);
1538
 
1539
- // Set multipart params
1540
- $.extend(ai1wm_uploader.params, {
1541
- storage: storage,
1542
- archive: file.name
1543
- });
1544
 
1545
- // Set stop
1546
- this.model.onStop = function () {
1547
- self.stopUpload = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1548
 
1549
- // Clean storage
1550
- self.model.clean();
1551
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1552
 
1553
- // Set status
1554
- this.model.setStatus({ type: 'progress', percent: '0.00' });
1555
- };
1556
 
1557
- FileUploader.prototype.upload = function (file) {
1558
- var self = this;
1559
-
1560
- var formData = new FormData();
1561
- formData.append('upload-file', file);
1562
- for (var name in ai1wm_uploader.params) {
1563
- formData.append(name, ai1wm_uploader.params[name]);
1564
- }
1565
-
1566
- $.ajax({
1567
- url: ai1wm_uploader.url,
1568
- type: 'POST',
1569
- data: formData,
1570
- cache: false,
1571
- contentType: false,
1572
- processData: false,
1573
- xhr: function xhr() {
1574
- var handle = $.ajaxSettings.xhr();
1575
- if (handle.upload) {
1576
- handle.upload.addEventListener('progress', function (event) {
1577
- var percent = event.loaded / event.total * 100;
1578
- self.model.setStatus({ type: 'progress', percent: percent.toFixed(2) });
1579
- });
1580
- }
1581
-
1582
- return handle;
1583
- },
1584
- success: function success() {
1585
- if (self.stopUpload) {
1586
- return;
1587
- }
1588
-
1589
- self.onFileUploaded();
1590
- },
1591
- error: function error(jqXHR, textStatus) {
1592
- throw new Error(textStatus);
1593
- }
1594
- });
1595
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1596
 
1597
- FileUploader.prototype.onUploadProgress = function (percent) {
1598
- this.model.setStatus({ type: 'progress', percent: percent });
1599
- };
1600
 
1601
- FileUploader.prototype.onFileUploaded = function () {
1602
- this.model.start();
1603
- };
1604
 
1605
- FileUploader.prototype.onError = function (error) {
1606
- this.model.setStatus({ type: 'error', title: ai1wm_locale.unable_to_import, message: error.message });
1607
- };
 
 
 
 
 
 
1608
 
1609
- module.exports = FileUploader;
1610
 
1611
- /***/ })
1612
- /******/ ]);
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ /***/ 936:
5
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6
 
7
  /**
8
  * Copyright (C) 2014-2020 ServMask Inc.
27
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
28
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
29
  */
30
+ var Modal = __webpack_require__(544),
31
+ $ = jQuery;
32
 
33
+ var Import = function Import() {
34
+ var self = this; // Set params
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ this.params = []; // Set modal
37
 
38
+ this.modal = new Modal(); // Set confirm listener
39
 
40
+ this.modal.onConfirm = function (options) {
41
+ self.onConfirm(options);
42
+ }; // Set blogs listener
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
+ this.modal.onBlogs = function (options) {
46
+ self.onBlogs(options);
47
+ }; // Set stop listener
48
 
 
49
 
50
+ this.modal.onStop = function (options) {
51
+ self.onStop(options);
52
+ }; // Set disk space listener
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
+ this.modal.onDiskSpaceConfirm = function (options) {
56
+ self.onDiskSpaceConfirm(options);
57
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  };
59
 
60
  Import.prototype.setParams = function (params) {
61
+ this.params = Ai1wm.Util.list(params);
62
  };
63
 
64
  Import.prototype.start = function (options, retries) {
65
+ var self = this;
66
+ retries = retries || 0; // Reset stop flag
67
+
68
+ if (retries === 0) {
69
+ this.stopImport(false);
70
+ } // Stop running import
71
+
72
+
73
+ if (this.isImportStopped()) {
74
+ return;
75
+ } // Initializing beforeunload event
76
+
77
+
78
+ $(window).bind('beforeunload', function () {
79
+ return ai1wm_locale.stop_importing_your_website;
80
+ }); // Set initial status
81
+
82
+ this.setStatus({
83
+ type: 'info',
84
+ message: ai1wm_locale.preparing_to_import
85
+ }); // Set params
86
+
87
+ var params = this.params.concat({
88
+ name: 'secret_key',
89
+ value: ai1wm_import.secret_key
90
+ }); // Set additional params
91
+
92
+ if (options) {
93
+ params = params.concat(Ai1wm.Util.list(options));
94
+ } // Import
95
+
96
+
97
+ $.ajax({
98
+ url: ai1wm_import.ajax.url,
99
+ type: 'POST',
100
+ dataType: 'json',
101
+ data: params,
102
+ dataFilter: function dataFilter(data) {
103
+ return Ai1wm.Util.json(data);
104
+ }
105
+ }).done(function () {
106
+ self.getStatus();
107
+ }).done(function (result) {
108
+ if (result) {
109
+ self.run(result);
110
+ }
111
+ }).fail(function (xhr) {
112
+ var timeout = retries * 1000;
113
+
114
+ try {
115
+ var json = Ai1wm.Util.json(xhr.responseText);
116
+
117
+ if (json) {
118
+ var result = JSON.parse(json);
119
+ var error = result.errors.pop();
120
+
121
+ if (error.message) {
122
+ self.stopImport(true);
123
+ self.setStatus({
124
+ type: 'error',
125
+ title: ai1wm_locale.unable_to_import,
126
+ message: error.message
127
+ });
128
+ return;
129
+ }
130
+ }
131
+ } catch (e) {}
132
+
133
+ if (retries >= 5) {
134
+ self.stopImport(true);
135
+ self.setStatus({
136
+ type: 'error',
137
+ title: ai1wm_locale.unable_to_import,
138
+ message: ai1wm_locale.unable_to_start_the_import
139
+ });
140
+ return;
141
+ }
142
+
143
+ retries++;
144
+ setTimeout(self.start.bind(self, options, retries), timeout);
145
+ });
146
  };
147
 
148
  Import.prototype.run = function (params, retries) {
149
+ var self = this;
150
+ retries = retries || 0; // Stop running import
151
+
152
+ if (this.isImportStopped()) {
153
+ return;
154
+ } // Import
155
+
156
+
157
+ $.ajax({
158
+ url: ai1wm_import.ajax.url,
159
+ type: 'POST',
160
+ dataType: 'json',
161
+ data: params,
162
+ dataFilter: function dataFilter(data) {
163
+ return Ai1wm.Util.json(data);
164
+ }
165
+ }).done(function (result) {
166
+ if (result) {
167
+ self.run(result);
168
+ }
169
+ }).fail(function (xhr) {
170
+ var timeout = retries * 1000;
171
+
172
+ try {
173
+ var json = Ai1wm.Util.json(xhr.responseText);
174
+
175
+ if (json) {
176
+ var result = JSON.parse(json);
177
+ var error = result.errors.pop();
178
+
179
+ if (error.message) {
180
+ self.stopImport(true);
181
+ self.setStatus({
182
+ type: 'error',
183
+ title: ai1wm_locale.unable_to_import,
184
+ message: error.message
185
+ });
186
+ return;
187
+ }
188
+ }
189
+ } catch (e) {}
190
+
191
+ retries++;
192
+ setTimeout(self.run.bind(self, params, retries), timeout);
193
+ });
194
  };
195
 
196
  Import.prototype.confirm = function (options, retries) {
197
+ var self = this;
198
+ retries = retries || 0; // Stop running import
199
+
200
+ if (this.isImportStopped()) {
201
+ return;
202
+ } // Set params
203
+
204
+
205
+ var params = this.params.concat({
206
+ name: 'secret_key',
207
+ value: ai1wm_import.secret_key
208
+ }).concat({
209
+ name: 'priority',
210
+ value: 150
211
+ }); // Set additional params
212
+
213
+ if (options) {
214
+ params = params.concat(Ai1wm.Util.list(options));
215
+ } // Confirm
216
+
217
+
218
+ $.ajax({
219
+ url: ai1wm_import.ajax.url,
220
+ type: 'POST',
221
+ dataType: 'json',
222
+ data: params,
223
+ dataFilter: function dataFilter(data) {
224
+ return Ai1wm.Util.json(data);
225
+ }
226
+ }).done(function () {
227
+ self.getStatus();
228
+ }).done(function (result) {
229
+ if (result) {
230
+ self.run(result);
231
+ }
232
+ }).fail(function (xhr) {
233
+ var timeout = retries * 1000;
234
+
235
+ try {
236
+ var json = Ai1wm.Util.json(xhr.responseText);
237
+
238
+ if (json) {
239
+ var result = JSON.parse(json);
240
+ var error = result.errors.pop();
241
+
242
+ if (error.message) {
243
+ self.stopImport(true);
244
+ self.setStatus({
245
+ type: 'error',
246
+ title: ai1wm_locale.unable_to_import,
247
+ message: error.message
248
+ });
249
+ return;
250
+ }
251
+ }
252
+ } catch (e) {}
253
+
254
+ if (retries >= 5) {
255
+ self.stopImport(true);
256
+ self.setStatus({
257
+ type: 'error',
258
+ title: ai1wm_locale.unable_to_import,
259
+ message: ai1wm_locale.unable_to_confirm_the_import
260
+ });
261
+ return;
262
+ }
263
+
264
+ retries++;
265
+ setTimeout(self.confirm.bind(self, options, retries), timeout);
266
+ });
267
  };
268
 
269
  Import.prototype.checkDiskSpace = function (fileSize, callback) {
270
+ this.diskSpaceCallback = callback;
271
+ var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10);
272
+ var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10);
273
+ var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10);
274
+
275
+ if (diskSpaceFree >= 0) {
276
+ var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra;
277
+
278
+ if (diskSpaceRequired > diskSpaceFree) {
279
+ this.setStatus({
280
+ type: 'disk_space_confirm',
281
+ message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree))
282
+ });
283
+ return;
284
+ }
285
+ }
286
+
287
+ callback();
288
  };
289
 
290
  Import.prototype.blogs = function (options, retries) {
291
+ var self = this;
292
+ retries = retries || 0; // Stop running import
293
+
294
+ if (this.isImportStopped()) {
295
+ return;
296
+ } // Set params
297
+
298
+
299
+ var params = this.params.concat({
300
+ name: 'secret_key',
301
+ value: ai1wm_import.secret_key
302
+ }).concat({
303
+ name: 'priority',
304
+ value: 150
305
+ }); // Set additional params
306
+
307
+ if (options) {
308
+ params = params.concat(Ai1wm.Util.list(options));
309
+ } // Blogs
310
+
311
+
312
+ $.ajax({
313
+ url: ai1wm_import.ajax.url,
314
+ type: 'POST',
315
+ dataType: 'json',
316
+ data: params,
317
+ dataFilter: function dataFilter(data) {
318
+ return Ai1wm.Util.json(data);
319
+ }
320
+ }).done(function () {
321
+ self.getStatus();
322
+ }).done(function (result) {
323
+ if (result) {
324
+ self.run(result);
325
+ }
326
+ }).fail(function (xhr) {
327
+ var timeout = retries * 1000;
328
+
329
+ try {
330
+ var json = Ai1wm.Util.json(xhr.responseText);
331
+
332
+ if (json) {
333
+ var result = JSON.parse(json);
334
+ var error = result.errors.pop();
335
+
336
+ if (error.message) {
337
+ self.stopImport(true);
338
+ self.setStatus({
339
+ type: 'error',
340
+ title: ai1wm_locale.unable_to_import,
341
+ message: error.message
342
+ });
343
+ return;
344
+ }
345
+ }
346
+ } catch (e) {}
347
+
348
+ if (retries >= 5) {
349
+ self.stopImport(true);
350
+ self.setStatus({
351
+ type: 'error',
352
+ title: ai1wm_locale.unable_to_import,
353
+ message: ai1wm_locale.unable_to_prepare_blogs_on_import
354
+ });
355
+ return;
356
+ }
357
+
358
+ retries++;
359
+ setTimeout(self.blogs.bind(self, options, retries), timeout);
360
+ });
361
  };
362
 
363
  Import.prototype.clean = function (options, retries) {
364
+ var self = this;
365
+ retries = retries || 0; // Reset stop flag
366
+
367
+ if (retries === 0) {
368
+ this.stopImport(true);
369
+ } // Set initial status
370
+
371
+
372
+ this.setStatus({
373
+ type: 'info',
374
+ message: ai1wm_locale.please_wait_stopping_the_import
375
+ }); // Set params
376
+
377
+ var params = this.params.concat({
378
+ name: 'secret_key',
379
+ value: ai1wm_import.secret_key
380
+ }).concat({
381
+ name: 'priority',
382
+ value: 400
383
+ }); // Set additional params
384
+
385
+ if (options) {
386
+ params = params.concat(Ai1wm.Util.list(options));
387
+ } // Clean
388
+
389
+
390
+ $.ajax({
391
+ url: ai1wm_import.ajax.url,
392
+ type: 'POST',
393
+ dataType: 'json',
394
+ data: params,
395
+ dataFilter: function dataFilter(data) {
396
+ return Ai1wm.Util.json(data);
397
+ }
398
+ }).done(function () {
399
+ // Unbinding the beforeunload event when we stop importing
400
+ $(window).unbind('beforeunload'); // Destroy modal
401
+
402
+ self.modal.destroy();
403
+ }).fail(function (xhr) {
404
+ var timeout = retries * 1000;
405
+
406
+ try {
407
+ var json = Ai1wm.Util.json(xhr.responseText);
408
+
409
+ if (json) {
410
+ var result = JSON.parse(json);
411
+ var error = result.errors.pop();
412
+
413
+ if (error.message) {
414
+ self.stopImport(true);
415
+ self.setStatus({
416
+ type: 'error',
417
+ title: ai1wm_locale.unable_to_import,
418
+ message: error.message
419
+ });
420
+ return;
421
+ }
422
+ }
423
+ } catch (e) {}
424
+
425
+ if (retries >= 5) {
426
+ self.stopImport(true);
427
+ self.setStatus({
428
+ type: 'error',
429
+ title: ai1wm_locale.unable_to_import,
430
+ message: ai1wm_locale.unable_to_stop_the_import
431
+ });
432
+ return;
433
+ }
434
+
435
+ retries++;
436
+ setTimeout(self.clean.bind(self, options, retries), timeout);
437
+ });
438
  };
439
 
440
  Import.prototype.getStatus = function () {
441
+ var self = this; // Stop getting status
442
+
443
+ if (this.isImportStopped()) {
444
+ return;
445
+ }
446
+
447
+ this.statusXhr = $.ajax({
448
+ url: ai1wm_import.status.url,
449
+ type: 'GET',
450
+ dataType: 'json',
451
+ cache: false,
452
+ dataFilter: function dataFilter(data) {
453
+ return Ai1wm.Util.json(data);
454
+ }
455
+ }).done(function (params) {
456
+ if (params) {
457
+ self.setStatus(params); // Next status
458
+
459
+ switch (params.type) {
460
+ case 'done':
461
+ case 'error':
462
+ // Unbinding the beforeunload event when any case is performed
463
+ $(window).unbind('beforeunload');
464
+ return;
465
+
466
+ case 'confirm':
467
+ case 'disk_space_confirm':
468
+ case 'blogs':
469
+ return;
470
+ }
471
+ } // Import is not done yet, let's check status in 3 seconds
472
+
473
+
474
+ setTimeout(self.getStatus.bind(self), 3000);
475
+ }).fail(function () {
476
+ // Import is not done yet, let's check status in 3 seconds
477
+ setTimeout(self.getStatus.bind(self), 3000);
478
+ });
 
 
479
  };
480
 
481
  Import.prototype.setStatus = function (params) {
482
+ this.modal.render(params);
483
  };
484
 
485
  Import.prototype.onConfirm = function (options) {
486
+ this.confirm(options);
487
  };
488
 
489
  Import.prototype.onBlogs = function (options) {
490
+ this.blogs(options);
491
  };
492
 
493
  Import.prototype.onStop = function (options) {
494
+ this.clean(options);
495
  };
496
 
497
  Import.prototype.onDiskSpaceConfirm = function (options) {
498
+ this.diskSpaceCallback(options);
499
  };
500
 
501
  Import.prototype.stopImport = function (isStopped) {
502
+ try {
503
+ if (isStopped && this.statusXhr) {
504
+ this.statusXhr.abort();
505
+ }
506
+ } finally {
507
+ this.isStopped = isStopped;
508
+ }
509
  };
510
 
511
  Import.prototype.isImportStopped = function () {
512
+ return this.isStopped;
513
  };
514
 
515
  module.exports = Import;
516
 
517
  /***/ }),
 
 
 
 
518
 
519
+ /***/ 544:
520
+ /***/ (function(module) {
521
 
522
  /**
523
  * Copyright (C) 2014-2020 ServMask Inc.
542
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
543
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
544
  */
 
545
  var $ = jQuery;
546
 
547
  var Modal = function Modal() {
548
+ var self = this; // Error Modal
549
+
550
+ this.error = function (params) {
551
+ // Create the modal container
552
+ var container = $('<div></div>'); // Create section to hold title, message and action
553
+
554
+ var section = $('<section></section>'); // Create header to hold title
555
+
556
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
557
+
558
+ var message = $('<p></p>').html(params.message); // Create action section
559
+
560
+ var action = $('<div></div>'); // Create title
561
+
562
+ var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title); // Create close button
563
 
564
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
565
+ self.destroy();
566
+ }); // Append text to close button
 
567
 
568
+ closeButton.append(ai1wm_locale.close_import); // Append close button to action
 
569
 
570
+ action.append(closeButton); // Append title to section
 
571
 
572
+ header.append(title); // Append header and message to section
 
573
 
574
+ section.append(header).append(message); // Append section and action to container
 
575
 
576
+ container.append(section).append(action); // Render modal
 
577
 
578
+ self.modal.html(container).show();
579
+ self.modal.focus();
580
+ self.overlay.show();
581
+ }; // Progress Modal
582
 
 
 
583
 
584
+ this.progress = function (params) {
585
+ // Update progress bar meter
586
+ if (this.progress.progressBarMeter) {
587
+ this.progress.progressBarMeter.width(params.percent + '%');
588
+ } // Update progress bar percent
589
 
 
 
590
 
591
+ if (this.progress.progressBarPercent) {
592
+ this.progress.progressBarPercent.text(params.percent + '%');
593
+ return;
594
+ } // Create the modal container
595
 
 
 
596
 
597
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
 
 
 
598
 
599
+ var section = $('<section></section>'); // Create header to hold progress bar
 
 
 
 
 
600
 
601
+ var header = $('<h1></h1>'); // Create action section
 
 
 
 
602
 
603
+ var action = $('<div></div>'); // Create progress bar
 
604
 
605
+ var progressBar = $('<span class="ai1wm-progress-bar"></span>'); // Create progress bar meter
 
606
 
607
+ this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%'); // Create progress bar percent
 
608
 
609
+ this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%'); // Create stop import
 
610
 
611
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
612
+ stopButton.attr('disabled', 'disabled');
613
+ self.onStop();
614
+ }); // Append text to stop button
615
 
616
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import); // Append progress meter and progress percent
 
617
 
618
+ progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent); // Append stop button to action
 
619
 
620
+ action.append(stopButton); // Append progress bar to section
 
 
 
 
621
 
622
+ header.append(progressBar); // Append header to section
 
623
 
624
+ section.append(header); // Append section and action to container
 
625
 
626
+ container.append(section).append(action); // Render modal
 
627
 
628
+ self.modal.html(container).show();
629
+ self.modal.focus();
630
+ self.overlay.show();
631
+ }; // Pro Modal
632
 
 
 
633
 
634
+ this.pro = function (params) {
635
+ // Create the modal container
636
+ var container = $('<div></div>'); // Create section to hold title, message and action
637
 
638
+ var section = $('<section></section>'); // Create header to hold warning
 
 
 
 
639
 
640
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
 
 
641
 
642
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
643
 
644
+ var action = $('<div></div>'); // Create warning
 
645
 
646
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
647
 
648
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
649
+ self.destroy();
650
+ }); // Append text to close button
651
 
652
+ closeButton.append(ai1wm_locale.close_import); // Append close button to action
 
653
 
654
+ action.append(closeButton); // Append warning to section
 
 
 
655
 
656
+ header.append(warning); // Append header and message to section
 
657
 
658
+ section.append(header).append(message); // Append section and action to container
 
659
 
660
+ container.append(section).append(action); // Render modal
 
661
 
662
+ self.modal.html(container).show();
663
+ self.modal.focus();
664
+ self.overlay.show();
665
+ }; // Confirm Modal
666
 
 
 
667
 
668
+ this.confirm = function (params) {
669
+ // Create the modal container
670
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
 
671
 
672
+ var section = $('<section></section>'); // Create header to hold warning
 
 
 
673
 
674
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
675
 
676
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
677
 
678
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create warning
 
679
 
680
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
681
 
682
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
683
+ closeButton.attr('disabled', 'disabled');
684
+ self.onStop();
685
+ }); // Create confirm button
686
 
687
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
688
+ confirmButton.attr('disabled', 'disabled');
689
+ self.onConfirm();
690
+ }); // Append text to close button
 
691
 
692
+ closeButton.append(ai1wm_locale.close_import); // Append text to confirm button
 
 
 
 
693
 
694
+ confirmButton.append(ai1wm_locale.confirm_import + ' &gt;'); // Append close button to action
 
695
 
696
+ action.append(closeButton); // Append confirm button to action
 
697
 
698
+ action.append(confirmButton); // Append warning to section
 
699
 
700
+ header.append(warning); // Append header and message to section
 
701
 
702
+ section.append(header).append(message); // Append section and action to container
 
703
 
704
+ container.append(section).append(action); // Render modal
 
705
 
706
+ self.modal.html(container).show();
707
+ self.modal.focus();
708
+ self.overlay.show();
709
+ }; // Disk space Confirm Modal
710
 
 
 
 
 
 
711
 
712
+ this.diskSpaceConfirm = function (params) {
713
+ // Create the modal container
714
+ var container = $('<div></div>'); // Create section to hold title, message and action
 
715
 
716
+ var section = $('<section></section>'); // Create header to hold warning
 
717
 
718
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
719
 
720
+ var message = $('<p class="ai1wm-import-modal-content"></p>').html(params.message); // Create action section
 
721
 
722
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create warning
 
723
 
724
+ var warning = $('<i class="ai1wm-icon-notification"></i>'); // Create close button
 
725
 
726
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
727
+ self.destroy();
728
+ }); // Create confirm button
 
729
 
730
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
731
+ $(this).attr('disabled', 'disabled');
732
+ self.onDiskSpaceConfirm();
733
+ }); // Append text to close button
 
734
 
735
+ closeButton.append(ai1wm_locale.close_import); // Append text to confirm button
 
736
 
737
+ confirmButton.append(ai1wm_locale.confirm_disk_space); // Append close button to action
 
738
 
739
+ action.append(closeButton); // Append confirm button to action
 
740
 
741
+ action.append(confirmButton); // Append warning to section
 
742
 
743
+ header.append(warning); // Append header and message to section
 
744
 
745
+ section.append(header).append(message); // Append section and action to container
 
746
 
747
+ container.append(section).append(action); // Render modal
 
748
 
749
+ self.modal.html(container).show();
750
+ self.modal.focus();
751
+ self.overlay.show();
752
+ }; // Blogs Modal
 
753
 
 
 
 
 
 
 
 
 
754
 
755
+ this.blogs = function (params) {
756
+ // Create the modal container
757
+ var container = $('<form></form>').on('submit', function (e) {
758
+ e.preventDefault();
759
+ continueButton.attr('disabled', 'disabled');
760
+ self.onBlogs(container.serializeArray());
761
+ }); // Create section to hold title, message and action
762
 
763
+ var section = $('<section></section>'); // Create header to hold title
 
764
 
765
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
766
 
767
+ var message = $('<p></p>').html(params.message); // Create action section
 
768
 
769
+ var action = $('<div></div>'); // Create title
 
770
 
771
+ var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title); // Create continue button
 
772
 
773
+ var continueButton = $('<button type="submit" class="ai1wm-button-green"></button>'); // Append text to continue button
 
774
 
775
+ continueButton.append(ai1wm_locale.continue_import); // Append continue button to action
 
776
 
777
+ action.append(continueButton); // Append title to section
 
778
 
779
+ header.append(title); // Append header and message to section
 
780
 
781
+ section.append(header).append(message); // Append section and action to container
 
782
 
783
+ container.append(section).append(action); // Render modal
 
 
 
 
784
 
785
+ self.modal.html(container).show();
786
+ self.modal.focus();
787
+ self.overlay.show();
788
+ }; // Info Modal
789
 
 
 
790
 
791
+ this.info = function (params) {
792
+ // Create the modal container
793
+ var container = $('<div></div>'); // Create section to hold title, message and action
794
 
795
+ var section = $('<section></section>'); // Create header to hold loader
 
796
 
797
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
798
 
799
+ var message = $('<p></p>').html(params.message); // Create action section
 
800
 
801
+ var action = $('<div></div>'); // Create loader
 
802
 
803
+ var loader = $('<span class="ai1wm-loader"></span>'); // Create warning
 
804
 
805
+ var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser); // Create notice to be displayed during import process
 
806
 
807
+ var notice = $('<div class="ai1wm-import-modal-notice"></div>'); // Append warning to notice
 
808
 
809
+ notice.append(warning); // Append stop button to action
 
810
 
811
+ action.append(notice); // Append loader to header
 
812
 
813
+ header.append(loader); // Append header and message to section
 
814
 
815
+ section.append(header).append(message); // Append section and action to container
 
 
 
 
816
 
817
+ container.append(section).append(action); // Render modal
 
 
 
818
 
819
+ self.modal.html(container).show();
820
+ self.modal.focus();
821
+ self.overlay.show();
822
+ }; // Done Modal
823
 
 
 
824
 
825
+ this.done = function (params) {
826
+ // Create the modal container
827
+ var container = $('<div></div>'); // Create section to hold title, message and action
828
 
829
+ var section = $('<section></section>'); // Create header to hold title
 
830
 
831
+ var header = $('<h1></h1>'); // Create paragraph to hold mesage
 
832
 
833
+ var message = $('<p class="ai1wm-import-modal-content-done"></p>').html(params.message); // Create action section
 
 
 
834
 
835
+ var action = $('<div class="ai1wm-import-modal-actions"></div>'); // Create title
 
836
 
837
+ var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title); // Create close button
 
838
 
839
+ var closeButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
840
+ self.destroy();
841
+ }); // Append text to close button
842
 
843
+ closeButton.append(ai1wm_locale.finish_import + ' &gt;'); // Append close button to action
 
844
 
845
+ action.append(closeButton); // Append title to section
 
846
 
847
+ header.append(title); // Append header and message to section
 
 
 
 
848
 
849
+ section.append(header).append(message); // Append section and action to container
 
850
 
851
+ container.append(section).append(action); // Render modal
 
852
 
853
+ self.modal.html(container).show();
854
+ self.modal.focus();
855
+ self.overlay.show();
856
+ }; // Create the overlay
857
+
858
+
859
+ this.overlay = $('<div class="ai1wm-overlay"></div>'); // Create the modal container
860
+
861
+ this.modal = $('<div class="ai1wm-modal-container" role="dialog" tabindex="-1"></div>');
862
+ $('body').append(this.overlay) // Append overlay to body
863
+ .append(this.modal); // Append modal to body
864
  };
865
 
866
  Modal.prototype.render = function (params) {
867
+ $(document).trigger('ai1wm-import-status', params); // Show modal
868
+
869
+ switch (params.type) {
870
+ case 'pro':
871
+ this.pro(params);
872
+ break;
873
+
874
+ case 'error':
875
+ this.error(params);
876
+ break;
877
+
878
+ case 'confirm':
879
+ this.confirm(params);
880
+ break;
881
+
882
+ case 'disk_space_confirm':
883
+ this.diskSpaceConfirm(params);
884
+ break;
885
+
886
+ case 'blogs':
887
+ this.blogs(params);
888
+ break;
889
+
890
+ case 'progress':
891
+ this.progress(params);
892
+ break;
893
+
894
+ case 'info':
895
+ this.info(params);
896
+ break;
897
+
898
+ case 'done':
899
+ this.done(params);
900
+ break;
901
+ }
 
902
  };
903
 
904
  Modal.prototype.destroy = function () {
905
+ this.modal.hide();
906
+ this.overlay.hide();
907
  };
908
 
909
  module.exports = Modal;
910
 
911
  /***/ }),
912
+
913
+ /***/ 814:
914
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
915
 
916
  /**
917
  * Copyright (C) 2014-2020 ServMask Inc.
936
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
937
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
938
  */
939
+ var Import = __webpack_require__(936),
940
+ $ = jQuery;
941
 
942
+ var FileUploader = function FileUploader() {};
 
 
 
943
 
944
+ FileUploader.prototype.setDefaultValues = function () {
945
+ this.model = new Import();
946
+ this.stopUpload = false;
947
+ };
948
 
949
+ FileUploader.prototype.init = function () {
950
+ var _this = this;
951
+
952
+ var formElement = $('#ai1wm-import-form');
953
+ var selectElement = $('#ai1wm-import-file');
954
+ var dropElement = $('#ai1wm-drag-drop-area');
955
+ selectElement.on('change', function (e) {
956
+ _this.setDefaultValues();
957
+
958
+ var file = e.target.files.item(0);
959
+
960
+ if (file) {
961
+ _this.fileSize = file.size;
962
+
963
+ if (_this.fileSize > ai1wm_uploader.max_file_size) {
964
+ _this.model.setStatus({
965
+ type: 'pro',
966
+ message: ai1wm_locale.import_from_file
967
+ });
968
+ } else {
969
+ _this.model.checkDiskSpace(_this.fileSize, function () {
970
+ try {
971
+ _this.onFilesAdded(file);
972
+
973
+ _this.onBeforeUpload(file);
974
+
975
+ _this.upload(file);
976
+ } catch (error) {
977
+ _this.onError(error);
978
+ }
979
+ });
980
+ }
981
+ }
982
+
983
+ formElement.trigger('reset');
984
+ e.preventDefault();
985
+ });
986
+ dropElement.on('dragenter', function (e) {
987
+ dropElement.addClass('ai1wm-drag-over');
988
+ e.preventDefault();
989
+ });
990
+ dropElement.on('dragover', function (e) {
991
+ dropElement.addClass('ai1wm-drag-over');
992
+ e.preventDefault();
993
+ });
994
+ dropElement.on('dragleave', function (e) {
995
+ dropElement.removeClass('ai1wm-drag-over');
996
+ e.preventDefault();
997
+ });
998
+ dropElement.on('drop', function (e) {
999
+ _this.setDefaultValues();
1000
+
1001
+ dropElement.removeClass('ai1wm-drag-over');
1002
+ var file = e.originalEvent.dataTransfer.files.item(0);
1003
+
1004
+ if (file) {
1005
+ _this.fileSize = file.size;
1006
+
1007
+ if (_this.fileSize > ai1wm_uploader.max_file_size) {
1008
+ _this.model.setStatus({
1009
+ type: 'pro',
1010
+ message: ai1wm_locale.import_from_file
1011
+ });
1012
+ } else {
1013
+ _this.model.checkDiskSpace(_this.fileSize, function () {
1014
+ try {
1015
+ _this.onFilesAdded(file);
1016
+
1017
+ _this.onBeforeUpload(file);
1018
+
1019
+ _this.upload(file);
1020
+ } catch (error) {
1021
+ _this.onError(error);
1022
+ }
1023
+ });
1024
+ }
1025
+ }
1026
+
1027
+ formElement.trigger('reset');
1028
+ e.preventDefault();
1029
+ });
1030
+ }; // Check extension
1031
+
1032
+
1033
+ FileUploader.prototype.c1 = function (file) {
1034
+ if (file.name.substr(-6) !== 'wpress') {
1035
+ throw new Error(ai1wm_locale.invalid_archive_extension);
1036
  }
1037
+ }; // Check compatibility
1038
 
 
1039
 
1040
+ FileUploader.prototype.c3 = function () {
1041
+ if (ai1wm_compatibility.messages.length > 0) {
1042
+ throw new Error(ai1wm_compatibility.messages.join());
1043
+ }
1044
+ };
1045
+
1046
+ FileUploader.prototype.onFilesAdded = function (file) {
1047
+ this.c1(file);
1048
+ this.c3(file); // Initializing beforeunload event
1049
+
1050
+ $(window).bind('beforeunload', function () {
1051
+ return ai1wm_locale.stop_importing_your_website;
1052
  });
1053
+ };
1054
 
1055
+ FileUploader.prototype.onBeforeUpload = function (file) {
1056
+ var self = this;
1057
+ var storage = Ai1wm.Util.random(12);
1058
+ var options = Ai1wm.Util.form('#ai1wm-import-form').concat({
1059
+ name: 'storage',
1060
+ value: storage
1061
+ }).concat({
1062
+ name: 'archive',
1063
+ value: file.name
1064
+ }).concat({
1065
+ name: 'file',
1066
+ value: 1
1067
+ }); // Set global params
1068
+
1069
+ this.model.setParams(options); // Set multipart params
1070
+
1071
+ $.extend(ai1wm_uploader.params, {
1072
+ storage: storage,
1073
+ archive: file.name
1074
+ }); // Set stop
1075
+
1076
+ this.model.onStop = function () {
1077
+ self.stopUpload = true; // Clean storage
1078
+
1079
+ self.model.clean();
1080
+ }; // Set status
1081
+
1082
+
1083
+ this.model.setStatus({
1084
+ type: 'progress',
1085
+ percent: '0.00'
1086
+ });
1087
+ };
1088
 
1089
+ FileUploader.prototype.upload = function (file) {
1090
+ var self = this;
1091
+ var formData = new FormData();
1092
+ formData.append('upload-file', file);
1093
 
1094
+ for (var name in ai1wm_uploader.params) {
1095
+ formData.append(name, ai1wm_uploader.params[name]);
1096
+ }
1097
 
1098
+ $.ajax({
1099
+ url: ai1wm_uploader.url,
1100
+ type: 'POST',
1101
+ data: formData,
1102
+ cache: false,
1103
+ contentType: false,
1104
+ processData: false,
1105
+ xhr: function xhr() {
1106
+ var handle = $.ajaxSettings.xhr();
1107
+
1108
+ if (handle.upload) {
1109
+ handle.upload.addEventListener('progress', function (event) {
1110
+ var percent = event.loaded / event.total * 100;
1111
+ self.model.setStatus({
1112
+ type: 'progress',
1113
+ percent: percent.toFixed(2)
1114
+ });
1115
+ });
1116
+ }
1117
+
1118
+ return handle;
1119
+ },
1120
+ success: function success() {
1121
+ if (self.stopUpload) {
1122
+ return;
1123
+ }
1124
+
1125
+ self.onFileUploaded();
1126
+ },
1127
+ error: function error(jqXHR, textStatus) {
1128
+ throw new Error(textStatus);
1129
+ }
1130
+ });
1131
+ };
1132
+
1133
+ FileUploader.prototype.onUploadProgress = function (percent) {
1134
+ this.model.setStatus({
1135
+ type: 'progress',
1136
+ percent: percent
1137
+ });
1138
+ };
1139
+
1140
+ FileUploader.prototype.onFileUploaded = function () {
1141
+ this.model.start();
1142
+ };
1143
+
1144
+ FileUploader.prototype.onError = function (error) {
1145
+ this.model.setStatus({
1146
+ type: 'error',
1147
+ title: ai1wm_locale.unable_to_import,
1148
+ message: error.message
1149
+ });
1150
+ };
1151
+
1152
+ module.exports = FileUploader;
1153
+
1154
+ /***/ }),
1155
+
1156
+ /***/ 332:
1157
+ /***/ (function() {
1158
 
1159
  /**
1160
  * Copyright (C) 2014-2020 ServMask Inc.
1179
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1180
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1181
  */
1182
+ jQuery(document).ready(function ($) {
1183
+ 'use strict'; // Idea
1184
+
1185
+ $('#ai1wm-feedback-type-link-1').click(function () {
1186
+ var radio = $('#ai1wm-feedback-type-1');
1187
+
1188
+ if (radio.is(':checked')) {
1189
+ radio.attr('checked', false);
1190
+ } else {
1191
+ radio.attr('checked', true);
1192
+ }
1193
+ }); // Help
1194
+
1195
+ $('#ai1wm-feedback-type-2').click(function () {
1196
+ // Hide other options
1197
+ $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message
1198
+
1199
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form
1200
+
1201
+ $('.ai1wm-feedback-form').fadeIn();
1202
+ }); // Cancel feedback form
1203
+
1204
+ $('#ai1wm-feedback-cancel').click(function (e) {
1205
+ $('.ai1wm-feedback-form').fadeOut(function () {
1206
+ $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
1207
+ });
1208
+ e.preventDefault();
1209
+ }); // Send feedback form
1210
+
1211
+ $('#ai1wm-feedback-submit').click(function (e) {
1212
+ var self = $(this);
1213
+ var spinner = self.next();
1214
+ var type = $('.ai1wm-feedback-type:checked').val();
1215
+ var email = $('.ai1wm-feedback-email').val();
1216
+ var message = $('.ai1wm-feedback-message').val();
1217
+ var terms = $('.ai1wm-feedback-terms').is(':checked');
1218
+ self.attr('disabled', true);
1219
+ spinner.css('visibility', 'visible');
1220
+ $.ajax({
1221
+ url: ai1wm_feedback.ajax.url,
1222
+ type: 'POST',
1223
+ dataType: 'json',
1224
+ async: true,
1225
+ data: {
1226
+ secret_key: ai1wm_feedback.secret_key,
1227
+ ai1wm_type: type,
1228
+ ai1wm_email: email,
1229
+ ai1wm_message: message,
1230
+ ai1wm_terms: +terms
1231
+ },
1232
+ dataFilter: function dataFilter(data) {
1233
+ return Ai1wm.Util.json(data);
1234
+ }
1235
+ }).done(function (data) {
1236
+ self.attr('disabled', false);
1237
+ spinner.css('visibility', 'hidden');
1238
+
1239
+ if (data.errors.length > 0) {
1240
+ $('.ai1wm-feedback .ai1wm-message').remove();
1241
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1242
+ $.each(data.errors, function (key, value) {
1243
+ errorMessage.append($('<p />').text(value));
1244
+ });
1245
+ $('.ai1wm-feedback').prepend(errorMessage);
1246
+ } else {
1247
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1248
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
1249
+ $('.ai1wm-feedback').html(successMessage);
1250
+ }
1251
+ });
1252
+ e.preventDefault();
1253
+ });
1254
+ });
1255
 
1256
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1257
 
1258
+ /***/ 947:
1259
+ /***/ (function() {
 
 
 
1260
 
1261
+ /**
1262
+ * Copyright (C) 2014-2020 ServMask Inc.
1263
+ *
1264
+ * This program is free software: you can redistribute it and/or modify
1265
+ * it under the terms of the GNU General Public License as published by
1266
+ * the Free Software Foundation, either version 3 of the License, or
1267
+ * (at your option) any later version.
1268
+ *
1269
+ * This program is distributed in the hope that it will be useful,
1270
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1271
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1272
+ * GNU General Public License for more details.
1273
+ *
1274
+ * You should have received a copy of the GNU General Public License
1275
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1276
+ *
1277
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
1278
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
1279
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
1280
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
1281
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1282
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1283
+ */
1284
+ jQuery(document).ready(function ($) {
1285
+ 'use strict';
1286
 
1287
+ $('#ai1wm-report-problem-button').click(function (e) {
1288
+ $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
1289
+ e.preventDefault();
1290
+ });
1291
+ $('#ai1wm-report-cancel').click(function (e) {
1292
+ $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
1293
+ e.preventDefault();
1294
+ });
1295
+ $('#ai1wm-report-submit').click(function (e) {
1296
+ var self = $(this);
1297
+ var spinner = self.next();
1298
+ var email = $('.ai1wm-report-email').val();
1299
+ var message = $('.ai1wm-report-message').val();
1300
+ var terms = $('.ai1wm-report-terms').is(':checked');
1301
+ self.attr('disabled', true);
1302
+ spinner.css('visibility', 'visible');
1303
+ $.ajax({
1304
+ url: ai1wm_report.ajax.url,
1305
+ type: 'POST',
1306
+ dataType: 'json',
1307
+ async: true,
1308
+ data: {
1309
+ secret_key: ai1wm_report.secret_key,
1310
+ ai1wm_email: email,
1311
+ ai1wm_message: message,
1312
+ ai1wm_terms: +terms
1313
+ },
1314
+ dataFilter: function dataFilter(data) {
1315
+ return Ai1wm.Util.json(data);
1316
+ }
1317
+ }).done(function (data) {
1318
+ self.attr('disabled', false);
1319
+ spinner.css('visibility', 'hidden');
1320
+
1321
+ if (data.errors.length > 0) {
1322
+ $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
1323
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1324
+ $.each(data.errors, function (key, value) {
1325
+ errorMessage.append($('<p />').text(value));
1326
+ });
1327
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
1328
+ } else {
1329
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1330
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
1331
+ $('.ai1wm-report-problem-dialog').html(successMessage); // Hide message
1332
+
1333
+ setTimeout(function () {
1334
+ $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
1335
+ }, 2000);
1336
+ }
1337
+ });
1338
+ e.preventDefault();
1339
+ });
1340
+ });
1341
 
1342
+ /***/ })
 
 
1343
 
1344
+ /******/ });
1345
+ /************************************************************************/
1346
+ /******/ // The module cache
1347
+ /******/ var __webpack_module_cache__ = {};
1348
+ /******/
1349
+ /******/ // The require function
1350
+ /******/ function __webpack_require__(moduleId) {
1351
+ /******/ // Check if module is in cache
1352
+ /******/ if(__webpack_module_cache__[moduleId]) {
1353
+ /******/ return __webpack_module_cache__[moduleId].exports;
1354
+ /******/ }
1355
+ /******/ // Create a new module (and put it into the cache)
1356
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1357
+ /******/ // no module.id needed
1358
+ /******/ // no module.loaded needed
1359
+ /******/ exports: {}
1360
+ /******/ };
1361
+ /******/
1362
+ /******/ // Execute the module function
1363
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1364
+ /******/
1365
+ /******/ // Return the exports of the module
1366
+ /******/ return module.exports;
1367
+ /******/ }
1368
+ /******/
1369
+ /************************************************************************/
1370
+ /******/ /* webpack/runtime/global */
1371
+ /******/ !function() {
1372
+ /******/ __webpack_require__.g = (function() {
1373
+ /******/ if (typeof globalThis === 'object') return globalThis;
1374
+ /******/ try {
1375
+ /******/ return this || new Function('return this')();
1376
+ /******/ } catch (e) {
1377
+ /******/ if (typeof window === 'object') return window;
1378
+ /******/ }
1379
+ /******/ })();
1380
+ /******/ }();
1381
+ /******/
1382
+ /************************************************************************/
1383
+ !function() {
1384
+ /**
1385
+ * Copyright (C) 2014-2020 ServMask Inc.
1386
+ *
1387
+ * This program is free software: you can redistribute it and/or modify
1388
+ * it under the terms of the GNU General Public License as published by
1389
+ * the Free Software Foundation, either version 3 of the License, or
1390
+ * (at your option) any later version.
1391
+ *
1392
+ * This program is distributed in the hope that it will be useful,
1393
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1394
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1395
+ * GNU General Public License for more details.
1396
+ *
1397
+ * You should have received a copy of the GNU General Public License
1398
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1399
+ *
1400
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
1401
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
1402
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
1403
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
1404
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
1405
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1406
+ */
1407
+ var FileUploader = __webpack_require__(814),
1408
+ Feedback = __webpack_require__(332),
1409
+ Report = __webpack_require__(947),
1410
+ Import = __webpack_require__(936);
1411
 
1412
+ jQuery(document).ready(function ($) {
1413
+ 'use strict';
 
1414
 
1415
+ var uploader;
 
 
1416
 
1417
+ if (Ai1wm.MultisiteExtensionUploader) {
1418
+ uploader = new Ai1wm.MultisiteExtensionUploader();
1419
+ } else if (Ai1wm.UnlimitedExtensionUploader) {
1420
+ uploader = new Ai1wm.UnlimitedExtensionUploader();
1421
+ } else if (Ai1wm.FileExtensionUploader) {
1422
+ uploader = new Ai1wm.FileExtensionUploader();
1423
+ } else {
1424
+ uploader = new Ai1wm.FileUploader();
1425
+ }
1426
 
1427
+ uploader.init(); // Expands/Collapses Import from
1428
 
1429
+ $('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
1430
+ $(this).parent().toggleClass('ai1wm-open');
1431
+ });
1432
+ });
1433
+ __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, {
1434
+ FileUploader: FileUploader,
1435
+ Feedback: Feedback,
1436
+ Report: Report,
1437
+ Import: Import
1438
+ });
1439
+ }();
1440
+ /******/ })()
1441
+ ;
lib/view/assets/javascript/settings.min.js CHANGED
@@ -1,103 +1,8 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 14);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ({
67
-
68
- /***/ 0:
69
- /***/ (function(module, exports) {
70
-
71
- var g;
72
-
73
- // This works in non-strict mode
74
- g = (function() {
75
- return this;
76
- })();
77
-
78
- try {
79
- // This works if eval is allowed (see CSP)
80
- g = g || Function("return this")() || (1,eval)("this");
81
- } catch(e) {
82
- // This works if the window reference is available
83
- if(typeof window === "object")
84
- g = window;
85
- }
86
-
87
- // g can still be undefined, but nothing to do about it...
88
- // We return undefined, instead of nothing here, so it's
89
- // easier to handle this case. if(!global) { ...}
90
-
91
- module.exports = g;
92
-
93
-
94
- /***/ }),
95
-
96
- /***/ 1:
97
- /***/ (function(module, exports, __webpack_require__) {
98
-
99
- "use strict";
100
 
 
 
101
 
102
  /**
103
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -122,102 +27,84 @@ module.exports = g;
122
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
123
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
124
  */
125
-
126
  jQuery(document).ready(function ($) {
127
- 'use strict';
128
-
129
- // Idea
130
-
131
- $('#ai1wm-feedback-type-link-1').click(function () {
132
- var radio = $('#ai1wm-feedback-type-1');
133
- if (radio.is(':checked')) {
134
- radio.attr('checked', false);
135
- } else {
136
- radio.attr('checked', true);
137
- }
138
- });
139
-
140
- // Help
141
- $('#ai1wm-feedback-type-2').click(function () {
142
- // Hide other options
143
- $('#ai1wm-feedback-type-1').closest('li').hide();
144
-
145
- // Change placeholder message
146
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
147
-
148
- // Show feedback form
149
- $('.ai1wm-feedback-form').fadeIn();
150
- });
151
-
152
- // Cancel feedback form
153
- $('#ai1wm-feedback-cancel').click(function (e) {
154
- $('.ai1wm-feedback-form').fadeOut(function () {
155
- $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
156
- });
157
-
158
- e.preventDefault();
159
- });
160
-
161
- // Send feedback form
162
- $('#ai1wm-feedback-submit').click(function (e) {
163
- var self = $(this);
164
-
165
- var spinner = self.next();
166
- var type = $('.ai1wm-feedback-type:checked').val();
167
- var email = $('.ai1wm-feedback-email').val();
168
- var message = $('.ai1wm-feedback-message').val();
169
- var terms = $('.ai1wm-feedback-terms').is(':checked');
170
-
171
- self.attr('disabled', true);
172
- spinner.css('visibility', 'visible');
173
-
174
- $.ajax({
175
- url: ai1wm_feedback.ajax.url,
176
- type: 'POST',
177
- dataType: 'json',
178
- async: true,
179
- data: {
180
- secret_key: ai1wm_feedback.secret_key,
181
- ai1wm_type: type,
182
- ai1wm_email: email,
183
- ai1wm_message: message,
184
- ai1wm_terms: +terms
185
- },
186
- dataFilter: function dataFilter(data) {
187
- return Ai1wm.Util.json(data);
188
- }
189
- }).done(function (data) {
190
- self.attr('disabled', false);
191
- spinner.css('visibility', 'hidden');
192
-
193
- if (data.errors.length > 0) {
194
- $('.ai1wm-feedback .ai1wm-message').remove();
195
-
196
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
197
- $.each(data.errors, function (key, value) {
198
- errorMessage.append($('<p />').text(value));
199
- });
200
-
201
- $('.ai1wm-feedback').prepend(errorMessage);
202
- } else {
203
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
204
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
205
-
206
- $('.ai1wm-feedback').html(successMessage);
207
- }
208
- });
209
-
210
- e.preventDefault();
211
- });
212
  });
213
 
214
  /***/ }),
215
 
216
- /***/ 14:
217
- /***/ (function(module, exports, __webpack_require__) {
218
-
219
- "use strict";
220
- /* WEBPACK VAR INJECTION */(function(global) {
221
 
222
  /**
223
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -242,25 +129,106 @@ jQuery(document).ready(function ($) {
242
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
243
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
244
  */
245
-
246
- var Feedback = __webpack_require__(1),
247
- Report = __webpack_require__(2);
248
-
249
- jQuery(document).ready(function () {
250
  'use strict';
251
- });
252
-
253
- global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Feedback: Feedback, Report: Report });
254
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
255
-
256
- /***/ }),
257
-
258
- /***/ 2:
259
- /***/ (function(module, exports, __webpack_require__) {
260
 
261
- "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
 
 
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  /**
265
  * Copyright (C) 2014-2020 ServMask Inc.
266
  *
@@ -284,77 +252,16 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Feedback: Feedback, Report: Rep
284
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
285
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
286
  */
 
 
287
 
288
- jQuery(document).ready(function ($) {
289
- 'use strict';
290
-
291
- $('#ai1wm-report-problem-button').click(function (e) {
292
- $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
293
-
294
- e.preventDefault();
295
- });
296
-
297
- $('#ai1wm-report-cancel').click(function (e) {
298
- $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
299
-
300
- e.preventDefault();
301
- });
302
-
303
- $('#ai1wm-report-submit').click(function (e) {
304
- var self = $(this);
305
-
306
- var spinner = self.next();
307
- var email = $('.ai1wm-report-email').val();
308
- var message = $('.ai1wm-report-message').val();
309
- var terms = $('.ai1wm-report-terms').is(':checked');
310
-
311
- self.attr('disabled', true);
312
- spinner.css('visibility', 'visible');
313
-
314
- $.ajax({
315
- url: ai1wm_report.ajax.url,
316
- type: 'POST',
317
- dataType: 'json',
318
- async: true,
319
- data: {
320
- secret_key: ai1wm_report.secret_key,
321
- ai1wm_email: email,
322
- ai1wm_message: message,
323
- ai1wm_terms: +terms
324
- },
325
- dataFilter: function dataFilter(data) {
326
- return Ai1wm.Util.json(data);
327
- }
328
- }).done(function (data) {
329
- self.attr('disabled', false);
330
- spinner.css('visibility', 'hidden');
331
-
332
- if (data.errors.length > 0) {
333
- $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
334
-
335
- var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
336
- $.each(data.errors, function (key, value) {
337
- errorMessage.append($('<p />').text(value));
338
- });
339
-
340
- $('.ai1wm-report-problem-dialog').prepend(errorMessage);
341
- } else {
342
- var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
343
- successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
344
-
345
- $('.ai1wm-report-problem-dialog').html(successMessage);
346
-
347
- // Hide message
348
- setTimeout(function () {
349
- $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
350
- }, 2000);
351
- }
352
- });
353
-
354
- e.preventDefault();
355
- });
356
  });
357
-
358
- /***/ })
359
-
360
- /******/ });
 
 
 
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ /***/ 332:
5
+ /***/ (function() {
6
 
7
  /**
8
  * Copyright (C) 2014-2020 ServMask Inc.
27
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
28
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
29
  */
 
30
  jQuery(document).ready(function ($) {
31
+ 'use strict'; // Idea
32
+
33
+ $('#ai1wm-feedback-type-link-1').click(function () {
34
+ var radio = $('#ai1wm-feedback-type-1');
35
+
36
+ if (radio.is(':checked')) {
37
+ radio.attr('checked', false);
38
+ } else {
39
+ radio.attr('checked', true);
40
+ }
41
+ }); // Help
42
+
43
+ $('#ai1wm-feedback-type-2').click(function () {
44
+ // Hide other options
45
+ $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message
46
+
47
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form
48
+
49
+ $('.ai1wm-feedback-form').fadeIn();
50
+ }); // Cancel feedback form
51
+
52
+ $('#ai1wm-feedback-cancel').click(function (e) {
53
+ $('.ai1wm-feedback-form').fadeOut(function () {
54
+ $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
55
+ });
56
+ e.preventDefault();
57
+ }); // Send feedback form
58
+
59
+ $('#ai1wm-feedback-submit').click(function (e) {
60
+ var self = $(this);
61
+ var spinner = self.next();
62
+ var type = $('.ai1wm-feedback-type:checked').val();
63
+ var email = $('.ai1wm-feedback-email').val();
64
+ var message = $('.ai1wm-feedback-message').val();
65
+ var terms = $('.ai1wm-feedback-terms').is(':checked');
66
+ self.attr('disabled', true);
67
+ spinner.css('visibility', 'visible');
68
+ $.ajax({
69
+ url: ai1wm_feedback.ajax.url,
70
+ type: 'POST',
71
+ dataType: 'json',
72
+ async: true,
73
+ data: {
74
+ secret_key: ai1wm_feedback.secret_key,
75
+ ai1wm_type: type,
76
+ ai1wm_email: email,
77
+ ai1wm_message: message,
78
+ ai1wm_terms: +terms
79
+ },
80
+ dataFilter: function dataFilter(data) {
81
+ return Ai1wm.Util.json(data);
82
+ }
83
+ }).done(function (data) {
84
+ self.attr('disabled', false);
85
+ spinner.css('visibility', 'hidden');
86
+
87
+ if (data.errors.length > 0) {
88
+ $('.ai1wm-feedback .ai1wm-message').remove();
89
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
90
+ $.each(data.errors, function (key, value) {
91
+ errorMessage.append($('<p />').text(value));
92
+ });
93
+ $('.ai1wm-feedback').prepend(errorMessage);
94
+ } else {
95
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
96
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
97
+ $('.ai1wm-feedback').html(successMessage);
98
+ }
99
+ });
100
+ e.preventDefault();
101
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  });
103
 
104
  /***/ }),
105
 
106
+ /***/ 947:
107
+ /***/ (function() {
 
 
 
108
 
109
  /**
110
  * Copyright (C) 2014-2020 ServMask Inc.
129
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
130
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
131
  */
132
+ jQuery(document).ready(function ($) {
 
 
 
 
133
  'use strict';
 
 
 
 
 
 
 
 
 
134
 
135
+ $('#ai1wm-report-problem-button').click(function (e) {
136
+ $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
137
+ e.preventDefault();
138
+ });
139
+ $('#ai1wm-report-cancel').click(function (e) {
140
+ $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
141
+ e.preventDefault();
142
+ });
143
+ $('#ai1wm-report-submit').click(function (e) {
144
+ var self = $(this);
145
+ var spinner = self.next();
146
+ var email = $('.ai1wm-report-email').val();
147
+ var message = $('.ai1wm-report-message').val();
148
+ var terms = $('.ai1wm-report-terms').is(':checked');
149
+ self.attr('disabled', true);
150
+ spinner.css('visibility', 'visible');
151
+ $.ajax({
152
+ url: ai1wm_report.ajax.url,
153
+ type: 'POST',
154
+ dataType: 'json',
155
+ async: true,
156
+ data: {
157
+ secret_key: ai1wm_report.secret_key,
158
+ ai1wm_email: email,
159
+ ai1wm_message: message,
160
+ ai1wm_terms: +terms
161
+ },
162
+ dataFilter: function dataFilter(data) {
163
+ return Ai1wm.Util.json(data);
164
+ }
165
+ }).done(function (data) {
166
+ self.attr('disabled', false);
167
+ spinner.css('visibility', 'hidden');
168
+
169
+ if (data.errors.length > 0) {
170
+ $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
171
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
172
+ $.each(data.errors, function (key, value) {
173
+ errorMessage.append($('<p />').text(value));
174
+ });
175
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
176
+ } else {
177
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
178
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
179
+ $('.ai1wm-report-problem-dialog').html(successMessage); // Hide message
180
+
181
+ setTimeout(function () {
182
+ $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
183
+ }, 2000);
184
+ }
185
+ });
186
+ e.preventDefault();
187
+ });
188
+ });
189
 
190
+ /***/ })
191
 
192
+ /******/ });
193
+ /************************************************************************/
194
+ /******/ // The module cache
195
+ /******/ var __webpack_module_cache__ = {};
196
+ /******/
197
+ /******/ // The require function
198
+ /******/ function __webpack_require__(moduleId) {
199
+ /******/ // Check if module is in cache
200
+ /******/ if(__webpack_module_cache__[moduleId]) {
201
+ /******/ return __webpack_module_cache__[moduleId].exports;
202
+ /******/ }
203
+ /******/ // Create a new module (and put it into the cache)
204
+ /******/ var module = __webpack_module_cache__[moduleId] = {
205
+ /******/ // no module.id needed
206
+ /******/ // no module.loaded needed
207
+ /******/ exports: {}
208
+ /******/ };
209
+ /******/
210
+ /******/ // Execute the module function
211
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
212
+ /******/
213
+ /******/ // Return the exports of the module
214
+ /******/ return module.exports;
215
+ /******/ }
216
+ /******/
217
+ /************************************************************************/
218
+ /******/ /* webpack/runtime/global */
219
+ /******/ !function() {
220
+ /******/ __webpack_require__.g = (function() {
221
+ /******/ if (typeof globalThis === 'object') return globalThis;
222
+ /******/ try {
223
+ /******/ return this || new Function('return this')();
224
+ /******/ } catch (e) {
225
+ /******/ if (typeof window === 'object') return window;
226
+ /******/ }
227
+ /******/ })();
228
+ /******/ }();
229
+ /******/
230
+ /************************************************************************/
231
+ !function() {
232
  /**
233
  * Copyright (C) 2014-2020 ServMask Inc.
234
  *
252
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
253
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
254
  */
255
+ var Feedback = __webpack_require__(332),
256
+ Report = __webpack_require__(947);
257
 
258
+ jQuery(document).ready(function () {
259
+ 'use strict';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  });
261
+ __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, {
262
+ Feedback: Feedback,
263
+ Report: Report
264
+ });
265
+ }();
266
+ /******/ })()
267
+ ;
lib/view/assets/javascript/updater.min.js CHANGED
@@ -1,76 +1,4 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 15);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ({
67
-
68
- /***/ 15:
69
- /***/ (function(module, exports, __webpack_require__) {
70
-
71
- "use strict";
72
-
73
-
74
  /**
75
  * Copyright (C) 2014-2020 ServMask Inc.
76
  *
@@ -94,65 +22,54 @@
94
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
95
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
96
  */
97
-
98
  jQuery(document).ready(function ($) {
99
- 'use strict';
100
-
101
- $('.ai1wm-purchase-add').click(function (e) {
102
- var self = $(this);
103
-
104
- self.attr('disabled', true);
105
-
106
- var dialog = self.closest('.ai1wm-modal-dialog');
107
- var error = dialog.find('.ai1wm-modal-error');
108
- var index = dialog.attr('id').split('-').pop();
109
- var purchaseId = dialog.find('.ai1wm-purchase-id').val();
110
- var updateLink = dialog.find('.ai1wm-update-link').val();
111
-
112
- // Check Purchase ID
113
- $.ajax({
114
- url: 'https://servmask.com/purchase/' + purchaseId + '/check',
115
- type: 'GET',
116
- dataType: 'json',
117
- dataFilter: function dataFilter(data) {
118
- return Ai1wm.Util.json(data);
119
- }
120
- }).done(function (product) {
121
- // Update Purchase ID
122
- $.ajax({
123
- url: ai1wm_updater.ajax.url,
124
- type: 'POST',
125
- dataType: 'json',
126
- data: {
127
- ai1wm_uuid: product.uuid,
128
- ai1wm_extension: product.extension
129
- },
130
- dataFilter: function dataFilter(data) {
131
- return Ai1wm.Util.json(data);
132
- }
133
- }).done(function () {
134
- window.location.hash = '';
135
-
136
- // Update plugin row
137
- $('#ai1wm-update-section-' + index).html($('<a />').attr('href', updateLink).text(ai1wm_locale.check_for_updates));
138
-
139
- self.attr('disabled', false);
140
- });
141
- }).fail(function () {
142
- self.attr('disabled', false);
143
- error.html(ai1wm_locale.invalid_purchase_id);
144
- });
145
-
146
- e.preventDefault();
147
- });
148
-
149
- $('.ai1wm-purchase-discard').click(function (e) {
150
- window.location.hash = '';
151
-
152
- e.preventDefault();
153
- });
154
  });
155
-
156
- /***/ })
157
-
158
- /******/ });
1
+ /******/ (function() { // webpackBootstrap
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Copyright (C) 2014-2020 ServMask Inc.
4
  *
22
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
 
25
  jQuery(document).ready(function ($) {
26
+ 'use strict';
27
+
28
+ $('.ai1wm-purchase-add').click(function (e) {
29
+ var self = $(this);
30
+ self.attr('disabled', true);
31
+ var dialog = self.closest('.ai1wm-modal-dialog');
32
+ var error = dialog.find('.ai1wm-modal-error');
33
+ var index = dialog.attr('id').split('-').pop();
34
+ var purchaseId = dialog.find('.ai1wm-purchase-id').val();
35
+ var updateLink = dialog.find('.ai1wm-update-link').val(); // Check Purchase ID
36
+
37
+ $.ajax({
38
+ url: 'https://servmask.com/purchase/' + purchaseId + '/check',
39
+ type: 'GET',
40
+ dataType: 'json',
41
+ dataFilter: function dataFilter(data) {
42
+ return Ai1wm.Util.json(data);
43
+ }
44
+ }).done(function (product) {
45
+ // Update Purchase ID
46
+ $.ajax({
47
+ url: ai1wm_updater.ajax.url,
48
+ type: 'POST',
49
+ dataType: 'json',
50
+ data: {
51
+ ai1wm_uuid: product.uuid,
52
+ ai1wm_extension: product.extension
53
+ },
54
+ dataFilter: function dataFilter(data) {
55
+ return Ai1wm.Util.json(data);
56
+ }
57
+ }).done(function () {
58
+ window.location.hash = ''; // Update plugin row
59
+
60
+ $('#ai1wm-update-section-' + index).html($('<a />').attr('href', updateLink).text(ai1wm_locale.check_for_updates));
61
+ self.attr('disabled', false);
62
+ });
63
+ }).fail(function () {
64
+ self.attr('disabled', false);
65
+ error.html(ai1wm_locale.invalid_purchase_id);
66
+ });
67
+ e.preventDefault();
68
+ });
69
+ $('.ai1wm-purchase-discard').click(function (e) {
70
+ window.location.hash = '';
71
+ e.preventDefault();
72
+ });
 
 
 
 
 
 
 
 
73
  });
74
+ /******/ })()
75
+ ;
 
 
lib/view/assets/javascript/util.min.js CHANGED
@@ -1,103 +1,8 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 16);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ({
67
-
68
- /***/ 0:
69
- /***/ (function(module, exports) {
70
 
71
- var g;
72
-
73
- // This works in non-strict mode
74
- g = (function() {
75
- return this;
76
- })();
77
-
78
- try {
79
- // This works if eval is allowed (see CSP)
80
- g = g || Function("return this")() || (1,eval)("this");
81
- } catch(e) {
82
- // This works if the window reference is available
83
- if(typeof window === "object")
84
- g = window;
85
- }
86
-
87
- // g can still be undefined, but nothing to do about it...
88
- // We return undefined, instead of nothing here, so it's
89
- // easier to handle this case. if(!global) { ...}
90
-
91
- module.exports = g;
92
-
93
-
94
- /***/ }),
95
-
96
- /***/ 16:
97
- /***/ (function(module, exports, __webpack_require__) {
98
-
99
- "use strict";
100
- /* WEBPACK VAR INJECTION */(function(global) {
101
 
102
  /**
103
  * Copyright (C) 2014-2020 ServMask Inc.
@@ -122,20 +27,103 @@ module.exports = g;
122
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
123
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
124
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
- var Util = __webpack_require__(17);
127
-
128
- global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Util: Util });
129
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
130
-
131
- /***/ }),
132
-
133
- /***/ 17:
134
- /***/ (function(module, exports, __webpack_require__) {
135
-
136
- "use strict";
137
-
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Copyright (C) 2014-2020 ServMask Inc.
141
  *
@@ -159,63 +147,11 @@ global.Ai1wm = jQuery.extend({}, global.Ai1wm, { Util: Util });
159
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
160
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
161
  */
162
-
163
- var $ = jQuery;
164
-
165
- module.exports = {
166
- random: function random(len) {
167
- var text = '';
168
- var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
169
-
170
- for (var i = 0; i < len; i++) {
171
- text += possible.charAt(Math.floor(Math.random() * possible.length));
172
- }
173
-
174
- return text;
175
- },
176
- form: function form(id) {
177
- return $(id).serializeArray();
178
- },
179
- ucfirst: function ucfirst(text) {
180
- return text.charAt(0).toUpperCase() + text.slice(1);
181
- },
182
- list: function list(input) {
183
- // Convert object to list
184
- if ($.isPlainObject(input)) {
185
- var result = [];
186
- var params = decodeURIComponent($.param(input)).split('&');
187
-
188
- // Loop over params
189
- $.each(params, function (index, item) {
190
- var value = item.split('=');
191
-
192
- // Add item
193
- result.push({ name: value[0], value: value[1] });
194
- });
195
-
196
- return result;
197
- }
198
-
199
- return input;
200
- },
201
- json: function json(input) {
202
- if ($.type(input) === 'string') {
203
- var result = input.match(/{[\s\S]+}/);
204
- if (result !== null) {
205
- return result[0];
206
- }
207
- }
208
-
209
- return false;
210
- },
211
- sizeFormat: function sizeFormat(bytes) {
212
- var i = Math.floor(Math.log(bytes) / Math.log(1024));
213
- var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
214
-
215
- return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
216
- }
217
- };
218
-
219
- /***/ })
220
-
221
- /******/ });
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ /***/ 139:
5
+ /***/ (function(module) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  /**
8
  * Copyright (C) 2014-2020 ServMask Inc.
27
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
28
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
29
  */
30
+ var $ = jQuery;
31
+ module.exports = {
32
+ random: function random(len) {
33
+ var text = '';
34
+ var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
35
+
36
+ for (var i = 0; i < len; i++) {
37
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
38
+ }
39
+
40
+ return text;
41
+ },
42
+ form: function form(id) {
43
+ return $(id).serializeArray();
44
+ },
45
+ ucfirst: function ucfirst(text) {
46
+ return text.charAt(0).toUpperCase() + text.slice(1);
47
+ },
48
+ list: function list(input) {
49
+ // Convert object to list
50
+ if ($.isPlainObject(input)) {
51
+ var result = [];
52
+ var params = decodeURIComponent($.param(input)).split('&'); // Loop over params
53
+
54
+ $.each(params, function (index, item) {
55
+ var value = item.split('='); // Add item
56
+
57
+ result.push({
58
+ name: value[0],
59
+ value: value[1]
60
+ });
61
+ });
62
+ return result;
63
+ }
64
+
65
+ return input;
66
+ },
67
+ json: function json(input) {
68
+ if ($.type(input) === 'string') {
69
+ var result = input.match(/{[\s\S]+}/);
70
+
71
+ if (result !== null) {
72
+ return result[0];
73
+ }
74
+ }
75
+
76
+ return false;
77
+ },
78
+ sizeFormat: function sizeFormat(bytes) {
79
+ var i = Math.floor(Math.log(bytes) / Math.log(1024));
80
+ var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
81
+ return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
82
+ }
83
+ };
84
 
85
+ /***/ })
 
 
 
 
 
 
 
 
 
 
 
86
 
87
+ /******/ });
88
+ /************************************************************************/
89
+ /******/ // The module cache
90
+ /******/ var __webpack_module_cache__ = {};
91
+ /******/
92
+ /******/ // The require function
93
+ /******/ function __webpack_require__(moduleId) {
94
+ /******/ // Check if module is in cache
95
+ /******/ if(__webpack_module_cache__[moduleId]) {
96
+ /******/ return __webpack_module_cache__[moduleId].exports;
97
+ /******/ }
98
+ /******/ // Create a new module (and put it into the cache)
99
+ /******/ var module = __webpack_module_cache__[moduleId] = {
100
+ /******/ // no module.id needed
101
+ /******/ // no module.loaded needed
102
+ /******/ exports: {}
103
+ /******/ };
104
+ /******/
105
+ /******/ // Execute the module function
106
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
107
+ /******/
108
+ /******/ // Return the exports of the module
109
+ /******/ return module.exports;
110
+ /******/ }
111
+ /******/
112
+ /************************************************************************/
113
+ /******/ /* webpack/runtime/global */
114
+ /******/ !function() {
115
+ /******/ __webpack_require__.g = (function() {
116
+ /******/ if (typeof globalThis === 'object') return globalThis;
117
+ /******/ try {
118
+ /******/ return this || new Function('return this')();
119
+ /******/ } catch (e) {
120
+ /******/ if (typeof window === 'object') return window;
121
+ /******/ }
122
+ /******/ })();
123
+ /******/ }();
124
+ /******/
125
+ /************************************************************************/
126
+ !function() {
127
  /**
128
  * Copyright (C) 2014-2020 ServMask Inc.
129
  *
147
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
148
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
149
  */
150
+ var Util = __webpack_require__(139);
151
+
152
+ __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, {
153
+ Util: Util
154
+ });
155
+ }();
156
+ /******/ })()
157
+ ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordp
4
  Requires at least: 3.3
5
  Tested up to: 5.6
6
  Requires PHP: 5.2.17
7
- Stable tag: 7.31
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -108,6 +108,12 @@ Alternatively you can download the plugin using the download button on this page
108
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
 
110
  == Changelog ==
 
 
 
 
 
 
111
  = 7.31 =
112
  **Added**
113
 
4
  Requires at least: 3.3
5
  Tested up to: 5.6
6
  Requires PHP: 5.2.17
7
+ Stable tag: 7.32
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
108
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
 
110
  == Changelog ==
111
+ = 7.32 =
112
+ **Added**
113
+
114
+ * Update javascript dependencies
115
+ * Turn on WP_IMPORTING on export and import
116
+
117
  = 7.31 =
118
  **Added**
119