WP Migrate DB - Version 2.0

Version Description

Download this release

Release Info

Developer deliciousbrains
Plugin Icon 128x128 WP Migrate DB
Version 2.0
Comparing to
See all releases

Code changes from version 1.0.17 to 2.0

asset/build/css/plugin-update-styles.css DELETED
@@ -1 +0,0 @@
1
- .check-licence-spinner{left:5px;position:relative;top:2px;margin-bottom:-2px;width:16px;height:16px}.wpmdb-original-update-row{display:none}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates{padding-left:40px}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates:before,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates:before{margin-left:-30px;float:left}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates p,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates p{display:inline-block;margin:0}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates span,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates span{display:block}.plugin-update-tr.wpmdbpro-custom-visible .update-message.post-shiny-updates p:before,.plugin-update-tr.wpmdbpro-custom .update-message.post-shiny-updates p:before{position:absolute}.plugin-update-tr.wpmdbpro-custom-visible .update-message.post-shiny-updates p span,.plugin-update-tr.wpmdbpro-custom .update-message.post-shiny-updates p span{margin-left:30px;display:block}.plugins #the-list tr.wpmdbpro-has-message td,.plugins #the-list tr.wpmdbpro-has-message th{box-shadow:none;-webkit-box-shadow:none}.plugins .plugin-update-tr .wpmdb-compat-plugin-row-error .notice{margin-top:0}
 
asset/build/css/styles.css DELETED
@@ -1 +0,0 @@
1
- #overlay{background-color:hsla(0,0%,100%,.9);position:fixed;top:0;left:0;width:100%;height:100%;z-index:100000;overflow-x:auto;display:flex;flex-direction:row;align-items:flex-start;justify-content:center;transition:opacity .3s ease-out}#overlay.show{opacity:1;display:flex}@media screen and (max-width:700px){#overlay.show{justify-content:flex-start}}#overlay.hide{opacity:0;display:flex}@media screen and (max-width:1120px){.wpmdb-not-pro #overlay.show{justify-content:flex-start}}.stage-tabs{margin:0;z-index:5}.stage-tabs .stage-tab{box-sizing:border-box;display:block;float:left;width:auto;height:45px;margin:0 5px -1px 0;background-color:#ddd;border:1px solid #aaa;padding:.5em 1.5em 0;line-height:1.3;text-align:center;text-transform:capitalize;color:#333;transition:background-color .2s ease-in-out}.stage-tabs .stage-tab.active{background-color:#fff;border-bottom-color:#fff}.stage-tabs .stage-status{display:block;font-size:.8em;font-style:italic}.complete .stage-tabs .stage-tab:not(.active){cursor:pointer}.complete .stage-tabs .stage-tab:not(.active):hover{background-color:#eee}.migration-progress-stages{position:relative;margin:0 -30px;background:#fff;overflow-y:auto}.migration-progress-stages .migration-progress-stage-container{top:0;left:0;width:100%;padding:0}.migration-progress-stages .migration-progress-stage-container.complete,.migration-progress-stages .migration-progress-stage-container.queued{display:none}.migration-progress-stages .migration-progress-stage-container.active{display:block}.migration-progress-stages .migration-progress-stage-container.find_replace .progress-items .item-progress .size{display:none}.migration-progress-stages .migration-progress-stage-container.import .progress-items,.migration-progress-stages .migration-progress-stage-container.upload .progress-items{height:0!important;opacity:0}.migration-progress-stages .truncation-notice{margin:-10px 30px 10px;padding:5px 10px;color:#999;text-align:center}.migration-progress-stages .hide-tables .truncation-notice{display:none}.migration-progress-stages .progress-items{position:relative;overflow-y:auto;padding:10px 30px;z-index:0}.migration-progress-stages .item-progress{position:relative;background-color:#eee;overflow:hidden;margin:0 0 .8em;transition:height .2s ease-in-out,margin .2s ease-in-out}.migration-progress-stages .item-progress .dashicons-yes.dashicons{position:absolute;right:.3em;top:.12em;z-index:20;background:#333;color:#85d937;width:.75em;height:.75em;border-radius:50%;text-indent:-.18em;line-height:.8;vertical-align:2em;font-size:2em;opacity:0;transition:opacity .3s ease-in;transition-delay:.5s}.migration-progress-stages .item-progress.complete .dashicons-yes{opacity:1}.migration-progress-stages .item-progress .progress-bar{background:#85d937}.migration-progress-stages .item-progress .progress-bar.excluded{opacity:.3}.migration-progress-stages .item-progress .item-info{margin:0;position:relative;padding:.25em 0 .25em 1em;font-size:1em;z-index:10}.migration-progress-stages .hide-tables .progress-items{height:0!important;opacity:0}@keyframes progress-bg-anim{0%{background-position:0 0}to{background-position:50px 50px}}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1}.general-spinner{width:16px;height:16px}.migration-error{color:#a21b1b;display:block;max-height:400px;max-width:100%;overflow:auto;word-wrap:break-word}.migration-php-errors{display:none;margin:20px 0;overflow-y:scroll;height:180px}.progress-overlay-container{display:none;position:relative;background-color:#eee;padding:30px 30px 15px;box-shadow:0 0 10px rgba(0,0,0,.5);cursor:default;font-size:14px;z-index:1;margin:0 10px;box-sizing:border-box;flex-direction:column;max-height:95%;overflow-y:hidden;transition:opacity .3s ease-out,transform .5s ease-out;width:700px;min-width:700px;flex-basis:700px;flex:0 1 0%}.progress-overlay-container.show{display:flex;opacity:1}.progress-overlay-container.hide{display:flex;opacity:0;transform:translateY(-100%)}.progress-overlay-container>div{flex:1 0 auto}.progress-overlay-container .migration-progress-stages{flex:100 1 auto}@media (-ms-high-contrast:none){.progress-overlay-container .migration-progress-stages{height:300px}}.progress-overlay-container .progress-title{margin-top:0;font-size:22px;font-weight:400;width:85%;line-height:1.3}.progress-overlay-container .progress-title .domain-label{white-space:nowrap}.progress-overlay-container .progress-title .dashicons{display:inline;vertical-align:middle;margin-left:-.15em;padding-right:.3em;font-size:42px}.progress-overlay-container .progress-info-wrapper{margin-bottom:10px}.progress-overlay-container .progress-text{clear:left;float:left;width:100%}.progress-overlay-container .timer{position:absolute;top:35px;right:55px}.progress-overlay-container .progress-bar{position:absolute;top:0;left:0;height:100%;transition:width .5s ease-out;z-index:0}.progress-overlay-container .progress-bar-no-transition{transition:none!important}.progress-overlay-container .stage-progress{display:none;text-transform:capitalize;padding:15px 30px 0;margin:0 -30px;height:65px;box-sizing:border-box;background:#fff;border-top:1px solid #aaa;z-index:100}.progress-overlay-container .stage-progress.active{display:block}.progress-overlay-container .stage-progress .lowercase{text-transform:lowercase}.progress-overlay-container .stage-progress .items-complete{margin-left:3em}.progress-overlay-container .stage-progress .progress-bar-wrapper{position:relative;height:10px;width:100%;background-color:#eee;margin:15px 0 10px;background-image:linear-gradient(-45deg,hsla(0,0%,100%,.35) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.35) 0,hsla(0,0%,100%,.35) 75%,transparent 0,transparent);background-size:20px 20px;animation:progress-bg-anim 5s linear infinite}.progress-overlay-container .stage-progress .progress-bar{background-color:#406fa4}.progress-overlay-container .stage-progress .show-hide-tables{display:block;float:right;cursor:pointer}.progress-overlay-container .stage-progress.find_replace .size-complete-wrap,.progress-overlay-container .stage-progress.import .items-complete-wrap,.progress-overlay-container .stage-progress.import .show-hide-tables,.progress-overlay-container .stage-progress.upload .items-complete-wrap,.progress-overlay-container .stage-progress.upload .show-hide-tables{display:none}.progress-overlay-container .stage-progress.find_replace .items-complete{margin-left:9em}.progress-overlay-container .progress-tables{overflow:hidden;margin-bottom:2px;padding:0 0 20px}.progress-overlay-container .progress-tables-hover-boxes{position:absolute;top:0;left:0;display:block;width:100%}.progress-overlay-container .progress-chunk-hover{display:block;float:left;height:35px;position:relative;top:-5px;z-index:1}.progress-overlay-container .progress-chunk{box-sizing:border-box;float:left;display:block;height:6px;border-right:1px solid #ccc;border-bottom:1px solid #ccc;color:#999;position:relative;text-align:center}.progress-overlay-container .progress-chunk>span{padding:0 3px;white-space:nowrap;text-overflow:ellipsis;margin-top:10px;display:inline-block}.progress-overlay-container .progress-label{padding:5px 10px;border:1px solid #ccc;border-radius:3px;background-color:#fff;font-family:Consolas,Monaco,monospace;font-size:12px;display:inline-block;top:-35px;position:absolute;opacity:0;transition:opacity .2s ease-in-out}.progress-overlay-container .label-visible{opacity:1}.progress-overlay-container .progress-label:before{border-top:4px solid #ccc;bottom:-5px}.progress-overlay-container .progress-label:after,.progress-overlay-container .progress-label:before{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;display:block;position:absolute;left:50%;margin-left:-2px}.progress-overlay-container .progress-label:after{border-top:4px solid #fff;bottom:-4px}.progress-overlay-container .migration-progress-ajax-spinner{left:7px;position:relative;top:15px}.progress-overlay-container .close-progress-content{color:#999;cursor:pointer;font-size:26px;font-weight:200;position:absolute;right:10px;top:5px;padding:5px;display:none}.progress-overlay-container .close-progress-content:hover{color:#666;border-color:#aaa}.progress-overlay-container .migration-controls{display:block;transition:opacity .2s ease-out;padding-top:15px}.progress-overlay-container .migration-controls.hidden{opacity:0;pointer-events:none}.progress-overlay-container .migration-controls span{float:left;text-align:center;display:block}.progress-overlay-container .migration-controls span:first-child{margin-right:10px;width:71px}.progress-overlay-container .migration-controls .pause-before-finalize{display:none;float:right;margin-top:5px}.progress-overlay-container .migration-controls #pause-before-finalize{margin-top:0}.progress-overlay-container .pro-version{margin-top:45px;padding-top:40px;position:relative;border-top:1px solid #ccc}.progress-overlay-container .pro-version iframe{position:absolute;top:40px;right:0;display:block}.progress-overlay-container .pro-version-content{padding-right:460px;min-height:255px}.progress-overlay-container .pro-version-content h1{line-height:1em;margin-top:0;font-size:20px}.progress-overlay-container .pro-version-content ul{margin-left:24px}.progress-overlay-container .pro-version-content li{position:relative;font-size:14px;line-height:1.4em;margin-bottom:15px;max-width:580px}.progress-overlay-container .pro-version-content .pro-quote{margin:0 0 20px;max-width:570px}.progress-overlay-container .pro-version-content .pro-quote .dashicons-star-filled{font-size:16px;width:16px;height:16px;position:relative;top:2px}.progress-overlay-container .pro-version-content .pro-quote-author{font-style:italic;white-space:nowrap}.progress-overlay-container.wpmdb-error{outline:3px solid #dc3232}@media screen and (max-width:1096px){.progress-overlay-container .pro-version iframe{position:relative;top:auto;right:auto}.progress-overlay-container .pro-version-content{min-height:0;padding:0 0 20px}}.progress-overlay-container:not(.complete) .migration-progress-stages .item-progress:first-child{background-image:linear-gradient(-45deg,hsla(0,0%,100%,.3) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.3) 0,hsla(0,0%,100%,.3) 75%,transparent 0,transparent);background-size:50px 50px;animation:progress-bg-anim 2s linear infinite}.progress-overlay-container.paused .active.stage-progress .progress-bar-wrapper,.progress-overlay-container.paused .migration-progress-stages .item-progress:first-child{animation-play-state:paused}.progress-overlay-container .migration-progress-stages .determining-media .item-progress:first-child{background-image:none;animation:none}.migrate-tab>.pro-version,.progress-overlay-container.cancelled .migration-progress-stages,.progress-overlay-container.cancelled .stage-progress.active,.progress-overlay-container.cancelled .stage-tabs,.progress-overlay-container.wpmdb-error .migration-progress-stages,.progress-overlay-container.wpmdb-error .stage-progress.active,.progress-overlay-container.wpmdb-error .stage-tabs{display:none}#overlay .pro-version{width:42%;padding-left:0;padding-right:0;flex-basis:42%;max-width:515px;min-width:400px;max-height:100%;order:2;font-size:14px;display:block;transition:transform .3s ease-out,opacity .3s ease-out,margin-left .2s ease-in-out .3s}#overlay .pro-version.remove{margin-left:-525px!important}#overlay .pro-version .pro-version-content{padding:0 30px}#overlay .pro-version .pro-version-content h1{font-size:22px;font-weight:700;margin:0 0 30px}#overlay .pro-version .pro-version-content li{margin-bottom:10px;padding-left:35px;position:relative}#overlay .pro-version .pro-version-content li .dashicons{display:block;position:absolute;font-size:2em;top:-3px;left:0}#overlay .pro-version .pro-version-content .pro-quote{border:1px solid #bbb;border-radius:3px;padding:15px 15px 15px 100px;margin:30px 0;position:relative;background:url(../img/mor10.png) no-repeat 15px 31px;background-size:51px 51px}@media (-webkit-min-device-pixel-ratio:1.3),(min--moz-device-pixel-ratio:1.3),(min-device-pixel-ratio:1.3),(min-resolution:1.3dppx){#overlay .pro-version .pro-version-content .pro-quote{background-image:url(../img/mor10@2x.png)}}#overlay .pro-version .pro-version-content .pro-quote p{margin:0;font-size:13px}#overlay .pro-version .pro-version-content .pro-quote .pro-quote-author{font-size:14px;font-weight:700;color:#999;margin-bottom:5px}#overlay .pro-version .pro-version-content .pro-quote .pro-quote-author .dashicons{float:right;color:#999}#overlay .pro-version .pro-version-content .pro-quote .stars{position:absolute;bottom:0;left:0;width:100%;height:0;overflow:visible;text-align:center}#overlay .pro-version .pro-version-content .pro-quote .stars span{background:#eee;color:#999;margin-top:-.5em}#overlay .pro-version .pro-version-content .pro-quote .stars span:first-child{padding-left:.1em}#overlay .pro-version .pro-version-content .pro-quote .stars span:last-child{padding-right:.1em}#overlay .pro-version .iframe,#overlay .pro-version iframe{width:100%;height:289px;background:#000}#overlay .pro-version .button{display:block;position:relative;width:250px;margin:20px auto 10px;text-align:center}#overlay .pro-version .close-pro-version{color:#999;cursor:pointer;font-size:26px;font-weight:200;position:absolute;right:10px;top:5px;padding:5px;display:block}#overlay .pro-version .close-pro-version:hover{color:#666;border-color:#aaa}.wpmdb #wpmdb-backups-messages{display:none}.wpmdb #wpmdb-backups-messages.visible{display:block}.wpmdb .backups-tab{display:none}.wpmdb .backups-tab p{margin-top:0;line-height:1.5rem}.wpmdb .backups-row{display:flex;flex-direction:row;flex-wrap:wrap;min-height:35px;opacity:1;transition:opacity .2s ease-out,min-height .6s ease .5s,background-color .8s ease}.wpmdb .backups-row.wpmdb-backup-deleted{opacity:0;min-height:0;height:0}.wpmdb .backups-row:nth-child(odd){background-color:#e2e2e2}.wpmdb .backups-row li{padding:5px 8px;margin:0;line-height:25px}.wpmdb .backups-row li:first-child{min-width:120px}.wpmdb .backups-row li:nth-child(2){width:470px}.wpmdb .backups-row li:last-child{width:85px}@supports (display:grid){.wpmdb .backups-row{display:grid;grid-column-gap:5px;grid-row-gap:5px;grid-template-columns:200px auto 100px}.wpmdb .backups-row li{align-self:center;line-height:normal}.wpmdb .backups-row li:first-child{min-width:0}.wpmdb .backups-row li:nth-child(2){width:auto}}.wpmdb .delete-backup{background-color:unset;background-position:50% 50%;background-size:6px 6px;background-repeat:no-repeat;cursor:pointer;display:block;float:right;border:0;border-radius:0;height:auto;width:auto;margin-left:0;margin-top:0;position:static}.wpmdb .delete-backup:focus{box-shadow:unset}.wpmdb .delete-backuphover{border-color:none}.wpmdb .delete-backup:after{content:"\F153";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 dashicons;vertical-align:middle;color:#999;font-size:15px}.wpmdb .delete-backup:hover:after{color:#666}.option-section.disabled{margin-bottom:10px}label.disabled input[type=radio]:disabled{opacity:1;border-color:#dedede;background:#fff}.force-disabled{color:#888}p.upgrade.force-disabled{margin:12px 0 0;font-size:12px;line-height:1.4em}.wpmdb label.upgrade-pro{display:block}.wpmdb label.upgrade-pro .option-row{width:18%;display:inline-block}.wpmdb label.upgrade-pro span.option-description a{text-decoration:underline;color:#999}.wpmdb label.upgrade-pro span.option-description:before{content:" ";background:url(../img/lock.png) no-repeat 0 5px;background-size:75%;display:inline-block;width:.8rem;height:1.1rem;margin-right:4px}span.upgrade-pro{width:9%;display:inline-block}.check-licence-spinner{left:5px;position:relative;top:2px;margin-bottom:-2px;width:16px;height:16px}.wpmdb-original-update-row{display:none}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates{padding-left:40px}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates:before,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates:before{margin-left:-30px;float:left}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates p,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates p{display:inline-block;margin:0}.plugin-update-tr.wpmdbpro-custom-visible .update-message.pre-shiny-updates span,.plugin-update-tr.wpmdbpro-custom .update-message.pre-shiny-updates span{display:block}.plugin-update-tr.wpmdbpro-custom-visible .update-message.post-shiny-updates p:before,.plugin-update-tr.wpmdbpro-custom .update-message.post-shiny-updates p:before{position:absolute}.plugin-update-tr.wpmdbpro-custom-visible .update-message.post-shiny-updates p span,.plugin-update-tr.wpmdbpro-custom .update-message.post-shiny-updates p span{margin-left:30px;display:block}.plugins #the-list tr.wpmdbpro-has-message td,.plugins #the-list tr.wpmdbpro-has-message th{box-shadow:none;-webkit-box-shadow:none}.plugins .plugin-update-tr .wpmdb-compat-plugin-row-error .notice{margin-top:0}#wpmdb-main{width:742px;position:relative;min-height:950px;visibility:visible}.wpmdb h2~.error,.wpmdb h2~.notice,.wpmdb h2~.updated{clear:both}.wpmdb div.below-title.warning,.wpmdb div.updated.warning{max-width:742px;box-sizing:border-box;margin:10px 0}.wpmdb div.below-title.warning p,.wpmdb div.updated.warning p{font-size:13px;margin:.5em 0}.wpmdb a{text-decoration:none}.wpmdb li{margin-bottom:5px;position:relative}.wpmdb ul{margin:0}.wpmdb input[type=checkbox],.wpmdb input[type=radio]{margin-right:5px;vertical-align:baseline;margin-top:0}.wpmdb input[type=password],.wpmdb input[type=text]{padding:5px}.wpmdb input[disableddisabled=disabled],.wpmdb label[disabled=disabled]{cursor:default}.wpmdb label.disabled{color:#888;cursor:default}.wpmdb div.disabled{color:#888}.wpmdb .option-section{border-bottom:1px solid #ccc;padding-bottom:20px;margin-bottom:20px}.wpmdb .option-section h3{font-size:18px;font-weight:400}.wpmdb p.migrate-db{overflow:hidden;min-height:29px}.wpmdb p.migrate-db input{float:left}.wpmdb p.migrate-db img{float:left;margin:3px 0 0 5px}.wpmdb p.migrate-db .save-settings-button{margin-left:10px;display:none}.wpmdb .indent-wrap{margin-left:24px}.wpmdb .expandable-content{display:none;margin-top:10px}.wpmdb .expandable-content li:last-child{margin-bottom:0}.wpmdb .header-wrapper{margin-bottom:10px}.wpmdb .header-expand-collapse{cursor:pointer;display:inline-block}.wpmdb .option-description{font-size:12px;color:#999;margin-left:8px;font-weight:400}.wpmdb .option-group li:last-child{margin-bottom:0}.wpmdb .connection-status{display:none;overflow:auto}.wpmdb .connection-status.error{color:#9d1818}.wpmdb .copy-licence-to-remote-site{display:inline-block}.wpmdb .ajax-spinner{left:6px;position:relative;top:3px}.wpmdb div.message{margin:15px 0 0}.wpmdb .licence-wrap h3{margin:0 0 10px}.wpmdb .licence-input{clear:both;display:block;font-family:Consolas,Monaco,monospace;font-size:14px;margin-bottom:7px;padding:10px;width:418px}.wpmdb .register-licence{float:left;outline:none}.wpmdb .licence-status{color:#a21b1b;font-weight:700;clear:both;padding-top:.5em;margin:0}.wpmdb .licence-status.success{color:#333}.wpmdb .register-licence-ajax-spinner{margin:4px 0 0 8px}.wpmdb .return-to-profile-selection{margin-bottom:15px;display:inline-block}.wpmdb .return-to-profile-selection.bottom{margin-top:10px}.wpmdb h2.nav-tab-wrapper{margin-top:10px;margin-bottom:20px;padding-left:5px}.wpmdb h2.nav-tab-wrapper a.nav-tab-active{color:#464646;cursor:default}.wpmdb label{display:inline-block;clear:both}.wpmdb .migration-profile-options li{position:relative;width:520px}.wpmdb .migration-profile-options li a{padding:5px 10px;width:500px;border:1px solid #ddd;margin:0 0 7px;display:block;font-size:14px;color:#333}.wpmdb .migration-profile-options li a:hover{border-color:#bbb}.wpmdb .main-list-delete-profile-link{color:#999;font-size:26px;font-weight:200;position:absolute;right:7px;top:4px;cursor:pointer}.wpmdb .main-list-delete-profile-link:hover{color:#444}.wpmdb .crumbs{overflow:hidden;border-bottom:1px solid #ccc;padding:12px 0}.wpmdb .crumbs .crumb{position:relative;display:block;float:left;margin-right:4px;padding-right:3px;font-size:13px;font-weight:700}.wpmdb .crumbs span.crumb{padding-left:25px}.wpmdb .crumbs span.crumb:before{content:"\F345";position:absolute;left:0;top:0;display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 dashicons;vertical-align:middle}.wpmdb .option-group li{margin-bottom:5px}.wpmdb .option-group>li{margin-bottom:8px}.wpmdb .option-group li>label{font-size:14px;font-weight:700}.wpmdb .option-group ul{display:none;margin:10px 0 10px 25px}.wpmdb .option-group ul label{font-size:12px;font-weight:400}.wpmdb .checkbox-label,.wpmdb .option-heading{font-size:14px;font-weight:700}.wpmdb .checkbox-label input[type=checkbox]{margin-right:7px;position:relative;top:-1px}.wpmdb .expand-collapse-arrow{margin-right:9px}.wpmdb .migrate-selection{padding-top:20px}.wpmdb .migrate-connection-info{min-width:675px;margin:0}.wpmdb .migrate-tab .pull-push-connection-info{width:418px;height:65px;color:#333;font-family:Consolas,Monaco,monospace;font-size:15px;line-height:21px;padding:10px}.wpmdb .migrate-tab.import .advanced-options,.wpmdb .migrate-tab.import .exclude-post-types-options,.wpmdb .migrate-tab.import .table-options{margin-left:24px;display:none!important}.wpmdb .migrate-tab.import .advanced-options,.wpmdb .migrate-tab.import .find-replace-options,.wpmdb .migrate-tab.import .table-options{border-bottom:none;margin-bottom:0}.wpmdb .migrate-tab.import .exclude-post-types-options,.wpmdb .migrate-tab.import .table-options{border-top:1px solid #ccc;padding-top:20px}.wpmdb .basic-access-auth-wrapper{display:none;margin-bottom:5px}.wpmdb .auth-password,.wpmdb .auth-username{width:206px;margin-top:3px}.wpmdb .auth-password{width:207px}.wpmdb .connection-info-wrapper{display:none;width:670px}.wpmdb .connect-button{margin-top:2px}.wpmdb .temp-disabled{background-color:#eee;color:#888;font-family:Consolas,Monaco,monospace;text-shadow:0 1px 0 #fff}.wpmdb .push-list ul{margin-bottom:0}.wpmdb .find-heading,.wpmdb .replace-heading{float:left}.wpmdb .find-heading{width:382px}.wpmdb .replace-fields{border-collapse:collapse;border-spacing:0}.wpmdb .replace-fields input{width:295px}.wpmdb .replace-fields tr td{padding-bottom:7px}.wpmdb .replace-fields tr:last-child td{padding-bottom:0}.wpmdb .arrow-col{width:93px;text-align:center;vertical-align:middle}.wpmdb .right-arrow{font-size:36px;color:#aaa}.wpmdb .replace-right-col span{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:16px;height:16px;display:inline-block;position:relative;top:4px;cursor:pointer}.wpmdb .replace-right-col span:hover{border-color:#aaa}.wpmdb .pin .sort-handle-col{opacity:.5;cursor:default}.wpmdb .pin .sort-handle{cursor:default!important}.wpmdb .sort-handle-col{width:20px;cursor:-moz-grab}.wpmdb .sort-handle:before{content:"\F214";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1 dashicons;vertical-align:top;color:#aaa;background-color:transparent!important;margin-right:4px}.wpmdb .original-repeatable-field{display:none}.wpmdb .no-replaces-message{display:none;margin-bottom:0}.wpmdb .inline-message.missing-replace{margin-top:15px;display:none}.wpmdb #new-path-missing-warning{margin-top:5px}.wpmdb .tables-header{display:inline-block}.wpmdb .expand-collapse-arrow{display:inline-block;position:relative;top:-2px;font-size:11px}.wpmdb .collapsed{transform:scale(1) rotate(-90deg) translateX(0) translateY(0) skewX(0deg) skewY(0deg)}.wpmdb .select-deselect-divider{margin:0 6px}.wpmdb .select-wrap{display:none;margin-top:12px}.wpmdb .select-wrap .find-replace-msg{display:none}.wpmdb .select-post-types-wrap{display:block}.wpmdb .exclude-post-types-warning{font-size:13px;font-weight:700;color:#9c1f1f}.wpmdb .exclude-post-types-warning p{margin:0 0 12px}.wpmdb .exclude-post-types-warning .find-replace-msg{display:none}.wpmdb .multiselect{min-width:550px;min-height:180px;margin-bottom:10px}.wpmdb .table-migrate-options li label{font-size:12px;font-weight:400}.wpmdb .table-migrate-options li{margin-bottom:5px}.wpmdb .general-helper{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:15px;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.wpmdb .general-helper:hover{border-color:#aaa}.wpmdb .general-helper:after{content:"?";color:#999;font-size:10px;font-weight:700;left:4px;position:absolute;top:-1px}.wpmdb .helper-message{padding:10px 16px;border-radius:3px;background-color:#fff;position:absolute;width:500px;z-index:9999;display:none;box-shadow:0 0 10px rgba(0,0,0,.2)}.wpmdb .inline-message{padding:10px;border-radius:3px;margin-top:5px}.wpmdb .inline-message.error{border:1px solid #c00;background-color:#ffebe8}.wpmdb .inline-message.warning{background-color:#ffffe0;border:1px solid #e6db55}.wpmdb .helper-message:after{content:"";border-bottom:8px solid transparent;border-right:8px solid #fff;border-top:8px solid transparent;display:block;height:0;left:-7px;position:absolute;top:11px;width:0}.wpmdb .helper-message.bottom:before{border-bottom:8px solid #aaa;top:-9px}.wpmdb .helper-message.bottom:after,.wpmdb .helper-message.bottom:before{content:"";border-left:8px solid transparent;border-right:8px solid transparent;border-top:0;display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.wpmdb .helper-message.bottom:after{border-bottom:8px solid #fff;top:-8px}.wpmdb .label-disabled{color:#888}.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice,.wpmdb .prefix-notice,.wpmdb .ssl-notice,.wpmdb .unrecognized-import-file-notice{background-color:#ffffe0;border:1px solid #e6db55;padding:15px;border-radius:3px;margin-bottom:15px;display:none}.wpmdb .different-plugin-version-notice p,.wpmdb .directory-permission-notice p,.wpmdb .prefix-notice p,.wpmdb .ssl-notice p,.wpmdb .unrecognized-import-file-notice p{margin-top:0}.wpmdb .different-plugin-version-notice p:last-child,.wpmdb .directory-permission-notice p:last-child,.wpmdb .prefix-notice p:last-child,.wpmdb .ssl-notice p:last-child,.wpmdb .unrecognized-import-file-notice p:last-child{margin:0}.wpmdb .mst-required{display:none}.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice{background-color:#ffebe8;border-color:#c00}.wpmdb .different-plugin-version-notice a,.wpmdb .directory-permission-notice a{color:#c00;text-decoration:underline}.wpmdb .mixed-case-table-name-notice{display:none}.wpmdb .save-migration-profile-wrap li label{font-size:12px;font-weight:400}.wpmdb .save-migration-profile-wrap li{margin-bottom:5px;padding-left:25px}.wpmdb .save-migration-profile-wrap .indent-wrap{margin-left:0}.wpmdb .create-new-label{margin-right:8px}.wpmdb .create-new-profile{position:absolute;top:-5px;width:397px}.wpmdb .delete-profile,.wpmdb .replace-remove-row{background-color:#eee;border:1px solid #ccc;border-radius:50% 50% 50% 50%;cursor:pointer;height:11px;left:5px;margin-left:2px;position:absolute;margin-top:-6px;top:50%;width:11px;display:block;background-position:50% 50%;background-size:6px 6px;background-repeat:no-repeat}.wpmdb .delete-profile:after,.wpmdb .replace-remove-row:after{content:"\D7";left:2px;position:absolute;top:-3px;color:#aaa;font-size:12px}.wpmdb .replace-remove-row:after{position:relative}.wpmdb .delete-profile:hover,.wpmdb .replace-remove-row:hover{border-color:#aaa}.wpmdb .ajax-success-msg{font-weight:700;margin-left:9px;position:absolute;display:inline-block}.wpmdb .migrate-db .ajax-success-msg{margin-top:3px}.wpmdb p img.save-profile-ajax-spinner{margin:6px 0 0 10px}.wpmdb .backup-description{left:20px;position:relative}.wpmdb .backup-option-disabled{margin-bottom:0!important}.wpmdb .settings-tab{display:none}.wpmdb .settings-tab .slider{max-width:416px}.wpmdb .settings-tab .slider-label{display:block;margin-bottom:10px;float:left;width:50%}.wpmdb .settings-tab .slider-label span{vertical-align:middle}.wpmdb .settings-tab .slider-label-wrapper{max-width:416px;width:100%;position:relative;font-size:14px}.wpmdb .settings-tab .amount{width:50%;text-align:right;display:block;float:left}.wpmdb .settings-tab .slider-spinner{position:absolute;right:-35px;bottom:-13px}.wpmdb .settings-tab .slider-success-msg{right:-63px;bottom:-14px;position:absolute;font-weight:700}.wpmdb .settings-tab .ui-slider{border:2px solid #fff;background:#fff;height:10px;border-radius:2px;position:relative;opacity:1}.wpmdb .settings-tab .ui-slider-handle{width:20px;height:20px;background:#ade7b5;border:2px solid #fff;border-radius:50%;display:block;position:absolute;top:-7px;outline:none;margin-left:-11px}.wpmdb .settings-tab .ui-slider-handle:active{background:#86db91;border-color:#eee}.wpmdb .settings-tab .ui-slider-range{background:#ade7b5;height:100%}.wpmdb .settings-tab .form-table{margin-top:0}.wpmdb .settings-tab .form-table h3,.wpmdb .settings-tab .form-table h4,.wpmdb .settings-tab .form-table p{margin:0;line-height:1.2}.wpmdb .settings-tab .form-table p.has-margin{margin-bottom:10px}.wpmdb .settings-tab .form-table h3{font-weight:400}.wpmdb .settings-tab .form-table h4{font-size:15px}.wpmdb .settings-tab .form-table h4 .helper-message{font-weight:400}.wpmdb .settings-tab .form-table h4 img.ajax-spinner{position:absolute;float:left;top:auto;left:auto;margin-top:1px}.wpmdb .settings-tab .form-table h4 .setting-status .ajax-success-msg{margin-left:6px}.wpmdb .settings-tab .form-table tr td{padding:10px 0}.wpmdb .settings-tab .form-table tr.wpmdb-setting-title td{padding-bottom:0}.wpmdb .settings-tab .form-table tr.wpmdb-setting-title td h3{margin:10px 0}.wpmdb .settings-tab .form-table tr:first-child td{padding-top:0}.wpmdb .settings-tab .form-table tr:first-child td h3{margin-top:0}.wpmdb .settings-tab .form-table tr td:first-child{vertical-align:top;min-width:100px;width:100px}@media screen and (max-width:782px){.wpmdb .settings-tab .form-table tr td:first-child{width:auto}}.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode td{padding-bottom:0}.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode>td{padding:20px 0}.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode .notification-message{margin:15px 0 0}.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode .expandable-content{margin-top:15px}.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode .compatibility-mode-description h4,.wpmdb .settings-tab .form-table tr.option-section.compatibility-mode .compatibility-mode-description p{line-height:1.4}.wpmdb .settings-tab .form-table tr.option-section label{font-weight:400;position:relative}.wpmdb .settings-tab .form-table tr.option-section li{margin-bottom:5px}.wpmdb .settings-tab .form-table tr.option-section li:last-child{margin-bottom:0}.wpmdb .settings-tab .form-table tr.option-section.allow-remote-requests-wrap .ajax-spinner,.wpmdb .settings-tab .form-table tr.option-section.plugin-compatibility-section .ajax-spinner{right:-23px;left:inherit;top:0;position:absolute}.wpmdb .settings-tab .form-table tr.option-section .bubble .ajax-spinner{right:-45px}.wpmdb .settings-tab .form-table tr.option-section .bubble .ajax-success-msg{right:-65px}.wpmdb .settings-tab .form-table tr.option-section td{padding-bottom:20px}.wpmdb .settings-tab .form-table tr.licence-wrap td{padding-top:0}.wpmdb .settings-tab .form-table tr.licence-wrap td .notification-message{margin:10px 0 0}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap{height:170px;padding-top:20px;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);clear:both}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap #welcome-img{width:170px;height:170px;float:left}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap .welcome-text{height:130px;padding:20px 25px 20px 195px;background:#fff}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap .welcome-text h3{font-weight:lighter;font-size:22px;margin-bottom:10px}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap .welcome-text p{font-size:15px;line-height:1.5}.wpmdb .settings-tab .form-table tr.licence-wrap td #welcome-wrap .welcome-text a{font-weight:700}.wpmdb .settings-tab .form-table tr.plugin-compatibility-section td{padding-top:0}.wpmdb .settings-tab .form-table .general-helper{width:20px}.wpmdb .settings-tab .form-table .general-helper:after{top:-1px;font-size:22px;height:20px;left:-1px}.wpmdb .settings-tab .setting-status{padding-left:6px}.wpmdb .settings-tab .slider-label span{font-weight:700}.wpmdb .allow-remote-reqeusts{font-size:14px;font-weight:700}.wpmdb .connection-info-label{margin-top:15px;margin-bottom:5px;display:block}.wpmdb .connection-info{clear:both;font-size:15px;line-height:21px;font-family:Consolas,Monaco,monospace;padding:10px;height:67px;text-shadow:0 1px 0 #fff;display:block;margin-bottom:7px;width:418px}.wpmdb .reset-button-wrap{width:418px}.wpmdb .reset-button-wrap .button{float:left;position:relative}.wpmdb .reset-button-wrap .button:first-of-type{margin-right:10px}.wpmdb .reset-button-wrap .button.copy-api-key .copy-api-key-confirmation{display:none;left:0;position:absolute;text-align:center;top:0;height:100%;width:100%;color:#333}.wpmdb .reset-button-wrap .reset-api-key-ajax-spinner{float:left;margin:4px 7px}.wpmdb .masked-licence{margin-top:0}.wpmdb .bull{font-size:22px;position:relative;top:4px}.wpmdb .plugin-compatibility-wrap{padding:18px 18px 18px 100px;background-color:#e6e6e6;margin-left:0}.wpmdb .plugin-compatibility-wrap p:last-of-type{margin:10px 0 0}.wpmdb ul.plugin-compatibility-options{display:block;margin:10px 0}.wpmdb .plugin-compatibility-spinner{position:relative;top:3px;left:10px}.wpmdb .plugin-compatibility-success-msg{position:relative;left:10px;font-weight:700}.wpmdb .wpmdb-switch{position:relative;display:inline-block;padding:2px;overflow:hidden;border-radius:2px;background-color:#d4d3d3;cursor:pointer}.wpmdb .wpmdb-switch.on{background-color:#ade7b5}.wpmdb .wpmdb-switch span{visibility:hidden;box-sizing:border-box;float:left;display:inline-block;height:100%;font-size:12px;line-height:20px;border-radius:2px;-webkit-border-radius:2px;font-weight:700;padding:4px 8px;background:#fff;color:#8d8d8d;z-index:1}.wpmdb .wpmdb-switch span.on{color:#82d78b}.wpmdb .wpmdb-switch span.checked{visibility:visible}.wpmdb .wpmdb-switch.disabled{cursor:default;background:#e6e6e6}.wpmdb .wpmdb-switch.disabled span{background:#f1f1f1;color:#d6d6d6}.wpmdb .wpmdb-switch input[type=checkbox]{position:absolute!important;top:0;left:0;opacity:0;z-index:-1}.wpmdb .help-tab{display:none}.wpmdb .help-tab h3{font-size:18px;font-weight:400}.wpmdb .help-tab .support{border-bottom:1px solid #ccc;margin-bottom:25px;padding-bottom:18px}.wpmdb .help-tab .support p{width:640px}.wpmdb .help-tab .support .email a{font-size:12px}.wpmdb .help-tab .support .upgrade-to-pro{font-size:16px;font-weight:700}.wpmdb .help-tab .support .upgrade-to-pro a{white-space:nowrap}.wpmdb .help-tab .support .ajax-spinner{top:2px}.wpmdb .help-tab .debug .ajax-spinner{top:6px}.wpmdb .help-tab .debug .ajax-success-msg{margin-top:5px}.wpmdb .help-tab .video-viewer{margin-bottom:30px;border:1px solid #ccc}.wpmdb .help-tab .videos{width:640px}.wpmdb .help-tab .videos ul>li{margin-bottom:30px;overflow:hidden;position:relative}.wpmdb .help-tab .videos ul>li a{overflow:hidden;display:block;width:320px;height:180px;float:left;margin-right:15px;position:relative;z-index:1;border:1px solid #ccc}.wpmdb .help-tab .videos ul>li a:after,.wpmdb .help-tab .videos ul>li a:before{position:absolute;content:" ";margin:auto;left:0;right:0;top:0;bottom:0}.wpmdb .help-tab .videos ul>li a:before{width:64px;height:64px;border-radius:64px;opacity:.8;border:1px solid #ddd;background-color:#fff;z-index:2}.wpmdb .help-tab .videos ul>li a:after{opacity:.8;border:21.33333px solid transparent;border-top-width:12.8px;border-bottom-width:12.8px;border-left-color:#333;background:transparent;display:block;left:25px;width:0;height:0;z-index:3}.wpmdb .help-tab .videos .video:last-child{margin-bottom:0}.wpmdb .help-tab .videos img{width:320px;height:240px;position:relative;top:50%;margin-top:-120px}.wpmdb .help-tab .debug{width:640px;border-bottom:1px solid #ccc;margin-bottom:25px;padding-bottom:28px}.wpmdb .help-tab .debug textarea{width:100%;min-height:200px;font-family:Consolas,Monaco,monospace;margin-bottom:5px}.wpmdb .help-tab h4{margin:0 0 .2em}.wpmdb .help-tab p{margin:0 0 .5em}.wpmdb .addons-tab,.wpmdb .help-tab iframe{display:none}.wpmdb .addons-tab .addons-content>article:first-child,.wpmdb .addons-tab .addons-content>div:first-child{margin-top:0}.wpmdb .addons-tab .addon{position:relative;width:100%;min-height:138px;padding:25px 30px 30px 165px;box-sizing:border-box;margin-top:15px;border:1px solid #ddd;background-color:#f9f9f9;background-repeat:no-repeat}.wpmdb .addons-tab .addon .actions{float:right;font-size:14px}.wpmdb .addons-tab .addon .actions>*{margin-right:10px}.wpmdb .addons-tab .addon .actions :last-child{margin-right:0}.wpmdb .addons-tab .addon .actions .action{background-color:#0085ba;color:#fff;display:inline-block;padding:.2em .4em}.wpmdb .addons-tab .addon .actions .action:hover{background-color:#008ec2}.wpmdb .addons-tab .addon .actions .status{border-bottom:2px solid #444;padding-bottom:.1em}.wpmdb .addons-tab .addon h1{float:left;margin:0;padding:0;font-weight:700;font-size:22px;margin-bottom:5px;color:#002040;text-transform:uppercase}.wpmdb .addons-tab .addon p{font-size:14px;line-height:1.4;clear:both;margin:0}.wpmdb .addons-tab .addon p a{text-decoration:underline}.wpmdb .addons-tab .addon.wp-migrate-db-pro-media-files{background-image:url(../img/icon-media-files.svg);background-position:30px 30px;background-size:110px 85px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli{background-image:url(../img/icon-cli.svg);background-position:30px 30px;background-size:110px 97px;min-height:157px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-multisite-tools{background-image:url(../img/icon-multisite-tools.svg);background-position:30px 20px;background-size:110px 118px;min-height:157px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-theme-plugin-files{background-image:url(../img/icon-theme-plugin-files.svg);background-position:30px 20px;background-size:110px 118px;min-height:157px}.wpmdb-not-pro .wpmdb .wpmdb-main{margin-top:15px}.wpmdb-not-pro .wpmdb .help-tab .support p{width:auto}#wpmdb-sidebar{position:absolute;top:0;right:-312px;width:292px}#wpmdb-sidebar .block{padding:20px;border:1px solid #ccc}#wpmdb-sidebar .wpmdb-banner{display:block;background:#a5ddf1 url(../img/mdb-banner.svg) 0 100%/220px 220px no-repeat;padding-bottom:180px;box-shadow:none;color:#042340}#wpmdb-sidebar .wpmdb-banner h4{font-weight:300;font-size:28px;margin:0 0 15px;padding:25px 0 0 20px}#wpmdb-sidebar .wpmdb-banner p{font-size:14px;padding:0 20px;margin:0}#wpmdb-sidebar .wpmdb-banner img{display:block}#wpmdb-sidebar .wpmdb-upgrade-details{background-color:#042340;padding:10px 20px 20px;color:#eee;font-size:13px;margin:0;display:block;text-decoration:none}#wpmdb-sidebar .wpmdb-upgrade-details h1{font-size:28px;color:#a5ddf1;margin:0 0 15px;padding:0;text-decoration:none;font-weight:200;line-height:1}#wpmdb-sidebar .wpmdb-upgrade-details h3{color:#a5ddf1;font-weight:400;text-decoration:none;font-size:16px;box-shadow:none}#wpmdb-sidebar .wpmdb-upgrade-details p{margin:0}#wpmdb-sidebar .wpmdb-upgrade-details a{color:#eee;font-weight:700;text-decoration:none;font-size:16px;box-shadow:none}#wpmdb-sidebar .wpmdb-upgrade-details a:hover{color:#fff}#wpmdb-sidebar .wpmdb-upgrade-details ul{margin:0 13px 20px 16px;list-style-type:disc}#wpmdb-sidebar .wpmdb-discount{border-top:none}#wpmdb-sidebar .wpmdb-discount h2{padding:0;margin:0;margin-bottom:.5em;color:#666;font-size:20px;line-height:1.2em;float:none}#wpmdb-sidebar .wpmdb-discount h3{font-size:16px;margin:20px 0 0}#wpmdb-sidebar .wpmdb-discount h3 a{color:#042340;display:inline-block;padding:8px 10px;border:1px solid #bababa;border-radius:3px;margin-bottom:6px}#wpmdb-sidebar .wpmdb-discount h3 a:hover{color:rgba(4,35,64,.65)}#wpmdb-sidebar .wpmdb-discount p{margin:0}#wpmdb-sidebar .wpmdb-discount p.interesting{margin-bottom:1em;line-height:1.4}#wpmdb-sidebar .wpmdb-discount .links{margin-bottom:2em}#wpmdb-sidebar .wpmdb-discount .links a{text-decoration:none}#wpmdb-sidebar .wpmdb-discount .discount-applied{color:#999;font-size:12px;line-height:1.4em}#wpmdb-sidebar .wpmdb-discount .field{margin-bottom:.5em}#wpmdb-sidebar .wpmdb-discount .field p{margin-bottom:.3em}#wpmdb-sidebar .wpmdb-discount .field.submit-button{margin-bottom:1em}#wpmdb-sidebar .testimonial{border-top:none}#wpmdb-sidebar .testimonial p{margin:0}#wpmdb-sidebar .testimonial .quote{font-size:20px}#wpmdb-sidebar .testimonial .author{white-space:nowrap;text-align:right}#wpmdb-sidebar .testimonial .stars{white-space:nowrap;margin-bottom:5px}#wpmdb-sidebar .testimonial .via{text-align:right;font-size:12px}#wpmdb-sidebar .testimonial .via a{color:#666}#wpmdb-sidebar .testimonial .via a:before{content:"\F301";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 dashicons;vertical-align:top;margin-right:3px}@media screen and (max-width:1252px){#wpmdb-sidebar{position:relative;top:auto;right:auto;margin-top:50px}}body.mp6 input[type=checkbox]:disabled{opacity:1;border-color:#ccc}body.mp6 #wpmdb-main,body.mp6 p{font-size:14px}body.mp6 .wrap>h1,body.mp6 .wrap h2{float:left}body.mp6 .wpmdb .content-tab{padding-top:15px}body.mp6 .wpmdb .migrate-tab{padding-top:0}body.mp6 .wpmdb input[type=checkbox],body.mp6 .wpmdb input[type=radio]{vertical-align:middle;margin-top:-4px}body.mp6 .wpmdb input[type=password],body.mp6 .wpmdb input[type=text]{padding:3px 5px}body.mp6 .wpmdb input.code{padding-top:6px}body.mp6 .wpmdb label{font-size:14px}body.mp6 .wpmdb h2.nav-tab-wrapper{float:none;margin-bottom:0;width:722px;font-size:23px;line-height:29px;padding:9px 0 0 5px}body.mp6 .wpmdb .help-tab h3{margin-top:0}body.mp6 .wpmdb .temp-disabled{background-color:#f9f9f9}body.mp6 .wpmdb .migration-profile-options li a{border-color:#ccc;color:#555;background-color:#e4e4e4}body.mp6 .wpmdb .migration-profile-options li a:hover{background-color:#fff;color:#464646}body.mp6 .wpmdb .connection-info,body.mp6 .wpmdb .migrate-tab .pull-push-connection-info{font-weight:700;font-size:14px}body.mp6 .wpmdb .general-helper{border:0;width:auto;height:auto;top:auto;margin:0}body.mp6 .wpmdb .general-helper:after{content:"\F223";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 dashicons;vertical-align:top;top:auto;left:auto;position:relative}body.mp6 .wpmdb .helper-message{font-size:14px;line-height:1.4em}body.mp6 .wpmdb .right-arrow{display:none}body.mp6 .wpmdb .arrow-col{width:52px}body.mp6 .wpmdb .arrow-col:after{content:"\F344";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 dashicons;vertical-align:top;color:#999}body.mp6 .wpmdb .arrow-col:hover{cursor:pointer}body.mp6 .wpmdb .arrow-col:hover:after{color:#666}body.mp6 .wpmdb .arrow-col.disabled:after{opacity:.5}body.mp6 .wpmdb .arrow-col.disabled:hover{cursor:default}body.mp6 .wpmdb .arrow-col.disabled:hover:after{color:#999}body.mp6 .wpmdb .find-heading{width:409px}body.mp6 .wpmdb .replace-fields input{width:304px}body.mp6 .wpmdb .replace-right-col span{border-color:#999}body.mp6 .wpmdb .replace-right-col span:hover{border-color:#666}body.mp6 .wpmdb .replace-add-row:after,body.mp6 .wpmdb .replace-add-row:before{background-color:#999}body.mp6 .wpmdb .replace-add-row:hover:after,body.mp6 .wpmdb .replace-add-row:hover:before{background-color:#666}body.mp6 .wpmdb .option-group.migrate-selection>li>label{font-size:16px}body.mp6 .wpmdb .saved-migration-profile-label{margin-top:0;padding-top:15px;font-size:16px}body.mp6 .wpmdb .checkbox-label,body.mp6 .wpmdb .option-heading{font-size:16px}body.mp6 .wpmdb .checkbox-label input[type=checkbox]{top:auto}body.mp6 .wpmdb .return-to-profile-selection{font-size:14px}body.mp6 .wpmdb .option-description{font-size:13px}body.mp6 .wpmdb .save-migration-profile-wrap li{position:relative}body.mp6 .wpmdb .delete-profile,body.mp6 .wpmdb .replace-remove-row{border:0;border-radius:0;height:auto;width:auto;left:0;top:50%;margin-left:0}body.mp6 .wpmdb .delete-profile:after,body.mp6 .wpmdb .replace-remove-row:after{content:"\F153";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 dashicons;vertical-align:middle;color:#999}body.mp6 .wpmdb .delete-profile:hover:after,body.mp6 .wpmdb .replace-remove-row:hover:after{color:#666}body.mp6 .wpmdb .row-action-buttons{position:relative;width:60px}body.mp6 .wpmdb .row-action-buttons .helper-message{width:320px}body.mp6 .wpmdb .row-action-buttons .replace-remove-row{margin-left:4px;border:0;border-radius:50%;height:22px;width:auto;left:0;top:0;display:block;float:left;position:relative;margin-top:0}body.mp6 .wpmdb .row-action-buttons .replace-remove-row:after{display:inline-block;vertical-align:top;top:auto;position:relative;left:auto;height:22px;line-height:22px}body.mp6 .wpmdb .row-action-buttons .general-helper{display:inline-block;position:static;margin-left:4px}body.mp6 .wpmdb .row-action-buttons .general-helper:first-child{margin-left:2px}body.mp6 .wpmdb .row-action-buttons .general-helper:after{display:inline-block;vertical-align:top;top:auto;left:auto;position:relative}body.mp6 .wpmdb .delete-profile:after{color:#ccc}body.mp6 .wpmdb .delete-profile:hover:after{color:#aaa}body.mp6 .wpmdb .help-tab .support .email a,body.mp6 .wpmdb .help-tab .support p{font-size:14px}body.mp6 .wpmdb .help-tab div.warning p{font-size:13px}body.mp6 .wpmdb .help-tab .videos h4,body.mp6 .wpmdb .help-tab .videos p{font-size:14px}body.mp6 .wpmdb .inline-message,body.mp6 .wpmdb .notification-message{border-radius:0;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:10px 14px;font-size:13px}body.mp6 .wpmdb .notification-message{margin-bottom:20px;background-color:#fff}body.mp6 .wpmdb .notification-message.invalid-licence,body.mp6 .wpmdb .notification-message.ssl-notice,body.mp6 .wpmdb .notification-message.unrecognized-import-file-notice{margin-bottom:0;margin-top:15px}body.mp6 .wpmdb .notification-message.backup-option-disabled{line-height:1.8em}body.mp6 .wpmdb .notification-message.backup-option-disabled a{text-decoration:underline}body.mp6 .wpmdb .notification-message.backup-option-disabled a:hover{text-decoration:none}body.mp6 .wpmdb .notification-message p{font-size:13px;margin-top:0}body.mp6 .wpmdb .notification-message p:last-child{margin:0}body.mp6 .wpmdb .notification-message h4{margin-top:0}body.mp6 .wpmdb .notification-message a{color:#0074a2;text-decoration:none}body.mp6 .wpmdb .notification-message a:hover{color:#2ea2cc}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child{margin:.5em 0}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child a.button{color:#555}body.mp6 .wpmdb .inline-message.error,body.mp6 .wpmdb .notification-message.error-notice{border-left:4px solid #dd3d36;background-color:#fff}body.mp6 .wpmdb .inline-message.warning,body.mp6 .wpmdb .notification-message.warning-notice{background-color:#fff;border-left:4px solid #ffba00}body.mp6 .wpmdb .inline-message.success,body.mp6 .wpmdb .notification-message.success-notice{border-left:4px solid #7ad03a}body.mp6 .wpmdb .ssl-notice{margin-bottom:0}body.mp6 .wpmdb .different-plugin-version-notice,body.mp6 .wpmdb .directory-permission-notice{margin-bottom:10px}body.mp6 .wpmdb .licence-status{color:#444;float:left;font-weight:400}body.mp6 #overlay{background-color:rgba(0,0,0,.5)}body.mp6 .migration-progress-ajax-spinner{top:20px}
 
asset/build/img/icon-cli.svg DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="412px" height="365px" viewBox="0 0 412 365" enable-background="new 0 0 412 365" xml:space="preserve">
6
- <path id="window-command-icon" fill="#002040" d="M0,0v365h412V0H0z M362,315H50V97h312V315z M191.458,206.895l-75.999,76.397
7
- L87.998,255.96l48.801-49.065L87.93,157.761l27.461-27.329L191.458,206.895z M326,244.027H212.5v38H326V244.027z"/>
8
- </svg>
 
 
 
 
 
 
 
 
asset/build/img/icon-media-files.svg DELETED
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="412px" height="318.25px" viewBox="0 0 412 318.25" enable-background="new 0 0 412 318.25" xml:space="preserve">
6
- <path id="photo-camera-4-icon" fill="#002040" d="M289.652,180.604c0,29.392-23.909,53.3-53.3,53.3
7
- c-29.39,0-53.297-23.908-53.297-53.3c0-29.389,23.909-53.296,53.297-53.296C265.742,127.307,289.652,151.215,289.652,180.604z
8
- M412,51.25v267H0v-267h113.219c11.253,0,21.56-6.297,26.694-16.31L157.832,0h153.665l19.819,35.785
9
- c5.284,9.543,15.335,15.465,26.242,15.465H412z M104.831,109.5c0-11.322-9.178-20.5-20.5-20.5c-11.322,0-20.5,9.178-20.5,20.5
10
- s9.178,20.5,20.5,20.5C95.653,130,104.831,120.822,104.831,109.5z M335.5,180.604c0-54.667-44.477-96.854-99.146-96.854
11
- c-54.667,0-99.146,42.185-99.146,96.854c0,54.671,44.477,99.146,99.146,99.146C291.023,279.75,335.5,235.273,335.5,180.604z
12
- M92.331,7.75h-65.5v27h65.5V7.75z"/>
13
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
asset/build/img/icon-multisite-tools.svg DELETED
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- width="14em" height="15em" viewBox="64.684 51 382.628 410" enable-background="new 64.684 51 382.628 410"
5
- xml:space="preserve">
6
- <path id="network-6-icon" fill="#002040" d="M225.741,122.262c-10.096-4.89-19.027-8.84-27.496-12.287C211.636,74.43,230.974,51,256.001,51
7
- c24.381,0,43.363,22.232,56.707,56.239c-8.562,3.61-17.354,7.632-27.344,12.62C275.139,93.088,263.473,81,256.001,81
8
- C248.31,81,236.177,93.811,225.741,122.262z M256.001,431c-7.471,0-19.135-12.088-29.361-38.859
9
- c-10.084,5.035-18.803,9.016-27.346,12.62C212.64,438.767,231.62,461,256.001,461c25.028,0,44.365-23.43,57.758-58.974
10
- c-8.438-3.437-17.34-7.367-27.495-12.288C275.827,418.19,263.691,431,256.001,431z M174.112,393.154
11
- c-33.35,12.045-83.111,23.779-102.887-5.42c-9.77-14.428-13.416-42.164,24.695-92.377c10.111-13.321,21.816-26.407,33.689-38.418
12
- c26.635-26.545,56.641-52.097,95.738-78.553c-18.822-10.192-39.367-19.936-59.412-27.187c-20.52-7.424-38.586-11.535-52.428-11.535
13
- c-8.842,0-15.404,1.843-17.553,4.93c-2.285,3.281-2.398,13.373,7.744,31.476c1.201-0.132,2.418-0.206,3.652-0.206
14
- c18.225,0,33,14.775,33,33c0,18.227-14.775,33-33,33s-33-14.773-33-33c0-5.902,1.559-11.439,4.273-16.233
15
- c-19.311-33.481-15.328-53.631-7.291-65.177c5.648-8.115,17.551-17.789,42.174-17.789c43.723,0,102.635,28.356,140.564,50.322
16
- C292.58,136.708,353.492,106,398.49,106c24.723,0,36.639,9.932,42.281,18.264c9.77,14.428,13.416,42.164-24.693,92.377
17
- C362.44,287.316,255.792,363.652,174.112,393.154z M392.185,198.504c26.183-34.497,26.984-52.643,23.75-57.418
18
- c-2.188-3.232-8.545-5.086-17.44-5.086c-33.951,0-85.664,24.93-115.436,41.803c21.981,14.287,42.518,29.346,61.239,44.701
19
- c-7.084,7.058-14.51,13.981-22.102,20.68c-20.783-16.807-43.886-33.264-67.833-48.011c-27.5,17.708-55.186,38.509-80.055,60.672
20
- c18.705,16.243,40.973,33.295,64.725,49.076c-9.086,5.654-18.26,11.073-28.729,16.744c-0.004-0.003-0.006-0.005-0.01-0.007
21
- c-0.078-0.055-0.154-0.109-0.232-0.164c-19.885-13.854-39.51-29.055-57.662-44.965c-49.02,49.168-62.828,84.795-56.336,94.383
22
- c2.189,3.232,8.549,5.088,17.443,5.088c40.871,0,105.748-34.459,144.129-59.173C304.759,286.484,358.495,242.895,392.185,198.504z
23
- M433.524,319.63c2.44-4.604,3.829-9.854,3.829-15.432c0-18.226-14.774-33-33-33c-18.225,0-33,14.774-33,33
24
- c0,18.227,14.775,33,33,33c1.521,0,3.017-0.112,4.48-0.312c9.611,17.505,9.453,27.296,7.209,30.519
25
- c-2.148,3.087-8.709,4.93-17.551,4.93c-27.856,0-66.664-16.141-91.65-28.324c-8.357,5.84-18.73,12.77-28.846,19.122
26
- c33.494,17.718,82.752,39.202,120.496,39.202c24.621,0,36.522-9.674,42.172-17.788C448.683,373.029,452.663,352.955,433.524,319.63z
27
- "/>
28
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
asset/build/img/icon-theme-plugin-files.svg DELETED
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="23px" height="24px" viewBox="0 0 23 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
4
- <title>icon-theme-plugin-files</title>
5
- <desc>Created with Sketch.</desc>
6
- <defs></defs>
7
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
- <g id="icon-theme-plugin-files" fill="#002040" fill-rule="nonzero">
9
- <path d="M4.759,5.753 L4.746,5.753 L4.746,6.711 C4.711,8.325 9.151,8.329 9.097,6.711 L9.097,5.754 C8.968,4.226 4.871,4.218 4.759,5.753 Z M8.304,5.9 C8.304,6.214 7.69,6.471 6.934,6.471 C6.179,6.471 5.564,6.215 5.564,5.9 C5.564,5.585 6.179,5.33 6.934,5.33 C7.69,5.33 8.304,5.586 8.304,5.9 Z M0,6.079 L0.009,6.084 L0,6.065 L11.5,0 L23,6.142 L23,11.373 L12,17.171 L12,11.86 L21.864,6.67 L11.497,1.153 L1.166,6.607 L11,11.836 L11,17.167 L0,11.309 L0,6.079 Z M23,12.513 L23,18.326 L12,24 L12,18.311 L23,12.513 Z M9.308,9.143 C9.273,10.758 13.714,10.761 13.659,9.143 L13.659,8.186 C13.53,6.658 9.434,6.65 9.322,8.185 L9.308,8.185 L9.308,9.143 Z M11.496,7.762 C12.251,7.762 12.866,8.017 12.866,8.332 C12.866,8.646 12.251,8.902 11.496,8.902 C10.741,8.902 10.126,8.647 10.126,8.332 C10.126,8.017 10.741,7.762 11.496,7.762 Z M13.658,4.408 L13.658,3.452 C13.528,1.925 9.433,1.917 9.321,3.451 L9.308,3.451 L9.308,4.408 C9.272,6.023 13.714,6.026 13.658,4.408 Z M11.497,3.027 C12.251,3.027 12.867,3.283 12.867,3.598 C12.867,3.912 12.251,4.169 11.497,4.169 C10.741,4.169 10.127,3.912 10.127,3.598 C10.127,3.284 10.741,3.027 11.497,3.027 Z M18.209,6.711 L18.209,5.754 C18.079,4.226 13.983,4.218 13.873,5.753 L13.859,5.753 L13.859,6.711 C13.822,8.326 18.264,8.329 18.209,6.711 Z M14.677,5.901 C14.677,5.587 15.292,5.331 16.047,5.331 C16.803,5.331 17.418,5.587 17.418,5.901 C17.418,6.215 16.803,6.471 16.047,6.471 C15.292,6.471 14.677,6.215 14.677,5.901 Z M11,18.309 L11,24 L3.55271368e-15,18.327 L3.55271368e-15,12.452 L11,18.309 Z" id="Shape"></path>
10
- </g>
11
- </g>
12
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
asset/build/img/lock.png DELETED
Binary file
asset/build/img/mor10.png DELETED
Binary file
asset/build/img/mor10@2x.png DELETED
Binary file
asset/build/js/bundle-1017.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var i=n(29)("wks"),o=n(21),a=n(0).Symbol,r="function"==typeof a;(e.exports=function(e){return i[e]||(i[e]=r&&a[e]||(r?a:o)("Symbol."+e))}).store=i},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";t.__esModule=!0;var i=r(n(70)),o=r(n(82)),a="function"==typeof o.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function r(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,n){var i=n(5),o=n(35),a=n(24),r=Object.defineProperty;t.f=n(6)?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return r(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(8);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(4),o=n(20);e.exports=n(6)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(0),o=n(2),a=n(17),r=n(7),s=n(9),c=function(e,t,n){var l,p,d,m=e&c.F,u=e&c.G,_=e&c.S,h=e&c.P,f=e&c.B,g=e&c.W,b=u?o:o[t]||(o[t]={}),w=b.prototype,v=u?i:_?i[t]:(i[t]||{}).prototype;for(l in u&&(n=t),n)(p=!m&&v&&void 0!==v[l])&&s(b,l)||(d=p?v[l]:n[l],b[l]=u&&"function"!=typeof v[l]?n[l]:f&&p?a(d,i):g&&v[l]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):h&&"function"==typeof d?a(Function.call,d):d,h&&((b.virtual||(b.virtual={}))[l]=d,e&c.R&&w&&!w[l]&&r(w,l,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var i=n(75),o=n(26);e.exports=function(e){return i(o(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(63));t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,i.default)(e,o.key,o)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(18);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){var i=n(4).f,o=n(9),a=n(1)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){var i=n(8),o=n(0).document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var i=n(8);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(41),o=n(30);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(29)("keys"),o=n(21);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var i=n(2),o=n(0),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){t.f=n(1)},function(e,t,n){var i=n(0),o=n(2),a=n(14),r=n(31),s=n(4).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:r.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var i=n(18);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i}),this.resolve=i(t),this.reject=i(n)}(e)}},function(e,t,n){e.exports=!n(6)&&!n(19)(function(){return 7!=Object.defineProperty(n(23)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=n(68)},function(e,t,n){"use strict";var i=n(72)(!0);n(38)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var i=n(14),o=n(10),a=n(39),r=n(7),s=n(15),c=n(73),l=n(22),p=n(78),d=n(1)("iterator"),m=!([].keys&&"next"in[].keys()),u=function(){return this};e.exports=function(e,t,n,_,h,f,g){c(n,t,_);var b,w,v,y=function(e){if(!m&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==h,j=!1,S=e.prototype,T=S[d]||S["@@iterator"]||h&&S[h],$=T||y(h),C=h?k?y("entries"):$:void 0,F="Array"==t&&S.entries||T;if(F&&(v=p(F.call(new e)))!==Object.prototype&&v.next&&(l(v,x,!0),i||"function"==typeof v[d]||r(v,d,u)),k&&T&&"values"!==T.name&&(j=!0,$=function(){return T.call(this)}),i&&!g||!m&&!j&&S[d]||r(S,d,$),s[t]=$,s[x]=u,h)if(b={values:k?$:y("values"),keys:f?$:y("keys"),entries:C},g)for(w in b)w in S||a(S,w,b[w]);else o(o.P+o.F*(m||j),t,b);return b}},function(e,t,n){e.exports=n(7)},function(e,t,n){var i=n(5),o=n(74),a=n(30),r=n(28)("IE_PROTO"),s=function(){},c=function(){var e,t=n(23)("iframe"),i=a.length;for(t.style.display="none",n(43).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;i--;)delete c.prototype[a[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[r]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(9),o=n(11),a=n(76)(!1),r=n(28)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),c=0,l=[];for(n in s)n!=r&&i(s,n)&&l.push(n);for(;t.length>c;)i(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var i=n(25),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t,n){var i=n(0).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(26);e.exports=function(e){return Object(i(e))}},function(e,t,n){n(79);for(var i=n(0),o=n(7),a=n(15),r=n(1)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var l=s[c],p=i[l],d=p&&p.prototype;d&&!d[r]&&o(d,r,l),a[l]=a.Array}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(41),o=n(30).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(92));t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,n){return function o(a,r){try{var s=t[a](r),c=s.value}catch(e){return void n(e)}if(!s.done)return i.default.resolve(c).then(function(e){o("next",e)},function(e){o("throw",e)});e(c)}("next")})}}},function(e,t,n){var i=n(16),o=n(1)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var i=n(5),o=n(18),a=n(1)("species");e.exports=function(e,t){var n,r=i(e).constructor;return void 0===r||void 0==(n=i(r)[a])?t:o(n)}},function(e,t,n){var i,o,a,r=n(17),s=n(100),c=n(43),l=n(23),p=n(0),d=p.process,m=p.setImmediate,u=p.clearImmediate,_=p.MessageChannel,h=p.Dispatch,f=0,g={},b=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},w=function(e){b.call(e.data)};m&&u||(m=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++f]=function(){s("function"==typeof e?e:Function(e),t)},i(f),f},u=function(e){delete g[e]},"process"==n(16)(d)?i=function(e){d.nextTick(r(b,e,1))}:h&&h.now?i=function(e){h.now(r(b,e,1))}:_?(a=(o=new _).port2,o.port1.onmessage=w,i=r(a.postMessage,a,1)):p.addEventListener&&"function"==typeof postMessage&&!p.importScripts?(i=function(e){p.postMessage(e+"","*")},p.addEventListener("message",w,!1)):i="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),b.call(e)}}:function(e){setTimeout(r(b,e,1),0)}),e.exports={set:m,clear:u}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var i=n(5),o=n(8),a=n(34);e.exports=function(e,t){if(i(e),o(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.handleAjaxError=function(e,t){var n="\n\t\t\t<p>"+wpmdb_strings.ajax_php_errors+":</p>\n\t\t\t<p>"+t.message+"</p>\n\t";wpmdb.current_migration.setState(e,n,"error"),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events(),console.error("🚨 🚒",t)},t.throwMDBError=function(e){var t=void 0;throw void 0!==e.body&&(wpmdb.common.non_fatal_errors+=e.body,t=e.body),void 0!==e.msg&&(t=e.msg),new Error(t)},t.jQueryAjaxError=function(e,t){return void 0!==t.responseText&&""!==t.responseText?e=t.responseText:void 0!==t.statusText&&(e=t.statusText),console.error(t),wpmdb.current_migration.setState(wpmdb_strings.migration_failed,e,"error"),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events(),e},t.doNextStep=function(e,t,n){return wpmdb.common.next_step_in_migration={fn:e,args:t},wpmdb.functions.execute_next_step(n)}},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}}(n(3));var o=n(57),a=jQuery,r=Backbone.Model.extend({defaults:{_initialStages:null,stages:null,activeStageName:null,stageModels:null,localTableRows:null,localTableSizes:null,remoteTableRows:null,remoteTableSizes:null,migrationStatus:"active",migrationIntent:"savefile"},initialize:function(){this.set("stageModels",{}),this.set("_initialStages",this.get("stages")),this.set("stages",[]),_.each(this.get("_initialStages"),function(e,t,n){this.addStage(e.name,t,n)},this)},addStage:function(e,t,n,o){var r,s=[];return _.each(t,function(e){var t,i;"remote"===n?(t=this.get("remoteTableSizes")[e],i=this.get("remoteTableRows")[e]):(t=this.get("localTableSizes")[e],i=this.get("localTableRows")[e]),s.push({name:e,size:t,rows:i})},this),r={name:e,items:s,dataType:n},"object"===(void 0===o?"undefined":(0,i.default)(o))&&(r=a.extend(r,o)),this.addStageModel(r),this.trigger("stage:added",this.get("stageModels")[e]),this.get("stageModels")[e].on("change",function(){this.trigger("change")},this),this.getStageModel(r.name)},addStageItem:function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";this.getStageModel(e).addItem(t,n,i,o)},addStageModel:function(e){var t=this.get("stages"),n=this.get("stageModels"),i=new o(e);t.push(e),n[e.name]=i,this.set("stages",t),this.set("stageModels",n)},getStageModel:function(e){return this.get("stageModels")[e]},getStageItems:function(e,t){var n=this.getStageModel(e).get("items");return void 0===t?n:n.map(function(e){return e[t]})},setActiveStage:function(e){this.setStageComplete(),this.set("activeStageName",e),this.getStageModel(e).set("status","active"),this.trigger("change:activeStage")},setStageComplete:function(e){e||(e=this.get("activeStageName")),null!==e&&this.getStageModel(e).set("status","complete"),wpmdb.current_migration.currentStageNum=wpmdb.current_migration.currentStageNum+1},setMigrationComplete:function(){var e=this.getStageModel(this.get("activeStageName"));this.setStageComplete(),this.trigger("migrationComplete"),this.set("migrationStatus","complete"),e.activateTab()}});e.exports=r},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}}(n(3));var o=jQuery,a=Backbone.Model.extend({defaults:{status:"queued",_initialItems:null,items:null,names:null,lookupItems:null,totalSize:0,totalTransferred:0,dataType:"local",name:"",itemsComplete:0,itemsCompleteArr:[],strings:null},initialize:function(){this.initStrings(),this.set("_initialItems",this.get("items").slice()),this.set("items",[]),this.set("names",[]),this.set("lookupItems",{}),this.set("itemsCompleteArr",[]),_.each(this.get("_initialItems"),function(e){this.addItem(e.name,e.size,e.rows)},this),this.on("view:initialized",this.triggerItemViewInit),this.on("change",function(){wpmdb.current_migration.updateTitleElem()})},initStrings:function(){var e={stage_title:this.get("name"),migrated:wpmdb_strings.migrated,queued:wpmdb_strings.queued,active:wpmdb_strings.running,complete:wpmdb_strings.complete,hide:wpmdb_strings.hide,show:wpmdb_strings.show,itemsName:wpmdb_strings.tables},t=this.get("strings");t="object"===(void 0===t?"undefined":(0,i.default)(t))?t:{},(t=o.extend(e,t)).items_migrated=t.itemsName+" "+t.migrated,t.hide_items=t.hide+" "+t.itemsName,t.show_items=t.show+" "+t.itemsName,this.set("strings",t)},addItem:function(e,t,n,i){var a=this.get("items"),r=this.get("names");if(!~r.indexOf(e)){r.push(e);var s={name:e,size:t,rows:n||t,stageName:this.get("name"),transferred:0,rowsTransferred:0,complete:!1,title:null,get $title(){return this.title||this.createTitleElem()},set $title(e){this.title=e},createTitleElem:function(){return this.title=o("<p>").addClass("item-info").append(o('<span class="name" />').text(this.displayName||this.name)).append(" ").append(o('<span class="size" />').text("("+wpmdb.functions.convertKBSizeToHRFixed(s.size)+")")),this.title},progress:null,get $progress(){return this.progress||this.createProgElem()},set $progress(e){this.progress=e},createProgElem:function(){return this.progress=o('<div class="progress-bar"/>').css("width","0%"),this.progress},el:null,get $el(){return this.el||this.createMainElem()},set $el(e){this.el=e},createMainElem:function(){return this.el=o('<div class="item-progress" />'),this.el.append(this.$title),this.el.append(this.$progress),this.el.append('<span class="dashicons dashicons-yes"/>'),this.el.attr("id","item-"+this.name),this.el.attr("data-stage",this.stageName),this.el},updateProgress:function(e){var t=this.$progress;window.requestAnimationFrame(function(){t.css("width",e+"%")}.bind(this))}};void 0!==i&&i.length&&(s.displayName=i),a.push(s),this.get("lookupItems")[e]=a.length-1,this.set("totalSize",parseFloat(this.get("totalSize"))+parseFloat(t)),this.trigger("item:added",s)}},triggerItemViewInit:function(){var e=this.get("items"),t=this;_.each(e,function(e){t.trigger("item:added",e)})},getTotalSizeTransferred:function(){return this.get("totalTransferred")},countItemsComplete:function(){return this.get("itemsComplete")},getTotalProgressPercent:function(){var e=this.getTotalSizeTransferred(),t=this.get("totalSize");return 0>=e||0>=t?0:Math.min(100,Math.round(e/t*100))},activateTab:function(){this.trigger("activateTab"),wpmdb.current_migration.model.trigger("change:activeStage")},setItemComplete:function(e){var t=this.get("itemsCompleteArr");if(!~t.indexOf(e)){t.push(e);var n=this.getItemByName(e),i=this.get("totalTransferred"),o=this.get("itemsComplete");this.set("itemsComplete",++o),i+=n.size-n.transferred,this.set("totalTransferred",i),n.transferred=n.size,n.complete=!0,n.rowsTransferred=n.rows,this.trigger("change change:items",n)}},setItemPercentTransferred:function(e,t,n,i){var o=this.getItemByName(e),a=n/1e3;if(1===t){o.complete=!0,o.transferred=a;var r=this.get("itemsComplete");this.set("itemsComplete",++r),this.trigger("change change:items",o)}o.transferred=i/1e3,o.exactPercent=t;var s=this.get("totalTransferred");s+=a,this.set("totalTransferred",s),this.trigger("change change:items",o)},setItemRowsTransferred:function(e,t){var n,i,o=this.getItemByName(e),a=this.get("totalTransferred");1!==(n=-1===parseInt(t)?1:Math.min(1,t/o.rows))?(a+=(i=o.size*n)-o.transferred,this.set("totalTransferred",a),o.transferred=i,o.rowsTransferred=t,this.trigger("change change:items",o)):this.setItemComplete(e)},getItemByName:function(e){var t=this.get("items")[this.get("lookupItems")[e]]||{};return e===t.name?t:this.determineItemByName(e)},determineItemByName:function(e){for(var t=this.get("items"),n=0;n<t.length;n++){var i=t[n];if(e===i.name)return this.get("lookupItems").itemName=n,i}}});e.exports=a},function(e,t,n){"use strict";var i=n(59),o=(jQuery,Backbone.View.extend({tagName:"div",className:"migration-progress-stages",id:"migration-progress-stages",self:void 0,initialize:function(){this.$el.empty(),this.model.on("stage:added",function(e){this.addStageView(e)},this),_.each(this.model.get("stageModels"),this.addStageView,this)},addStageView:function(e){var t=new i({model:e});e.trigger("view:initialized",t),this.$el.append(t.$el),this.$el.parent().find(".stage-tabs").append(t.$tabElem)}}));e.exports=o},function(e,t,n){"use strict";var i=jQuery,o=Backbone.View.extend({tagName:"div",className:"migration-progress-stage-container hide-tables",$totalProgressElem:null,$tabElem:null,$showHideTablesElem:null,$pauseBeforeFinalizeElem:null,$pauseBeforeFinalizeCheckbox:null,$itemsContainer:null,itemViews:null,maxDomNodes:140,visibleDomNodes:0,itemCount:0,percentDone:0,sizeDone:0,tablesDone:0,queuedElements:null,$truncationNotice:null,$truncationNoticeHiddenItems:null,shouldHideItemProgress:!1,initialize:function(){this.$el.empty(),this.$el.attr("data-stage",this.model.get("name")).addClass("queued "+this.model.get("name")),this.queuedElements=[],this.initTotalProgressElem(),wpmdb.current_migration.view.$el.parent().find(".stage-tabs").after(this.$totalProgressElem),this.$itemsContainer=i("<div class=progress-items />"),this.$el.append(this.$itemsContainer),this.initTabElem(),this.model.on("item:added",this.maybeAddElementToView,this),_.each(this.model.get("itemModels"),this.maybeAddElementToView,this),this.model.on("change",function(){this.updateProgressElem(),this.updateStageTotals()},this),this.model.on("change:status",function(e){this.$el.removeClass("queued active").addClass(this.model.get("status")),this.$totalProgressElem.removeClass("queued active").addClass(this.model.get("status")),this.$tabElem.removeClass("queued active").addClass(this.model.get("status")).find(".stage-status").text(this.model.get("strings")[this.model.get("status")])},this),this.model.on("change:items",function(e){e.name&&this.setItemProgress(e)},this),this.model.on("activateTab",function(){"complete"===wpmdb.current_migration.model.get("migrationStatus")&&(this.$totalProgressElem.addClass("active").siblings().removeClass("active"),this.$tabElem.addClass("active").siblings().removeClass("active"),this.$el.addClass("active").siblings().removeClass("active"))},this)},initTotalProgressElem:function(){this.initShowHideTablesElem(),this.initPauseBeforeFinalizeElem(),this.$totalProgressElem=i('<div class="stage-progress '+this.model.get("name")+'" />').append("<span class=percent-complete>0</span>% "+this.model.get("strings").complete+" ").append('<span class="size-complete-wrap">(<span class=size-complete>0 MB</span> / <span class=size-total>0 MB</span>) </span>').append('<span class="items-complete-wrap"><span class=items-complete>0</span> <span class=lowercase >of</span> <span class=items-total>0</span> '+this.model.get("strings").items_migrated+"</span>").append(this.$showHideTablesElem).append("<div class=progress-bar-wrapper><div class=progress-bar /></div>"),this.updateStageTotals()},initShowHideTablesElem:function(){this.$showHideTablesElem=i('<a class="show-hide-tables">').text(this.model.get("strings").show_items);var e=this;this.$showHideTablesElem.on("click show-hide-progress-tables",function(){var t;e.$el.hasClass("hide-tables")?(t=!1,e.$el.add(e.$el.siblings()).removeClass("hide-tables"),e.$showHideTablesElem.text(e.model.get("strings").hide_items)):(t=!0,e.$el.add(e.$el.siblings()).addClass("hide-tables"),e.$showHideTablesElem.text(e.model.get("strings").show_items)),Boolean(t)!==Boolean(wpmdb_data.prog_tables_hidden)&&(wpmdb_data.prog_tables_visibility_changed=!0,wpmdb_data.prog_tables_hidden=t)}),wpmdb_data.prog_tables_hidden||this.$showHideTablesElem.triggerHandler("show-hide-progress-tables"),this.model.on("change:status activateTab",function(){wpmdb_data.prog_tables_hidden?e.$showHideTablesElem.text(e.model.get("strings").show_items):e.$showHideTablesElem.text(e.model.get("strings").hide_items)})},initPauseBeforeFinalizeElem:function(){this.$pauseBeforeFinalizeElem=i(".pause-before-finalize"),this.$pauseBeforeFinalizeCheckbox=this.$pauseBeforeFinalizeElem.find("input[type=checkbox]");var e=this,t=!1,n=wpmdb.current_migration.model.get("migrationIntent");wpmdb_data.pause_before_finalize&&(t=!0),this.$pauseBeforeFinalizeCheckbox.prop("checked",t),-1!==i.inArray(n,["push","pull","find_replace","import"])?("find_replace"===n&&i("#pause-before-finalize-label").text(wpmdb_strings.pause_before_finalize_find_replace),this.$pauseBeforeFinalizeElem.show()):this.$pauseBeforeFinalizeElem.hide(),wpmdb.current_migration.model.on("change:activeStage",function(){-1!==i.inArray(wpmdb.current_migration.model.get("activeStageName"),["media","themes","plugins"])&&e.$pauseBeforeFinalizeElem.hide()}),this.$pauseBeforeFinalizeElem.on("click",function(){var t=Boolean(e.$pauseBeforeFinalizeCheckbox.is(":checked"));t!==Boolean(wpmdb_data.pause_before_finalize)&&(wpmdb_data.pause_before_finalize_changed=!0,wpmdb_data.pause_before_finalize=t)})},initTabElem:function(){var e=this;this.$tabElem=i("<a class=stage-tab>").append("<span class=stage-title>"+this.model.get("strings").stage_title+"</span> ").append("<span class=stage-status>"+this.model.get("strings").queued+"</span> ").on("click",function(){e.model.activateTab()})},updateProgressElem:function(){var e=Math.max(0,this.model.getTotalProgressPercent()),t=wpmdb.functions.convertKBSizeToHRFixed(Math.min(this.model.getTotalSizeTransferred(),this.model.get("totalSize"))),n=Math.min(this.model.countItemsComplete(),this.model.get("items").length);"complete"===this.model.get("status")&&0===this.model.get("totalSize")&&(e=100,this.$showHideTablesElem.fadeOut()),e!==this.percentDone&&(this.percentDone=e,this.$totalProgressElem.find(".percent-complete").text(e),this.$totalProgressElem.find(".progress-bar-wrapper .progress-bar").css({width:e+"%"})),t!=this.sizeDone&&(this.sizeDone=t,this.$totalProgressElem.find(".size-complete").text(t)),n!=this.tablesDone&&(this.tablesDone=n,this.$totalProgressElem.find(".items-complete").text(wpmdb.functions.wpmdb_add_commas(n)))},updateStageTotals:function(e){if((e=e||this.model.get("items").length)!==this.itemCount&&(this.itemCount=e,this.$totalProgressElem.find(".items-total").text(wpmdb.functions.wpmdb_add_commas(e)),this.$totalProgressElem.find(".size-total").text(wpmdb.functions.convertKBSizeToHRFixed(this.model.get("totalSize"))),!this.shouldHideItemProgress&&500<e)){var t=this.model.get("name").toLowerCase();"themes"!=t&&"plugins"!==t||this.hideItemProgress()}},hideItemProgress:function(){this.shouldHideItemProgress||(this.shouldHideItemProgress=!0,this.$itemsContainer.empty(),this.$showHideTablesElem&&this.$showHideTablesElem.hide())},maybeAddElementToView:function(e){var t=this.shouldHideItemProgress?0:this.maxDomNodes;this.visibleDomNodes<t?(++this.visibleDomNodes,this.$itemsContainer.append(e.$el)):(this.queuedElements.push(e),this.$truncationNotice?this.updateTruncationNotice():this.showTruncationNotice())},showTruncationNotice:function(){if(!this.$truncationNotice){var e=this.shouldHideItemProgress?this.model.get("items").length:this.queuedElements.length;this.$truncationNotice=i('<div class="truncation-notice" >'+wpmdb_strings.progress_items_truncated_msg.replace("%1$s",'<span class="hidden-items">'+wpmdb.functions.wpmdb_add_commas(e)+"</span>")+"</div>"),this.$truncationNoticeHiddenItems=this.$truncationNotice.find(".hidden-items"),this.$itemsContainer.after(this.$truncationNotice)}},updateTruncationNotice:function(){var e=this.shouldHideItemProgress?this.model.get("items").length:this.queuedElements.length;this.$truncationNoticeHiddenItems.text(wpmdb.functions.wpmdb_add_commas(e))},getNextElementForView:function(e){var t;return!this.shouldHideItemProgress&&(this.queuedElements.length&&(e&&this.queuedElements.push(e),e=(t=this.queuedElements.shift())instanceof i?t:t.$el),e)},setItemProgress:function(e){var t=Math.min(100,Math.ceil(e.transferred/e.size*100));e.hasOwnProperty("exactPercent")&&(t=100*e.exactPercent),0===e.size&&(t=100),e.updateProgress(t),(100<=t||0===e.size)&&this.elemComplete(e)},elemComplete:function(e){if(!this.shouldHideItemProgress){var t=e.$el.addClass("complete");if(1!==this.model.get("items").length){var n=this.getNextElementForView(t),i=t.height(),o=t.css("margin-bottom"),a=!1;n===t&&(a=n.clone().css({height:0,marginBottom:0,display:"block"}).addClass("clone complete")).appendTo(this.$itemsContainer),t.css({height:i,marginBottom:o}),setTimeout(function(){t.css({height:0,marginBottom:0});var e=0;a&&(e=250,a.css({height:i,marginBottom:o}),a.find(".progress-bar").addClass("progress-bar-no-transition").css({width:"100%"})),setTimeout(function(){t.css({display:"none"}),t.remove(),a&&a.remove(),this.$itemsContainer.find(".item-progress:not(.clone)").last().after(n.css({height:"auto",marginBottom:o,display:"block"}))}.bind(this),e)}.bind(this),1e3)}}}});e.exports=o},function(e,t,n){"use strict";var i=jQuery;e.exports={updateProgTableVisibilitySetting:function(){wpmdb_data.prog_tables_visibility_changed&&(wpmdb_data.prog_tables_visibility_changed=!1,i.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",nonce:wpmdb_data.nonces.save_setting,setting:"prog_tables_hidden",checked:Boolean(wpmdb_data.prog_tables_hidden)},error:function(e,t,n){console.log("Could not save progress item visibility setting",n)}}))},updatePauseBeforeFinalizeSetting:function(){wpmdb_data.pause_before_finalize_changed&&(wpmdb_data.pause_before_finalize_changed=!1,i.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",nonce:wpmdb_data.nonces.save_setting,setting:"pause_before_finalize",checked:Boolean(wpmdb_data.pause_before_finalize)},error:function(e,t,n){console.log("Could not save pause before finalize setting",n)}}))}}},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}}(n(62));window.wpmdb={functions:{},common:{hooks:[],call_stack:[],non_fatal_errors:"",migration_error:!1}},wpmdb.functions=new i.default,function(e){e.keys().forEach(function(t){-1===t.indexOf("wpmdbCommon.js")&&-1===t.indexOf("./js/modules/")&&e(t)})}(n(66))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(12)),o=a(n(13));function a(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){(0,i.default)(this,e)}return(0,o.default)(e,[{key:"wpmdb_toggle_migration_action_text",value:function(){jQuery(".action-text").hide(),jQuery(".action-text."+jQuery("input[name=action]:checked").val()).show()}},{key:"wpmdb_migration_type",value:function(){var e=jQuery("input[name=action]:checked");return 0===e.length?"":e.val()}},{key:"wpmdb_call_next_hook",value:function(){var e=window.wpmdb;e.common.call_stack.length||(e.common.call_stack=e.common.hooks);var t=e.common.call_stack[0];e.common.call_stack.shift(),t.call(this)}},{key:"wpmdb_add_commas",value:function(e){for(var t=(e+="").split("."),n=t[0],i=1<t.length?"."+t[1]:"",o=/(\d+)(\d{3})/;o.test(n);)n=n.replace(o,"$1,$2");return n+i}},{key:"wpmdb_parse_json",value:function(e){var t={};try{t=jQuery.parseJSON(e)}catch(e){return!1}return t}},{key:"wpmdbGetAjaxErrors",value:function(e,t,n,i){var o=!1,a="";if(!1===this.wpmdb_parse_json(n)){o=!0,e=wpmdb_strings.ajax_json_message,t="(#144)";var r=n;n=wpmdb_strings.ajax_json_errors+" "+t,n+='<br><a class="show-errors-toggle" href="#">'+wpmdb_strings.view_error_messages+"</a> ",n+='<div class="migration-php-errors">'+r+"</div>"}return(o||"undefined"!==i)&&(a+="<strong>"+e+"</strong> &mdash; "),o||"undefined"===i||(a+=wpmdb_strings.status+": "+i.status+" "+i.statusText,a+="<br /><br />"+wpmdb_strings.response+":<br />"),o||(n+=" "+t),a+=n}},{key:"preg_quote",value:function(e,t){return String(e).replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(t||"")+"-]","g"),"\\$&")}},{key:"table_is",value:function(e,t,n){if((e+t).toLowerCase()===n.toLowerCase())return!0;var i=this.preg_quote(n);return null!==new RegExp(e+"([0-9]+)_"+t,"i").exec(i)}},{key:"subsite_for_table",value:function(e,t){var n=this.preg_quote(t),i=new RegExp(e+"([0-9]+)_","i").exec(n);return null===i?1:i[1]}},{key:"convertKBSizeToHR",value:function(e,t,n,i){var o,a;if(n=n||1e3,t=t||2,(e=parseFloat(e))<1&&e>0)o=[(e*n).toFixed(0),"B"];else if(n>Math.abs(e))o=[e.toFixed(0),"KB"];else{a=["MB","GB","TB","PB","EB","ZB","YB"];var r=-1;do{e/=n,++r}while(Math.abs(e)>=n&&r<a.length-1);o=[Math.round(e*Math.pow(10,t))/Math.pow(10,t),a[r]]}return i||(o=o[0]+" "+o[1]),o}},{key:"convertKBSizeToHRFixed",value:function(e,t,n){t=t||2;var i=this.convertKBSizeToHR(e,t,n,!0);return"MB"==i[1]?i[0].toFixed(2)+" "+i[1]:i[0]+" "+i[1]}},{key:"ajax_handle_dismissible_notice",value:function(e,t,n){jQuery.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_process_notice_link",nonce:e,notice:jQuery(n).data("notice"),type:jQuery(n).data("type"),reminder:jQuery(n).data("reminder")},beforeSend:t(n)})}},{key:"get_spinner_url",value:function(){var e=ajaxurl.replace("/admin-ajax.php","")+"/images/spinner";return 2<window.devicePixelRatio&&(e+="-2x"),e+=".gif"}},{key:"exclude_post_types_warning",value:function(){var e=$("#select-post-types").val(),t="",n=$(".exclude-post-types-warning");e?(t="<code>"+e.join("</code>, <code>")+"</code>",$(".excluded-post-types").html(t),"0"===n.css("opacity")&&n.css({opacity:0}).slideDown(200).animate({opacity:1})):n.css({opacity:0}).slideUp(200).animate({opacity:0})}}]),e}();t.default=r},function(e,t,n){e.exports={default:n(64),__esModule:!0}},function(e,t,n){n(65);var i=n(2).Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},function(e,t,n){var i=n(10);i(i.S+i.F*!n(6),"Object",{defineProperty:n(4).f})},function(e,t,n){var i={"./js/backups.js":67,"./js/dismissable-notices.js":108,"./js/helpers/events.js":109,"./js/helpers/utils.js":110,"./js/helpers/wpmdbCommon.js":111,"./js/helpers/wpmdbGlobals.js":112,"./js/hook.js":113,"./js/import.js":114,"./js/localStorage.js":115,"./js/modules/MigrationProgress-controller.js":116,"./js/modules/MigrationProgress-model.js":117,"./js/modules/MigrationProgress-utils.js":118,"./js/modules/MigrationProgress-view.js":119,"./js/modules/MigrationProgressStage-model.js":120,"./js/modules/MigrationProgressStage-view.js":121,"./js/multisite.js":122,"./js/plugin-update.js":123,"./js/script.js":124,"./js/usage-tracking-notice.js":127,"./js/usage-tracking.js":128,"./sass/_migration-progress.scss":129,"./sass/_progress-upgrade.scss":130,"./sass/backups.scss":131,"./sass/disabled.scss":132,"./sass/plugin-update-styles.scss":133,"./sass/styles.scss":134};function o(e){return n(a(e))}function a(e){var t=i[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(i)},o.resolve=a,e.exports=o,o.id=66},function(e,t,n){var i=window.jQuery;Object.defineProperty(t,"__esModule",{value:!0});var o=l(n(36)),a=l(n(3)),r=l(n(49)),s=l(n(12)),c=l(n(13));n(55);function l(e){return e&&e.__esModule?e:{default:e}}i=window.jQuery;var p=window.wpmdb,d=window.ajaxurl,m=window._,u=function(){function e(){var t=this;(0,s.default)(this,e),this.ajax_spinner='<img src="'+p.functions.get_spinner_url()+'" alt="" class="ajax-spinner general-spinner" />',this.locationHashChanged=(0,r.default)(o.default.mark(function e(){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("#backups"!==window.location.hash){e.next=6;break}return m.isEmpty(t.backups_list)&&(document.getElementById("wpmdb-backups-container").innerHTML=wpmdb_strings.loading_backups+t.ajax_spinner),e.next=4,t.getBackups();case 4:(n=e.sent)&&"object"===(void 0===n?"undefined":(0,a.default)(n))&&t.displayBackups(n);case 6:case"end":return e.stop()}},e,t)})),this.backups_list={},this.backups_rendered=!1}return(0,c.default)(e,[{key:"setup",value:function(){var e=this;if("false"===wpmdb_data.is_pro)return!1;document.addEventListener("DOMContentLoaded",function(){"#backups"===window.location.hash&&e.locationHashChanged()}),navigator.userAgent.match(/Trident.*rv:11\./)&&i("body").addClass("ie11"),window.onhashchange=this.locationHashChanged}},{key:"doAJAX",value:function(){var e=(0,r.default)(o.default.mark(function e(t){var n,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.ajax({url:d,type:"POST",cache:!1,data:t});case 2:return n=e.sent,a=JSON.parse(n),e.abrupt("return",a);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getBackups",value:function(){var e=(0,r.default)(o.default.mark(function e(){var t,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={action:"wpmdb_get_backups",nonce:wpmdb_data.nonces.get_backups},e.prev=1,m.isEmpty(this.backups_list)){e.next=4;break}return e.abrupt("return",this.backups_list);case 4:return e.next=6,this.doAJAX(t);case 6:if(void 0===(n=e.sent).status){e.next=11;break}return document.getElementById("wpmdb-backups-container").innerHTML=n.status,this.backups_list=n.status,e.abrupt("return");case 11:if(void 0===n.wpmdb_error){e.next=13;break}throw new Error(n.error_msg);case 13:return this.backups_list=n,e.abrupt("return",n);case 17:e.prev=17,e.t0=e.catch(1),document.getElementById("wpmdb-backups-container").innerHTML="",this.ajaxError(wpmdb_strings.error_getting_backups,e.t0);case 21:case"end":return e.stop()}},e,this,[[1,17]])}));return function(){return e.apply(this,arguments)}}()},{key:"ajaxError",value:function(e,t){var n=document.getElementById("wpmdb-backups-messages"),i="\n\t\t\t<p><strong>"+e+"</strong></p>\n\t\t\t<p>"+t+"</p>\n\t\t";n.classList.contains("visible")||n.classList.add("visible"),n.innerHTML=i,console.error(t)}},{key:"render",value:function(e){return'\n\t\t<ul class="backups-row" id="'+e.raw_name.replace(/\.sql/,"")+'">\n\t\t\t<li>'+e.modified+"</li>\n\t\t\t<li>"+e.name+'</li>\n\t\t\t<li><a href="#backups" class="download-backup">'+wpmdb_strings.download+'</a> <a href="#backups" class="delete-backup"></a></li>\n\t\t</ul>'}},{key:"displayBackups",value:function(e){if(!this.backups_rendered){var t=""+e.map(this.render).join("");document.getElementById("wpmdb-backups-container").innerHTML=t,this.addListener(".download-backup",this.ajaxGetDownloadFile),this.addListener(".delete-backup",this.ajaxDeleteBackup),this.backups_rendered=!0}}},{key:"addListener",value:function(){var e=(0,r.default)(o.default.mark(function e(t,n){var i=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:document.querySelectorAll(t).forEach(function(e){e.addEventListener("click",function(){var e=(0,r.default)(o.default.mark(function e(t){var a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),a=t.target.parentNode.parentNode.id,e.next=4,n.call(i,a);case 4:return e.abrupt("return",!1);case 5:case"end":return e.stop()}},e,i)}));return function(t){return e.apply(this,arguments)}}())});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"ajaxGetDownloadFile",value:function(){var e=(0,r.default)(o.default.mark(function e(t,n){var i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i={action:"wpmdb_get_backup",path:t,nonce:wpmdb_data.nonces.get_backup},e.prev=1,e.next=4,this.doAJAX(i);case 4:if(void 0===(a=e.sent).wpmdb_error){e.next=7;break}throw new Error(a.error_msg);case 7:return"success"===a.status&&(location.href=a.redirect),e.abrupt("return",a);case 11:e.prev=11,e.t0=e.catch(1),this.ajaxError(wpmdb_strings.error_downloading_backup,e.t0);case 14:case"end":return e.stop()}},e,this,[[1,11]])}));return function(t,n){return e.apply(this,arguments)}}()},{key:"ajaxDeleteBackup",value:function(){var e=(0,r.default)(o.default.mark(function e(t,n){var i,a,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(wpmdb_strings.confirm_delete_backup)){e.next=2;break}return e.abrupt("return");case 2:return i={action:"wpmdb_delete_backup",path:t,nonce:wpmdb_data.nonces.delete_backup},e.prev=3,e.next=6,this.doAJAX(i);case 6:if(void 0===(a=e.sent).wpmdb_error){e.next=9;break}throw new Error(a.error_msg);case 9:return"deleted"===a.status&&((r=document.querySelector("#"+t)).classList.add("wpmdb-backup-deleted"),setTimeout(function(){r.parentNode.removeChild(r)},1100)),e.abrupt("return",a);case 13:e.prev=13,e.t0=e.catch(3),this.ajaxError(wpmdb_strings.error_deleting_backup,e.t0);case 16:case"end":return e.stop()}},e,this,[[3,13]])}));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.default=u,(new u).setup()},function(e,t,n){var i=function(){return this}()||Function("return this")(),o=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,a=o&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,e.exports=n(69),o)i.regeneratorRuntime=a;else try{delete i.regeneratorRuntime}catch(e){i.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",l="object"==typeof e,p=t.regeneratorRuntime;if(p)l&&(e.exports=p);else{(p=t.regeneratorRuntime=l?e.exports:{}).wrap=v;var d="suspendedStart",m="suspendedYield",u="executing",_="completed",h={},f={};f[r]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(z([])));b&&b!==i&&o.call(b,r)&&(f=b);var w=j.prototype=x.prototype=Object.create(f);k.prototype=w.constructor=j,j.constructor=k,j[c]=k.displayName="GeneratorFunction",p.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},p.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(w),e},p.awrap=function(e){return{__await:e}},S(T.prototype),T.prototype[s]=function(){return this},p.AsyncIterator=T,p.async=function(e,t,n,i){var o=new T(v(e,t,n,i));return p.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(w),w[c]="Generator",w[r]=function(){return this},w.toString=function(){return"[object Generator]"},p.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},p.values=z,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,o){return s.type="throw",s.arg=e,t.next=i,o&&(t.method="next",t.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var c=o.call(r,"catchLoc"),l=o.call(r,"finallyLoc");if(c&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var r=a?a.completion:{};return r.type=e,r.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(r)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),F(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;F(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:z(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=n),h}}}function v(e,t,n,i){var o=t&&t.prototype instanceof x?t:x,a=Object.create(o.prototype),r=new E(i||[]);return a._invoke=function(e,t,n){var i=d;return function(o,a){if(i===u)throw new Error("Generator is already running");if(i===_){if("throw"===o)throw a;return P()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=$(r,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=u;var c=y(e,t,n);if("normal"===c.type){if(i=n.done?_:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=_,n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function y(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function x(){}function k(){}function j(){}function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function T(e){var t;this._invoke=function(n,i){function a(){return new Promise(function(t,a){!function t(n,i,a,r){var s=y(e[n],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&o.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,r)},function(e){t("throw",e,a,r)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},r)}r(s.arg)}(n,i,t,a)})}return t=t?t.then(a,a):a()}}function $(e,t){var i=e.iterator[t.method];if(i===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,$(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=y(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function z(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){e.exports={default:n(71),__esModule:!0}},function(e,t,n){n(37),n(45),e.exports=n(31).f("iterator")},function(e,t,n){var i=n(25),o=n(26);e.exports=function(e){return function(t,n){var a,r,s=String(o(t)),c=i(n),l=s.length;return c<0||c>=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(r=s.charCodeAt(c+1))<56320||r>57343?e?s.charAt(c):a:e?s.slice(c,c+2):r-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var i=n(40),o=n(20),a=n(22),r={};n(7)(r,n(1)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(r,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var i=n(4),o=n(5),a=n(27);e.exports=n(6)?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,c=0;s>c;)i.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var i=n(16);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(11),o=n(42),a=n(77);e.exports=function(e){return function(t,n,r){var s,c=i(t),l=o(c.length),p=a(r,l);if(e&&n!=n){for(;l>p;)if((s=c[p++])!=s)return!0}else for(;l>p;p++)if((e||p in c)&&c[p]===n)return e||p||0;return!e&&-1}}},function(e,t,n){var i=n(25),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){var i=n(9),o=n(44),a=n(28)("IE_PROTO"),r=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?r:null}},function(e,t,n){"use strict";var i=n(80),o=n(81),a=n(15),r=n(11);e.exports=n(38)(Array,"Array",function(e,t){this._t=r(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(83),__esModule:!0}},function(e,t,n){n(84),n(48),n(90),n(91),e.exports=n(2).Symbol},function(e,t,n){"use strict";var i=n(0),o=n(9),a=n(6),r=n(10),s=n(39),c=n(85).KEY,l=n(19),p=n(29),d=n(22),m=n(21),u=n(1),_=n(31),h=n(32),f=n(86),g=n(87),b=n(5),w=n(8),v=n(44),y=n(11),x=n(24),k=n(20),j=n(40),S=n(88),T=n(89),$=n(46),C=n(4),F=n(27),E=T.f,z=C.f,P=S.f,O=i.Symbol,I=i.JSON,M=I&&I.stringify,A=u("_hidden"),D=u("toPrimitive"),N={}.propertyIsEnumerable,q=p("symbol-registry"),B=p("symbols"),Q=p("op-symbols"),L=Object.prototype,R="function"==typeof O&&!!$.f,H=i.QObject,V=!H||!H.prototype||!H.prototype.findChild,U=a&&l(function(){return 7!=j(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=E(L,t);i&&delete L[t],z(e,t,n),i&&e!==L&&z(L,t,i)}:z,G=function(e){var t=B[e]=j(O.prototype);return t._k=e,t},W=R&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},K=function(e,t,n){return e===L&&K(Q,t,n),b(e),t=x(t,!0),b(n),o(B,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=j(n,{enumerable:k(0,!1)})):(o(e,A)||z(e,A,k(1,{})),e[A][t]=!0),U(e,t,n)):z(e,t,n)},J=function(e,t){b(e);for(var n,i=f(t=y(t)),o=0,a=i.length;a>o;)K(e,n=i[o++],t[n]);return e},Y=function(e){var t=N.call(this,e=x(e,!0));return!(this===L&&o(B,e)&&!o(Q,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,A)&&this[A][e])||t)},X=function(e,t){if(e=y(e),t=x(t,!0),e!==L||!o(B,t)||o(Q,t)){var n=E(e,t);return!n||!o(B,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(y(e)),i=[],a=0;n.length>a;)o(B,t=n[a++])||t==A||t==c||i.push(t);return i},ee=function(e){for(var t,n=e===L,i=P(n?Q:y(e)),a=[],r=0;i.length>r;)!o(B,t=i[r++])||n&&!o(L,t)||a.push(B[t]);return a};R||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=m(arguments.length>0?arguments[0]:void 0),t=function(n){this===L&&t.call(Q,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),U(this,e,k(1,n))};return a&&V&&U(L,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",function(){return this._k}),T.f=X,C.f=K,n(47).f=S.f=Z,n(33).f=Y,$.f=ee,a&&!n(14)&&s(L,"propertyIsEnumerable",Y,!0),_.f=function(e){return G(u(e))}),r(r.G+r.W+r.F*!R,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)u(te[ne++]);for(var ie=F(u.store),oe=0;ie.length>oe;)h(ie[oe++]);r(r.S+r.F*!R,"Symbol",{for:function(e){return o(q,e+="")?q[e]:q[e]=O(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in q)if(q[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),r(r.S+r.F*!R,"Object",{create:function(e,t){return void 0===t?j(e):J(j(e),t)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var ae=l(function(){$.f(1)});r(r.S+r.F*ae,"Object",{getOwnPropertySymbols:function(e){return $.f(v(e))}}),I&&r(r.S+r.F*(!R||l(function(){var e=O();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=t=i[1],(w(t)||void 0!==e)&&!W(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),i[1]=t,M.apply(I,i)}}),O.prototype[D]||n(7)(O.prototype,D,O.prototype.valueOf),d(O,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(e,t,n){var i=n(21)("meta"),o=n(8),a=n(9),r=n(4).f,s=0,c=Object.isExtensible||function(){return!0},l=!n(19)(function(){return c(Object.preventExtensions({}))}),p=function(e){r(e,i,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!c(e))return"F";if(!t)return"E";p(e)}return e[i].i},getWeak:function(e,t){if(!a(e,i)){if(!c(e))return!0;if(!t)return!1;p(e)}return e[i].w},onFreeze:function(e){return l&&d.NEED&&c(e)&&!a(e,i)&&p(e),e}}},function(e,t,n){var i=n(27),o=n(46),a=n(33);e.exports=function(e){var t=i(e),n=o.f;if(n)for(var r,s=n(e),c=a.f,l=0;s.length>l;)c.call(e,r=s[l++])&&t.push(r);return t}},function(e,t,n){var i=n(16);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(11),o=n(47).f,a={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return r&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return r.slice()}}(e):o(i(e))}},function(e,t,n){var i=n(33),o=n(20),a=n(11),r=n(24),s=n(9),c=n(35),l=Object.getOwnPropertyDescriptor;t.f=n(6)?l:function(e,t){if(e=a(e),t=r(t,!0),c)try{return l(e,t)}catch(e){}if(s(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){n(32)("asyncIterator")},function(e,t,n){n(32)("observable")},function(e,t,n){e.exports={default:n(93),__esModule:!0}},function(e,t,n){n(48),n(37),n(45),n(94),n(106),n(107),e.exports=n(2).Promise},function(e,t,n){"use strict";var i,o,a,r,s=n(14),c=n(0),l=n(17),p=n(50),d=n(10),m=n(8),u=n(18),_=n(95),h=n(96),f=n(51),g=n(52).set,b=n(101)(),w=n(34),v=n(53),y=n(102),x=n(54),k=c.TypeError,j=c.process,S=j&&j.versions,T=S&&S.v8||"",$=c.Promise,C="process"==p(j),F=function(){},E=o=w.f,z=!!function(){try{var e=$.resolve(1),t=(e.constructor={})[n(1)("species")]=function(e){e(F,F)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(F)instanceof t&&0!==T.indexOf("6.6")&&-1===y.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;b(function(){for(var i=e._v,o=1==e._s,a=0,r=function(t){var n,a,r,s=o?t.ok:t.fail,c=t.resolve,l=t.reject,p=t.domain;try{s?(o||(2==e._h&&A(e),e._h=1),!0===s?n=i:(p&&p.enter(),n=s(i),p&&(p.exit(),r=!0)),n===t.promise?l(k("Promise-chain cycle")):(a=P(n))?a.call(n,c,l):c(n)):l(i)}catch(e){p&&!r&&p.exit(),l(e)}};n.length>a;)r(n[a++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){g.call(c,function(){var t,n,i,o=e._v,a=M(e);if(a&&(t=v(function(){C?j.emit("unhandledRejection",o,e):(n=c.onunhandledrejection)?n({promise:e,reason:o}):(i=c.console)&&i.error&&i.error("Unhandled promise rejection",o)}),e._h=C||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){g.call(c,function(){var t;C?j.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},N=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=P(e))?b(function(){var i={_w:n,_d:!1};try{t.call(e,l(N,i,1),l(D,i,1))}catch(e){D.call(i,e)}}):(n._v=e,n._s=1,O(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};z||($=function(e){_(this,$,"Promise","_h"),u(e),i.call(this);try{e(l(N,this,1),l(D,this,1))}catch(e){D.call(this,e)}},(i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(103)($.prototype,{then:function(e,t){var n=E(f(this,$));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?j.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new i;this.promise=e,this.resolve=l(N,e,1),this.reject=l(D,e,1)},w.f=E=function(e){return e===$||e===r?new a(e):o(e)}),d(d.G+d.W+d.F*!z,{Promise:$}),n(22)($,"Promise"),n(104)("Promise"),r=n(2).Promise,d(d.S+d.F*!z,"Promise",{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!z),"Promise",{resolve:function(e){return x(s&&this===r?$:this,e)}}),d(d.S+d.F*!(z&&n(105)(function(e){$.all(e).catch(F)})),"Promise",{all:function(e){var t=this,n=E(t),i=n.resolve,o=n.reject,a=v(function(){var n=[],a=0,r=1;h(e,!1,function(e){var s=a++,c=!1;n.push(void 0),r++,t.resolve(e).then(function(e){c||(c=!0,n[s]=e,--r||i(n))},o)}),--r||i(n)});return a.e&&o(a.v),n.promise},race:function(e){var t=this,n=E(t),i=n.reject,o=v(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return o.e&&i(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var i=n(17),o=n(97),a=n(98),r=n(5),s=n(42),c=n(99),l={},p={};(t=e.exports=function(e,t,n,d,m){var u,_,h,f,g=m?function(){return e}:c(e),b=i(n,d,t?2:1),w=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(u=s(e.length);u>w;w++)if((f=t?b(r(_=e[w])[0],_[1]):b(e[w]))===l||f===p)return f}else for(h=g.call(e);!(_=h.next()).done;)if((f=o(h,b,_.value,t))===l||f===p)return f}).BREAK=l,t.RETURN=p},function(e,t,n){var i=n(5);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&i(a.call(e)),t}}},function(e,t,n){var i=n(15),o=n(1)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var i=n(50),o=n(1)("iterator"),a=n(15);e.exports=n(2).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[i(e)]}},function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var i=n(0),o=n(52).set,a=i.MutationObserver||i.WebKitMutationObserver,r=i.process,s=i.Promise,c="process"==n(16)(r);e.exports=function(){var e,t,n,l=function(){var i,o;for(c&&(i=r.domain)&&i.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(c)n=function(){r.nextTick(l)};else if(!a||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var p=s.resolve(void 0);n=function(){p.then(l)}}else n=function(){o.call(i,l)};else{var d=!0,m=document.createTextNode("");new a(l).observe(m,{characterData:!0}),n=function(){m.data=d=!d}}return function(i){var o={fn:i,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var i=n(0).navigator;e.exports=i&&i.userAgent||""},function(e,t,n){var i=n(7);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:i(e,o,t[o]);return e}},function(e,t,n){"use strict";var i=n(0),o=n(2),a=n(4),r=n(6),s=n(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:i[e];r&&t&&!t[s]&&a.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(1)("iterator"),o=!1;try{var a=[7][i]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var a=[7],r=a[i]();r.next=function(){return{done:n=!0}},a[i]=function(){return r},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var i=n(10),o=n(2),a=n(0),r=n(51),s=n(54);i(i.P+i.R,"Promise",{finally:function(e){var t=r(this,o.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var i=n(10),o=n(34),a=n(53);i(i.S,"Promise",{try:function(e){var t=o.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t){window.jQuery;!function(e){0<e(".wpmdb-compat-plugin-row-error").length&&e('[data-slug="wp-migrate-db-pro"]').addClass("wpmdbpro-has-message"),e(".wpmdbpro-custom").prev().addClass("update"),e(".notice-link-plugins-page").click(function(t){t.preventDefault();var n=jQuery(this);wpmdb.functions.ajax_handle_dismissible_notice(wpmdb_nonces.process_notice_link,function(t){e(t).closest(".wpmdbpro-custom").hide(),e(t).closest("tr").siblings("tr.wpmdbpro-has-message").removeClass("wpmdbpro-has-message")},n),e(".wpmdbpro-custom").prev().removeClass("update")})}(jQuery)},function(e,t){var n=window.jQuery;n.fn.bindFirst=function(e,t){this.bindNth(e,t,0)},n.fn.bindNth=function(e,t,n){this.bind(e,t),this.changeEventOrder(e,n)},n.fn.changeEventOrder=function(e,t){var i=this;n.each(e.split(" "),function(e,o){i.each(function(){var e=n._data(this,"events")[o.split(".")[0]];t=Math.min(t,e.length-1),e.splice(t,0,e.pop())})})}},function(e,t){window.jQuery;Object.defineProperty(t,"__esModule",{value:!0});t.handleAjaxError=function(e,t){var n="\n\t\t\t<p>"+wpmdb_strings.ajax_php_errors+":</p>\n\t\t\t<p>"+t.message+"</p>\n\t";wpmdb.current_migration.setState(e,n,"error"),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events(),console.error("🚨 🚒",t)},t.throwMDBError=function(e){var t=void 0;throw void 0!==e.body&&(wpmdb.common.non_fatal_errors+=e.body,t=e.body),void 0!==e.msg&&(t=e.msg),new Error(t)},t.jQueryAjaxError=function(e,t){return void 0!==t.responseText&&""!==t.responseText?e=t.responseText:void 0!==t.statusText&&(e=t.statusText),console.error(t),wpmdb.current_migration.setState(wpmdb_strings.migration_failed,e,"error"),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events(),e},t.doNextStep=function(e,t,n){return wpmdb.common.next_step_in_migration={fn:e,args:t},wpmdb.functions.execute_next_step(n)}},function(e,t,n){var i=window.jQuery;Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(12)),a=r(n(13));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,o.default)(this,e)}return(0,a.default)(e,[{key:"wpmdb_toggle_migration_action_text",value:function(){jQuery(".action-text").hide(),jQuery(".action-text."+jQuery("input[name=action]:checked").val()).show()}},{key:"wpmdb_migration_type",value:function(){var e=jQuery("input[name=action]:checked");return 0===e.length?"":e.val()}},{key:"wpmdb_call_next_hook",value:function(){var e=window.wpmdb;e.common.call_stack.length||(e.common.call_stack=e.common.hooks);var t=e.common.call_stack[0];e.common.call_stack.shift(),t.call(this)}},{key:"wpmdb_add_commas",value:function(e){for(var t=(e+="").split("."),n=t[0],i=1<t.length?"."+t[1]:"",o=/(\d+)(\d{3})/;o.test(n);)n=n.replace(o,"$1,$2");return n+i}},{key:"wpmdb_parse_json",value:function(e){var t={};try{t=jQuery.parseJSON(e)}catch(e){return!1}return t}},{key:"wpmdbGetAjaxErrors",value:function(e,t,n,i){var o=!1,a="";if(!1===this.wpmdb_parse_json(n)){o=!0,e=wpmdb_strings.ajax_json_message,t="(#144)";var r=n;n=wpmdb_strings.ajax_json_errors+" "+t,n+='<br><a class="show-errors-toggle" href="#">'+wpmdb_strings.view_error_messages+"</a> ",n+='<div class="migration-php-errors">'+r+"</div>"}return(o||"undefined"!==i)&&(a+="<strong>"+e+"</strong> &mdash; "),o||"undefined"===i||(a+=wpmdb_strings.status+": "+i.status+" "+i.statusText,a+="<br /><br />"+wpmdb_strings.response+":<br />"),o||(n+=" "+t),a+=n}},{key:"preg_quote",value:function(e,t){return String(e).replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(t||"")+"-]","g"),"\\$&")}},{key:"table_is",value:function(e,t,n){if((e+t).toLowerCase()===n.toLowerCase())return!0;var i=this.preg_quote(n);return null!==new RegExp(e+"([0-9]+)_"+t,"i").exec(i)}},{key:"subsite_for_table",value:function(e,t){var n=this.preg_quote(t),i=new RegExp(e+"([0-9]+)_","i").exec(n);return null===i?1:i[1]}},{key:"convertKBSizeToHR",value:function(e,t,n,i){var o,a;if(n=n||1e3,t=t||2,(e=parseFloat(e))<1&&e>0)o=[(e*n).toFixed(0),"B"];else if(n>Math.abs(e))o=[e.toFixed(0),"KB"];else{a=["MB","GB","TB","PB","EB","ZB","YB"];var r=-1;do{e/=n,++r}while(Math.abs(e)>=n&&r<a.length-1);o=[Math.round(e*Math.pow(10,t))/Math.pow(10,t),a[r]]}return i||(o=o[0]+" "+o[1]),o}},{key:"convertKBSizeToHRFixed",value:function(e,t,n){t=t||2;var i=this.convertKBSizeToHR(e,t,n,!0);return"MB"==i[1]?i[0].toFixed(2)+" "+i[1]:i[0]+" "+i[1]}},{key:"ajax_handle_dismissible_notice",value:function(e,t,n){jQuery.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_process_notice_link",nonce:e,notice:jQuery(n).data("notice"),type:jQuery(n).data("type"),reminder:jQuery(n).data("reminder")},beforeSend:t(n)})}},{key:"get_spinner_url",value:function(){var e=ajaxurl.replace("/admin-ajax.php","")+"/images/spinner";return 2<window.devicePixelRatio&&(e+="-2x"),e+=".gif"}},{key:"exclude_post_types_warning",value:function(){var e=i("#select-post-types").val(),t="",n=i(".exclude-post-types-warning");e?(t="<code>"+e.join("</code>, <code>")+"</code>",i(".excluded-post-types").html(t),"0"===n.css("opacity")&&n.css({opacity:0}).slideDown(200).animate({opacity:1})):n.css({opacity:0}).slideUp(200).animate({opacity:0})}}]),e}();t.default=s},function(e,t,n){var i=window.jQuery;Object.defineProperty(t,"__esModule",{value:!0});var o=s(n(3)),a=s(n(12)),r=s(n(13));function s(e){return e&&e.__esModule?e:{default:e}}i=window.jQuery;var c=window.ajaxurl,l=window.wpmdb_strings,p=window.wpmdb_data,d=function(){function e(){(0,a.default)(this,e),this.show_ssl_notice=!1,this.doing_save_profile=!1,this.doing_ajax=!1,this.profile_name_edited=!1,this.migration_intent=null,this.doing_licence_registration_ajax=!1,this.migration_paused=!1,this.last_replace_switch=wpmdb.functions.wpmdb_migration_type(),this.connection_established=!1,this.profile_name_edited=!1,this.checked_licence=!1,this.show_prefix_notice=!1,this.show_ssl_notice=!1,this.force_reconnect=!1,this.migration_selection="",this.show_version_notice=!1,this.migration_completed=!1,this.currently_migrating=!1,this.dump_filename="",this.dump_path="",this.migration_intent="",this.remote_site=null,this.secret_key=null,this.form_data=null,this.stage=null,this.elapsed_interval=null,this.completed_msg=null,this.tables_to_migrate=[],this.migration_paused=!1,this.previous_progress_title="",this.previous_progress_text_primary="",this.previous_progress_text_secondary="",this.cancelling_text="",this.paused_text="",this.migration_cancelled=!1,this.flag_skip_delay=!1,this.delay_between_requests=0,this.fade_duration=400,this.pause_before_finalize=!1,this.is_auto_pause_before_finalize=!1,this.$connection_info_box=i(".connection-info-wrapper"),this.$push_select=window.wpmdb.$push_select=i("#select-tables").clone(),this.$pull_select=window.wpmdb.$pull_select=i("#select-tables").clone(),this.$push_post_type_select=i("#select-post-types").clone(),this.$pull_post_type_select=i("#select-post-types").clone(),this.$push_select_backup=i("#select-backup").clone(),this.$pull_select_backup=i("#select-backup").clone(),this.spinner_url=window.spinner_url=wpmdb.functions.get_spinner_url(),this.ajax_spinner=window.ajax_spinner='<img src="'+this.spinner_url+'" alt="" class="ajax-spinner general-spinner" />'}return(0,r.default)(e,[{key:"pad",value:function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e}},{key:"is_int",value:function(e){return"number"==typeof(e=parseInt(e))&&0==e%1}},{key:"get_intersect",value:function(e,t){var n,i,o=[],a={},r=t.length;for(n=0;n<r;n++)a[t[n]]=!0;for(r=e.length,n=0;n<r;n++)(i=e[n])in a&&o.push(i);return o}},{key:"pin_replace_url",value:function(e){!0===e&&1>i(".replace-row.pin").length&&1===i("#old-url").length&&i("#old-url").parents(".replace-row").addClass("pin"),!1===e&&0<i(".replace-row.pin").length&&i(".replace-row.pin").removeClass("pin")}},{key:"get_ajax_errors",value:function(e,t,n){return wpmdb.functions.wpmdbGetAjaxErrors(l.connection_local_server_problem,t,e,n)}},{key:"refresh_debug_log",value:function(){i.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_get_log",nonce:p.nonces.get_log},error:function(e,t,n){alert(l.update_log_problem)},success:function(e){i(".debug-log-textarea").val(e)}})}},{key:"get_query_var",value:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}},{key:"maybe_show_ssl_warning",value:function(e,t,n){var o=e.substr(0,e.indexOf(":")),a=i(".ssl-notice");if(this.show_ssl_notice||a.hide(),n!==o&&-1!==e.indexOf("https"))return a.show(),this.show_ssl_notice=!0,e=e.replace("https","http"),void i(".pull-push-connection-info").val(e+"\n"+t);this.show_ssl_notice=!1}},{key:"validate_url",value:function(e){return/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)}},{key:"refresh_table_selects",value:function(){void 0!==p&&void 0!==p.this_tables&&void 0!==p.this_table_sizes_hr&&(this.$push_select=this.create_table_select(p.this_tables,p.this_table_sizes_hr,i(wpmdb.$push_select).val())),void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.tables&&void 0!==wpmdb.common.connection_data.table_sizes_hr&&(this.$pull_select=this.create_table_select(wpmdb.common.connection_data.tables,wpmdb.common.connection_data.table_sizes_hr,i(wpmdb.$pull_select).val()))}},{key:"save_active_profile",value:function(){var e,t=this;if(i(".save-settings-button").blur(),!this.doing_save_profile&&!0!==this.maybe_show_select_table_notice()){var n=!1;i("#create_new").is(":checked")&&(n=!0);var o=i(".create-new-profile").val();this.doing_save_profile=!0,e=i(i("#migrate-form")[0].elements).not(".auth-credentials").serialize(),i(".save-settings-button").attr("disabled","disabled").after('<img src="'+this.spinner_url+'" alt="" class="save-profile-ajax-spinner general-spinner" />'),this.doing_ajax=!0,i.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_profile",profile:e,nonce:p.nonces.save_profile},error:function(e,n,o){t.doing_ajax=!1,alert(l.save_profile_problem),i(".save-settings-button").removeAttr("disabled"),i(".save-profile-ajax-spinner").remove(),i(".save-settings-button").after('<span class="ajax-success-msg">'+l.saved+"</span>"),i(".ajax-success-msg").fadeOut(2e3,function(){i(this).remove()}),t.doing_save_profile=!1},success:function(e){var a=parseInt(i("#migrate-form input[name=save_migration_profile_option]:checked").val(),10)+1;if(t.doing_ajax=!1,i(".save-settings-button").removeAttr("disabled"),i(".save-profile-ajax-spinner").remove(),i(".save-settings-button").after('<span class="ajax-success-msg">'+l.saved+"</span>"),i(".ajax-success-msg").fadeOut(2e3,function(){i(this).remove()}),t.doing_save_profile=!1,i(".create-new-profile").val(""),n){var r=parseInt(e,10),s=r+1,c=i('<li><span class="delete-profile" data-profile-id="'+s+'"></span><label for="profile-'+s+'"><input id="profile-'+s+'" value="'+r+'" name="save_migration_profile_option" type="radio"></label></li>');c.find("label").append(document.createTextNode(" "+o)),a=s,i("#create_new").parents("li").before(c),i("#profile-"+s).attr("checked","checked")}var d=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile="+a,m=i("#migrate-form input[name=save_migration_profile_option]:checked").parent().text().trim();if("function"==typeof window.history.pushState){if(i("#migrate-form .crumbs").length)i("#migrate-form .crumbs .crumb:last").text(m);else{var u=i('<div class="crumbs" />').append('<a class="crumb" href="'+p.this_plugin_base+'"> Saved Profiles </a>').append('<span class="crumb">'+m+"</span>");i("#migrate-form").prepend(u)}window.history.pushState({updated_profile_id:a},null,d)}}})}}},{key:"cancel_migration",value:function(e){this.migration_cancelled=!0,this.cancelling_text=l.cancelling_migration,i(".migration-controls").css({visibility:"hidden"}),"find_replace"===this.migration_intent&&(this.cancelling_text=l.cancelling_find_replace),wpmdb.current_migration.setState(this.cancelling_text,l.completing_current_request,"cancelling"),!0===this.migration_paused&&(this.migration_paused=!1,wpmdb.functions.execute_next_step())}},{key:"set_checkbox",value:function(e){var t=i("#"+e),n=t.find("input[type=checkbox]");t.toggleClass("on").find("span").toggleClass("checked");var o=t.find("span.on").hasClass("checked");n.attr("checked",o).trigger("change")}},{key:"move_connection_info_box",value:function(){var e,t,n,o,a,r,s=i(".connection-status"),c=i(".directory-permission-notice"),l=i(".compatibility-older-mysql"),d=i(".mst-required"),m=i(".keep-active-plugins"),u=i(".step-two"),_=i(".backup-options"),h=wpmdb.functions.wpmdb_migration_type();if(s.hide(),c.hide(),u.show(),_.show(),m.show(),l.hide(),d.hide(),wpmdb.functions.wpmdb_toggle_migration_action_text(),i(".migrate-tab").attr("class","migrate-tab content-tab").addClass(wpmdb.functions.wpmdb_migration_type()),i.wpmdb.do_action("move_connection_info_box",{migration_type:h,last_migration_type:this.last_replace_switch}),-1!==i.inArray(h,["push","pull"])){var f=i(".pull-push-connection-info"),g=i.trim(f.val()).split("\n"),b=i("."+h+"-list li");if(b.append(this.$connection_info_box),this.$connection_info_box.show(function(){var e=i(this).find(".pull-push-connection-info");e.val()||e.focus()}),h!==this.last_replace_switch&&2===g.length)return wpmdb.force_reconnect=!0,b.append(this.$connection_info_box),f.removeClass("temp-disabled").attr("readonly","readonly"),i(".connect-button").hide(),void wpmdb.functions.connection_box_changed();this.connection_established?(s.hide(),u.show(),wpmdb.functions.wpmdb_toggle_migration_action_text(),"pull"===h?(t=wpmdb.common.connection_data.prefix,n=p.site_details.prefix,o=p.this_uploads_dir,a=p.this_upload_dir_long,r=p.write_permission):(t=p.this_prefix,n=wpmdb.common.connection_data.prefix,o=wpmdb.common.connection_data.uploads_dir,a=wpmdb.common.connection_data.upload_dir_long,r=wpmdb.common.connection_data.write_permissions),i(".table_prefix").html(t),i(".backup-table-prefix").html(n),i(".uploads-dir").html(o),this.maybe_show_backup_disabled_msg(a,r),!1===this.profile_name_edited&&(e=this.get_domain_name(wpmdb.common.connection_data.url),i(".create-new-profile").val(e))):(s.show(),u.hide())}else if(-1!==i.inArray(h,["find_replace","savefile"]))if(s.hide(),u.show(),i(".table-prefix").html(p.this_prefix),!1===this.profile_name_edited&&i(".create-new-profile").val(""),m.hide(),"savefile"===h)_.hide(),l.show(),"false"===p.write_permission&&(c.show(),u.hide());else{if("true"===p.is_multisite){var w=i(".old-replace-col").eq(1);w.parent().removeClass("pin").find(".replace-remove-row").show(),w.find("input").removeAttr("readonly")}this.maybe_show_backup_disabled_msg(p.this_upload_dir_long,p.write_permission)}this.maybe_show_mixed_cased_table_name_warning()}},{key:"maybe_show_backup_disabled_msg",value:function(e,t){var n=i("#create-backup"),o=i("#create-backup-label"),a=i(".backup-option-disabled");n.removeAttr("disabled"),o.removeClass("disabled"),a.hide(),"false"===t&&(n.prop("checked",!1),n.attr("disabled","disabled"),o.addClass("disabled"),a.show(),i(".upload-directory-location").html(e))}},{key:"change_replace_values",value:function(){var e=null,t=null,n=this;null!==wpmdb.common.previous_connection_data&&"object"===(0,o.default)(wpmdb.common.previous_connection_data)&&wpmdb.common.previous_connection_data.url!==wpmdb.common.connection_data.url&&(e=this.remove_protocol(wpmdb.common.previous_connection_data.url),t=wpmdb.common.previous_connection_data.path),"push"===wpmdb.functions.wpmdb_migration_type()||"savefile"===wpmdb.functions.wpmdb_migration_type()?("pull"===this.last_replace_switch?i(".replace-row").each(function(){var e=i(".old-replace-col input",this).val();i(".old-replace-col input",this).val(i(".replace-right-col input",this).val()),i(".replace-right-col input",this).val(e)}):"push"===this.last_replace_switch&&"push"===wpmdb.functions.wpmdb_migration_type()&&null!==e&&null!==t&&i(".replace-row").each(function(){var o=i(".replace-right-col input",this).val();o===t&&i(".replace-right-col input",this).val(wpmdb.common.connection_data.path),o===e&&i(".replace-right-col input",this).val(n.remove_protocol(wpmdb.common.connection_data.url))}),i.wpmdb.do_action("wpmdb_update_push_table_select"),i("#select-post-types").remove(),i(".exclude-post-types-warning").after(this.$push_post_type_select),wpmdb.functions.exclude_post_types_warning(),i("#select-backup").remove(),i(".backup-tables-wrap").prepend(this.$push_select_backup)):"pull"===wpmdb.functions.wpmdb_migration_type()&&(""===this.last_replace_switch||"push"===this.last_replace_switch||"savefile"===this.last_replace_switch?i(".replace-row").each(function(){var e=i(".old-replace-col input",this).val();i(".old-replace-col input",this).val(i(".replace-right-col input",this).val()),i(".replace-right-col input",this).val(e)}):"pull"===this.last_replace_switch&&"pull"===wpmdb.functions.wpmdb_migration_type()&&null!==e&&null!==t&&i(".replace-row").each(function(){var o=i(".old-replace-col input",this).val();o===t&&i(".old-replace-col input",this).val(wpmdb.common.connection_data.path),o===e&&i(".old-replace-col input",this).val(n.remove_protocol(wpmdb.common.connection_data.url))}),i.wpmdb.do_action("wpmdb_update_pull_table_select"),i("#select-post-types").remove(),i(".exclude-post-types-warning").after(this.$pull_post_type_select),wpmdb.functions.exclude_post_types_warning(),i("#select-backup").remove(),i(".backup-tables-wrap").prepend(this.$pull_select_backup)),this.last_replace_switch=wpmdb.functions.wpmdb_migration_type()}},{key:"switch_to_plugin_tab",value:function(e,t){i(".nav-tab").removeClass("nav-tab-active"),i(".nav-tab."+e).addClass("nav-tab-active"),i(".content-tab").hide(),i("."+e+"-tab").show(),"settings"===e&&!0===this.should_check_licence()&&(i("p.licence-status").append("Checking License... ").append(this.ajax_spinner),this.check_licence()),"help"===e&&(this.refresh_debug_log(),!0===this.should_check_licence()&&(i(".support-content p").append(this.ajax_spinner),this.check_licence())),"addons"===e&&!0!==t&&!0===this.should_check_licence()&&(i(".addons-content p").append(this.ajax_spinner),this.check_licence())}},{key:"hide_overlay",value:function(){i("#overlay").removeClass("show").addClass("hide"),i("#overlay > div").removeClass("show").addClass("hide"),wpmdb.current_migration.$proVersion.find("iframe").remove(),setTimeout(function(){i("#overlay").remove()},500),this.migration_completed=!1}},{key:"check_licence",value:function(e){var t=!this.doing_licence_registration_ajax;this.checked_licence=!0;var n=this;i.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_check_licence",licence:e,context:"all",nonce:p.nonces.check_licence},error:function(e,t,n){alert(l.license_check_problem)},success:function(e){var o,a,r,s=i(".support-content"),c=i(".addons-content"),l=i(".licence-status:not(.notification-message)");if(void 0!==e.dbrains_api_down)a=e.dbrains_api_down+e.message,r=e.dbrains_api_down;else if(void 0!==e.errors){if(void 0!==e.errors.subscription_expired)o=e.errors.subscription_expired.licence,a=e.errors.subscription_expired.support,r=e.errors.subscription_expired.addons;else{var p="";for(var d in e.errors)p+=e.errors[d];a=p,r=p}void 0!==e.addon_content&&(r+="\n"+e.addon_content)}else a=e.message,r=e.addon_content;t&&l.stop().fadeOut(n.fade_duration,function(){void 0===o&&(i(this).css({visibility:"hidden",display:"block"}).slideUp(),o=""),i(this).empty().html(o).stop().fadeIn(n.fade_duration)}),s.stop().fadeOut(n.fade_duration,function(){i(this).empty().html(a).stop().fadeIn(n.fade_duration)}),c.stop().fadeOut(n.fade_duration,function(){i(this).empty().html(r).stop().fadeIn(n.fade_duration)}),i("#plugin-compatibility").is(":not(:checked)")&&i("#compatibility-header").click()}})}},{key:"should_check_licence",value:function(){return!1===this.checked_licence&&"1"===p.has_licence&&"true"===p.is_pro}},{key:"maybe_show_mixed_cased_table_name_warning",value:function(){if(void 0!==wpmdb.common.connection_data&&!1!==wpmdb.common.connection_data){var e=wpmdb.functions.wpmdb_migration_type(),t=wpmdb.functions.get_tables_to_migrate(null,null);i(".mixed-case-table-name-notice").hide(),null!==t&&(t=t.join(""))!==t.toLowerCase()&&("1"===wpmdb.common.connection_data.lower_case_table_names||"push"!==e&&"savefile"!==e)&&("1"!==p.lower_case_table_names&&"pull"===e||("push"===e||"savefile"===e?i(".mixed-case-table-name-notice.push").show():i(".mixed-case-table-name-notice.pull").show()))}}},{key:"enable_pro_licence",value:function(e,t){i(".licence-input, .register-licence").remove(),i(".licence-not-entered").prepend(e.masked_licence),i(".support-content").empty().html("<p>"+l.fetching_license+'<img src="'+this.spinner_url+'" alt="" class="ajax-spinner general-spinner" /></p>'),this.check_licence(t),i(".migrate-selection label").removeClass("disabled"),i(".migrate-selection input").removeAttr("disabled")}},{key:"get_domain_name",value:function(e){return e.replace(/\/\/(.*)@/,"//").replace("http://","").replace("https://","").replace("www.","")}},{key:"update_domain_placeholder",value:function(e,t,n){var i=this.get_domain_name(t);return"completed"===n?e.replace(/\%s\s?/,"<span class=domain-label>"+i+"</span>&nbsp;"):e.replace(/\%s(\S*)\s?/,"<span class=domain-label>"+i+"$1</span>&nbsp;")}},{key:"get_migration_status_label",value:function(e,t,n){var o="",a="";switch(t){case"push":o=l.push_migration_label_migrating,a=l.push_migration_label_completed;break;case"pull":o=l.pull_migration_label_migrating,a=l.pull_migration_label_completed;break;case"find_replace":o=l.find_replace_label_migrating,a=l.find_replace_label_completed;break;case"savefile":o=l.exporting_please_wait,a=l.exporting_complete}var r=o;return"completed"===n&&(r=a),"push"!==t&&"pull"!==t||(r=this.update_domain_placeholder(r,e,n)),r=i.wpmdb.apply_filters("wpmdb_get_migration_status_label",r,{intent:t,stage:n})}},{key:"disable_export_type_controls",value:function(){i(".option-group").each(function(e){i("input",this).attr("disabled","disabled"),i("label",this).css("cursor","default")})}},{key:"enable_export_type_controls",value:function(){i(".option-group").each(function(e){i("input",this).removeAttr("disabled"),i("label",this).css("cursor","pointer")})}},{key:"set_slider_value",value:function(e,t,n,o){var a=t;void 0!==o&&(a=o),i(".slider",e).slider("value",parseInt(t)),i(".amount",e).html(wpmdb.functions.wpmdb_add_commas(a)+" "+n)}},{key:"set_pause_resume_button",value:function(e,t){!0===this.migration_paused?(this.migration_paused=!1,this.doing_ajax=!0,wpmdb.current_migration.setState(this.previous_progress_title,this.previous_progress_text_primary,"active"),i(".pause-resume").html(l.pause),wpmdb.current_migration.resumeTimer(),wpmdb.functions.execute_next_step(t)):(this.migration_paused=!0,this.doing_ajax=!1,this.paused_text=l.migration_paused,this.previous_progress_title=i(".progress-title").html(),this.previous_progress_text_primary=i(".progress-text",".progress-wrapper-primary").html(),this.previous_progress_text_secondary=i(".progress-text",".progress-wrapper-secondary ").html(),"find_replace"===this.migration_intent&&(this.paused_text=l.find_replace_paused),wpmdb.current_migration.setState(this.paused_text,l.completing_current_request,null),i("body").off("click",".pause-resume"),i("body").off("click",".cancel"))}},{key:"filter_temp_tables",value:function(e,t){var n=p.this_temp_prefix;return"pull"===wpmdb.functions.wpmdb_migration_type()&&void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.temp_prefix&&(n=wpmdb.common.connection_data.temp_prefix),n===t.substring(0,n.length)||e}},{key:"get_table_prefix",value:function(e,t){return i(".table-select-wrap .table-prefix").text()}},{key:"lock_replace_url",value:function(e){!0===e?(i('.replace-row.pin .replace-right-col input[type="text"]').attr("readonly","readonly"),i(".replace-row.pin .arrow-col").addClass("disabled")):(i('.replace-row.pin .replace-right-col input[type="text"]').removeAttr("readonly"),i(".replace-row.pin .arrow-col").removeClass("disabled"))}},{key:"set_connection_data",value:function(e){window.wpmdb.common.previous_connection_data=wpmdb.common.connection_data,window.wpmdb.common.connection_data=e,i.wpmdb.do_action("wpmdb_connection_data_updated",e)}},{key:"get_max_request_display_info",value:function(e){var t={unit:"MB"};return t.amount=(e/1024).toFixed(2),t}},{key:"establish_remote_connection_from_saved_profile",value:function(){var e=wpmdb.functions.wpmdb_migration_type(),t=i.trim(i(".pull-push-connection-info").val()).split("\n");if("undefined"!=typeof wpmdb_default_profile&&!0!==wpmdb_default_profile&&"savefile"!==e&&"find_replace"!==e&&"import"!==e&&!this.doing_ajax&&p.is_pro){this.doing_ajax=!0,this.disable_export_type_controls(),i(".connection-status").html(l.establishing_remote_connection),i(".connection-status").removeClass("notification-message error-notice migration-error"),i(".connection-status").append(this.ajax_spinner);var n=wpmdb.functions.wpmdb_migration_type(),o=this;i.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:t[0],key:t[1],intent:n,nonce:p.nonces.verify_connection_to_remote_site,convert_post_type_selection:wpmdb_convert_post_type_selection,profile:p.profile},error:function(e,t,n){i(".connection-status").html(o.get_ajax_errors(e.responseText,"(#102)",e)),i(".connection-status").addClass("notification-message error-notice migration-error"),i(".ajax-spinner").remove(),o.doing_ajax=!1,o.enable_export_type_controls()},success:function(e){if(i(".ajax-spinner").remove(),o.doing_ajax=!1,o.enable_export_type_controls(),void 0!==e.wpmdb_error&&1===e.wpmdb_error)return i(".connection-status").html(e.body),i(".connection-status").addClass("notification-message error-notice migration-error"),void(e.body.indexOf("401 Unauthorized")>-1&&i(".basic-access-auth-wrapper").show());if(!0!==wpmdb.functions.maybe_show_mst_warning(e)){o.maybe_show_ssl_warning(t[0],t[1],e.scheme),wpmdb.functions.maybe_show_prefix_notice(e.prefix),i(".pull-push-connection-info").addClass("temp-disabled"),i(".pull-push-connection-info").attr("readonly","readonly"),i(".connect-button").hide(),i(".connection-status").hide(),i(".step-two").show(),o.connection_established=!0,o.set_connection_data(e),o.move_connection_info_box(),o.maybe_show_mixed_cased_table_name_warning();var n="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables&&(n=wpmdb_loaded_tables),o.$pull_select=wpmdb.functions.create_table_select(wpmdb.common.connection_data.tables,wpmdb.common.connection_data.table_sizes_hr,n);var a="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_post_types&&(void 0!==e.select_post_types?(i("#exclude-post-types").attr("checked","checked"),i(".post-type-select-wrap").show(),a=e.select_post_types):a=wpmdb_loaded_post_types);var r=document.createElement("select");i(r).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),i.each(wpmdb.common.connection_data.post_types,function(e,t){var n=i.inArray(t,a);n=-1!==n||!0===wpmdb_convert_exclude_revisions&&"revision"!==t?' selected="selected" ':" ",i(r).append("<option"+n+'value="'+t+'">'+t+"</option>")}),o.$pull_post_type_select=r;var s="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables_backup&&(s=wpmdb_loaded_tables_backup);var c=document.createElement("select");i(c).attr({multiple:"multiple",name:"select_backup[]",id:"select-backup",class:"multiselect"}),i.each(wpmdb.common.connection_data.tables,function(e,t){var n=i.inArray(t,s);n=-1!==n?' selected="selected" ':" ",i(c).append("<option"+n+'value="'+t+'">'+t+" ("+wpmdb.common.connection_data.table_sizes_hr[t]+")</option>")}),o.$push_select_backup=c,"pull"===wpmdb.functions.wpmdb_migration_type()?(i.wpmdb.do_action("wpmdb_update_pull_table_select"),i("#select-post-types").remove(),i(".exclude-post-types-warning").after(o.$pull_post_type_select),i("#select-backup").remove(),i(".backup-tables-wrap").prepend(o.$pull_select_backup),i(".table-prefix").html(e.prefix),i(".uploads-dir").html(p.this_uploads_dir)):(i("#select-backup").remove(),i(".backup-tables-wrap").prepend(o.$push_select_backup)),i.wpmdb.do_action("verify_connection_to_remote_site",wpmdb.common.connection_data)}else i(".connection-status").hide()}})}}},{key:"migrate_table_recursive",value:function(e,t,n){var o=this,a=n||0;if(a>=this.tables_to_migrate.length)if("upload"===this.stage&&wpmdb.current_migration.model.getStageItems("find_replace").length)this.stage="find_replace",this.tables_to_migrate=wpmdb.current_migration.model.getStageItems("find_replace","name"),this.tables_to_migrate=this.tables_to_migrate.map(function(e){return"_mig_"+e}),a=0;else{if("backup"!==this.stage)return i(".progress-label").removeClass("label-visible"),wpmdb.common.hooks=i.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",wpmdb.common.hooks),wpmdb.common.hooks.push(wpmdb.functions.migration_complete),wpmdb.common.hooks.push(wpmdb.functions.wpmdb_flush),wpmdb.common.hooks=i.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",wpmdb.common.hooks),wpmdb.common.hooks.push(wpmdb.functions.migration_complete_events),wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},void wpmdb.functions.execute_next_step();if(-1!==i.inArray(this.migration_intent,["push","pull"])?this.stage="migrate":"import"===this.migration_intent?this.stage="upload":this.stage=this.migration_intent,wpmdb.current_migration.model.setActiveStage(this.stage),"find_replace"!==this.stage&&"migrate"!==this.stage)return void wpmdb.functions.wpmdb_call_next_hook();a=0,this.tables_to_migrate=wpmdb.functions.get_tables_to_migrate(null,null)}var r=0;a===this.tables_to_migrate.length-1&&(r=1);var s=0;-1!==i.inArray(this.migration_intent,["push","pull"])&&1===parseInt(wpmdb.common.connection_data.gzip)&&(s=1);var d={action:"wpmdb_migrate_table",migration_state_id:wpmdb.migration_state_id,table:this.tables_to_migrate[a],stage:this.stage,current_row:e,last_table:r,primary_keys:t,gzip:s,nonce:p.nonces.migrate_table};-1!==i.inArray(this.migration_intent,["push","pull"])&&(d.bottleneck=wpmdb.common.connection_data.bottleneck,d.prefix=wpmdb.common.connection_data.prefix),wpmdb.common.connection_data&&wpmdb.common.connection_data.path_current_site&&wpmdb.common.connection_data.domain&&(d.path_current_site=wpmdb.common.connection_data.path_current_site,d.domain_current_site=wpmdb.common.connection_data.domain),this.doing_ajax=!0,i.ajax({url:c,type:"POST",dataType:"text",cache:!1,timeout:0,data:d,error:function(e,t,n){var i=l.table_process_problem+" "+o.tables_to_migrate[a]+"<br /><br />"+l.status+": "+e.status+" "+e.statusText+"<br /><br />"+l.response+":<br />"+e.responseText;wpmdb.current_migration.setState(l.migration_failed,i,"error"),o.doing_ajax=!1,console.log(e),console.log(t),console.log(n),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(e){o.doing_ajax=!1,e=i.trim(e);var t=wpmdb.functions.wpmdb_parse_json(e),n="";if(!1===t||null===t)return n=""===e||null===e?l.table_process_problem_empty_response+" "+o.tables_to_migrate[a]:o.get_ajax_errors(e,null,null),wpmdb.current_migration.setState(l.migration_failed,n,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();if(void 0!==t.wpmdb_error&&1===t.wpmdb_error)return wpmdb.current_migration.setState(l.migration_failed,t.body,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();var s=o.tables_to_migrate[a];"import"===o.migration_intent&&"find_replace"===o.stage&&(s=s.replace(p.this_temp_prefix,"")),wpmdb.current_migration.setText(),wpmdb.current_migration.model.getStageModel(o.stage).setItemRowsTransferred(s,t.current_row),1===r&&"savefile"===o.migration_intent&&(void 0!==t.dump_filename&&(o.dump_filename=t.dump_filename),void 0!==t.dump_path&&(o.dump_path=t.dump_path)),-1===parseInt(t.current_row)&&(a++,t.current_row="",t.primary_keys=""),wpmdb.common.next_step_in_migration={fn:wpmdb.functions.migrate_table_recursive,args:[t.current_row,t.primary_keys,a]},wpmdb.functions.execute_next_step()}})}},{key:"migration_complete_events",value:function(){if(!1===wpmdb.common.migration_error)if(""===wpmdb.common.non_fatal_errors)if("savefile"!==this.migration_intent&&!0===i("#save_computer").is(":checked")&&wpmdb.current_migration.setText(),this.completed_msg=this.completed_msg+'&nbsp;<div class="dashicons dashicons-yes"></div>',!0===this.migration_cancelled){var e=l.migration_cancelled_success;"find_replace"===this.migration_intent&&(e=l.find_replace_cancelled_success),wpmdb.current_migration.setState(this.completed_msg,e,"cancelled")}else wpmdb.current_migration.setState(this.completed_msg,"","complete");else wpmdb.current_migration.setState(l.completed_with_some_errors,wpmdb.common.non_fatal_errors,"error");i(".migration-controls").addClass("hidden"),wpmdb.common.hooks=[],wpmdb.common.call_stack=[],wpmdb.common.migration_error=!1,this.currently_migrating=!1,this.migration_completed=!0,this.migration_paused=!1,this.migration_cancelled=!1,this.doing_ajax=!1,wpmdb.common.non_fatal_errors="",this.tables_to_migrate=[],i(".progress-label").remove(),i(".migration-progress-ajax-spinner").remove(),i(".close-progress-content").show(),i("#overlay").css("cursor","pointer"),wpmdb.current_migration.model.setMigrationComplete()}},{key:"migration_complete",value:function(){var e=this;if(i(".migration-controls").addClass("hidden"),"savefile"===this.migration_intent){this.currently_migrating=!1;var t=l.migration_complete;if(i("#save_computer").is(":checked")){var n=p.this_download_url+encodeURIComponent(this.dump_filename);i("#gzip_file").is(":checked")&&(n+="&gzip=1"),window.location=n}else t=l.completed_dump_located_at+" "+this.dump_path;!1===wpmdb.common.migration_error&&(wpmdb.functions.migration_complete_events(),wpmdb.current_migration.setState(this.completed_msg,t,"complete"))}else{wpmdb.current_migration.setState(null,l.finalizing_migration,"finalizing");var o={action:"wpmdb_finalize_migration",migration_state_id:wpmdb.migration_state_id,tables:this.tables_to_migrate.join(","),nonce:p.nonces.finalize_migration};-1!==i.inArray(this.migration_intent,["push","pull"])&&(o.prefix=wpmdb.common.connection_data.prefix),this.doing_ajax=!0,i.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:o,error:function(t,n,i){e.doing_ajax=!1,wpmdb.current_migration.setState(l.migration_failed,l.finalize_tables_problem,"error"),alert(t+" : "+n+" : "+i),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,"1"!==i.trim(t))return wpmdb.current_migration.setState(l.migration_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},wpmdb.functions.execute_next_step()}})}}},{key:"wpmdb_flush",value:function(){var e=this;"savefile"!==this.migration_intent&&(wpmdb.current_migration.setText(l.flushing),this.doing_ajax=!0,i.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:wpmdb.migration_state_id,nonce:p.nonces.flush},error:function(t,n,i){e.doing_ajax=!1,wpmdb.current_migration.setState(l.migration_failed,l.flush_problem,"error"),alert(t+" : "+n+" : "+i),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,"1"!==i.trim(t))return wpmdb.current_migration.setState(l.migration_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},wpmdb.functions.execute_next_step()}}))}},{key:"execute_next_step",value:function(){var e=this;if(0<this.delay_between_requests&&!1===this.flag_skip_delay)setTimeout(function(){this.flag_skip_delay=!0,wpmdb.functions.execute_next_step()},this.delay_between_requests);else if(this.flag_skip_delay=!1,!0===this.migration_paused){i(".migration-progress-ajax-spinner").hide(),wpmdb.current_migration.pauseTimer();var t="";!0===this.is_auto_pause_before_finalize?(t=l.paused_before_finalize,this.is_auto_pause_before_finalize=!1,"find_replace"===wpmdb.functions.wpmdb_migration_type()&&(t=l.find_replace_paused_before_finalize)):t=l.paused,wpmdb.current_migration.setState(null,t,"paused"),i("body").on("click",".pause-resume",function(e){this.set_pause_resume_button(e)}),i("body").on("click",".cancel",function(e){this.cancel_migration(e)}),i(".pause-resume").html(l.resume)}else if(!0===this.migration_cancelled){var n;this.migration_intent=wpmdb.functions.wpmdb_migration_type(),"savefile"===this.migration_intent?n=l.removing_local_sql:"pull"===this.migration_intent?n="backup"===this.stage?l.removing_local_backup:l.removing_local_temp_tables:"push"===this.migration_intent&&(n="backup"===this.stage?l.removing_remote_sql:l.removing_remote_temp_tables),wpmdb.current_migration.setText(n);var o={action:"wpmdb_cancel_migration",migration_state_id:wpmdb.migration_state_id,nonce:p.nonces.cancel_migration};this.doing_ajax=!0,i.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:o,error:function(t,n,i){wpmdb.current_migration.setState(l.migration_cancellation_failed,l.manually_remove_temp_files+"<br /><br />"+l.status+": "+t.status+" "+t.statusText+"<br /><br />"+l.response+":<br />"+t.responseText,"error"),console.log(t),console.log(n),console.log(i),e.doing_ajax=!1,wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,t=i.trim(t),"push"===e.migration_intent&&"1"!==t||"push"!==e.migration_intent&&""!==t)return void 0!==t&&void 0!==t.wpmdb_error&&1===t.wpmdb_error&&(t=t.wpmdb_error),wpmdb.current_migration.setState(l.migration_cancellation_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();e.completed_msg=l.migration_cancelled,"find_replace"===e.migration_intent&&(e.completed_msg=l.find_replace_cancelled),wpmdb.functions.migration_complete_events(),wpmdb.current_migration.setStatus("cancelled")}})}else wpmdb.common.next_step_in_migration.fn.apply(null,wpmdb.common.next_step_in_migration.args)}},{key:"maybe_show_prefix_notice",value:function(e){var t=i(".prefix-notice");t.hide(),e!==p.this_prefix&&(i(".remote-prefix").html(e),this.show_prefix_notice=!0,t.show())}},{key:"maybe_show_select_table_notice",value:function(){if(i("#migrate-selected").is(":checked")&&null===i("#select-tables").val()){if("import"!==wpmdb.functions.wpmdb_migration_type())return alert(l.please_select_one_table),!0;if(i("#import-find-replace").is(":checked")&&i("#select-tables").is(":visible"))return alert(l.please_select_one_table_import),!0}return!("savefile"===wpmdb.functions.wpmdb_migration_type()||!i("#backup-manual-select").is(":checked")||null!==i("#select-backup").val())&&(alert(l.please_select_one_table_backup),!0)}},{key:"remove_protocol",value:function(e){return e.replace(/^https?:/i,"")}},{key:"create_table_select",value:function(e,t,n){var o=document.createElement("select");return i(o).attr({multiple:"multiple",name:"select_tables[]",id:"select-tables",class:"multiselect"}),0<e.length&&i.each(e,function(e,a){if(!i.wpmdb.apply_filters("wpmdb_exclude_table",!1,a)){var r=" ";void 0!==n&&null!==n&&0<n.length&&-1!==i.inArray(a,n)&&(r=' selected="selected" ');var s="";0!==t.length&&(s=" ("+t[a]+")"),i(o).append("<option"+r+'value="'+a+'">'+a+s+"</option>")}}),o}},{key:"get_tables_to_migrate",value:function(){var e=[],t=wpmdb.functions.wpmdb_migration_type();return"migrate_select"===i("input[name=table_migrate_option]:checked").val()?e=i("#select-tables").val():"pull"!==t&&void 0!==p.this_prefixed_tables?e=p.this_prefixed_tables:"pull"===t&&void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.prefixed_tables&&(e=wpmdb.common.connection_data.prefixed_tables),e}},{key:"update_migrate_button_text",value:function(){var e=wpmdb.functions.wpmdb_migration_type(),t=i("#save-migration-profile").is(":checked")?"_save":"",n="migrate_button_"+("savefile"===e?"export":e)+t;i(".migrate-db .button-primary").val(l[n])}},{key:"connection_box_changed",value:function(){var e=this,t=i(".pull-push-connection-info");if(-1!==i.inArray(wpmdb.functions.wpmdb_migration_type(),["push","pull"])&&(!this.doing_ajax&&!i(t).hasClass("temp-disabled")||!1!==wpmdb.force_reconnect)){wpmdb.force_reconnect=!1;var n=i(".pull-push-connection-info").val(),o=i.trim(n).split("\n"),a=!1,r="";if(""===o&&(a=!0,r=l.connection_info_missing),1===o.length&&!a){var s=i.trim(n).split(" ");2===s.length&&(o=s)}2===o.length||a||(a=!0,r=l.connection_info_incorrect),a||this.validate_url(o[0])||(a=!0,r=l.connection_info_url_invalid);var d=0;if(void 0!==o[1]&&(d=o[1].length),a||32===d||40===d||(a=!0,r=l.connection_info_key_invalid),a||o[0]!==p.connection_info[0]||(a=!0,r=l.connection_info_local_url),a||o[1]!==p.connection_info[1]||(a=!0,r=l.connection_info_local_key),a)return i(".connection-status").html(r),void i(".connection-status").addClass("notification-message error-notice migration-error");var m=o[0]+"\n"+o[1];1===i.trim(n).split("\n").length&&i(".pull-push-connection-info").val(m),!1===p.openssl_available&&(o[0]=o[0].replace("https://","http://"),m=o[0]+"\n"+o[1],i(".pull-push-connection-info").val(m)),this.show_prefix_notice=!1,this.doing_ajax=!0,this.disable_export_type_controls(),i(".basic-access-auth-wrapper").is(":visible")&&(o[0]=o[0].replace(/\/\/(.*)@/,"//"),o[0]=o[0].replace("//","//"+encodeURIComponent(i.trim(i(".auth-username").val()))+":"+encodeURIComponent(i.trim(i(".auth-password").val()))+"@"),m=o[0]+"\n"+o[1],i(".pull-push-connection-info").val(m),i(".basic-access-auth-wrapper").hide()),i(".step-two").hide(),i(".ssl-notice").hide(),i(".prefix-notice").hide(),i(".connection-status").show(),i(".connection-status").html(l.establishing_remote_connection),i(".connection-status").removeClass("notification-message error-notice migration-error"),i(".connection-status").append(this.ajax_spinner);var u=wpmdb.functions.wpmdb_migration_type();return this.profile_name_edited=!1,i.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:o[0],key:o[1],intent:u,nonce:p.nonces.verify_connection_to_remote_site},error:function(t,n,o){i(".connection-status").html(e.get_ajax_errors(t.responseText,"(#100)",t)),i(".connection-status").addClass("notification-message error-notice migration-error"),i(".ajax-spinner").remove(),e.doing_ajax=!1,e.enable_export_type_controls()},success:function(t){if(i(".ajax-spinner").remove(),e.doing_ajax=!1,e.enable_export_type_controls(),void 0!==t.wpmdb_error&&1===t.wpmdb_error)return i(".connection-status").html(t.body),i(".connection-status").addClass("notification-message error-notice migration-error"),t.body.indexOf("401 Unauthorized")>-1&&i(".basic-access-auth-wrapper").show(),void(i(".pull-push-connection-info").hasClass("temp-disabled")||i(".connect-button").is(":visible")||(i(".pull-push-connection-info").removeAttr("readonly"),i(".connect-button").show()));if(!0!==wpmdb.functions.maybe_show_mst_warning(t)){e.maybe_show_ssl_warning(o[0],o[1],t.scheme);var n=e.get_domain_name(t.url);i(".create-new-profile").val(n),i(".pull-push-connection-info").addClass("temp-disabled"),i(".pull-push-connection-info").attr("readonly","readonly"),i(".connect-button").hide(),i(".connection-status").hide(),i(".step-two").show(),wpmdb.functions.maybe_show_prefix_notice(t.prefix),e.connection_established=!0,e.set_connection_data(t),e.move_connection_info_box(),e.change_replace_values(),e.maybe_show_mixed_cased_table_name_warning(),e.refresh_table_selects(null,null,e),e.$push_select_backup=i(e.$pull_select).clone(),i(e.$push_select_backup).attr({name:"select_backup[]",id:"select-backup"});var a=document.createElement("select");i(a).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),i.each(wpmdb.common.connection_data.post_types,function(e,t){i(a).append('<option value="'+t+'">'+t+"</option>")}),e.$pull_post_type_select=a,i("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===wpmdb.functions.wpmdb_migration_type()?(i("#new-url").val(e.remove_protocol(p.this_url)),i("#new-path").val(p.this_path),"true"===p.is_multisite&&(i("#new-domain").val(p.this_domain),i('.replace-row.pin .old-replace-col input[type="text"]').val(e.remove_protocol(t.url))),i("#old-url").val(e.remove_protocol(t.url)),i("#old-path").val(t.path),i.wpmdb.do_action("wpmdb_update_pull_table_select"),i("#select-post-types").remove(),i(".exclude-post-types-warning").after(e.$pull_post_type_select),wpmdb.functions.exclude_post_types_warning(),i(".table-prefix").html(t.prefix),i(".backup-table-prefix").html(p.site_details.prefix),i(".uploads-dir").html(p.this_uploads_dir)):(i("#new-url").val(e.remove_protocol(t.url)),i("#new-path").val(t.path),"true"===p.is_multisite&&i('.replace-row.pin .old-replace-col input[type="text"]').val(e.remove_protocol(p.this_url)),i.wpmdb.do_action("wpmdb_update_push_table_select"),i("#select-backup").remove(),i(".backup-tables-wrap").prepend(e.$push_select_backup)),wpmdb.common.next_step_in_migration={fn:i.wpmdb.do_action,args:["verify_connection_to_remote_site",wpmdb.common.connection_data]},wpmdb.functions.execute_next_step()}else i(".connection-status").hide()}})}}}]),e}();t.default=d},function(e,t){window.jQuery;jQuery.wpmdb={hooks:{action:{},filter:{}},add_action:function(e,t,n,i){jQuery.wpmdb.add_hook("action",e,t,n,i)},add_filter:function(e,t,n,i){jQuery.wpmdb.add_hook("filter",e,t,n,i)},do_action:function(e,t){jQuery.wpmdb.do_hook("action",e,null,t)},apply_filters:function(e,t,n){return jQuery.wpmdb.do_hook("filter",e,t,n)},remove_action:function(e,t){jQuery.wpmdb.remove_hook("action",e,t)},remove_filter:function(e,t){jQuery.wpmdb.remove_hook("filter",e,t)},add_hook:function(e,t,n,i,o){void 0===jQuery.wpmdb.hooks[e][t]&&(jQuery.wpmdb.hooks[e][t]=[]);var a=jQuery.wpmdb.hooks[e][t];void 0===i&&(i=t+"_"+a.length),jQuery.wpmdb.hooks[e][t].push({tag:i,callable:n,instance:o})},do_hook:function(e,t,n,i){if(void 0!==jQuery.wpmdb.hooks[e][t])for(var o=jQuery.wpmdb.hooks[e][t],a=0;a<o.length;a++)"action"===e?o[a].callable.call(o[a].instance,i,o[a].instance):n=o[a].callable.call(o[a].instance,n,i,o[a].instance);if("filter"===e)return n},remove_hook:function(e,t,n){if(void 0!==jQuery.wpmdb.hooks[e][t])for(var i=jQuery.wpmdb.hooks[e][t],o=i.length-1;0<o;o--)void 0!==n&&n!==i[o].tag||i.splice(o,1)}}},function(e,t){window.jQuery;!function(e,t){var n=!1,i=e("#select-tables").clone(),o=[],a=[],r=!1,s="",c={},l='<img src="'+t.functions.get_spinner_url()+'" alt="" class="ajax-spinner general-spinner" />';function p(){var t=e(".find-replace-rows");return e("#import-find-replace").is(":checked")?t.show():t.hide()}e.wpmdb.add_filter("wpmdb_get_migration_status_label",function(e,t){return"import"===t.intent&&(e="completed"===t.stage?wpmdb_strings.import_label_completed:wpmdb_strings.import_label_migrating),e}),e.wpmdb.add_action("move_connection_info_box",function(t){var i=e(".import-file-status");"import"===t.migration_type?(n?r&&e(".unrecognized-import-file-notice").show():(e(".step-two").hide(),i.hasClass("profile-loaded")?(i.attr("class","import-file-status profile-loaded notification-message success-notice"),i.html(wpmdb_strings.import_profile_loaded)):i.html(wpmdb_strings.please_select_sql_file),i.show()),p(),e(".mst-options").hide(),e(".import-find-replace-option, .import-active-plugin-option").show()):(e('.find-replace-rows, .table-options, .advanced-options, .exclude-post-types-options, label[for="backup-selected"]').show(),e(".import-find-replace-option, .find-replace-options, .import-file-status, .import-active-plugin-option, .unrecognized-import-file-notice").hide(),"search_all_imported"===e("input[name=table_migrate_option]:checked").val()&&e("input[name=table_migrate_option][value=migrate_only_with_prefix]").prop("checked",!0))}),e.wpmdb.add_action("wpmdb_migration_initiated",function(e){"import"===t.functions.wpmdb_migration_type()&&("backup"===e&&t.common.hooks.push(t.functions.migrate_table_recursive),t.common.hooks.push(t.functions.upload_file_recursive),t.common.next_step_in_migration={fn:t.functions.wpmdb_call_next_hook},t.functions.execute_next_step())}),e.wpmdb.add_action("wpmdb_update_import_table_select",function(){e("#select-tables").remove(),e(".select-tables-wrap").prepend(i),e("#select-tables").change()}),e.wpmdb.add_filter("wpmdb_backup_selected_tables",function(e){return"import"===t.functions.wpmdb_migration_type()&&(e=a),e}),e.wpmdb.add_action("wpmdb_add_migration_stages",function(n){"import"===t.functions.wpmdb_migration_type()&&(t.current_migration.model.addStage("upload",[],"local",{strings:{stage_title:wpmdb_strings.upload}}),t.current_migration.model.addStage("import",[],"local",{strings:{stage_title:wpmdb_strings.migrate_button_import}}),e("#import-find-replace").is(":checked")&&(o=n.tables_to_migrate,t.current_migration.model.addStage("find_replace",[],"local",{strings:{migrated:wpmdb_strings.searched,stage_title:wpmdb_strings.migrate_button_find_replace}})))}),e.wpmdb.add_filter("wpmdb_initiate_migration_request_data",function(e){return"import"===t.functions.wpmdb_migration_type()&&(e.import_info=c),e}),e("#import-file").on("change",function(o){var d=o.target.files,m=d[0],u=new FileReader,_=e(".import-file-status"),h=e('label[for="backup-selected"]'),f=e(".prefix-notice"),g=e(".unrecognized-import-file-notice"),b=e(".step-two"),w=e("#old-url"),v=e("#old-path"),y=e("#new-url"),x=e("#new-path");if(_.hide().attr("class","import-file-status"),f.hide(),g.hide(),b.hide(),e(".mst-required ").hide(),d.length){if(".sql"!==m.name.slice(-4)&&".sql.gz"!==m.name.slice(-7))return _.addClass("notification-message error-notice migration-error").text(wpmdb_strings.invalid_sql_file).show(),void b.hide();n=!0,s="",_.text(wpmdb_strings.parsing_sql_file).append(l).show(),u.onloadend=function(n){n.target.readyState===FileReader.DONE&&e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_get_import_info",file_data:n.target.result,nonce:wpmdb_data.nonces.import_file},error:function(e,t,n){console.log(e,t,n)},success:function(n){if(e(".ajax-spinner").remove(),_.hide(),!0!==t.functions.maybe_show_mst_warning(n))if(b.show(),void 0!==n.wpmdb_error&&1===n.wpmdb_error)_.text(n.body).addClass("notification-message error-notice migration-error").show(),b.hide();else{var o=t.functions.get_localStorage_form_data();if(c=n,void 0!==n.prefix&&(s=n.prefix,e(".table-prefix").text(n.prefix),t.functions.maybe_show_prefix_notice(n.prefix)),void 0!==n.tables){a=n.tables,h.show(),o||(w.val(t.functions.remove_protocol(n.URL)),v.val(n.path),y.val(t.functions.remove_protocol(wpmdb_data.this_url)),x.val(wpmdb_data.this_path));var l=[],d=[];if(o?(l=o.select_tables,d=o.select_post_types,t.functions.remove_localStorage_form_data()):"migrate_only_with_prefix"!==e("input[name=table_migrate_option]:checked").val()||_.hasClass("profile-loaded")||e("input[name=table_migrate_option][value=search_all_imported]").prop("checked",!0),!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables&&(l=wpmdb_loaded_tables,d=wpmdb_loaded_post_types),i=t.functions.create_table_select(n.tables,[],l),e.wpmdb.do_action("wpmdb_update_import_table_select"),void 0!==n.post_types){var m=document.createElement("select");e(m).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),e.each(n.post_types,function(t,n){var i=e.inArray(n,d);i=-1!==i||!0===wpmdb_convert_exclude_revisions&&"revision"!==n;var o=document.createElement("option");o.value=n,o.text=n,o.selected=i,m.add(o,null)}),e("#select-post-types").remove(),e(".exclude-post-types-warning").after(m)}r&&(r=!1,p())}else g.show(),h.hide(),e(".table-options").hide(),r=!0,y.val(w.val()),x.val(v.val()),w.val(""),v.val("")}}})};var k=m.slice(0,1024e3);u.readAsDataURL(k)}else n&&(b.hide(),_.text(wpmdb_strings.please_select_sql_file).show(),n=!1)}),e("#import-find-replace").on("click",p),e(".find-replace-options-toggle").on("click",function(){r&&setTimeout(function(){e(".find-replace-options-toggle .expand-collapse-arrow").hasClass("collapsed")||e(".table-options").hide()},1)}),e("input[name=keep_active_plugins]").on("click",function(){e("input[name=keep_active_plugins]").prop("checked",e(this).is(":checked"))}),t.functions.upload_file_recursive=function(n){n=void 0===n?0:n;var i=document.getElementById("import-file").files[0],o=n+1024e3+1,a=new FileReader;0===n&&t.current_migration.model.addStageItem("upload",i.name,i.size/1e3,Math.ceil(i.size/1024e3)),a.onloadend=function(a){a.target.readyState===FileReader.DONE&&e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_upload_file",file_data:a.target.result,file:i.name,file_type:i.type,migration_state_id:t.migration_state_id,stage:"import",import_info:c,nonce:wpmdb_data.nonces.import_file},error:function(e,n,i){console.log(e,n,i),t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(e){if(t.current_migration.setText(),void 0!==e.wpmdb_error&&1===e.wpmdb_error)return t.common.migration_error=!0,t.functions.migration_complete_events(),void t.current_migration.setState(wpmdb_strings.migration_failed,e.body,"error");var a=n+1024e3;t.current_migration.setText(wpmdb_strings.uploading_file_to_server),t.current_migration.model.getStageModel("upload").setItemRowsTransferred(i.name,Math.ceil(a/1024e3)),o<i.size?t.common.next_step_in_migration={fn:t.functions.upload_file_recursive,args:[o]}:t.common.next_step_in_migration={fn:t.functions.upload_import_successful,args:[i]},t.functions.execute_next_step()}})};var r=i.slice(n,o);a.readAsDataURL(r)},t.functions.upload_import_successful=function(n){e.ajax({type:"POST",url:ajaxurl,data:{action:"wpmdb_prepare_import_file",migration_state_id:t.migration_state_id,nonce:wpmdb_data.nonces.import_file},dataType:"json",error:function(e,n,i){console.log(e,n,i),t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(e){var i=n.name,o=wpmdb_strings.importing_file_to_db;".gz"===i.slice(-3)&&(i=n.name.slice(0,-3)),o=o.replace(/\%s\s?/,i),t.current_migration.setText(o),t.current_migration.model.addStageItem("import",i,e.import_size/1e3,e.num_chunks),t.current_migration.model.setActiveStage("import"),t.common.next_step_in_migration={fn:t.functions.import_file_recursive,args:[{import_filename:e.import_file,item_name:i,chunk:0,current_query:""}]},t.functions.execute_next_step()}})},t.functions.import_file_recursive=function(n){e.ajax({type:"POST",url:ajaxurl,data:{action:"wpmdb_import_file",migration_state_id:t.migration_state_id,chunk:n.chunk,current_query:n.current_query,import_file:n.import_filename,nonce:wpmdb_data.nonces.import_file},dataType:"json",error:function(e,n,i){console.log(e,n,i),t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(i){if(void 0!==i.wpmdb_error&&1===i.wpmdb_error)return t.common.migration_error=!0,t.functions.migration_complete_events(),void t.current_migration.setState(wpmdb_strings.migration_failed,i.body,"error");if(t.current_migration.model.getStageModel("import").setItemRowsTransferred(n.item_name,i.chunk),i.chunk>=i.num_chunks){if(t.current_migration.model.getStageModel("import").setItemRowsTransferred(n.item_name,++i.chunk),e("#import-find-replace").is(":checked")){if(r)e.each(i.table_sizes,function(e,n){if(e.startsWith(wpmdb_data.this_temp_prefix)&&wpmdb_data.alter_table_name!==e){var o=e.replace(wpmdb_data.this_temp_prefix,"");t.current_migration.model.addStageItem("find_replace",o,i.table_sizes[e],i.table_rows[e])}});else{var c=e("input[name=table_migrate_option]:checked").val();"migrate_only_with_prefix"===c?o=a.filter(function(e){return s===e.substring(0,s.length)}):"search_all_imported"===c&&(o=a),e.each(o,function(e,n){var o=wpmdb_data.this_temp_prefix+n;i.table_sizes.hasOwnProperty(o)&&t.current_migration.model.addStageItem("find_replace",n,i.table_sizes[o],i.table_rows[o])})}o=[],t.current_migration.model.setActiveStage("find_replace");var l=t.functions.get_tables_to_migrate();return t.common.next_step_in_migration={fn:t.functions.migrate_table_recursive,args:["-1","",l.length]},void t.functions.execute_next_step()}e(".progress-label").removeClass("label-visible"),t.common.hooks=e.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",t.common.hooks),t.common.hooks.push(t.functions.migration_complete),t.common.hooks.push(t.functions.wpmdb_flush),t.common.hooks=e.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",t.common.hooks),t.common.hooks.push(t.functions.migration_complete_events),t.common.next_step_in_migration={fn:t.functions.wpmdb_call_next_hook}}else t.common.next_step_in_migration={fn:t.functions.import_file_recursive,args:[{import_filename:n.import_filename,item_name:n.item_name,chunk:i.chunk,current_query:i.current_query}]};t.functions.execute_next_step()}})},t.functions.get_tables_to_import=function(){return a}}(jQuery,wpmdb)},function(e,t){window.jQuery;!function(e,t){e(document).ready(function(){t.functions.localStorage_available=function(){try{return localStorage.setItem("wpmdb_test","wpmdb_test"),localStorage.removeItem("wpmdb_test","wpmdb_test"),!0}catch(e){return!1}},t.functions.maybe_reload_page=function(){var n=t.functions.wpmdb_migration_type();if(t.functions.localStorage_available()&&"cancelled"!==t.current_migration.status&&!0!==t.common.migration_error&&!e(".progress-overlay-container").hasClass("wpmdb-error")&&-1!==e.inArray(n,["pull","import","find_replace"])&&("true"!==wpmdb_data.is_multisite||!e("#mst-select-subsite").is(":checked")||wpmdb_data.this_domain===e("#mst-selected-subsite option:selected").text())){var i=t.functions.get_tables_to_migrate();"import"===n&&(i=t.functions.get_tables_to_import()),-1===e.inArray(wpmdb_data.this_prefix+"options",i)&&-1===e.inArray(wpmdb_data.this_prefix+"usermeta",i)||(t.functions.set_localStorage_form_data(),location.reload())}},t.functions.set_localStorage_form_data=function(){var t={};e.each(e("#migrate-form").serializeArray(),function(e,n){if("[]"===n.name.substr(-2)){var i=n.name.slice(0,-2);void 0===t[i]&&(t[i]=[]),t[i].push(n.value)}else t[n.name]=n.value}),localStorage.setItem("wpmdb_migrate_form",JSON.stringify(t))},t.functions.get_localStorage_form_data=function(){var e=localStorage.getItem("wpmdb_migrate_form");if(null===e)return!1;try{e=JSON.parse(e)}catch(e){return!1}return e},t.functions.remove_localStorage_form_data=function(){localStorage.removeItem("wpmdb_migrate_form")},t.functions.load_data_from_localStorage=function(){var n=t.functions.get_localStorage_form_data();n&&(e.each(n,function(n,i){var o=e('[name="'+n+'"]'),a=o.attr("type");"action"===n?(t.migration_selection=i,e("#"+i).prop("checked",!0)):"radio"===a?e('[name="'+n+'"][value="'+i+'"]').prop("checked",!0):"checkbox"===a?(o.prop("checked",!0),o.parent().hasClass("checkbox-label")&&o.parent().next().show()):o.val(i)}),e(".option-group input[type=radio]").change(),e("."+t.migration_selection+"-list ul").show(),e.when(t.functions.connection_box_changed()).done(function(){if("migrate_select"===e("input[name=table_migrate_option]:checked").val()?(void 0!==n.select_tables&&e("#select-tables").val(n.select_tables),e(".table-options .expandable-content, .select-tables-wrap").show(),e(".table-options .expand-collapse-arrow").removeClass("collapsed")):e(".select-tables-wrap").hide(),"backup_manual_select"===e("input[name=backup_option]:checked").val()&&(void 0!==n.select_backup&&e("#select-backup").val(n.select_backup),e(".backup-tables-wrap").show()),void 0!==n.select_post_types&&(e("#select-post-types").val(n.select_post_types),t.functions.exclude_post_types_warning()),void 0!==n.replace_old){e(".replace-row").not(".original-repeatable-field").remove();var i=1;e.each(n.replace_old,function(t,o){e(".replace-row:nth-child("+i+")").length||e(".replace-row").last().after(e(".original-repeatable-field").clone().removeClass("original-repeatable-field")),e(".replace-row:nth-child("+i+') [name="replace_old[]"]').val(o),e(".replace-row:nth-child("+i+') [name="replace_new[]"]').val(n.replace_new[t]),i++})}}),t.functions.update_migrate_button_text(),"import"!==t.functions.wpmdb_migration_type()&&t.functions.remove_localStorage_form_data())},t.functions.load_data_from_localStorage()})}(jQuery,wpmdb)},function(e,t,n){var i=window.jQuery,o=function(e){return e&&e.__esModule?e:{default:e}}(n(3));i=jQuery;var a=n(56),r=n(58),s=i('<div id="overlay" class="hide"></div>'),c=i(".progress-content").clone().addClass("hide"),l=i(".pro-version").addClass("hide");s.append(l);var p={migration:{model:{},view:{},$progress:{},$wrapper:{},$overlay:{},status:"active",title:"",text:"",timerCount:0,timerStart:0,elapsedInterval:0,currentStageNum:0,counterDisplay:!1,originalTitle:document.title,setTitle:function(e){this.$progress.find(".progress-title").html(e),this.title=e},setStatus:function(e){this.$progress.removeClass(this.status).addClass("error"===e?"wpmdb-error":e),"error"===e&&this.$progress.find(".progress-text").addClass("migration-error"),this.status=e,this.updateTitleElem()},setText:function(e){"string"!=typeof e&&(e=""),0>=e.indexOf("wpmdb_error")&&(e=this.decodeErrorObject(e)),this.$progress.find(".progress-text").html(e),this.text=e},setState:function(e,t,n){null!==e&&this.setTitle(e),null!==t&&this.setText(t),null!==n&&this.setStatus(n)},startTimer:function(){this.timerStart=Date.now(),this.timerCount=0,this.counterDisplay=i(".timer"),this.elapsedInterval=setInterval(this.incrementTimer.bind(this),1e3)},getTimerCountInSeconds:function(){return Math.floor((Date.now()-this.timerStart)/1e3)},pauseTimer:function(){this.pausedAt=Date.now(),clearInterval(this.elapsedInterval)},resumeTimer:function(){this.timerStart+=Date.now()-this.pausedAt,this.elapsedInterval=setInterval(this.incrementTimer.bind(this),1e3)},incrementTimer:function(){this.timerCount=this.getTimerCountInSeconds(),this.displayCount()},displayCount:function(){var e=Math.floor(this.timerCount/3600)%24,t=Math.floor(this.timerCount/60)%60,n=this.timerCount%60,i=this.pad(e,2,0)+":"+this.pad(t,2,0)+":"+this.pad(n,2,0);this.counterDisplay.html(i)},updateTitleElem:function(){var e=this.model.get("activeStageName"),t=this.model.getStageModel(e),n=Math.max(0,t.getTotalProgressPercent()),i=this.model.get("stages").length,o=this.currentStageNum,a=this.status,r=wpmdb_strings.title_progress;"complete"===t.get("status")&&0===t.get("totalSize")&&(n=100),r=(r=(r=r.replace("%1$s",n+"%")).replace("%2$s",o)).replace("%3$s",i),1===i&&(r=n+"%"),wpmdb_strings["title_"+a]&&(r=wpmdb_strings["title_"+a]),r=r+" - "+this.originalTitle,document.title=r},restoreTitleElem:function(){document.title=this.originalTitle},pad:function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e},decodeErrorObject:function(e){var t=e.replace(/\{&quot;/g,"{#q!#").replace(/\&quot;}/g,"#q!#}").replace(/,&quot;/g,",#q!#").replace(/&quot;:/g,"#q!#:").replace(/:&quot;/g,":#q!#").replace(/&quot;/g,'\\"').replace(/#q!#/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<");try{t=JSON.parse(t)}catch(t){return e}return"object"===(void 0===t?"undefined":(0,o.default)(t))&&void 0!==t.body?t:e},fixProgressStageWidthForScrollBar:function(){var e=Math.abs(this.$wrapper[0].offsetWidth-this.$wrapper[0].clientWidth),t=this.$wrapper.find(".active .progress-items"),n=parseInt(t.css("padding-left"),10),i=parseInt(t.css("padding-right"),10);(0!==e||0===e&&i!==n)&&t.css("padding-right",n-e+"px")}},newMigration:function(e){i("#overlay").remove(),i(".progress-content").remove(),this.migration.$overlay=s.clone(),i("#wpwrap").append(this.migration.$overlay),this.migration.model=new a(e),this.migration.view=new r({model:this.migration.model}),this.migration.$progress=c.clone(),this.migration.$wrapper=this.migration.view.$el,this.migration.$progress.find(".migration-progress-stages").replaceWith(this.migration.$wrapper),this.migration.$proVersion=this.migration.$overlay.find(".pro-version");var t=this.migration.$proVersion.find("iframe").remove().clone();this.migration.$overlay.prepend(this.migration.$progress);var n=this;return setTimeout(function(){n.migration.$overlay.add(n.migration.$progress).add(n.migration.$proVersion).removeClass("hide").addClass("show"),n.migration.$proVersion.length&&setTimeout(function(){n.migration.$proVersion.find(".iframe").append(t)},500)},0),this.migration.currentStageNum=0,this.migration.$proVersion.on("click",".close-pro-version",function(){n.migration.$proVersion.find("iframe").remove(),n.migration.$proVersion.addClass("hide remove"),setTimeout(function(){n.migration.$proVersion.remove()},500)}),this.migration.model.on("migrationComplete",function(){n.utils.updateProgTableVisibilitySetting(),n.utils.updatePauseBeforeFinalizeSetting(),n.migration.pauseTimer()}),i(window).on("resize",_.debounce(this.migration.fixProgressStageWidthForScrollBar.bind(this.migration),100)),this.migration.model.on("change:activeStage",this.migration.fixProgressStageWidthForScrollBar.bind(this.migration)),this.migration},utils:n(60)};e.exports=p},function(e,t,n){var i=window.jQuery,o=function(e){return e&&e.__esModule?e:{default:e}}(n(3));var a=n(57),r=(i=jQuery,Backbone.Model.extend({defaults:{_initialStages:null,stages:null,activeStageName:null,stageModels:null,localTableRows:null,localTableSizes:null,remoteTableRows:null,remoteTableSizes:null,migrationStatus:"active",migrationIntent:"savefile"},initialize:function(){this.set("stageModels",{}),this.set("_initialStages",this.get("stages")),this.set("stages",[]),_.each(this.get("_initialStages"),function(e,t,n){this.addStage(e.name,t,n)},this)},addStage:function(e,t,n,a){var r,s=[];return _.each(t,function(e){var t,i;"remote"===n?(t=this.get("remoteTableSizes")[e],i=this.get("remoteTableRows")[e]):(t=this.get("localTableSizes")[e],i=this.get("localTableRows")[e]),s.push({name:e,size:t,rows:i})},this),r={name:e,items:s,dataType:n},"object"===(void 0===a?"undefined":(0,o.default)(a))&&(r=i.extend(r,a)),this.addStageModel(r),this.trigger("stage:added",this.get("stageModels")[e]),this.get("stageModels")[e].on("change",function(){this.trigger("change")},this),this.getStageModel(r.name)},addStageItem:function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";this.getStageModel(e).addItem(t,n,i,o)},addStageModel:function(e){var t=this.get("stages"),n=this.get("stageModels"),i=new a(e);t.push(e),n[e.name]=i,this.set("stages",t),this.set("stageModels",n)},getStageModel:function(e){return this.get("stageModels")[e]},getStageItems:function(e,t){var n=this.getStageModel(e).get("items");return void 0===t?n:n.map(function(e){return e[t]})},setActiveStage:function(e){this.setStageComplete(),this.set("activeStageName",e),this.getStageModel(e).set("status","active"),this.trigger("change:activeStage")},setStageComplete:function(e){e||(e=this.get("activeStageName")),null!==e&&this.getStageModel(e).set("status","complete"),wpmdb.current_migration.currentStageNum=wpmdb.current_migration.currentStageNum+1},setMigrationComplete:function(){var e=this.getStageModel(this.get("activeStageName"));this.setStageComplete(),this.trigger("migrationComplete"),this.set("migrationStatus","complete"),e.activateTab()}}));e.exports=r},function(e,t){var n=window.jQuery;n=jQuery;e.exports={updateProgTableVisibilitySetting:function(){wpmdb_data.prog_tables_visibility_changed&&(wpmdb_data.prog_tables_visibility_changed=!1,n.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",nonce:wpmdb_data.nonces.save_setting,setting:"prog_tables_hidden",checked:Boolean(wpmdb_data.prog_tables_hidden)},error:function(e,t,n){console.log("Could not save progress item visibility setting",n)}}))},updatePauseBeforeFinalizeSetting:function(){wpmdb_data.pause_before_finalize_changed&&(wpmdb_data.pause_before_finalize_changed=!1,n.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",nonce:wpmdb_data.nonces.save_setting,setting:"pause_before_finalize",checked:Boolean(wpmdb_data.pause_before_finalize)},error:function(e,t,n){console.log("Could not save pause before finalize setting",n)}}))}}},function(e,t,n){window.jQuery;var i=n(59),o=(jQuery,Backbone.View.extend({tagName:"div",className:"migration-progress-stages",id:"migration-progress-stages",self:void 0,initialize:function(){this.$el.empty(),this.model.on("stage:added",function(e){this.addStageView(e)},this),_.each(this.model.get("stageModels"),this.addStageView,this)},addStageView:function(e){var t=new i({model:e});e.trigger("view:initialized",t),this.$el.append(t.$el),this.$el.parent().find(".stage-tabs").append(t.$tabElem)}}));e.exports=o},function(e,t,n){var i=window.jQuery,o=function(e){return e&&e.__esModule?e:{default:e}}(n(3));i=jQuery;var a=Backbone.Model.extend({defaults:{status:"queued",_initialItems:null,items:null,names:null,lookupItems:null,totalSize:0,totalTransferred:0,dataType:"local",name:"",itemsComplete:0,itemsCompleteArr:[],strings:null},initialize:function(){this.initStrings(),this.set("_initialItems",this.get("items").slice()),this.set("items",[]),this.set("names",[]),this.set("lookupItems",{}),this.set("itemsCompleteArr",[]),_.each(this.get("_initialItems"),function(e){this.addItem(e.name,e.size,e.rows)},this),this.on("view:initialized",this.triggerItemViewInit),this.on("change",function(){wpmdb.current_migration.updateTitleElem()})},initStrings:function(){var e={stage_title:this.get("name"),migrated:wpmdb_strings.migrated,queued:wpmdb_strings.queued,active:wpmdb_strings.running,complete:wpmdb_strings.complete,hide:wpmdb_strings.hide,show:wpmdb_strings.show,itemsName:wpmdb_strings.tables},t=this.get("strings");t="object"===(void 0===t?"undefined":(0,o.default)(t))?t:{},(t=i.extend(e,t)).items_migrated=t.itemsName+" "+t.migrated,t.hide_items=t.hide+" "+t.itemsName,t.show_items=t.show+" "+t.itemsName,this.set("strings",t)},addItem:function(e,t,n,o){var a=this.get("items"),r=this.get("names");if(!~r.indexOf(e)){r.push(e);var s={name:e,size:t,rows:n||t,stageName:this.get("name"),transferred:0,rowsTransferred:0,complete:!1,title:null,get $title(){return this.title||this.createTitleElem()},set $title(e){this.title=e},createTitleElem:function(){return this.title=i("<p>").addClass("item-info").append(i('<span class="name" />').text(this.displayName||this.name)).append(" ").append(i('<span class="size" />').text("("+wpmdb.functions.convertKBSizeToHRFixed(s.size)+")")),this.title},progress:null,get $progress(){return this.progress||this.createProgElem()},set $progress(e){this.progress=e},createProgElem:function(){return this.progress=i('<div class="progress-bar"/>').css("width","0%"),this.progress},el:null,get $el(){return this.el||this.createMainElem()},set $el(e){this.el=e},createMainElem:function(){return this.el=i('<div class="item-progress" />'),this.el.append(this.$title),this.el.append(this.$progress),this.el.append('<span class="dashicons dashicons-yes"/>'),this.el.attr("id","item-"+this.name),this.el.attr("data-stage",this.stageName),this.el},updateProgress:function(e){var t=this.$progress;window.requestAnimationFrame(function(){t.css("width",e+"%")}.bind(this))}};void 0!==o&&o.length&&(s.displayName=o),a.push(s),this.get("lookupItems")[e]=a.length-1,this.set("totalSize",parseFloat(this.get("totalSize"))+parseFloat(t)),this.trigger("item:added",s)}},triggerItemViewInit:function(){var e=this.get("items"),t=this;_.each(e,function(e){t.trigger("item:added",e)})},getTotalSizeTransferred:function(){return this.get("totalTransferred")},countItemsComplete:function(){return this.get("itemsComplete")},getTotalProgressPercent:function(){var e=this.getTotalSizeTransferred(),t=this.get("totalSize");return 0>=e||0>=t?0:Math.min(100,Math.round(e/t*100))},activateTab:function(){this.trigger("activateTab"),wpmdb.current_migration.model.trigger("change:activeStage")},setItemComplete:function(e){var t=this.get("itemsCompleteArr");if(!~t.indexOf(e)){t.push(e);var n=this.getItemByName(e),i=this.get("totalTransferred"),o=this.get("itemsComplete");this.set("itemsComplete",++o),i+=n.size-n.transferred,this.set("totalTransferred",i),n.transferred=n.size,n.complete=!0,n.rowsTransferred=n.rows,this.trigger("change change:items",n)}},setItemPercentTransferred:function(e,t,n,i){var o=this.getItemByName(e),a=n/1e3;if(1===t){o.complete=!0,o.transferred=a;var r=this.get("itemsComplete");this.set("itemsComplete",++r),this.trigger("change change:items",o)}o.transferred=i/1e3,o.exactPercent=t;var s=this.get("totalTransferred");s+=a,this.set("totalTransferred",s),this.trigger("change change:items",o)},setItemRowsTransferred:function(e,t){var n,i,o=this.getItemByName(e),a=this.get("totalTransferred");1!==(n=-1===parseInt(t)?1:Math.min(1,t/o.rows))?(a+=(i=o.size*n)-o.transferred,this.set("totalTransferred",a),o.transferred=i,o.rowsTransferred=t,this.trigger("change change:items",o)):this.setItemComplete(e)},getItemByName:function(e){var t=this.get("items")[this.get("lookupItems")[e]]||{};return e===t.name?t:this.determineItemByName(e)},determineItemByName:function(e){for(var t=this.get("items"),n=0;n<t.length;n++){var i=t[n];if(e===i.name)return this.get("lookupItems").itemName=n,i}}});e.exports=a},function(e,t){var n=window.jQuery,i=(n=jQuery,Backbone.View.extend({tagName:"div",className:"migration-progress-stage-container hide-tables",$totalProgressElem:null,$tabElem:null,$showHideTablesElem:null,$pauseBeforeFinalizeElem:null,$pauseBeforeFinalizeCheckbox:null,$itemsContainer:null,itemViews:null,maxDomNodes:140,visibleDomNodes:0,itemCount:0,percentDone:0,sizeDone:0,tablesDone:0,queuedElements:null,$truncationNotice:null,$truncationNoticeHiddenItems:null,shouldHideItemProgress:!1,initialize:function(){this.$el.empty(),this.$el.attr("data-stage",this.model.get("name")).addClass("queued "+this.model.get("name")),this.queuedElements=[],this.initTotalProgressElem(),wpmdb.current_migration.view.$el.parent().find(".stage-tabs").after(this.$totalProgressElem),this.$itemsContainer=n("<div class=progress-items />"),this.$el.append(this.$itemsContainer),this.initTabElem(),this.model.on("item:added",this.maybeAddElementToView,this),_.each(this.model.get("itemModels"),this.maybeAddElementToView,this),this.model.on("change",function(){this.updateProgressElem(),this.updateStageTotals()},this),this.model.on("change:status",function(e){this.$el.removeClass("queued active").addClass(this.model.get("status")),this.$totalProgressElem.removeClass("queued active").addClass(this.model.get("status")),this.$tabElem.removeClass("queued active").addClass(this.model.get("status")).find(".stage-status").text(this.model.get("strings")[this.model.get("status")])},this),this.model.on("change:items",function(e){e.name&&this.setItemProgress(e)},this),this.model.on("activateTab",function(){"complete"===wpmdb.current_migration.model.get("migrationStatus")&&(this.$totalProgressElem.addClass("active").siblings().removeClass("active"),this.$tabElem.addClass("active").siblings().removeClass("active"),this.$el.addClass("active").siblings().removeClass("active"))},this)},initTotalProgressElem:function(){this.initShowHideTablesElem(),this.initPauseBeforeFinalizeElem(),this.$totalProgressElem=n('<div class="stage-progress '+this.model.get("name")+'" />').append("<span class=percent-complete>0</span>% "+this.model.get("strings").complete+" ").append('<span class="size-complete-wrap">(<span class=size-complete>0 MB</span> / <span class=size-total>0 MB</span>) </span>').append('<span class="items-complete-wrap"><span class=items-complete>0</span> <span class=lowercase >of</span> <span class=items-total>0</span> '+this.model.get("strings").items_migrated+"</span>").append(this.$showHideTablesElem).append("<div class=progress-bar-wrapper><div class=progress-bar /></div>"),this.updateStageTotals()},initShowHideTablesElem:function(){this.$showHideTablesElem=n('<a class="show-hide-tables">').text(this.model.get("strings").show_items);var e=this;this.$showHideTablesElem.on("click show-hide-progress-tables",function(){var t;e.$el.hasClass("hide-tables")?(t=!1,e.$el.add(e.$el.siblings()).removeClass("hide-tables"),e.$showHideTablesElem.text(e.model.get("strings").hide_items)):(t=!0,e.$el.add(e.$el.siblings()).addClass("hide-tables"),e.$showHideTablesElem.text(e.model.get("strings").show_items)),Boolean(t)!==Boolean(wpmdb_data.prog_tables_hidden)&&(wpmdb_data.prog_tables_visibility_changed=!0,wpmdb_data.prog_tables_hidden=t)}),wpmdb_data.prog_tables_hidden||this.$showHideTablesElem.triggerHandler("show-hide-progress-tables"),this.model.on("change:status activateTab",function(){wpmdb_data.prog_tables_hidden?e.$showHideTablesElem.text(e.model.get("strings").show_items):e.$showHideTablesElem.text(e.model.get("strings").hide_items)})},initPauseBeforeFinalizeElem:function(){this.$pauseBeforeFinalizeElem=n(".pause-before-finalize"),this.$pauseBeforeFinalizeCheckbox=this.$pauseBeforeFinalizeElem.find("input[type=checkbox]");var e=this,t=!1,i=wpmdb.current_migration.model.get("migrationIntent");wpmdb_data.pause_before_finalize&&(t=!0),this.$pauseBeforeFinalizeCheckbox.prop("checked",t),-1!==n.inArray(i,["push","pull","find_replace","import"])?("find_replace"===i&&n("#pause-before-finalize-label").text(wpmdb_strings.pause_before_finalize_find_replace),this.$pauseBeforeFinalizeElem.show()):this.$pauseBeforeFinalizeElem.hide(),wpmdb.current_migration.model.on("change:activeStage",function(){-1!==n.inArray(wpmdb.current_migration.model.get("activeStageName"),["media","themes","plugins"])&&e.$pauseBeforeFinalizeElem.hide()}),this.$pauseBeforeFinalizeElem.on("click",function(){var t=Boolean(e.$pauseBeforeFinalizeCheckbox.is(":checked"));t!==Boolean(wpmdb_data.pause_before_finalize)&&(wpmdb_data.pause_before_finalize_changed=!0,wpmdb_data.pause_before_finalize=t)})},initTabElem:function(){var e=this;this.$tabElem=n("<a class=stage-tab>").append("<span class=stage-title>"+this.model.get("strings").stage_title+"</span> ").append("<span class=stage-status>"+this.model.get("strings").queued+"</span> ").on("click",function(){e.model.activateTab()})},updateProgressElem:function(){var e=Math.max(0,this.model.getTotalProgressPercent()),t=wpmdb.functions.convertKBSizeToHRFixed(Math.min(this.model.getTotalSizeTransferred(),this.model.get("totalSize"))),n=Math.min(this.model.countItemsComplete(),this.model.get("items").length);"complete"===this.model.get("status")&&0===this.model.get("totalSize")&&(e=100,this.$showHideTablesElem.fadeOut()),e!==this.percentDone&&(this.percentDone=e,this.$totalProgressElem.find(".percent-complete").text(e),this.$totalProgressElem.find(".progress-bar-wrapper .progress-bar").css({width:e+"%"})),t!=this.sizeDone&&(this.sizeDone=t,this.$totalProgressElem.find(".size-complete").text(t)),n!=this.tablesDone&&(this.tablesDone=n,this.$totalProgressElem.find(".items-complete").text(wpmdb.functions.wpmdb_add_commas(n)))},updateStageTotals:function(e){if((e=e||this.model.get("items").length)!==this.itemCount&&(this.itemCount=e,this.$totalProgressElem.find(".items-total").text(wpmdb.functions.wpmdb_add_commas(e)),this.$totalProgressElem.find(".size-total").text(wpmdb.functions.convertKBSizeToHRFixed(this.model.get("totalSize"))),!this.shouldHideItemProgress&&500<e)){var t=this.model.get("name").toLowerCase();"themes"!=t&&"plugins"!==t||this.hideItemProgress()}},hideItemProgress:function(){this.shouldHideItemProgress||(this.shouldHideItemProgress=!0,this.$itemsContainer.empty(),this.$showHideTablesElem&&this.$showHideTablesElem.hide())},maybeAddElementToView:function(e){var t=this.shouldHideItemProgress?0:this.maxDomNodes;this.visibleDomNodes<t?(++this.visibleDomNodes,this.$itemsContainer.append(e.$el)):(this.queuedElements.push(e),this.$truncationNotice?this.updateTruncationNotice():this.showTruncationNotice())},showTruncationNotice:function(){if(!this.$truncationNotice){var e=this.shouldHideItemProgress?this.model.get("items").length:this.queuedElements.length;this.$truncationNotice=n('<div class="truncation-notice" >'+wpmdb_strings.progress_items_truncated_msg.replace("%1$s",'<span class="hidden-items">'+wpmdb.functions.wpmdb_add_commas(e)+"</span>")+"</div>"),this.$truncationNoticeHiddenItems=this.$truncationNotice.find(".hidden-items"),this.$itemsContainer.after(this.$truncationNotice)}},updateTruncationNotice:function(){var e=this.shouldHideItemProgress?this.model.get("items").length:this.queuedElements.length;this.$truncationNoticeHiddenItems.text(wpmdb.functions.wpmdb_add_commas(e))},getNextElementForView:function(e){var t;return!this.shouldHideItemProgress&&(this.queuedElements.length&&(e&&this.queuedElements.push(e),e=(t=this.queuedElements.shift())instanceof n?t:t.$el),e)},setItemProgress:function(e){var t=Math.min(100,Math.ceil(e.transferred/e.size*100));e.hasOwnProperty("exactPercent")&&(t=100*e.exactPercent),0===e.size&&(t=100),e.updateProgress(t),(100<=t||0===e.size)&&this.elemComplete(e)},elemComplete:function(e){if(!this.shouldHideItemProgress){var t=e.$el.addClass("complete");if(1!==this.model.get("items").length){var n=this.getNextElementForView(t),i=t.height(),o=t.css("margin-bottom"),a=!1;n===t&&(a=n.clone().css({height:0,marginBottom:0,display:"block"}).addClass("clone complete")).appendTo(this.$itemsContainer),t.css({height:i,marginBottom:o}),setTimeout(function(){t.css({height:0,marginBottom:0});var e=0;a&&(e=250,a.css({height:i,marginBottom:o}),a.find(".progress-bar").addClass("progress-bar-no-transition").css({width:"100%"})),setTimeout(function(){t.css({display:"none"}),t.remove(),a&&a.remove(),this.$itemsContainer.find(".item-progress:not(.clone)").last().after(n.css({height:"auto",marginBottom:o,display:"block"}))}.bind(this),e)}.bind(this),1e3)}}}}));e.exports=i},function(e,t){window.jQuery;!function(e,t){t.functions.update_multiselect=function(n,i,o){if(e(n).empty(),0<Object.keys(i).length){var a=e.wpmdb.apply_filters("wpmdb_get_table_prefix",null,null),r=!1;e.each(i,function(t,i){if(!e.wpmdb.apply_filters("wpmdb_exclude_subsite",!1,t)){var s=" ";(void 0===o||null===o||0===o.length||void 0!==o&&null!==o&&0<o.length&&-1!==e.inArray(t,o))&&(s=' selected="selected" ',r=!0),i+=" ("+a+("1"!==t?t+"_":"")+")",e(n).append("<option"+s+'value="'+t+'">'+i+"</option>")}}),!1===r&&t.functions.update_multiselect(n,i,[])}}}(jQuery,wpmdb)},function(e,t){window.jQuery;!function(e){var t,n=!1,i=ajaxurl.replace("/admin-ajax.php","")+"/images/spinner";2<window.devicePixelRatio&&(i+="-2x"),t=e('<img src="'+(i+=".gif")+'" alt="" class="check-licence-spinner" />'),e(document).ready(function(){e("body").on("click",".check-my-licence-again",function(i){if(i.preventDefault(),e(this).blur(),n)return!1;n=!0,e(this).hide(),t.insertAfter(this);var o=' <a class="check-my-licence-again" href="#">'+wpmdb_update_strings.check_license_again+"</a>";e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_check_licence",nonce:wpmdb_nonces.check_licence,context:"update"},error:function(t,i,a){n=!1,e(".wpmdb-licence-error-notice").fadeOut(650,function(){e(".wpmdb-licence-error-notice").empty().html(wpmdb_update_strings.license_check_problem+o).fadeIn(650)})},success:function(t){if(n=!1,void 0!==t.errors){var i="";for(var o in t.errors)i+=t.errors[o];e(".wpmdb-licence-error-notice").fadeOut(650,function(){e(".check-licence-spinner").remove(),e(".wpmdb-licence-error-notice").empty().html(i).fadeIn(650)})}else e(".wpmdbpro-custom-visible").fadeOut(650,function(){e(".check-licence-spinner").remove(),e(".wpmdbpro-custom-visible").empty().html(e(".wpmdb-original-update-row").html()).fadeIn(650)})}})}),e(".wpmdbpro-custom").prev().addClass("wpmdbpro-has-message")})}(jQuery)},function(e,t,n){window.jQuery;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(125)),o=n(55);var a=new i.default,r=window.wpmdb||{};!function(e,t){t.migration_progress_controller=n(126),t.current_migration=null,t.migration_selection=t.functions.wpmdb_migration_type(),window.onbeforeunload=function(n){if("import"!==t.functions.wpmdb_migration_type()||e(".step-two").is(":visible")||t.functions.remove_localStorage_form_data(),a.currently_migrating)return(n=n||window.event)&&(n.returnValue=wpmdb_strings.sure),wpmdb_strings.sure},t.functions.exclude_post_types_warning=function(){var t=e("#select-post-types").val(),n="",i=e(".exclude-post-types-warning");t?(n="<code>"+t.join("</code>, <code>")+"</code>",e(".excluded-post-types").html(n),"0"===i.css("opacity")&&i.css({opacity:0}).slideDown(200).animate({opacity:1})):i.css({opacity:0}).slideUp(200).animate({opacity:0})},t.functions.migrate_table_recursive=function(n,i,o){var r=o||0;if(r>=a.tables_to_migrate.length)if("upload"===a.stage&&t.current_migration.model.getStageItems("find_replace").length)a.stage="find_replace",a.tables_to_migrate=t.current_migration.model.getStageItems("find_replace","name"),a.tables_to_migrate=a.tables_to_migrate.map(function(e){return"_mig_"+e}),r=0;else{if("backup"!==a.stage)return e(".progress-label").removeClass("label-visible"),t.common.hooks=e.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",t.common.hooks),t.common.hooks.push(t.functions.migration_complete),t.common.hooks.push(t.functions.wpmdb_flush),t.common.hooks=e.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",t.common.hooks),t.common.hooks.push(t.functions.migration_complete_events),t.common.next_step_in_migration={fn:t.functions.wpmdb_call_next_hook},void t.functions.execute_next_step();if(-1!==e.inArray(a.migration_intent,["push","pull"])?a.stage="migrate":"import"===a.migration_intent?a.stage="upload":a.stage=a.migration_intent,t.current_migration.model.setActiveStage(a.stage),"find_replace"!==a.stage&&"migrate"!==a.stage)return void t.functions.wpmdb_call_next_hook();r=0,a.tables_to_migrate=t.functions.get_tables_to_migrate(null,null)}var s=0;r===a.tables_to_migrate.length-1&&(s=1);var c=0;-1!==e.inArray(a.migration_intent,["push","pull"])&&1===parseInt(t.common.connection_data.gzip)&&(c=1);var l={action:"wpmdb_migrate_table",migration_state_id:t.migration_state_id,table:a.tables_to_migrate[r],stage:a.stage,current_row:n,last_table:s,primary_keys:i,gzip:c,nonce:wpmdb_data.nonces.migrate_table};-1!==e.inArray(a.migration_intent,["push","pull"])&&(l.bottleneck=t.common.connection_data.bottleneck,l.prefix=t.common.connection_data.prefix),t.common.connection_data&&t.common.connection_data.path_current_site&&t.common.connection_data.domain&&(l.path_current_site=t.common.connection_data.path_current_site,l.domain_current_site=t.common.connection_data.domain),a.doing_ajax=!0,e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,timeout:0,data:l,error:function(e,n,i){var o=wpmdb_strings.table_process_problem+" "+a.tables_to_migrate[r]+"<br /><br />"+wpmdb_strings.status+": "+e.status+" "+e.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+e.responseText;t.current_migration.setState(wpmdb_strings.migration_failed,o,"error"),a.doing_ajax=!1,console.log(e),console.log(n),console.log(i),t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(n){a.doing_ajax=!1,n=e.trim(n);var i=t.functions.wpmdb_parse_json(n),o="";if(!1===i||null===i)return o=""===n||null===n?wpmdb_strings.table_process_problem_empty_response+" "+a.tables_to_migrate[r]:a.get_ajax_errors(n,null,null),t.current_migration.setState(wpmdb_strings.migration_failed,o,"error"),t.common.migration_error=!0,void t.functions.migration_complete_events();if(void 0!==i.wpmdb_error&&1===i.wpmdb_error)return t.current_migration.setState(wpmdb_strings.migration_failed,i.body,"error"),t.common.migration_error=!0,void t.functions.migration_complete_events();var c=a.tables_to_migrate[r];"import"===a.migration_intent&&"find_replace"===a.stage&&(c=c.replace(wpmdb_data.this_temp_prefix,"")),t.current_migration.setText(),t.current_migration.model.getStageModel(a.stage).setItemRowsTransferred(c,i.current_row),1===s&&"savefile"===a.migration_intent&&(void 0!==i.dump_filename&&(a.dump_filename=i.dump_filename),void 0!==i.dump_path&&(a.dump_path=i.dump_path)),-1===parseInt(i.current_row)&&(r++,i.current_row="",i.primary_keys=""),t.common.next_step_in_migration={fn:t.functions.migrate_table_recursive,args:[i.current_row,i.primary_keys,r]},t.functions.execute_next_step()}})},t.functions.migration_complete_events=function(){if(!1===t.common.migration_error)if(""===t.common.non_fatal_errors)if("savefile"!==a.migration_intent&&!0===e("#save_computer").is(":checked")&&t.current_migration.setText(),a.completed_msg=a.completed_msg+'&nbsp;<div class="dashicons dashicons-yes"></div>',!0===a.migration_cancelled){var n=wpmdb_strings.migration_cancelled_success;"find_replace"===a.migration_intent&&(n=wpmdb_strings.find_replace_cancelled_success),t.current_migration.setState(a.completed_msg,n,"cancelled")}else t.current_migration.setState(a.completed_msg,"","complete");else t.current_migration.setState(wpmdb_strings.completed_with_some_errors,t.common.non_fatal_errors,"error");e(".migration-controls").addClass("hidden"),t.common.hooks=[],t.common.call_stack=[],t.common.migration_error=!1,a.currently_migrating=!1,a.migration_completed=!0,a.migration_paused=!1,a.migration_cancelled=!1,a.doing_ajax=!1,t.common.non_fatal_errors="",a.tables_to_migrate=[],e(".progress-label").remove(),e(".migration-progress-ajax-spinner").remove(),e(".close-progress-content").show(),e("#overlay").css("cursor","pointer"),t.current_migration.model.setMigrationComplete()},t.functions.migration_complete=function(){if(e(".migration-controls").addClass("hidden"),"savefile"===a.migration_intent){a.currently_migrating=!1;var n=wpmdb_strings.migration_complete;if(e("#save_computer").is(":checked")){var i=wpmdb_data.this_download_url+encodeURIComponent(a.dump_filename);e("#gzip_file").is(":checked")&&(i+="&gzip=1"),e("body").trigger("wpmdb_done"),window.location=i}else e("body").trigger("wpmdb_done"),n=wpmdb_strings.completed_dump_located_at+" "+a.dump_path;!1===t.common.migration_error&&(t.functions.migration_complete_events(),t.current_migration.setState(a.completed_msg,n,"complete"))}else{t.current_migration.setState(null,wpmdb_strings.finalizing_migration,"finalizing");var r={action:"wpmdb_finalize_migration",migration_state_id:t.migration_state_id,tables:a.tables_to_migrate.join(","),nonce:wpmdb_data.nonces.finalize_migration};-1!==e.inArray(a.migration_intent,["push","pull"])&&(r.prefix=t.common.connection_data.prefix),a.doing_ajax=!0,e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:r,error:function(e){a.doing_ajax=!1;var t=wpmdb_strings.finalize_tables_problem;(0,o.jQueryAjaxError)(t,e)},success:function(e){if(a.doing_ajax=!1,void 0!==e&&void 0!==e.wpmdb_error&&1===e.wpmdb_error)return t.common.migration_error=!0,t.functions.migration_complete_events(),void t.current_migration.setState(wpmdb_strings.migration_failed,e.body,"error");t.common.next_step_in_migration={fn:t.functions.wpmdb_call_next_hook},t.functions.execute_next_step()}})}},t.functions.wpmdb_flush=function(){"savefile"!==a.migration_intent&&(t.current_migration.setText(wpmdb_strings.flushing),a.doing_ajax=!0,e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:t.migration_state_id,nonce:wpmdb_data.nonces.flush},error:function(e,n,i){a.doing_ajax=!1,t.current_migration.setState(wpmdb_strings.migration_failed,wpmdb_strings.flush_problem,"error"),alert(e+" : "+n+" : "+i),t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(n){if(a.doing_ajax=!1,"1"!==e.trim(n))return t.current_migration.setState(wpmdb_strings.migration_failed,n,"error"),t.common.migration_error=!0,void t.functions.migration_complete_events();e("body").trigger("wpmdb_done"),t.common.next_step_in_migration={fn:t.functions.wpmdb_call_next_hook},t.functions.execute_next_step()}}))},t.functions.execute_next_step=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0<a.delay_between_requests&&!1===a.flag_skip_delay)setTimeout(function(){a.flag_skip_delay=!0,t.functions.execute_next_step(n)},a.delay_between_requests);else if(a.flag_skip_delay=!1,!0===a.migration_paused){e(".migration-progress-ajax-spinner").hide(),t.current_migration.pauseTimer();var o="";!0===a.is_auto_pause_before_finalize?(o=wpmdb_strings.paused_before_finalize,a.is_auto_pause_before_finalize=!1,"find_replace"===t.functions.wpmdb_migration_type()&&(o=wpmdb_strings.find_replace_paused_before_finalize)):o=wpmdb_strings.paused,t.current_migration.setState(null,o,"paused"),e("body").on("click",".pause-resume",function(e){a.set_pause_resume_button(e,n)}),e("body").on("click",".cancel",function(e){a.cancel_migration(e)}),e(".pause-resume").html(wpmdb_strings.resume)}else if(!0===a.migration_cancelled){var r;a.migration_intent=t.functions.wpmdb_migration_type(),"savefile"===a.migration_intent?r=wpmdb_strings.removing_local_sql:"pull"===a.migration_intent?r="backup"===a.stage?wpmdb_strings.removing_local_backup:wpmdb_strings.removing_local_temp_tables:"push"===a.migration_intent&&(r="backup"===a.stage?wpmdb_strings.removing_remote_sql:wpmdb_strings.removing_remote_temp_tables),t.current_migration.setText(r);var s={action:"wpmdb_cancel_migration",migration_state_id:t.migration_state_id,nonce:wpmdb_data.nonces.cancel_migration};a.doing_ajax=!0,e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:s,error:function(e,n,i){t.current_migration.setState(wpmdb_strings.migration_cancellation_failed,wpmdb_strings.manually_remove_temp_files+"<br /><br />"+wpmdb_strings.status+": "+e.status+" "+e.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+e.responseText,"error"),console.log(e),console.log(n),console.log(i),a.doing_ajax=!1,t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(n){if(a.doing_ajax=!1,n=e.trim(n),"push"===a.migration_intent&&"1"!==n||"push"!==a.migration_intent&&""!==n)return void 0!==n&&void 0!==n.wpmdb_error&&1===n.wpmdb_error&&(n=n.wpmdb_error),t.current_migration.setState(wpmdb_strings.migration_cancellation_failed,n,"error"),t.common.migration_error=!0,void t.functions.migration_complete_events();a.completed_msg=wpmdb_strings.migration_cancelled,"find_replace"===a.migration_intent&&(a.completed_msg=wpmdb_strings.find_replace_cancelled),t.functions.migration_complete_events(),t.current_migration.setStatus("cancelled")}})}else i&&t.common.next_step_in_migration.fn.apply(n,t.common.next_step_in_migration.args)},t.functions.maybe_show_prefix_notice=function(t){var n=e(".prefix-notice");n.hide(),t!==wpmdb_data.this_prefix&&(e(".remote-prefix").html(t),a.show_prefix_notice=!0,n.show())},t.functions.maybe_show_mst_warning=function(n){var i=t.functions.wpmdb_migration_type(),o=!1;return-1!==e.inArray(i,["push","pull"])&&void 0!==n.site_details?wpmdb_data.site_details.is_multisite!==n.site_details.is_multisite&&(void 0!==t.mst&&void 0!==n.mst_available&&"1"===n.mst_available||(o=!0)):"import"===i&&void 0!==n.multisite&&void 0!==n.subsite_export&&("false"===wpmdb_data.site_details.is_multisite&&"true"===n.multisite&&"true"!==n.subsite_export||"true"===wpmdb_data.site_details.is_multisite&&"false"===n.multisite)&&(o=!0),(o=e.wpmdb.apply_filters("wpmdb_show_mst_warning",o))&&e(".mst-required").show(),o},t.functions.maybe_show_select_table_notice=function(){if(e("#migrate-selected").is(":checked")&&null===e("#select-tables").val()){if("import"!==t.functions.wpmdb_migration_type())return alert(wpmdb_strings.please_select_one_table),!0;if(e("#import-find-replace").is(":checked")&&e("#select-tables").is(":visible"))return alert(wpmdb_strings.please_select_one_table_import),!0}return!("savefile"===t.functions.wpmdb_migration_type()||!e("#backup-manual-select").is(":checked")||null!==e("#select-backup").val())&&(alert(wpmdb_strings.please_select_one_table_backup),!0)},t.functions.remove_protocol=function(e){return e.replace(/^https?:/i,"")},t.functions.create_table_select=function(t,n,i){var o=document.createElement("select");return e(o).attr({multiple:"multiple",name:"select_tables[]",id:"select-tables",class:"multiselect"}),0<t.length&&e.each(t,function(t,a){if(!e.wpmdb.apply_filters("wpmdb_exclude_table",!1,a)){var r=" ";void 0!==i&&null!==i&&0<i.length&&-1!==e.inArray(a,i)&&(r=' selected="selected" ');var s="";0!==n.length&&(s=" ("+n[a]+")"),e(o).append("<option"+r+'value="'+a+'">'+a+s+"</option>")}}),o},t.functions.get_tables_to_migrate=function(){var n=[],i=t.functions.wpmdb_migration_type();return"migrate_select"===e("input[name=table_migrate_option]:checked").val()?n=e("#select-tables").val():"pull"!==i&&void 0!==wpmdb_data.this_prefixed_tables?n=wpmdb_data.this_prefixed_tables:"pull"===i&&void 0!==t.common.connection_data&&void 0!==t.common.connection_data.prefixed_tables&&(n=t.common.connection_data.prefixed_tables),n},t.functions.update_migrate_button_text=function(){var n=t.functions.wpmdb_migration_type(),i=e("#save-migration-profile").is(":checked")?"_save":"",o="migrate_button_"+("savefile"===n?"export":n)+i;e(".migrate-db .button-primary").val(wpmdb_strings[o])},t.functions.connection_box_changed=function(){var n=e(".pull-push-connection-info");if(-1!==e.inArray(t.functions.wpmdb_migration_type(),["push","pull"])&&(!a.doing_ajax&&!e(n).hasClass("temp-disabled")||!1!==t.force_reconnect)){t.force_reconnect=!1;var i=e(".pull-push-connection-info").val(),o=e.trim(i).split("\n"),r=!1,s="";if(""===o&&(r=!0,s=wpmdb_strings.connection_info_missing),1===o.length&&!r){var c=e.trim(i).split(" ");2===c.length&&(o=c)}2===o.length||r||(r=!0,s=wpmdb_strings.connection_info_incorrect),r||a.validate_url(o[0])||(r=!0,s=wpmdb_strings.connection_info_url_invalid);var l=0;if(void 0!==o[1]&&(l=o[1].length),r||32===l||40===l||(r=!0,s=wpmdb_strings.connection_info_key_invalid),r||o[0]!==wpmdb_data.connection_info[0]||(r=!0,s=wpmdb_strings.connection_info_local_url),r||o[1]!==wpmdb_data.connection_info[1]||(r=!0,s=wpmdb_strings.connection_info_local_key),r)return e(".connection-status").html(s),void e(".connection-status").addClass("notification-message error-notice migration-error");var p=o[0]+"\n"+o[1];1===e.trim(i).split("\n").length&&e(".pull-push-connection-info").val(p),!1===wpmdb_data.openssl_available&&(o[0]=o[0].replace("https://","http://"),p=o[0]+"\n"+o[1],e(".pull-push-connection-info").val(p)),a.show_prefix_notice=!1,a.doing_ajax=!0,a.disable_export_type_controls(),e(".basic-access-auth-wrapper").is(":visible")&&(o[0]=o[0].replace(/\/\/(.*)@/,"//"),o[0]=o[0].replace("//","//"+encodeURIComponent(e.trim(e(".auth-username").val()))+":"+encodeURIComponent(e.trim(e(".auth-password").val()))+"@"),p=o[0]+"\n"+o[1],e(".pull-push-connection-info").val(p),e(".basic-access-auth-wrapper").hide()),e(".step-two").hide(),e(".ssl-notice").hide(),e(".prefix-notice").hide(),e(".connection-status").show(),e(".connection-status").html(wpmdb_strings.establishing_remote_connection),e(".connection-status").removeClass("notification-message error-notice migration-error"),e(".connection-status").append(a.ajax_spinner);var d=t.functions.wpmdb_migration_type();return a.profile_name_edited=!1,e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:o[0],key:o[1],intent:d,nonce:wpmdb_data.nonces.verify_connection_to_remote_site},error:function(t,n,i){e(".connection-status").html(a.get_ajax_errors(t.responseText,"(#100)",t)),e(".connection-status").addClass("notification-message error-notice migration-error"),e(".ajax-spinner").remove(),a.doing_ajax=!1,a.enable_export_type_controls()},success:function(n){if(e(".ajax-spinner").remove(),a.doing_ajax=!1,a.enable_export_type_controls(),void 0!==n.wpmdb_error&&1===n.wpmdb_error)return e(".connection-status").html(n.body),e(".connection-status").addClass("notification-message error-notice migration-error"),n.body.indexOf("401 Unauthorized")>-1&&e(".basic-access-auth-wrapper").show(),void(e(".pull-push-connection-info").hasClass("temp-disabled")||e(".connect-button").is(":visible")||(e(".pull-push-connection-info").removeAttr("readonly"),e(".connect-button").show()));if(!0!==t.functions.maybe_show_mst_warning(n)){a.maybe_show_ssl_warning(o[0],o[1],n.scheme);var i=a.get_domain_name(n.url);e(".create-new-profile").val(i),e(".pull-push-connection-info").addClass("temp-disabled"),e(".pull-push-connection-info").attr("readonly","readonly"),e(".connect-button").hide(),e(".connection-status").hide(),e(".step-two").show(),t.functions.maybe_show_prefix_notice(n.prefix),a.connection_established=!0,a.set_connection_data(n),a.move_connection_info_box(),a.change_replace_values(),a.maybe_show_mixed_cased_table_name_warning(),a.refresh_table_selects(null,null,this),a.$push_select_backup=e(a.$pull_select).clone(),e(a.$push_select_backup).attr({name:"select_backup[]",id:"select-backup"});var r=document.createElement("select");e(r).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),e.each(t.common.connection_data.post_types,function(t,n){e(r).append('<option value="'+n+'">'+n+"</option>")}),a.$pull_post_type_select=r,e("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===t.functions.wpmdb_migration_type()?(e("#new-url").val(t.functions.remove_protocol(wpmdb_data.this_url)),e("#new-path").val(wpmdb_data.this_path),"true"===wpmdb_data.is_multisite&&(e("#new-domain").val(wpmdb_data.this_domain),e('.replace-row.pin .old-replace-col input[type="text"]').val(t.functions.remove_protocol(n.url))),e("#old-url").val(t.functions.remove_protocol(n.url)),e("#old-path").val(n.path),e.wpmdb.do_action("wpmdb_update_pull_table_select"),e("#select-post-types").remove(),e(".exclude-post-types-warning").after(a.$pull_post_type_select),t.functions.exclude_post_types_warning(),e(".table-prefix").html(n.prefix),e(".backup-table-prefix").html(wpmdb_data.site_details.prefix),e(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(e("#new-url").val(t.functions.remove_protocol(n.url)),e("#new-path").val(n.path),"true"===wpmdb_data.is_multisite&&e('.replace-row.pin .old-replace-col input[type="text"]').val(t.functions.remove_protocol(wpmdb_data.this_url)),e.wpmdb.do_action("wpmdb_update_push_table_select"),e("#select-backup").remove(),e(".backup-tables-wrap").prepend(a.$push_select_backup)),e("body").trigger("wpmdb_connection_fired"),t.common.next_step_in_migration={fn:e.wpmdb.do_action,args:["verify_connection_to_remote_site",t.common.connection_data]},t.functions.execute_next_step()}else e(".connection-status").hide()}})}},e(document).ready(function(){t.migration_state_id="",e("#plugin-compatibility").change(function(t){var n="1",i=e(this).closest("td").next("td").find(".setting-status");e(this).is(":checked")||(n="0"),e(".plugin-compatibility-wrap").toggle(),i.find(".ajax-success-msg").remove(),i.append(a.ajax_spinner),e("#plugin-compatibility").attr("disabled","disabled"),e(".plugin-compatibility").addClass("disabled"),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_plugin_compatibility",install:n,nonce:wpmdb_data.nonces.plugin_compatibility},error:function(t,n,i){alert(wpmdb_strings.plugin_compatibility_settings_problem+"\r\n\r\n"+wpmdb_strings.status+" "+t.status+" "+t.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+t.responseText),e(".ajax-spinner").remove(),e("#plugin-compatibility").removeAttr("disabled"),e(".plugin-compatibility").removeClass("disabled")},success:function(t){""!==e.trim(t)?alert(t):(i.append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),e(".ajax-success-msg").fadeOut(2e3,function(){e(this).remove()})),e(".ajax-spinner").remove(),e("#plugin-compatibility").removeAttr("disabled"),e(".plugin-compatibility").removeClass("disabled")}})}),e("#plugin-compatibility").is(":checked")&&e(".plugin-compatibility-wrap").show(),(0<=navigator.userAgent.indexOf("MSIE")||0<=navigator.userAgent.indexOf("Trident"))&&e(".ie-warning").show(),0<=navigator.userAgent.indexOf("Edge")&&e(".edge-warning").show(),0===wpmdb_data.valid_licence&&e("#savefile").prop("checked",!0);var n=e(".max-request-size"),i=e(".slider",n);i.slider({range:"min",value:parseInt(wpmdb_data.max_request/1024),min:512,max:parseInt(wpmdb_data.bottleneck/1024),step:256,create:function(e,t){var i=a.get_max_request_display_info(wpmdb_data.max_request/1024);a.set_slider_value(n,wpmdb_data.max_request/1024,i.unit,i.amount)},slide:function(e,t){var i=a.get_max_request_display_info(t.value);a.set_slider_value(n,t.value,i.unit,i.amount)},stop:function(t,o){e(".slider-success-msg").remove(),e(".amount",n).after('<img src="'+a.spinner_url+'" alt="" class="slider-spinner general-spinner" />'),i.slider("disable"),e.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_max_request_size",max_request_size:parseInt(o.value),nonce:wpmdb_data.nonces.update_max_request_size},error:function(t,o,r){i.slider("enable"),e(".slider-spinner",n).remove(),alert(wpmdb_strings.max_request_size_problem);var s=a.get_max_request_display_info(wpmdb_data.max_request/1024);a.set_slider_value(n,wpmdb_data.max_request/1024,s.unit,s.amount),i.slider("enable")},success:function(){i.slider("enable"),e(".slider-label-wrapper",n).append('<span class="slider-success-msg">'+wpmdb_strings.saved+"</span>"),e(".slider-success-msg",n).fadeOut(2e3,function(){e(this).remove()}),e(".slider-spinner",n).remove()}})}});var o=e(".delay-between-requests"),r=e(".slider",o);r.slider({range:"min",value:parseInt(wpmdb_data.delay_between_requests/1e3),min:0,max:10,step:1,create:function(e,t){a.set_slider_value(o,wpmdb_data.delay_between_requests/1e3,"s")},slide:function(e,t){a.set_slider_value(o,t.value,"s")},stop:function(t,n){e(".slider-success-msg").remove(),e(".amount",o).after('<img src="'+a.spinner_url+'" alt="" class="slider-spinner general-spinner" />'),r.slider("disable"),e.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_delay_between_requests",delay_between_requests:parseInt(1e3*n.value),nonce:wpmdb_data.nonces.update_delay_between_requests},error:function(t,n,i){r.slider("enable"),e(".slider-spinner",o).remove(),alert(wpmdb_strings.delay_between_requests_problem),a.set_slider_value(o,wpmdb_data.delay_between_requests/1e3,"s"),r.slider("enable")},success:function(){wpmdb_data.delay_between_requests=parseInt(1e3*n.value),r.slider("enable"),e(".slider-label-wrapper",o).append('<span class="slider-success-msg">'+wpmdb_strings.saved+"</span>"),e(".slider-success-msg",o).fadeOut(2e3,function(){e(this).remove()}),e(".slider-spinner",o).remove()}})}}),e(".help-tab .video").each(function(){var t=e(this),n=e(".video-viewer");e("a",this).click(function(i){i.preventDefault(),n.attr("src","//www.youtube.com/embed/"+t.data("video-id")+"?autoplay=1"),n.show();var o=n.offset();e(window).scrollTop(o.top-50)})}),e(".backup-options").show(),e(".keep-active-plugins").show(),"savefile"===t.functions.wpmdb_migration_type()&&(e(".backup-options").hide(),e(".keep-active-plugins").hide()),a.last_replace_switch=t.functions.wpmdb_migration_type(),e(".content-tab").on("click",".check-my-licence-again",function(t){t.preventDefault(),a.checked_licence=!1,e(t.target).replaceWith("Checking... "+a.ajax_spinner),a.check_licence(null,"all")}),e.wpmdb.add_action("wpmdb_refresh_table_selects",a.refresh_table_selects,"",a),e.wpmdb.add_action("wpmdb_update_push_table_select",function(){e("#select-tables").remove(),e(".select-tables-wrap").prepend(a.$push_select),e("#select-tables").change()}),e.wpmdb.add_action("wpmdb_update_pull_table_select",function(){e("#select-tables").remove(),e(".select-tables-wrap").prepend(a.$pull_select),e("#select-tables").change()}),e.wpmdb.add_action("wpmdb_disable_table_migration_options",function(){e("#migrate-selected").parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),e(".table-select-wrap").show(),e("#migrate-only-with-prefix").prop("checked",!1),e("#migrate-selected").prop("checked",!0),e(".table-migrate-options").hide(),e(".select-tables-wrap").show()}),e.wpmdb.add_action("wpmdb_enable_table_migration_options",function(){e(".table-migrate-options").show()}),e.wpmdb.add_action("wpmdb_select_all_tables",function(){e("#select-tables").children("option").prop("selected",!0),e("#select-tables").change()}),e.wpmdb.add_filter("wpmdb_base_old_url",function(e,t){return a.remove_protocol(wpmdb_data.this_url)}),a.establish_remote_connection_from_saved_profile(),e("body").on("click",".js-action-link",function(t){t.preventDefault(),e(this).blur()}),e(".licence-input").keypress(function(t){13===t.which&&(t.preventDefault(),e(".register-licence").click())}),e("body").on("click",".register-licence",function(t){if(t.preventDefault(),!a.doing_licence_registration_ajax){var n=e.trim(e(".licence-input").val()),i=e(".licence-status");i.removeClass("notification-message error-notice success-notice"),""!==n?(i.empty().removeClass("success"),a.doing_licence_registration_ajax=!0,e(".button.register-licence").after('<img src="'+a.spinner_url+'" alt="" class="register-licence-ajax-spinner general-spinner" />'),e.ajax({url:ajaxurl,type:"POST",dataType:"JSON",cache:!1,data:{action:"wpmdb_activate_licence",licence_key:n,nonce:wpmdb_data.nonces.activate_licence,context:"licence"},error:function(t,n,o){a.doing_licence_registration_ajax=!1,e(".register-licence-ajax-spinner").remove(),i.html(wpmdb_strings.register_license_problem)},success:function(t){if(e(".register-licence-ajax-spinner").remove(),void 0!==t.errors){var o="";for(var r in t.errors)o+=t.errors[r];i.html(o),void 0!==t.masked_licence&&(a.enable_pro_licence(t,n),e(".migrate-tab .invalid-licence").hide())}else void 0!==t.wpmdb_error&&void 0!==t.body?i.html(t.body):(1===Number(t.is_first_activation)&&(wpmdb_strings.welcome_text=wpmdb_strings.welcome_text.replace("%1$s","https://deliciousbrains.com/wp-migrate-db-pro/doc/quick-start-guide/?utm_campaign=support%2Bdocs&utm_source=MDB%2BPaid&utm_medium=insideplugin"),wpmdb_strings.welcome_text=wpmdb_strings.welcome_text.replace("%2$s","https://deliciousbrains.com/wp-migrate-db-pro/videos/?utm_campaign=support%2Bdocs&utm_source=MDB%2BPaid&utm_medium=insideplugin"),i.after('<div id="welcome-wrap"><img id="welcome-img" src="'+wpmdb_data.this_plugin_url+'asset/build/img/mdb-banner.svg" /><div class="welcome-text"><h3>'+wpmdb_strings.welcome_title+"</h3><p>"+wpmdb_strings.welcome_text+"</p></div></div>")),i.html(wpmdb_strings.license_registered).delay(5e3).fadeOut(1e3,function(){e(this).css({visibility:"hidden",display:"block"}).slideUp()}),i.addClass("success notification-message success-notice"),a.enable_pro_licence(t,n),e(".invalid-licence").hide());a.doing_licence_registration_ajax=!1}})):i.html('<div class="notification-message error-notice">'+wpmdb_strings.enter_license_key+"</div>")}}),e(".clear-log").click(function(){e(".ajax-spinner, .ajax-success-msg").remove(),e(this).after(a.ajax_spinner),e(".debug-log-textarea").val(""),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_clear_log",nonce:wpmdb_data.nonces.clear_log},error:function(t,n,i){e(".ajax-spinner").remove(),alert(wpmdb_strings.clear_log_problem)},success:function(t){e(".ajax-spinner, .ajax-success-msg").remove(),a.refresh_debug_log(),e(".clear-log").after('<span class="ajax-success-msg">'+wpmdb_strings.clear_error_log+"</span>"),e(".ajax-success-msg").fadeOut(2e3,function(){e(this).remove()})}})}),e(".multiselect-select-all").click(function(){var t=e(this).parents(".select-wrap").children(".multiselect");e("option",t).prop("selected",1),e(t).focus().trigger("change")}),e(".multiselect-deselect-all").click(function(){var t=e(this).parents(".select-wrap").children(".multiselect");e("option",t).removeAttr("selected"),e(t).focus().trigger("change")}),e(".multiselect-invert-selection").click(function(){var t=e(this).parents(".select-wrap").children(".multiselect");e("option",t).each(function(){var t=e(this).prop("selected");e(this).prop("selected",!t)}),e(t).focus().trigger("change")}),e(".option-group input[type=radio]").change(function(){var t=e(this).closest(".option-group");e("ul",t).hide();var n=e(this).closest("li");e("ul",n).show()}),e(".option-group").each(function(){e(".option-group input[type=radio]").each(function(){if(e(this).is(":checked")){var t=e(this).closest("li");e("ul",t).show()}})}),e(".header-expand-collapse").click(function(){var t=null;void 0!==e(this).data("next")&&(t=e(this).data("next")),e(".expand-collapse-arrow",this).hasClass("collapsed")?(e(".expand-collapse-arrow",this).removeClass("collapsed"),t?e(t).show():e(this).next().show()):(e(".expand-collapse-arrow",this).addClass("collapsed"),t?e(t).hide():e(this).next().hide())}),e(".checkbox-label input[type=checkbox]").change(function(){e(this).is(":checked")?e(this).parent().next().show():e(this).parent().next().hide()}),e(".select-post-types-wrap").on("change","#select-post-types",function(){t.functions.exclude_post_types_warning()}),e("#exclude-post-types").is(":checked")&&e("#select-post-types").val()&&e(".exclude-post-types-warning").css({display:"block",opacity:1}),e("#save-migration-profile").change(function(){t.functions.update_migrate_button_text(),e(this).is(":checked")?e(".save-settings-button").show():e(".save-settings-button").hide()}),e("#save-migration-profile").is(":checked")&&e(".save-settings-button").show(),e(".create-new-profile").focus(function(){e("#create_new").prop("checked",!0)}),e(".checkbox-label input[type=checkbox]").each(function(){e(this).is(":checked")&&e(this).parent().next().show()}),e(".migrate-db-button").click(function(n){if(e(this).blur(),n.preventDefault(),t.migration_state_id="",!1!==e.wpmdb.apply_filters("wpmdb_migration_profile_ready",!0)&&!0!==t.functions.maybe_show_select_table_notice()){var i=!1,o=!1;if(e("#new-url").length&&!e("#new-url").val()&&(e("#new-url-missing-warning").show(),e("#new-url").focus(),e("html,body").scrollTop(0),i=!0),e("#new-path").length&&!e("#new-path").val()&&(e("#new-path-missing-warning").show(),!1===i&&(e("#new-path").focus(),e("html,body").scrollTop(0)),o=!0),!0===i||!0===o){if("import"!==t.functions.wpmdb_migration_type())return;if(e("#import-find-replace").is(":checked"))return}e("#save-migration-profile").is(":checked")&&a.save_active_profile(),a.form_data=e(e("#migrate-form")[0].elements).not(".auth-credentials").serialize(),a.migration_intent=t.functions.wpmdb_migration_type(),a.stage="backup","savefile"===a.migration_intent&&(a.stage="migrate"),!1===e("#create-backup").is(":checked")&&(-1!==e.inArray(a.migration_intent,["savefile","push","pull"])?a.stage="migrate":"import"===a.migration_intent?a.stage="upload":a.stage=a.migration_intent),t.current_migration=t.migration_progress_controller.newMigration({localTableSizes:wpmdb_data.this_table_sizes,localTableRows:wpmdb_data.this_table_rows,remoteTableSizes:void 0!==t.common.connection_data?t.common.connection_data.table_sizes:null,remoteTableRows:void 0!==t.common.connection_data?t.common.connection_data.table_rows:null,migrationIntent:t.functions.wpmdb_migration_type()});var r=e("input[name=backup_option]:checked").val(),s=e("input[name=table_migrate_option]:checked").val(),c="",l="";"backup"===a.stage&&("migrate_only_with_prefix"===s&&"backup_selected"===r&&"import"!==a.migration_intent&&(r="backup_only_with_prefix"),"push"===a.migration_intent?(l="remote","backup_only_with_prefix"===r?a.tables_to_migrate=t.common.connection_data.prefixed_tables:"backup_selected"===r?(c=e("#select-tables").val(),c=e.wpmdb.apply_filters("wpmdb_backup_selected_tables",c),a.tables_to_migrate=a.get_intersect(c,t.common.connection_data.tables)):"backup_manual_select"===r&&(a.tables_to_migrate=e("#select-backup").val())):(l="local","backup_only_with_prefix"===r?a.tables_to_migrate=wpmdb_data.this_prefixed_tables:"backup_selected"===r?(c=e("#select-tables").val(),c=e.wpmdb.apply_filters("wpmdb_backup_selected_tables",c),a.tables_to_migrate=a.get_intersect(c,wpmdb_data.this_tables)):"backup_manual_select"===r&&(a.tables_to_migrate=e("#select-backup").val())),t.current_migration.model.addStage("backup",a.tables_to_migrate,l,{strings:{migrated:wpmdb_strings.backed_up}})),l="pull"===a.migration_intent?"remote":"local","find_replace"===a.migration_intent?t.current_migration.model.addStage("find_replace",t.functions.get_tables_to_migrate(null,null),l,{strings:{migrated:wpmdb_strings.searched,stage_title:wpmdb_strings.migrate_button_find_replace}}):-1!==e.inArray(a.migration_intent,["savefile","push","pull"])&&t.current_migration.model.addStage("migrate",t.functions.get_tables_to_migrate(null,null),l),e.wpmdb.do_action("wpmdb_add_migration_stages",{data_type:l,tables_to_migrate:t.functions.get_tables_to_migrate(null,null)});e("input[name=table_migrate_option]:checked").val();var p=e.trim(e(".pull-push-connection-info").val()).split("\n");a.remote_site=p[0],a.secret_key=p[1];var d=a.get_migration_status_label(a.remote_site,a.migration_intent,"migrating");a.completed_msg=a.get_migration_status_label(a.remote_site,a.migration_intent,"completed"),-1!==e.inArray(a.stage,["find_replace","backup","migrate"])&&(a.tables_to_migrate=t.current_migration.model.getStageItems(a.stage,"name")),t.current_migration.model.setActiveStage(a.stage),t.current_migration.setTitle(d),t.current_migration.startTimer(),a.currently_migrating=!0,t.current_migration.setStatus("active");var m={action:"wpmdb_initiate_migration",intent:a.migration_intent,url:a.remote_site,key:a.secret_key,form_data:a.form_data,stage:a.stage,nonce:wpmdb_data.nonces.initiate_migration};m.site_details={local:wpmdb_data.site_details},-1!==e.inArray(a.migration_intent,["push","pull"])&&(m.temp_prefix=t.common.connection_data.temp_prefix,m.site_details.remote=t.common.connection_data.site_details),m.site_details=JSON.stringify(m.site_details),m=e.wpmdb.apply_filters("wpmdb_initiate_migration_request_data",m,m),a.doing_ajax=!0,e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:m,error:function(e,n,i){t.current_migration.setState(wpmdb_strings.migration_failed,a.get_ajax_errors(e.responseText,"(#112)",e),"error"),console.log(e),console.log(n),console.log(i),a.doing_ajax=!1,t.common.migration_error=!0,t.functions.migration_complete_events()},success:function(n){if(a.doing_ajax=!1,void 0!==n&&void 0!==n.wpmdb_error&&1===n.wpmdb_error)return t.common.migration_error=!0,t.functions.migration_complete_events(),void t.current_migration.setState(wpmdb_strings.migration_failed,n.body,"error");t.migration_state_id=n.migration_state_id;a.delay_between_requests=0,("savefile"!==a.migration_intent&&void 0!==t.common.connection_data&&void 0!==t.common.connection_data.delay_between_requests||"import"===a.migration_intent)&&("import"===a.migration_intent?a.delay_between_requests=wpmdb_data.delay_between_requests:a.delay_between_requests=Math.max(parseInt(wpmdb_data.delay_between_requests),parseInt(t.common.connection_data.delay_between_requests))),-1!==e.inArray(a.migration_intent,["savefile","push","pull","find_replace"])&&(t.common.next_step_in_migration={fn:t.functions.migrate_table_recursive,args:["-1",""]},t.functions.execute_next_step()),e.wpmdb.do_action("wpmdb_migration_initiated",a.stage)}})}}),a.update_migrate_button_text(),e("body").on("click",".close-progress-content-button",function(e){a.hide_overlay(),t.current_migration.restoreTitleElem(),t.functions.maybe_reload_page()}),e("body").on("click","#overlay",function(e){!0===a.migration_completed&&e.target===this&&(a.hide_overlay(),t.current_migration.restoreTitleElem(),t.functions.maybe_reload_page())}),e(".save-settings-button").click(function(t){if(t.preventDefault(),""===e.trim(e(".create-new-profile").val())&&e("#create_new").is(":checked"))return alert(wpmdb_strings.enter_name_for_profile),void e(".create-new-profile").focus();a.save_active_profile()}),a.move_connection_info_box(),e(".migrate-selection.option-group input[type=radio]").change(function(){a.move_connection_info_box(),t.migration_selection=t.functions.wpmdb_migration_type(),a.connection_established&&a.change_replace_values(),t.functions.update_migrate_button_text()}),"pull"!==t.functions.wpmdb_migration_type()&&"push"!==t.functions.wpmdb_migration_type()||a.connection_established||(e(".step-two").hide(),e(".connection-status").show()),e(".general-helper").click(function(t){t.preventDefault();var n=e(this),i=e(this).next();e(".helper-message").not(i).hide();var o=n.position();if(i.hasClass("bottom")){var a=1;!0===i.hasClass("compatibility-help")?a=6:e(this).is(":first-child")&&(a=3),i.css({left:o.left-i.width()/2-a+"px",top:o.top+n.height()+9+"px"})}else i.css({left:o.left+n.width()+9+"px",top:o.top+n.height()/2-18+"px"});i.toggle(),t.stopPropagation()}),e("body").click(function(){e(".helper-message").hide()}),e(".helper-message").click(function(e){e.stopPropagation()}),e("body").on("click",".show-errors-toggle",function(t){t.preventDefault(),e(this).next(".migration-php-errors").toggle()}),e(".nav-tab").click(function(){var t=e(this).attr("data-div-name");t=t.replace("-tab",""),window.location.hash=t,a.switch_to_plugin_tab(t,!1)}),e("body").on("click",'a[href^="#"]',function(t){var n=e(t.target).attr("href").substr(1);if(n){var i=e("."+n);1===i.length&&(i.trigger("click"),t.preventDefault())}}),e("body").on("click",".add-row",function(){var t=e(this).parents("tr");t.before(e(".original-repeatable-field").clone().removeClass("original-repeatable-field")),t.prev().find(".old-replace-col input").focus()}),e("body").on("click",".replace-remove-row",function(){e(this).parents("tr").remove(),2>=e(".replace-row").length&&e(".no-replaces-message").show();var t=e(this).prev().attr("id");"new-url"!==t&&"new-path"!==t||e("#"+t+"-missing-warning").hide()}),e("body").on("change","#new-url",function(){e("#new-url-missing-warning").hide()}).on("change","#new-path",function(){e("#new-path-missing-warning").hide()}),e("body").on("click",".arrow-col",function(){if(!e(this).hasClass("disabled")){var t=e(this).prev("td").find("input").val(),n=e(this).next("td").find("input");n.val(t),"new-url"===n.prop("id")?e("#new-url-missing-warning").hide():"new-path"===n.prop("id")&&e("#new-path-missing-warning").hide()}}),e(".add-replace").click(function(){e(".replace-fields").prepend(e(".original-repeatable-field").clone().removeClass("original-repeatable-field")),e(".no-replaces-message").hide()}),e("#find-and-replace-sort tbody").sortable({items:"> tr:not(.pin)",handle:"td:first",start:function(){e(".sort-handle").css("cursor","-webkit-grabbing"),e(".sort-handle").css("cursor","-moz-grabbing")},stop:function(){e(".sort-handle").css("cursor","-webkit-grab"),e(".sort-handle").css("cursor","-moz-grab")}});var s="";window.location.hash&&(s=window.location.hash.substring(1),a.switch_to_plugin_tab(s,!1)),""!==a.get_query_var("install-plugin")&&(s="addons",a.checked_licence=!0,a.switch_to_plugin_tab(s,!0)),e(".notice-link").click(function(n){n.preventDefault(),t.functions.ajax_handle_dismissible_notice(wpmdb_data.nonces.process_notice_link,function(t){e(t).closest(".inline-message").hide()},e(this))}),e("#connection_info").on("copy",function(t){var n=e(this).val().split("\n");if(2===n.length)try{t.originalEvent.clipboardData.setData("text/plain",n.join(" ")),t.preventDefault()}catch(e){}}),e(".reset-api-key").click(function(){confirm(wpmdb_strings.reset_api_key)&&!a.doing_reset_api_key_ajax&&(a.doing_reset_api_key_ajax=!0,e(".reset-api-key").after('<img src="'+a.spinner_url+'" alt="" class="reset-api-key-ajax-spinner general-spinner" />'),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_reset_api_key",nonce:wpmdb_data.nonces.reset_api_key},error:function(t,n,i){alert(wpmdb_strings.reset_api_key_problem),e(".reset-api-key-ajax-spinner").remove(),a.doing_reset_api_key_ajax=!1},success:function(t){e(".reset-api-key-ajax-spinner").remove(),a.doing_reset_api_key_ajax=!1,e(".connection-info").val(t),wpmdb_data.connection_info=e.trim(t).split("\n")}}))}),e(".copy-api-key").click(function(){var t=e(this),n=e("#connection_info"),i=n.val(),o=i.replace("\n"," ");n.val(o),n.select();try{document.execCommand("copy"),n.blur(),t.css("color","transparent");var a=e(".copy-api-key-confirmation").show();setTimeout(function(){a.fadeOut("fast"),setTimeout(function(){t.css("color","")},200)},1e3)}catch(e){alert("please press Ctrl/Cmd+C to copy")}n.val(i)}),e("input[name=table_migrate_option]").change(function(){e(".select-tables-wrap").hide(),"migrate_select"===e(this).val()&&e(".select-tables-wrap").show()}),e(".show-multiselect").each(function(){e(this).is(":checked")&&(e(this).parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),e(this).parents(".expandable-content").show(),e(this).parents(".expandable-content").children(".select-wrap").toggle())}),e("input[name=backup_option]").change(function(){e(".backup-tables-wrap").hide(),"backup_manual_select"===e(this).val()&&e(".backup-tables-wrap").show()}),e("#backup-manual-select").is(":checked")&&e(".backup-tables-wrap").show(),e(".plugin-compatibility-save").click(function(){if(!a.doing_plugin_compatibility_ajax){e(this).addClass("disabled");var t=e("#selected-plugins");e(t).attr("disabled","disabled"),e(".plugin-compatibility-success-msg").remove(),a.doing_plugin_compatibility_ajax=!0,e(this).after('<img src="'+a.spinner_url+'" alt="" class="plugin-compatibility-spinner general-spinner" />'),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_whitelist_plugins",whitelist_plugins:e(t).val(),nonce:wpmdb_data.nonces.whitelist_plugins},error:function(n,i,o){alert(wpmdb_strings.blacklist_problem+"\r\n\r\n"+wpmdb_strings.status+" "+n.status+" "+n.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+n.responseText),e(t).removeAttr("disabled"),e(".plugin-compatibility-save").removeClass("disabled"),a.doing_plugin_compatibility_ajax=!1,e(".plugin-compatibility-spinner").remove()},success:function(n){""!==e.trim(n)&&alert(n),e(t).removeAttr("disabled"),e(".plugin-compatibility-save").removeClass("disabled"),a.doing_plugin_compatibility_ajax=!1,e(".plugin-compatibility-spinner").remove(),e(".plugin-compatibility-save").after('<span class="plugin-compatibility-success-msg">'+wpmdb_strings.saved+"</span>"),e(".plugin-compatibility-success-msg").fadeOut(2e3)}})}}),e("body").on("click",".delete-profile",function(){var t=e(this).next().clone();if(e("input",t).remove(),t=e.trim(e(t).html()),confirm(wpmdb_strings.remove_profile.replace("{{profile}}",t))){var n=e(this).parent();if(n.find("input:checked").length){var i=n.siblings().last();if(i.find("input[type=radio]").prop("checked","checked"),i.find("input[type=text]").focus(),e("#migrate-form .crumbs .crumb:last").text("New Profile"),"function"==typeof window.history.pushState){var o=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile=-1";window.history.pushState({updated_profile_id:-1},null,o)}}n.fadeOut(500),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:e(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(e,t,n){alert(wpmdb_strings.remove_profile_problem)},success:function(e){"-1"===e&&alert(wpmdb_strings.remove_profile_not_found)}})}}),e(".main-list-delete-profile-link").click(function(){var t=e(this).prev().html();confirm(wpmdb_strings.remove_profile.replace("{{profile}}",t))&&(e(this).parent().fadeOut(500),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:e(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(e,t,n){alert(wpmdb_strings.remove_profile_problem)}}))}),e("body").on("click",".temp-disabled",function(){confirm(wpmdb_strings.change_connection_info)&&(e(".ssl-notice").hide(),e(".different-plugin-version-notice").hide(),e(".migrate-db-button").show(),e(".temp-disabled").removeAttr("readonly"),e(".temp-disabled").removeClass("temp-disabled"),e(".connect-button").show(),e(".step-two").hide(),e(".connection-status").show().html(wpmdb_strings.enter_connection_info),a.connection_established=!1)}),e(".settings-tab input[type=checkbox]").change(function(){if("plugin-compatibility"!==e(this).attr("id")){var t=e(this).is(":checked"),n=e(this).attr("id"),i=e(this).closest("td").next("td").find(".setting-status");"allow_tracking"===e(this).attr("id")&&(wpmdb_data.allow_tracking=t?"1":""),e(".ajax-success-msg").remove(),i.after(a.ajax_spinner),e.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",checked:t,setting:n,nonce:wpmdb_data.nonces.save_setting},error:function(t,n,i){alert(wpmdb_strings.save_settings_problem),e(".ajax-spinner").remove()},success:function(t){e(".ajax-spinner").remove(),i.append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),e(".ajax-success-msg").fadeOut(2e3,function(){e(this).remove()})}})}}),e(".migrate-form").submit(function(e){e.preventDefault()}),e(".connect-button").click(function(n){n.preventDefault(),e(this).blur(),t.functions.connection_box_changed()}),e(".pull-push-connection-info").bind("paste",function(e){setTimeout(function(){t.functions.connection_box_changed()},0)}),e("body").on("click",".try-again",function(){e(".pull-push-connection-info").removeClass("temp-disabled"),t.functions.connection_box_changed()}),e("body").on("click",".try-http",function(){var n=e.trim(e(".pull-push-connection-info").val()).split("\n"),i=n[0].replace("https","http")+"\n"+n[1];e(".pull-push-connection-info").val(i),t.functions.connection_box_changed()}),e(".create-new-profile").change(function(){a.profile_name_edited=!0}),e("body").on("click",".temporarily-disable-ssl",function(){var t="";window.location.hash&&(t=window.location.hash.substring(1)),e(this).attr("href",e(this).attr("href")+"&hash="+t)}),e("body").on("click",".pause-resume",function(e){a.set_pause_resume_button(e)}),e("body").on("click",".cancel",function(e){a.cancel_migration(e)}),e(".enter-licence").click(function(){e(".settings").click(),e(".licence-input").focus()}),e("body").on("click",".copy-licence-to-remote-site",function(){e(".connection-status").html(wpmdb_strings.copying_license),e(".connection-status").removeClass("notification-message error-notice migration-error"),e(".connection-status").append(a.ajax_spinner);var n=e.trim(e(".pull-push-connection-info").val()).split("\n");a.doing_ajax=!0,a.disable_export_type_controls(),e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_copy_licence_to_remote_site",url:n[0],key:n[1],nonce:wpmdb_data.nonces.copy_licence_to_remote_site},error:function(t,n,i){e(".connection-status").html(a.get_ajax_errors(t.responseText,"(#143)",t)),e(".connection-status").addClass("notification-message error-notice migration-error"),e(".ajax-spinner").remove(),a.doing_ajax=!1,a.enable_export_type_controls()},success:function(n){if(e(".ajax-spinner").remove(),a.doing_ajax=!1,a.enable_export_type_controls(),void 0!==n.wpmdb_error&&1===n.wpmdb_error)return e(".connection-status").html(n.body),e(".connection-status").addClass("notification-message error-notice migration-error"),void(n.body.indexOf("401 Unauthorized")>-1&&e(".basic-access-auth-wrapper").show());t.functions.connection_box_changed()}})}),e("body").on("click",".reactivate-licence",function(t){a.doing_ajax=!0,e(".invalid-licence").empty().html(wpmdb_strings.attempting_to_activate_licence),e(".invalid-licence").append(a.ajax_spinner),e.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_reactivate_licence",nonce:wpmdb_data.nonces.reactivate_licence},error:function(t,n,i){e(".invalid-licence").html(wpmdb_strings.activate_licence_problem),e(".invalid-licence").append("<br /><br />"+wpmdb_strings.status+": "+t.status+" "+t.statusText+"<br /><br />"+wpmdb_strings.response+"<br />"+t.responseText),e(".ajax-spinner").remove(),a.doing_ajax=!1},success:function(t){if(e(".ajax-spinner").remove(),a.doing_ajax=!1,void 0===t.wpmdb_error||1!==t.wpmdb_error){if(void 0!==t.wpmdb_dbrains_api_down&&1===t.wpmdb_dbrains_api_down)return e(".invalid-licence").html(wpmdb_strings.temporarily_activated_licence),void e(".invalid-licence").append(t.body);e(".invalid-licence").empty().html(wpmdb_strings.licence_reactivated),location.reload()}else e(".invalid-licence").html(t.body)}})}),e("input[name=table_migrate_option]").change(function(){a.maybe_show_mixed_cased_table_name_warning(),e.wpmdb.do_action("wpmdb_tables_to_migrate_changed")}),e("body").on("change","#select-tables",function(){a.maybe_show_mixed_cased_table_name_warning(),e.wpmdb.do_action("wpmdb_tables_to_migrate_changed")}),e.wpmdb.add_filter("wpmdb_get_table_prefix",a.get_table_prefix),e.wpmdb.add_filter("wpmdb_get_tables_to_migrate",t.functions.get_tables_to_migrate),e.wpmdb.add_action("wpmdb_lock_replace_url",a.lock_replace_url),e.wpmdb.add_action("wpmdb_pin_replace_url",a.pin_replace_url),e.wpmdb.add_action("move_connection_info_box",t.functions.exclude_post_types_warning),e.wpmdb.add_filter("wpmdb_before_migration_complete_hooks",function(t){return a.pause_before_finalize=!!e("input[name=pause_before_finalize]:checked").length,!0===a.pause_before_finalize&&"savefile"!==a.migration_intent&&(a.set_pause_resume_button(null),window.is_auto_pause_before_finalize=!0),t}),e(".wpmdb-switch").on("click",function(t){e(this).hasClass("disabled")||a.set_checkbox(e(this).attr("id"))}),e("#beta_optin-wrap").on("click",function(t){e(this).find("span.on").hasClass("checked")||wpmdb_data.is_beta_plugins_installed&&confirm(wpmdb_strings.rollback_beta_to_stable)&&(window.location=wpmdb_data.rollback_to_stable_url)})})}(jQuery,r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(3)),o=r(n(12)),a=r(n(13));function r(e){return e&&e.__esModule?e:{default:e}}var s=window.jQuery,c=window.ajaxurl,l=window.wpmdb_strings,p=window.wpmdb_data,d=function(){function e(){(0,o.default)(this,e),this.show_ssl_notice=!1,this.doing_save_profile=!1,this.doing_ajax=!1,this.profile_name_edited=!1,this.migration_intent=null,this.doing_licence_registration_ajax=!1,this.migration_paused=!1,this.last_replace_switch=wpmdb.functions.wpmdb_migration_type(),this.connection_established=!1,this.profile_name_edited=!1,this.checked_licence=!1,this.show_prefix_notice=!1,this.show_ssl_notice=!1,this.force_reconnect=!1,this.migration_selection="",this.show_version_notice=!1,this.migration_completed=!1,this.currently_migrating=!1,this.dump_filename="",this.dump_path="",this.migration_intent="",this.remote_site=null,this.secret_key=null,this.form_data=null,this.stage=null,this.elapsed_interval=null,this.completed_msg=null,this.tables_to_migrate=[],this.migration_paused=!1,this.previous_progress_title="",this.previous_progress_text_primary="",this.previous_progress_text_secondary="",this.cancelling_text="",this.paused_text="",this.migration_cancelled=!1,this.flag_skip_delay=!1,this.delay_between_requests=0,this.fade_duration=400,this.pause_before_finalize=!1,this.is_auto_pause_before_finalize=!1,this.$connection_info_box=s(".connection-info-wrapper"),this.$push_select=window.wpmdb.$push_select=s("#select-tables").clone(),this.$pull_select=window.wpmdb.$pull_select=s("#select-tables").clone(),this.$push_post_type_select=s("#select-post-types").clone(),this.$pull_post_type_select=s("#select-post-types").clone(),this.$push_select_backup=s("#select-backup").clone(),this.$pull_select_backup=s("#select-backup").clone(),this.spinner_url=window.spinner_url=wpmdb.functions.get_spinner_url(),this.ajax_spinner=window.ajax_spinner='<img src="'+this.spinner_url+'" alt="" class="ajax-spinner general-spinner" />'}return(0,a.default)(e,[{key:"pad",value:function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e}},{key:"is_int",value:function(e){return"number"==typeof(e=parseInt(e))&&0==e%1}},{key:"get_intersect",value:function(e,t){var n,i,o=[],a={},r=t.length;for(n=0;n<r;n++)a[t[n]]=!0;for(r=e.length,n=0;n<r;n++)(i=e[n])in a&&o.push(i);return o}},{key:"pin_replace_url",value:function(e){!0===e&&1>s(".replace-row.pin").length&&1===s("#old-url").length&&s("#old-url").parents(".replace-row").addClass("pin"),!1===e&&0<s(".replace-row.pin").length&&s(".replace-row.pin").removeClass("pin")}},{key:"get_ajax_errors",value:function(e,t,n){return wpmdb.functions.wpmdbGetAjaxErrors(l.connection_local_server_problem,t,e,n)}},{key:"refresh_debug_log",value:function(){s.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_get_log",nonce:p.nonces.get_log},error:function(e,t,n){alert(l.update_log_problem)},success:function(e){s(".debug-log-textarea").val(e)}})}},{key:"get_query_var",value:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}},{key:"maybe_show_ssl_warning",value:function(e,t,n){var i=e.substr(0,e.indexOf(":")),o=s(".ssl-notice");if(this.show_ssl_notice||o.hide(),n!==i&&-1!==e.indexOf("https"))return o.show(),this.show_ssl_notice=!0,e=e.replace("https","http"),void s(".pull-push-connection-info").val(e+"\n"+t);this.show_ssl_notice=!1}},{key:"valid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|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)}},{key:"refresh_table_selects",value:function(){void 0!==p&&void 0!==p.this_tables&&void 0!==p.this_table_sizes_hr&&(this.$push_select=this.create_table_select(p.this_tables,p.this_table_sizes_hr,s(wpmdb.$push_select).val())),void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.tables&&void 0!==wpmdb.common.connection_data.table_sizes_hr&&(this.$pull_select=this.create_table_select(wpmdb.common.connection_data.tables,wpmdb.common.connection_data.table_sizes_hr,s(wpmdb.$pull_select).val()))}},{key:"save_active_profile",value:function(){var e,t=this;if(s(".save-settings-button").blur(),!this.doing_save_profile&&!0!==this.maybe_show_select_table_notice()){var n=!1;s("#create_new").is(":checked")&&(n=!0);var i=s(".create-new-profile").val();this.doing_save_profile=!0,e=s(s("#migrate-form")[0].elements).not(".auth-credentials").serialize(),s(".save-settings-button").attr("disabled","disabled").after('<img src="'+this.spinner_url+'" alt="" class="save-profile-ajax-spinner general-spinner" />'),this.doing_ajax=!0,s.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_profile",profile:e,nonce:p.nonces.save_profile},error:function(e,n,i){t.doing_ajax=!1,alert(l.save_profile_problem),s(".save-settings-button").removeAttr("disabled"),s(".save-profile-ajax-spinner").remove(),s(".save-settings-button").after('<span class="ajax-success-msg">'+l.saved+"</span>"),s(".ajax-success-msg").fadeOut(2e3,function(){s(this).remove()}),t.doing_save_profile=!1},success:function(e){var o=parseInt(s("#migrate-form input[name=save_migration_profile_option]:checked").val(),10)+1;if(t.doing_ajax=!1,s(".save-settings-button").removeAttr("disabled"),s(".save-profile-ajax-spinner").remove(),s(".save-settings-button").after('<span class="ajax-success-msg">'+l.saved+"</span>"),s(".ajax-success-msg").fadeOut(2e3,function(){s(this).remove()}),t.doing_save_profile=!1,s(".create-new-profile").val(""),n){var a=parseInt(e,10),r=a+1,c=s('<li><span class="delete-profile" data-profile-id="'+r+'"></span><label for="profile-'+r+'"><input id="profile-'+r+'" value="'+a+'" name="save_migration_profile_option" type="radio"></label></li>');c.find("label").append(document.createTextNode(" "+i)),o=r,s("#create_new").parents("li").before(c),s("#profile-"+r).attr("checked","checked")}var d=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile="+o,m=s("#migrate-form input[name=save_migration_profile_option]:checked").parent().text().trim();if("function"==typeof window.history.pushState){if(s("#migrate-form .crumbs").length)s("#migrate-form .crumbs .crumb:last").text(m);else{var u=s('<div class="crumbs" />').append('<a class="crumb" href="'+p.this_plugin_base+'"> Saved Profiles </a>').append('<span class="crumb">'+m+"</span>");s("#migrate-form").prepend(u)}window.history.pushState({updated_profile_id:o},null,d)}}})}}},{key:"cancel_migration",value:function(e){this.migration_cancelled=!0,this.cancelling_text=l.cancelling_migration,s(".migration-controls").css({visibility:"hidden"}),"find_replace"===this.migration_intent&&(this.cancelling_text=l.cancelling_find_replace),wpmdb.current_migration.setState(this.cancelling_text,l.completing_current_request,"cancelling"),!0===this.migration_paused&&(this.migration_paused=!1,wpmdb.functions.execute_next_step())}},{key:"set_checkbox",value:function(e){var t=s("#"+e),n=t.find("input[type=checkbox]");t.toggleClass("on").find("span").toggleClass("checked");var i=t.find("span.on").hasClass("checked");n.attr("checked",i).trigger("change")}},{key:"move_connection_info_box",value:function(){var e,t,n,i,o,a,r=s(".connection-status"),c=s(".directory-permission-notice"),l=s(".compatibility-older-mysql"),d=s(".mst-required"),m=s(".keep-active-plugins"),u=s(".step-two"),_=s(".backup-options"),h=wpmdb.functions.wpmdb_migration_type();if(r.hide(),c.hide(),u.show(),_.show(),m.show(),l.hide(),d.hide(),wpmdb.functions.wpmdb_toggle_migration_action_text(),s(".migrate-tab").attr("class","migrate-tab content-tab").addClass(wpmdb.functions.wpmdb_migration_type()),s.wpmdb.do_action("move_connection_info_box",{migration_type:h,last_migration_type:this.last_replace_switch}),-1!==s.inArray(h,["push","pull"])){var f=s(".pull-push-connection-info"),g=s.trim(f.val()).split("\n"),b=s("."+h+"-list li");if(b.append(this.$connection_info_box),this.$connection_info_box.show(function(){var e=s(this).find(".pull-push-connection-info");e.val()||e.focus()}),h!==this.last_replace_switch&&2===g.length)return wpmdb.force_reconnect=!0,b.append(this.$connection_info_box),f.removeClass("temp-disabled").attr("readonly","readonly"),s(".connect-button").hide(),void wpmdb.functions.connection_box_changed();this.connection_established?(r.hide(),u.show(),wpmdb.functions.wpmdb_toggle_migration_action_text(),"pull"===h?(t=wpmdb.common.connection_data.prefix,n=p.site_details.prefix,i=p.this_uploads_dir,o=p.this_upload_dir_long,a=p.write_permission):(t=p.this_prefix,n=wpmdb.common.connection_data.prefix,i=wpmdb.common.connection_data.uploads_dir,o=wpmdb.common.connection_data.upload_dir_long,a=wpmdb.common.connection_data.write_permissions),s(".table_prefix").html(t),s(".backup-table-prefix").html(n),s(".uploads-dir").html(i),this.maybe_show_backup_disabled_msg(o,a),!1===this.profile_name_edited&&(e=this.get_domain_name(wpmdb.common.connection_data.url),s(".create-new-profile").val(e))):(r.show(),u.hide())}else if(-1!==s.inArray(h,["find_replace","savefile"]))if(r.hide(),u.show(),s(".table-prefix").html(p.this_prefix),!1===this.profile_name_edited&&s(".create-new-profile").val(""),m.hide(),"savefile"===h)_.hide(),l.show(),"false"===p.write_permission&&(c.show(),u.hide());else{if("true"===p.is_multisite){var w=s(".old-replace-col").eq(1);w.parent().removeClass("pin").find(".replace-remove-row").show(),w.find("input").removeAttr("readonly")}this.maybe_show_backup_disabled_msg(p.this_upload_dir_long,p.write_permission)}this.maybe_show_mixed_cased_table_name_warning()}},{key:"maybe_show_backup_disabled_msg",value:function(e,t){var n=s("#create-backup"),i=s("#create-backup-label"),o=s(".backup-option-disabled");n.removeAttr("disabled"),i.removeClass("disabled"),o.hide(),"false"===t&&(n.prop("checked",!1),n.attr("disabled","disabled"),i.addClass("disabled"),o.show(),s(".upload-directory-location").html(e))}},{key:"change_replace_values",value:function(){var e=null,t=null,n=this;null!==wpmdb.common.previous_connection_data&&"object"===(0,i.default)(wpmdb.common.previous_connection_data)&&wpmdb.common.previous_connection_data.url!==wpmdb.common.connection_data.url&&(e=this.remove_protocol(wpmdb.common.previous_connection_data.url),t=wpmdb.common.previous_connection_data.path),"push"===wpmdb.functions.wpmdb_migration_type()||"savefile"===wpmdb.functions.wpmdb_migration_type()?("pull"===this.last_replace_switch?s(".replace-row").each(function(){var e=s(".old-replace-col input",this).val();s(".old-replace-col input",this).val(s(".replace-right-col input",this).val()),s(".replace-right-col input",this).val(e)}):"push"===this.last_replace_switch&&"push"===wpmdb.functions.wpmdb_migration_type()&&null!==e&&null!==t&&s(".replace-row").each(function(){var i=s(".replace-right-col input",this).val();i===t&&s(".replace-right-col input",this).val(wpmdb.common.connection_data.path),i===e&&s(".replace-right-col input",this).val(n.remove_protocol(wpmdb.common.connection_data.url))}),s.wpmdb.do_action("wpmdb_update_push_table_select"),s("#select-post-types").remove(),s(".exclude-post-types-warning").after(this.$push_post_type_select),wpmdb.functions.exclude_post_types_warning(),s("#select-backup").remove(),s(".backup-tables-wrap").prepend(this.$push_select_backup)):"pull"===wpmdb.functions.wpmdb_migration_type()&&(""===this.last_replace_switch||"push"===this.last_replace_switch||"savefile"===this.last_replace_switch?s(".replace-row").each(function(){var e=s(".old-replace-col input",this).val();s(".old-replace-col input",this).val(s(".replace-right-col input",this).val()),s(".replace-right-col input",this).val(e)}):"pull"===this.last_replace_switch&&"pull"===wpmdb.functions.wpmdb_migration_type()&&null!==e&&null!==t&&s(".replace-row").each(function(){var i=s(".old-replace-col input",this).val();i===t&&s(".old-replace-col input",this).val(wpmdb.common.connection_data.path),i===e&&s(".old-replace-col input",this).val(n.remove_protocol(wpmdb.common.connection_data.url))}),s.wpmdb.do_action("wpmdb_update_pull_table_select"),s("#select-post-types").remove(),s(".exclude-post-types-warning").after(this.$pull_post_type_select),wpmdb.functions.exclude_post_types_warning(),s("#select-backup").remove(),s(".backup-tables-wrap").prepend(this.$pull_select_backup)),this.last_replace_switch=wpmdb.functions.wpmdb_migration_type()}},{key:"switch_to_plugin_tab",value:function(e,t){s(".nav-tab").removeClass("nav-tab-active"),s(".nav-tab."+e).addClass("nav-tab-active"),s(".content-tab").hide(),s("."+e+"-tab").show(),"settings"===e&&!0===this.should_check_licence()&&(s("p.licence-status").append("Checking License... ").append(this.ajax_spinner),this.check_licence()),"help"===e&&(this.refresh_debug_log(),!0===this.should_check_licence()&&(s(".support-content p").append(this.ajax_spinner),this.check_licence())),"addons"===e&&!0!==t&&!0===this.should_check_licence()&&(s(".addons-content p").append(this.ajax_spinner),this.check_licence())}},{key:"hide_overlay",value:function(){s("#overlay").removeClass("show").addClass("hide"),s("#overlay > div").removeClass("show").addClass("hide"),wpmdb.current_migration.$proVersion.find("iframe").remove(),setTimeout(function(){s("#overlay").remove()},500),this.migration_completed=!1}},{key:"check_licence",value:function(e){var t=!this.doing_licence_registration_ajax;this.checked_licence=!0;var n=this;s.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_check_licence",licence:e,context:"all",nonce:p.nonces.check_licence},error:function(e,t,n){alert(l.license_check_problem)},success:function(e){var i,o,a,r=s(".support-content"),c=s(".addons-content"),l=s(".licence-status:not(.notification-message)");if(void 0!==e.dbrains_api_down)o=e.dbrains_api_down+e.message,a=e.dbrains_api_down;else if(void 0!==e.errors){if(void 0!==e.errors.subscription_expired)i=e.errors.subscription_expired.licence,o=e.errors.subscription_expired.support,a=e.errors.subscription_expired.addons;else{var p="";for(var d in e.errors)p+=e.errors[d];o=p,a=p}void 0!==e.addon_content&&(a+="\n"+e.addon_content)}else o=e.message,a=e.addon_content;t&&l.stop().fadeOut(n.fade_duration,function(){void 0===i&&(s(this).css({visibility:"hidden",display:"block"}).slideUp(),i=""),s(this).empty().html(i).stop().fadeIn(n.fade_duration)}),r.stop().fadeOut(n.fade_duration,function(){s(this).empty().html(o).stop().fadeIn(n.fade_duration)}),c.stop().fadeOut(n.fade_duration,function(){s(this).empty().html(a).stop().fadeIn(n.fade_duration)}),s("#plugin-compatibility").is(":not(:checked)")&&s("#compatibility-header").click()}})}},{key:"should_check_licence",value:function(){return!1===this.checked_licence&&"1"===p.has_licence&&"true"===p.is_pro}},{key:"maybe_show_mixed_cased_table_name_warning",value:function(){if(void 0!==wpmdb.common.connection_data&&!1!==wpmdb.common.connection_data){var e=wpmdb.functions.wpmdb_migration_type(),t=wpmdb.functions.get_tables_to_migrate(null,null);s(".mixed-case-table-name-notice").hide(),null!==t&&(t=t.join(""))!==t.toLowerCase()&&("1"===wpmdb.common.connection_data.lower_case_table_names||"push"!==e&&"savefile"!==e)&&("1"!==p.lower_case_table_names&&"pull"===e||("push"===e||"savefile"===e?s(".mixed-case-table-name-notice.push").show():s(".mixed-case-table-name-notice.pull").show()))}}},{key:"enable_pro_licence",value:function(e,t){s(".licence-input, .register-licence").remove(),s(".licence-not-entered").prepend(e.masked_licence),s(".support-content").empty().html("<p>"+l.fetching_license+'<img src="'+this.spinner_url+'" alt="" class="ajax-spinner general-spinner" /></p>'),this.check_licence(t),s(".migrate-selection label").removeClass("disabled"),s(".migrate-selection input").removeAttr("disabled")}},{key:"get_domain_name",value:function(e){return e.replace(/\/\/(.*)@/,"//").replace("http://","").replace("https://","").replace("www.","")}},{key:"update_domain_placeholder",value:function(e,t,n){var i=this.get_domain_name(t);return"completed"===n?e.replace(/\%s\s?/,"<span class=domain-label>"+i+"</span>&nbsp;"):e.replace(/\%s(\S*)\s?/,"<span class=domain-label>"+i+"$1</span>&nbsp;")}},{key:"get_migration_status_label",value:function(e,t,n){var i="",o="";switch(t){case"push":i=l.push_migration_label_migrating,o=l.push_migration_label_completed;break;case"pull":i=l.pull_migration_label_migrating,o=l.pull_migration_label_completed;break;case"find_replace":i=l.find_replace_label_migrating,o=l.find_replace_label_completed;break;case"savefile":i=l.exporting_please_wait,o=l.exporting_complete}var a=i;return"completed"===n&&(a=o),"push"!==t&&"pull"!==t||(a=this.update_domain_placeholder(a,e,n)),a=s.wpmdb.apply_filters("wpmdb_get_migration_status_label",a,{intent:t,stage:n})}},{key:"disable_export_type_controls",value:function(){s(".option-group").each(function(e){s("input",this).attr("disabled","disabled"),s("label",this).css("cursor","default")})}},{key:"enable_export_type_controls",value:function(){s(".option-group").each(function(e){s("input",this).removeAttr("disabled"),s("label",this).css("cursor","pointer")})}},{key:"set_slider_value",value:function(e,t,n,i){var o=t;void 0!==i&&(o=i),s(".slider",e).slider("value",parseInt(t)),s(".amount",e).html(wpmdb.functions.wpmdb_add_commas(o)+" "+n)}},{key:"set_pause_resume_button",value:function(e,t){!0===this.migration_paused?(this.migration_paused=!1,this.doing_ajax=!0,wpmdb.current_migration.setState(this.previous_progress_title,this.previous_progress_text_primary,"active"),s(".pause-resume").html(l.pause),wpmdb.current_migration.resumeTimer(),wpmdb.functions.execute_next_step(t)):(this.migration_paused=!0,this.doing_ajax=!1,this.paused_text=l.migration_paused,this.previous_progress_title=s(".progress-title").html(),this.previous_progress_text_primary=s(".progress-text",".progress-wrapper-primary").html(),this.previous_progress_text_secondary=s(".progress-text",".progress-wrapper-secondary ").html(),"find_replace"===this.migration_intent&&(this.paused_text=l.find_replace_paused),wpmdb.current_migration.setState(this.paused_text,l.completing_current_request,null),s("body").off("click",".pause-resume"),s("body").off("click",".cancel"))}},{key:"filter_temp_tables",value:function(e,t){var n=p.this_temp_prefix;return"pull"===wpmdb.functions.wpmdb_migration_type()&&void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.temp_prefix&&(n=wpmdb.common.connection_data.temp_prefix),n===t.substring(0,n.length)||e}},{key:"get_table_prefix",value:function(e,t){return s(".table-select-wrap .table-prefix").text()}},{key:"lock_replace_url",value:function(e){!0===e?(s('.replace-row.pin .replace-right-col input[type="text"]').attr("readonly","readonly"),s(".replace-row.pin .arrow-col").addClass("disabled")):(s('.replace-row.pin .replace-right-col input[type="text"]').removeAttr("readonly"),s(".replace-row.pin .arrow-col").removeClass("disabled"))}},{key:"set_connection_data",value:function(e){window.wpmdb.common.previous_connection_data=wpmdb.common.connection_data,window.wpmdb.common.connection_data=e,s.wpmdb.do_action("wpmdb_connection_data_updated",e)}},{key:"get_max_request_display_info",value:function(e){var t={unit:"MB"};return t.amount=(e/1024).toFixed(2),t}},{key:"establish_remote_connection_from_saved_profile",value:function(){var e=wpmdb.functions.wpmdb_migration_type(),t=s.trim(s(".pull-push-connection-info").val()).split("\n");if("undefined"!=typeof wpmdb_default_profile&&!0!==wpmdb_default_profile&&"savefile"!==e&&"find_replace"!==e&&"import"!==e&&!this.doing_ajax&&p.is_pro){this.doing_ajax=!0,this.disable_export_type_controls(),s(".connection-status").html(l.establishing_remote_connection),s(".connection-status").removeClass("notification-message error-notice migration-error"),s(".connection-status").append(this.ajax_spinner);var n=wpmdb.functions.wpmdb_migration_type(),i=this;s.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:t[0],key:t[1],intent:n,nonce:p.nonces.verify_connection_to_remote_site,convert_post_type_selection:wpmdb_convert_post_type_selection,profile:p.profile},error:function(e,t,n){s(".connection-status").html(i.get_ajax_errors(e.responseText,"(#102)",e)),s(".connection-status").addClass("notification-message error-notice migration-error"),s(".ajax-spinner").remove(),i.doing_ajax=!1,i.enable_export_type_controls()},success:function(e){if(s(".ajax-spinner").remove(),i.doing_ajax=!1,i.enable_export_type_controls(),void 0!==e.wpmdb_error&&1===e.wpmdb_error)return s(".connection-status").html(e.body),s(".connection-status").addClass("notification-message error-notice migration-error"),void(e.body.indexOf("401 Unauthorized")>-1&&s(".basic-access-auth-wrapper").show());if(!0!==wpmdb.functions.maybe_show_mst_warning(e)){i.maybe_show_ssl_warning(t[0],t[1],e.scheme),wpmdb.functions.maybe_show_prefix_notice(e.prefix),s(".pull-push-connection-info").addClass("temp-disabled"),s(".pull-push-connection-info").attr("readonly","readonly"),s(".connect-button").hide(),s(".connection-status").hide(),s(".step-two").show(),i.connection_established=!0,i.set_connection_data(e),i.move_connection_info_box(),i.maybe_show_mixed_cased_table_name_warning();var n="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables&&(n=wpmdb_loaded_tables),i.$pull_select=wpmdb.functions.create_table_select(wpmdb.common.connection_data.tables,wpmdb.common.connection_data.table_sizes_hr,n);var o="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_post_types&&(void 0!==e.select_post_types?(s("#exclude-post-types").attr("checked","checked"),s(".post-type-select-wrap").show(),o=e.select_post_types):o=wpmdb_loaded_post_types);var a=document.createElement("select");s(a).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),s.each(wpmdb.common.connection_data.post_types,function(e,t){var n=s.inArray(t,o);n=-1!==n||!0===wpmdb_convert_exclude_revisions&&"revision"!==t?' selected="selected" ':" ",s(a).append("<option"+n+'value="'+t+'">'+t+"</option>")}),i.$pull_post_type_select=a;var r="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables_backup&&(r=wpmdb_loaded_tables_backup);var c=document.createElement("select");s(c).attr({multiple:"multiple",name:"select_backup[]",id:"select-backup",class:"multiselect"}),s.each(wpmdb.common.connection_data.tables,function(e,t){var n=s.inArray(t,r);n=-1!==n?' selected="selected" ':" ",s(c).append("<option"+n+'value="'+t+'">'+t+" ("+wpmdb.common.connection_data.table_sizes_hr[t]+")</option>")}),i.$push_select_backup=c,"pull"===wpmdb.functions.wpmdb_migration_type()?(s.wpmdb.do_action("wpmdb_update_pull_table_select"),s("#select-post-types").remove(),s(".exclude-post-types-warning").after(i.$pull_post_type_select),s("#select-backup").remove(),s(".backup-tables-wrap").prepend(i.$pull_select_backup),s(".table-prefix").html(e.prefix),s(".uploads-dir").html(p.this_uploads_dir)):(s("#select-backup").remove(),s(".backup-tables-wrap").prepend(i.$push_select_backup)),s.wpmdb.do_action("verify_connection_to_remote_site",wpmdb.common.connection_data)}else s(".connection-status").hide()}})}}},{key:"migrate_table_recursive",value:function(e,t,n){var i=this,o=n||0;if(o>=this.tables_to_migrate.length)if("upload"===this.stage&&wpmdb.current_migration.model.getStageItems("find_replace").length)this.stage="find_replace",this.tables_to_migrate=wpmdb.current_migration.model.getStageItems("find_replace","name"),this.tables_to_migrate=this.tables_to_migrate.map(function(e){return"_mig_"+e}),o=0;else{if("backup"!==this.stage)return s(".progress-label").removeClass("label-visible"),wpmdb.common.hooks=s.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",wpmdb.common.hooks),wpmdb.common.hooks.push(wpmdb.functions.migration_complete),wpmdb.common.hooks.push(wpmdb.functions.wpmdb_flush),wpmdb.common.hooks=s.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",wpmdb.common.hooks),wpmdb.common.hooks.push(wpmdb.functions.migration_complete_events),wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},void wpmdb.functions.execute_next_step();if(-1!==s.inArray(this.migration_intent,["push","pull"])?this.stage="migrate":"import"===this.migration_intent?this.stage="upload":this.stage=this.migration_intent,wpmdb.current_migration.model.setActiveStage(this.stage),"find_replace"!==this.stage&&"migrate"!==this.stage)return void wpmdb.functions.wpmdb_call_next_hook();o=0,this.tables_to_migrate=wpmdb.functions.get_tables_to_migrate(null,null)}var a=0;o===this.tables_to_migrate.length-1&&(a=1);var r=0;-1!==s.inArray(this.migration_intent,["push","pull"])&&1===parseInt(wpmdb.common.connection_data.gzip)&&(r=1);var d={action:"wpmdb_migrate_table",migration_state_id:wpmdb.migration_state_id,table:this.tables_to_migrate[o],stage:this.stage,current_row:e,last_table:a,primary_keys:t,gzip:r,nonce:p.nonces.migrate_table};-1!==s.inArray(this.migration_intent,["push","pull"])&&(d.bottleneck=wpmdb.common.connection_data.bottleneck,d.prefix=wpmdb.common.connection_data.prefix),wpmdb.common.connection_data&&wpmdb.common.connection_data.path_current_site&&wpmdb.common.connection_data.domain&&(d.path_current_site=wpmdb.common.connection_data.path_current_site,d.domain_current_site=wpmdb.common.connection_data.domain),this.doing_ajax=!0,s.ajax({url:c,type:"POST",dataType:"text",cache:!1,timeout:0,data:d,error:function(e,t,n){var a=l.table_process_problem+" "+i.tables_to_migrate[o]+"<br /><br />"+l.status+": "+e.status+" "+e.statusText+"<br /><br />"+l.response+":<br />"+e.responseText;wpmdb.current_migration.setState(l.migration_failed,a,"error"),i.doing_ajax=!1,console.log(e),console.log(t),console.log(n),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(e){i.doing_ajax=!1,e=s.trim(e);var t=wpmdb.functions.wpmdb_parse_json(e),n="";if(!1===t||null===t)return n=""===e||null===e?l.table_process_problem_empty_response+" "+i.tables_to_migrate[o]:i.get_ajax_errors(e,null,null),wpmdb.current_migration.setState(l.migration_failed,n,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();if(void 0!==t.wpmdb_error&&1===t.wpmdb_error)return wpmdb.current_migration.setState(l.migration_failed,t.body,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();var r=i.tables_to_migrate[o];"import"===i.migration_intent&&"find_replace"===i.stage&&(r=r.replace(p.this_temp_prefix,"")),wpmdb.current_migration.setText(),wpmdb.current_migration.model.getStageModel(i.stage).setItemRowsTransferred(r,t.current_row),1===a&&"savefile"===i.migration_intent&&(void 0!==t.dump_filename&&(i.dump_filename=t.dump_filename),void 0!==t.dump_path&&(i.dump_path=t.dump_path)),-1===parseInt(t.current_row)&&(o++,t.current_row="",t.primary_keys=""),wpmdb.common.next_step_in_migration={fn:wpmdb.functions.migrate_table_recursive,args:[t.current_row,t.primary_keys,o]},wpmdb.functions.execute_next_step()}})}},{key:"migration_complete_events",value:function(){if(!1===wpmdb.common.migration_error)if(""===wpmdb.common.non_fatal_errors)if("savefile"!==this.migration_intent&&!0===s("#save_computer").is(":checked")&&wpmdb.current_migration.setText(),this.completed_msg=this.completed_msg+'&nbsp;<div class="dashicons dashicons-yes"></div>',!0===this.migration_cancelled){var e=l.migration_cancelled_success;"find_replace"===this.migration_intent&&(e=l.find_replace_cancelled_success),wpmdb.current_migration.setState(this.completed_msg,e,"cancelled")}else wpmdb.current_migration.setState(this.completed_msg,"","complete");else wpmdb.current_migration.setState(l.completed_with_some_errors,wpmdb.common.non_fatal_errors,"error");s(".migration-controls").addClass("hidden"),wpmdb.common.hooks=[],wpmdb.common.call_stack=[],wpmdb.common.migration_error=!1,this.currently_migrating=!1,this.migration_completed=!0,this.migration_paused=!1,this.migration_cancelled=!1,this.doing_ajax=!1,wpmdb.common.non_fatal_errors="",this.tables_to_migrate=[],s(".progress-label").remove(),s(".migration-progress-ajax-spinner").remove(),s(".close-progress-content").show(),s("#overlay").css("cursor","pointer"),wpmdb.current_migration.model.setMigrationComplete()}},{key:"migration_complete",value:function(){var e=this;if(s(".migration-controls").addClass("hidden"),"savefile"===this.migration_intent){this.currently_migrating=!1;var t=l.migration_complete;if(s("#save_computer").is(":checked")){var n=p.this_download_url+encodeURIComponent(this.dump_filename);s("#gzip_file").is(":checked")&&(n+="&gzip=1"),window.location=n}else t=l.completed_dump_located_at+" "+this.dump_path;!1===wpmdb.common.migration_error&&(wpmdb.functions.migration_complete_events(),wpmdb.current_migration.setState(this.completed_msg,t,"complete"))}else{wpmdb.current_migration.setState(null,l.finalizing_migration,"finalizing");var i={action:"wpmdb_finalize_migration",migration_state_id:wpmdb.migration_state_id,tables:this.tables_to_migrate.join(","),nonce:p.nonces.finalize_migration};-1!==s.inArray(this.migration_intent,["push","pull"])&&(i.prefix=wpmdb.common.connection_data.prefix),this.doing_ajax=!0,s.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:i,error:function(t,n,i){e.doing_ajax=!1,wpmdb.current_migration.setState(l.migration_failed,l.finalize_tables_problem,"error"),alert(t+" : "+n+" : "+i),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,"1"!==s.trim(t))return wpmdb.current_migration.setState(l.migration_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},wpmdb.functions.execute_next_step()}})}}},{key:"wpmdb_flush",value:function(){var e=this;"savefile"!==this.migration_intent&&(wpmdb.current_migration.setText(l.flushing),this.doing_ajax=!0,s.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:wpmdb.migration_state_id,nonce:p.nonces.flush},error:function(t,n,i){e.doing_ajax=!1,wpmdb.current_migration.setState(l.migration_failed,l.flush_problem,"error"),alert(t+" : "+n+" : "+i),wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,"1"!==s.trim(t))return wpmdb.current_migration.setState(l.migration_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();wpmdb.common.next_step_in_migration={fn:wpmdb.functions.wpmdb_call_next_hook},wpmdb.functions.execute_next_step()}}))}},{key:"execute_next_step",value:function(){var e=this;if(0<this.delay_between_requests&&!1===this.flag_skip_delay)setTimeout(function(){this.flag_skip_delay=!0,wpmdb.functions.execute_next_step()},this.delay_between_requests);else if(this.flag_skip_delay=!1,!0===this.migration_paused){s(".migration-progress-ajax-spinner").hide(),wpmdb.current_migration.pauseTimer();var t="";!0===this.is_auto_pause_before_finalize?(t=l.paused_before_finalize,this.is_auto_pause_before_finalize=!1,"find_replace"===wpmdb.functions.wpmdb_migration_type()&&(t=l.find_replace_paused_before_finalize)):t=l.paused,wpmdb.current_migration.setState(null,t,"paused"),s("body").on("click",".pause-resume",function(e){this.set_pause_resume_button(e)}),s("body").on("click",".cancel",function(e){this.cancel_migration(e)}),s(".pause-resume").html(l.resume)}else if(!0===this.migration_cancelled){var n;this.migration_intent=wpmdb.functions.wpmdb_migration_type(),"savefile"===this.migration_intent?n=l.removing_local_sql:"pull"===this.migration_intent?n="backup"===this.stage?l.removing_local_backup:l.removing_local_temp_tables:"push"===this.migration_intent&&(n="backup"===this.stage?l.removing_remote_sql:l.removing_remote_temp_tables),wpmdb.current_migration.setText(n);var i={action:"wpmdb_cancel_migration",migration_state_id:wpmdb.migration_state_id,nonce:p.nonces.cancel_migration};this.doing_ajax=!0,s.ajax({url:c,type:"POST",dataType:"text",cache:!1,data:i,error:function(t,n,i){wpmdb.current_migration.setState(l.migration_cancellation_failed,l.manually_remove_temp_files+"<br /><br />"+l.status+": "+t.status+" "+t.statusText+"<br /><br />"+l.response+":<br />"+t.responseText,"error"),console.log(t),console.log(n),console.log(i),e.doing_ajax=!1,wpmdb.common.migration_error=!0,wpmdb.functions.migration_complete_events()},success:function(t){if(e.doing_ajax=!1,t=s.trim(t),"push"===e.migration_intent&&"1"!==t||"push"!==e.migration_intent&&""!==t)return void 0!==t&&void 0!==t.wpmdb_error&&1===t.wpmdb_error&&(t=t.wpmdb_error),wpmdb.current_migration.setState(l.migration_cancellation_failed,t,"error"),wpmdb.common.migration_error=!0,void wpmdb.functions.migration_complete_events();e.completed_msg=l.migration_cancelled,"find_replace"===e.migration_intent&&(e.completed_msg=l.find_replace_cancelled),wpmdb.functions.migration_complete_events(),wpmdb.current_migration.setStatus("cancelled")}})}else wpmdb.common.next_step_in_migration.fn.apply(null,wpmdb.common.next_step_in_migration.args)}},{key:"maybe_show_prefix_notice",value:function(e){var t=s(".prefix-notice");t.hide(),e!==p.this_prefix&&(s(".remote-prefix").html(e),this.show_prefix_notice=!0,t.show())}},{key:"maybe_show_select_table_notice",value:function(){if(s("#migrate-selected").is(":checked")&&null===s("#select-tables").val()){if("import"!==wpmdb.functions.wpmdb_migration_type())return alert(l.please_select_one_table),!0;if(s("#import-find-replace").is(":checked")&&s("#select-tables").is(":visible"))return alert(l.please_select_one_table_import),!0}return!("savefile"===wpmdb.functions.wpmdb_migration_type()||!s("#backup-manual-select").is(":checked")||null!==s("#select-backup").val())&&(alert(l.please_select_one_table_backup),!0)}},{key:"remove_protocol",value:function(e){return e.replace(/^https?:/i,"")}},{key:"create_table_select",value:function(e,t,n){var i=document.createElement("select");return s(i).attr({multiple:"multiple",name:"select_tables[]",id:"select-tables",class:"multiselect"}),0<e.length&&s.each(e,function(e,o){if(!s.wpmdb.apply_filters("wpmdb_exclude_table",!1,o)){var a=" ";void 0!==n&&null!==n&&0<n.length&&-1!==s.inArray(o,n)&&(a=' selected="selected" ');var r="";0!==t.length&&(r=" ("+t[o]+")"),s(i).append("<option"+a+'value="'+o+'">'+o+r+"</option>")}}),i}},{key:"get_tables_to_migrate",value:function(){var e=[],t=wpmdb.functions.wpmdb_migration_type();return"migrate_select"===s("input[name=table_migrate_option]:checked").val()?e=s("#select-tables").val():"pull"!==t&&void 0!==p.this_prefixed_tables?e=p.this_prefixed_tables:"pull"===t&&void 0!==wpmdb.common.connection_data&&void 0!==wpmdb.common.connection_data.prefixed_tables&&(e=wpmdb.common.connection_data.prefixed_tables),e}},{key:"update_migrate_button_text",value:function(){var e=wpmdb.functions.wpmdb_migration_type(),t=s("#save-migration-profile").is(":checked")?"_save":"",n="migrate_button_"+("savefile"===e?"export":e)+t;s(".migrate-db .button-primary").val(l[n])}},{key:"connection_box_changed",value:function(){var e=this,t=s(".pull-push-connection-info");if(-1!==s.inArray(wpmdb.functions.wpmdb_migration_type(),["push","pull"])&&(!this.doing_ajax&&!s(t).hasClass("temp-disabled")||!1!==wpmdb.force_reconnect)){wpmdb.force_reconnect=!1;var n=s(".pull-push-connection-info").val(),i=s.trim(n).split("\n"),o=!1,a="";if(""===i&&(o=!0,a=l.connection_info_missing),1===i.length&&!o){var r=s.trim(n).split(" ");2===r.length&&(i=r)}2===i.length||o||(o=!0,a=l.connection_info_incorrect),o||this.validate_url(i[0])||(o=!0,a=l.connection_info_url_invalid);var d=0;if(void 0!==i[1]&&(d=i[1].length),o||32===d||40===d||(o=!0,a=l.connection_info_key_invalid),o||i[0]!==p.connection_info[0]||(o=!0,a=l.connection_info_local_url),o||i[1]!==p.connection_info[1]||(o=!0,a=l.connection_info_local_key),o)return s(".connection-status").html(a),void s(".connection-status").addClass("notification-message error-notice migration-error");var m=i[0]+"\n"+i[1];1===s.trim(n).split("\n").length&&s(".pull-push-connection-info").val(m),!1===p.openssl_available&&(i[0]=i[0].replace("https://","http://"),m=i[0]+"\n"+i[1],s(".pull-push-connection-info").val(m)),this.show_prefix_notice=!1,this.doing_ajax=!0,this.disable_export_type_controls(),s(".basic-access-auth-wrapper").is(":visible")&&(i[0]=i[0].replace(/\/\/(.*)@/,"//"),i[0]=i[0].replace("//","//"+encodeURIComponent(s.trim(s(".auth-username").val()))+":"+encodeURIComponent(s.trim(s(".auth-password").val()))+"@"),m=i[0]+"\n"+i[1],s(".pull-push-connection-info").val(m),s(".basic-access-auth-wrapper").hide()),s(".step-two").hide(),s(".ssl-notice").hide(),s(".prefix-notice").hide(),s(".connection-status").show(),s(".connection-status").html(l.establishing_remote_connection),s(".connection-status").removeClass("notification-message error-notice migration-error"),s(".connection-status").append(this.ajax_spinner);var u=wpmdb.functions.wpmdb_migration_type();return this.profile_name_edited=!1,s.ajax({url:c,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:i[0],key:i[1],intent:u,nonce:p.nonces.verify_connection_to_remote_site},error:function(t,n,i){s(".connection-status").html(e.get_ajax_errors(t.responseText,"(#100)",t)),s(".connection-status").addClass("notification-message error-notice migration-error"),s(".ajax-spinner").remove(),e.doing_ajax=!1,e.enable_export_type_controls()},success:function(t){if(s(".ajax-spinner").remove(),e.doing_ajax=!1,e.enable_export_type_controls(),void 0!==t.wpmdb_error&&1===t.wpmdb_error)return s(".connection-status").html(t.body),s(".connection-status").addClass("notification-message error-notice migration-error"),t.body.indexOf("401 Unauthorized")>-1&&s(".basic-access-auth-wrapper").show(),void(s(".pull-push-connection-info").hasClass("temp-disabled")||s(".connect-button").is(":visible")||(s(".pull-push-connection-info").removeAttr("readonly"),s(".connect-button").show()));if(!0!==wpmdb.functions.maybe_show_mst_warning(t)){e.maybe_show_ssl_warning(i[0],i[1],t.scheme);var n=e.get_domain_name(t.url);s(".create-new-profile").val(n),s(".pull-push-connection-info").addClass("temp-disabled"),s(".pull-push-connection-info").attr("readonly","readonly"),s(".connect-button").hide(),s(".connection-status").hide(),s(".step-two").show(),wpmdb.functions.maybe_show_prefix_notice(t.prefix),e.connection_established=!0,e.set_connection_data(t),e.move_connection_info_box(),e.change_replace_values(),e.maybe_show_mixed_cased_table_name_warning(),e.refresh_table_selects(null,null,e),e.$push_select_backup=s(e.$pull_select).clone(),s(e.$push_select_backup).attr({name:"select_backup[]",id:"select-backup"});var o=document.createElement("select");s(o).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types",class:"multiselect"}),s.each(wpmdb.common.connection_data.post_types,function(e,t){s(o).append('<option value="'+t+'">'+t+"</option>")}),e.$pull_post_type_select=o,s("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===wpmdb.functions.wpmdb_migration_type()?(s("#new-url").val(e.remove_protocol(p.this_url)),s("#new-path").val(p.this_path),"true"===p.is_multisite&&(s("#new-domain").val(p.this_domain),s('.replace-row.pin .old-replace-col input[type="text"]').val(e.remove_protocol(t.url))),s("#old-url").val(e.remove_protocol(t.url)),s("#old-path").val(t.path),s.wpmdb.do_action("wpmdb_update_pull_table_select"),s("#select-post-types").remove(),s(".exclude-post-types-warning").after(e.$pull_post_type_select),wpmdb.functions.exclude_post_types_warning(),s(".table-prefix").html(t.prefix),s(".backup-table-prefix").html(p.site_details.prefix),s(".uploads-dir").html(p.this_uploads_dir)):(s("#new-url").val(e.remove_protocol(t.url)),s("#new-path").val(t.path),"true"===p.is_multisite&&s('.replace-row.pin .old-replace-col input[type="text"]').val(e.remove_protocol(p.this_url)),s.wpmdb.do_action("wpmdb_update_push_table_select"),s("#select-backup").remove(),s(".backup-tables-wrap").prepend(e.$push_select_backup)),wpmdb.common.next_step_in_migration={fn:s.wpmdb.do_action,args:["verify_connection_to_remote_site",wpmdb.common.connection_data]},wpmdb.functions.execute_next_step()}else s(".connection-status").hide()}})}}}]),e}();t.default=d},function(e,t,n){"use strict";var i=function(e){return e&&e.__esModule?e:{default:e}}(n(3));var o=jQuery,a=n(56),r=n(58),s=o('<div id="overlay" class="hide"></div>'),c=o(".progress-content").clone().addClass("hide"),l=o(".pro-version").addClass("hide");s.append(l);var p={migration:{model:{},view:{},$progress:{},$wrapper:{},$overlay:{},status:"active",title:"",text:"",timerCount:0,timerStart:0,elapsedInterval:0,currentStageNum:0,counterDisplay:!1,originalTitle:document.title,setTitle:function(e){this.$progress.find(".progress-title").html(e),this.title=e},setStatus:function(e){this.$progress.removeClass(this.status).addClass("error"===e?"wpmdb-error":e),"error"===e&&this.$progress.find(".progress-text").addClass("migration-error"),this.status=e,this.updateTitleElem()},setText:function(e){"string"!=typeof e&&(e=""),0>=e.indexOf("wpmdb_error")&&(e=this.decodeErrorObject(e)),this.$progress.find(".progress-text").html(e),this.text=e},setState:function(e,t,n){null!==e&&this.setTitle(e),null!==t&&this.setText(t),null!==n&&this.setStatus(n)},startTimer:function(){this.timerStart=Date.now(),this.timerCount=0,this.counterDisplay=o(".timer"),this.elapsedInterval=setInterval(this.incrementTimer.bind(this),1e3)},getTimerCountInSeconds:function(){return Math.floor((Date.now()-this.timerStart)/1e3)},pauseTimer:function(){this.pausedAt=Date.now(),clearInterval(this.elapsedInterval)},resumeTimer:function(){this.timerStart+=Date.now()-this.pausedAt,this.elapsedInterval=setInterval(this.incrementTimer.bind(this),1e3)},incrementTimer:function(){this.timerCount=this.getTimerCountInSeconds(),this.displayCount()},displayCount:function(){var e=Math.floor(this.timerCount/3600)%24,t=Math.floor(this.timerCount/60)%60,n=this.timerCount%60,i=this.pad(e,2,0)+":"+this.pad(t,2,0)+":"+this.pad(n,2,0);this.counterDisplay.html(i)},updateTitleElem:function(){var e=this.model.get("activeStageName"),t=this.model.getStageModel(e),n=Math.max(0,t.getTotalProgressPercent()),i=this.model.get("stages").length,o=this.currentStageNum,a=this.status,r=wpmdb_strings.title_progress;"complete"===t.get("status")&&0===t.get("totalSize")&&(n=100),r=(r=(r=r.replace("%1$s",n+"%")).replace("%2$s",o)).replace("%3$s",i),1===i&&(r=n+"%"),wpmdb_strings["title_"+a]&&(r=wpmdb_strings["title_"+a]),r=r+" - "+this.originalTitle,document.title=r},restoreTitleElem:function(){document.title=this.originalTitle},pad:function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e},decodeErrorObject:function(e){var t=e.replace(/\{&quot;/g,"{#q!#").replace(/\&quot;}/g,"#q!#}").replace(/,&quot;/g,",#q!#").replace(/&quot;:/g,"#q!#:").replace(/:&quot;/g,":#q!#").replace(/&quot;/g,'\\"').replace(/#q!#/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<");try{t=JSON.parse(t)}catch(t){return e}return"object"===(void 0===t?"undefined":(0,i.default)(t))&&void 0!==t.body?t:e},fixProgressStageWidthForScrollBar:function(){var e=Math.abs(this.$wrapper[0].offsetWidth-this.$wrapper[0].clientWidth),t=this.$wrapper.find(".active .progress-items"),n=parseInt(t.css("padding-left"),10),i=parseInt(t.css("padding-right"),10);(0!==e||0===e&&i!==n)&&t.css("padding-right",n-e+"px")}},newMigration:function(e){o("#overlay").remove(),o(".progress-content").remove(),this.migration.$overlay=s.clone(),o("#wpwrap").append(this.migration.$overlay),this.migration.model=new a(e),this.migration.view=new r({model:this.migration.model}),this.migration.$progress=c.clone(),this.migration.$wrapper=this.migration.view.$el,this.migration.$progress.find(".migration-progress-stages").replaceWith(this.migration.$wrapper),this.migration.$proVersion=this.migration.$overlay.find(".pro-version");var t=this.migration.$proVersion.find("iframe").remove().clone();this.migration.$overlay.prepend(this.migration.$progress);var n=this;return setTimeout(function(){n.migration.$overlay.add(n.migration.$progress).add(n.migration.$proVersion).removeClass("hide").addClass("show"),n.migration.$proVersion.length&&setTimeout(function(){n.migration.$proVersion.find(".iframe").append(t)},500)},0),this.migration.currentStageNum=0,this.migration.$proVersion.on("click",".close-pro-version",function(){n.migration.$proVersion.find("iframe").remove(),n.migration.$proVersion.addClass("hide remove"),setTimeout(function(){n.migration.$proVersion.remove()},500)}),this.migration.model.on("migrationComplete",function(){n.utils.updateProgTableVisibilitySetting(),n.utils.updatePauseBeforeFinalizeSetting(),n.migration.pauseTimer()}),o(window).on("resize",_.debounce(this.migration.fixProgressStageWidthForScrollBar.bind(this.migration),100)),this.migration.model.on("change:activeStage",this.migration.fixProgressStageWidthForScrollBar.bind(this.migration)),this.migration},utils:n(60)};e.exports=p},function(e,t){window.jQuery;jQuery(function(){jQuery(".wpmdb-opt-usage-tracking").on("click",function(e){e.preventDefault();var t=!!e.target.classList.contains("opt-yes");jQuery(".wpmdb-usage-tracking-notice .links").text(t?"Thanks!":"Done."),jQuery(".wpmdb-usage-tracking-notice").delay(1e3).fadeOut(200);var n=jQuery("#allow_tracking-wrap");if(t){if(!n.hasClass("on"))return void n.trigger("click")}else if(n.hasClass("on"))return void n.trigger("click");n.find("input[type=checkbox]").trigger("change")})})},function(e,t,n){var i=window.jQuery,o=r(n(36)),a=r(n(49));function r(e){return e&&e.__esModule?e:{default:e}}i=window.jQuery;var s=window.wpmdb,c=window.ajaxurl;window._;i(function(){i("body").on("wpmdb_done",(0,a.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("1"===wpmdb_data.allow_tracking&&"false"!==wpmdb_data.is_pro){e.next=2;break}return e.abrupt("return",!1);case 2:return t={action:"wpmdb_track_migration_complete",nonce:wpmdb_data.nonces.send_migration_complete,migration_state_id:s.migration_state_id},e.prev=3,e.next=6,i.ajax({url:c,type:"POST",cache:!1,data:t});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.error(e.t0);case 12:case"end":return e.stop()}},e,this,[[3,9]])}))),i.wpmdb.add_action("wpmdb_migration_initiated",(0,a.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("1"===wpmdb_data.allow_tracking&&"false"!==wpmdb_data.is_pro){e.next=2;break}return e.abrupt("return",!1);case 2:return t={action:"wpmdb_maybe_collect_data",nonce:wpmdb_data.nonces.track_usage,migration_state_id:s.migration_state_id},e.prev=3,e.next=6,i.ajax({url:c,type:"POST",cache:!1,data:t});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.error(e.t0);case 12:case"end":return e.stop()}},e,this,[[3,9]])})))})},function(e,t){window.jQuery},function(e,t){window.jQuery},function(e,t){window.jQuery},function(e,t){window.jQuery},function(e,t){window.jQuery},function(e,t){window.jQuery}]);
2
- //# sourceMappingURL=bundle-1017.js.map
 
 
asset/build/js/bundle-1017.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap 8442a13e0e99b8451ac6","webpack:///./node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/core-js/library/modules/_wks.js","webpack:///./node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/babel-runtime/helpers/typeof.js","webpack:///./node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/core-js/library/modules/_has.js","webpack:///./node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/core-js/library/modules/_to-iobject.js","webpack:///./node_modules/babel-runtime/helpers/classCallCheck.js","webpack:///./node_modules/babel-runtime/helpers/createClass.js","webpack:///./node_modules/core-js/library/modules/_library.js","webpack:///./node_modules/core-js/library/modules/_iterators.js","webpack:///./node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/core-js/library/modules/_uid.js","webpack:///./node_modules/core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/core-js/library/modules/_to-integer.js","webpack:///./node_modules/core-js/library/modules/_defined.js","webpack:///./node_modules/core-js/library/modules/_object-keys.js","webpack:///./node_modules/core-js/library/modules/_shared-key.js","webpack:///./node_modules/core-js/library/modules/_shared.js","webpack:///./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/core-js/library/modules/_wks-ext.js","webpack:///./node_modules/core-js/library/modules/_wks-define.js","webpack:///./node_modules/core-js/library/modules/_object-pie.js","webpack:///./node_modules/core-js/library/modules/_new-promise-capability.js","webpack:///./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/babel-runtime/regenerator/index.js","webpack:///./node_modules/core-js/library/modules/es6.string.iterator.js","webpack:///./node_modules/core-js/library/modules/_iter-define.js","webpack:///./node_modules/core-js/library/modules/_redefine.js","webpack:///./node_modules/core-js/library/modules/_object-create.js","webpack:///./node_modules/core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/core-js/library/modules/_to-length.js","webpack:///./node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/core-js/library/modules/_to-object.js","webpack:///./node_modules/core-js/library/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/library/modules/_object-gops.js","webpack:///./node_modules/core-js/library/modules/_object-gopn.js","webpack:///./node_modules/babel-runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/core-js/library/modules/_classof.js","webpack:///./node_modules/core-js/library/modules/_species-constructor.js","webpack:///./node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/core-js/library/modules/_perform.js","webpack:///./node_modules/core-js/library/modules/_promise-resolve.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/helpers/utils.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-model.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgressStage-model.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-view.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgressStage-view.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-utils.js","webpack:///./src/wp-migrate-db-pro/asset/webpack.index.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/helpers/wpmdbCommon.js","webpack:///./node_modules/babel-runtime/core-js/object/define-property.js","webpack:///./node_modules/core-js/library/fn/object/define-property.js","webpack:///./node_modules/core-js/library/modules/es6.object.define-property.js","webpack:///./src/wp-migrate-db-pro/asset/src ./node_modules/imports-loader","webpack:///./src/wp-migrate-db-pro/asset/src/js/backups.js","webpack:///./node_modules/regenerator-runtime/runtime-module.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/babel-runtime/core-js/symbol/iterator.js","webpack:///./node_modules/core-js/library/fn/symbol/iterator.js","webpack:///./node_modules/core-js/library/modules/_string-at.js","webpack:///./node_modules/core-js/library/modules/_iter-create.js","webpack:///./node_modules/core-js/library/modules/_object-dps.js","webpack:///./node_modules/core-js/library/modules/_iobject.js","webpack:///./node_modules/core-js/library/modules/_array-includes.js","webpack:///./node_modules/core-js/library/modules/_to-absolute-index.js","webpack:///./node_modules/core-js/library/modules/_object-gpo.js","webpack:///./node_modules/core-js/library/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/library/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/library/modules/_iter-step.js","webpack:///./node_modules/babel-runtime/core-js/symbol.js","webpack:///./node_modules/core-js/library/fn/symbol/index.js","webpack:///./node_modules/core-js/library/modules/es6.symbol.js","webpack:///./node_modules/core-js/library/modules/_meta.js","webpack:///./node_modules/core-js/library/modules/_enum-keys.js","webpack:///./node_modules/core-js/library/modules/_is-array.js","webpack:///./node_modules/core-js/library/modules/_object-gopn-ext.js","webpack:///./node_modules/core-js/library/modules/_object-gopd.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.async-iterator.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.observable.js","webpack:///./node_modules/babel-runtime/core-js/promise.js","webpack:///./node_modules/core-js/library/fn/promise.js","webpack:///./node_modules/core-js/library/modules/es6.promise.js","webpack:///./node_modules/core-js/library/modules/_an-instance.js","webpack:///./node_modules/core-js/library/modules/_for-of.js","webpack:///./node_modules/core-js/library/modules/_iter-call.js","webpack:///./node_modules/core-js/library/modules/_is-array-iter.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator-method.js","webpack:///./node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/core-js/library/modules/_microtask.js","webpack:///./node_modules/core-js/library/modules/_user-agent.js","webpack:///./node_modules/core-js/library/modules/_redefine-all.js","webpack:///./node_modules/core-js/library/modules/_set-species.js","webpack:///./node_modules/core-js/library/modules/_iter-detect.js","webpack:///./node_modules/core-js/library/modules/es7.promise.finally.js","webpack:///./node_modules/core-js/library/modules/es7.promise.try.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/dismissable-notices.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/helpers/events.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/helpers/wpmdbGlobals.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/hook.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/import.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/localStorage.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-controller.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/multisite.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/plugin-update.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/script.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/usage-tracking-notice.js","webpack:///./src/wp-migrate-db-pro/asset/src/js/usage-tracking.js","webpack:///./src/wp-migrate-db-pro/asset/src/sass/_migration-progress.scss","webpack:///./src/wp-migrate-db-pro/asset/src/sass/_progress-upgrade.scss","webpack:///./src/wp-migrate-db-pro/asset/src/sass/backups.scss","webpack:///./src/wp-migrate-db-pro/asset/src/sass/disabled.scss","webpack:///./src/wp-migrate-db-pro/asset/src/sass/plugin-update-styles.scss","webpack:///./src/wp-migrate-db-pro/asset/src/sass/styles.scss"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","global","window","Math","self","Function","__g","store","uid","Symbol","USE_SYMBOL","core","version","__e","_iterator2","_interopRequireDefault","_symbol2","_typeof","default","obj","constructor","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","P","Attributes","e","TypeError","value","isObject","it","a","createDesc","key","ctx","hide","has","$export","type","source","own","out","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","B","IS_WRAP","W","expProto","target","undefined","C","b","this","arguments","length","apply","virtual","R","U","IObject","defined","instance","Constructor","_defineProperty2","defineProperties","props","descriptor","writable","protoProps","staticProps","toString","slice","aFunction","fn","that","exec","bitmap","id","px","random","concat","def","TAG","tag","stat","document","is","createElement","val","valueOf","ceil","floor","isNaN","$keys","enumBugKeys","keys","shared","push","mode","copyright","split","LIBRARY","wksExt","$Symbol","charAt","propertyIsEnumerable","resolve","reject","promise","$$resolve","$$reject","$at","String","iterated","_t","_i","point","index","done","redefine","Iterators","$iterCreate","setToStringTag","getPrototypeOf","ITERATOR","BUGGY","returnThis","Base","NAME","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","values","dPs","IE_PROTO","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","open","write","lt","close","create","Properties","result","toIObject","arrayIndexOf","names","toInteger","min","documentElement","TO_STRING_TAG","DOMIterables","Collection","Array","getOwnPropertySymbols","hiddenKeys","getOwnPropertyNames","_promise2","gen","step","arg","info","error","then","err","cof","ARG","T","tryGet","callee","SPECIES","D","defer","channel","port","invoke","html","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","run","listener","event","data","args","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","set","clear","v","newPromiseCapability","x","promiseCapability","handleAjaxError","header_text","errorTemplate","wpmdb_strings","ajax_php_errors","message","wpmdb","current_migration","setState","common","migration_error","functions","migration_complete_events","console","throwMDBError","parsed_response","error_body","body","non_fatal_errors","msg","Error","jQueryAjaxError","responseText","jqXHR","statusText","migration_failed","doNextStep","next_step_in_migration","execute_next_step","MigrationProgressStageModel","require","$","jQuery","MigrationProgressModel","Backbone","Model","extend","defaults","_initialStages","stages","activeStageName","stageModels","localTableRows","localTableSizes","remoteTableRows","remoteTableSizes","migrationStatus","migrationIntent","initialize","_","each","stage","items","dataType","addStage","itemsArr","item","size","rows","_typeof3","addStageModel","trigger","on","getStageModel","addStageItem","displayName","addItem","newStageModel","getStageItems","map","setActiveStage","setStageComplete","currentStageNum","setMigrationComplete","lastStage","activateTab","MigrationProgressStage","status","_initialItems","lookupItems","totalSize","totalTransferred","itemsComplete","itemsCompleteArr","strings","initStrings","triggerItemViewInit","updateTitleElem","default_strings","stage_title","migrated","queued","active","running","complete","show","itemsName","tables","items_migrated","hide_items","show_items","indexOf","stageName","transferred","rowsTransferred","title","$title","createTitleElem","addClass","append","text","convertKBSizeToHRFixed","progress","$progress","createProgElem","prog","css","el","$el","createMainElem","attr","updateProgress","percent","requestAnimationFrame","bind","parseFloat","getTotalSizeTransferred","countItemsComplete","getTotalProgressPercent","total","round","model","setItemComplete","itemName","getItemByName","setItemPercentTransferred","percentTransferred","batchSize","folderTransferred","exactPercent","total_transferred","setItemRowsTransferred","numRows","amtDone","estTransferred","parseInt","determineItemByName","MigrationProgressStageView","MigrationProgressView","View","tagName","className","empty","stageModel","addStageView","newStageSubView","parent","find","$tabElem","$totalProgressElem","$showHideTablesElem","$pauseBeforeFinalizeElem","$pauseBeforeFinalizeCheckbox","$itemsContainer","itemViews","maxDomNodes","visibleDomNodes","itemCount","percentDone","sizeDone","tablesDone","queuedElements","$truncationNotice","$truncationNoticeHiddenItems","shouldHideItemProgress","initTotalProgressElem","view","after","initTabElem","maybeAddElementToView","updateProgressElem","updateStageTotals","removeClass","setItemProgress","siblings","initShowHideTablesElem","initPauseBeforeFinalizeElem","progTablesHidden","hasClass","add","Boolean","wpmdb_data","prog_tables_hidden","prog_tables_visibility_changed","triggerHandler","isChecked","pause_before_finalize","prop","inArray","pause_before_finalize_find_replace","pauseBeforeFinalizeValue","pause_before_finalize_changed","max","fadeOut","width","wpmdb_add_commas","toLowerCase","hideItemProgress","updateTruncationNotice","showTruncationNotice","hiddenItemsCount","progress_items_truncated_msg","replace","getNextElementForView","queueItem","shift","elemComplete","$nextEl","height","marginBottom","$clone","clone","appendTo","timeout","remove","last","updateProgTableVisibilitySetting","ajax","url","ajaxurl","cache","action","nonce","nonces","save_setting","setting","checked","textStatus","errorThrown","log","updatePauseBeforeFinalizeSetting","hooks","call_stack","WPMDBCommon","forEach","file","importAll","_classCallCheck3","func","number_string","number_parts","integer","decimal","rgx","test","maybe_json","json_object","parseJSON","code","jsonErrors","wpmdb_parse_json","ajax_json_message","originalText","ajax_json_errors","view_error_messages","response","str","delimiter","RegExp","table_prefix","desired_table","given_table","escaped_given_table","preg_quote","table_name","escaped_table_name","results","dec","kbSize","retArray","retVal","units","toFixed","abs","u","pow","hrSizeArray","convertKBSizeToHR","callback","ele","notice","reminder","beforeSend","spinner_url","devicePixelRatio","excluded_post_types","excluded_post_types_text","$exclude_post_types_warning","join","opacity","slideDown","animate","slideUp","$Object","desc","./js/backups.js","./js/dismissable-notices.js","./js/helpers/events.js","./js/helpers/utils.js","./js/helpers/wpmdbCommon.js","./js/helpers/wpmdbGlobals.js","./js/hook.js","./js/import.js","./js/localStorage.js","./js/modules/MigrationProgress-controller.js","./js/modules/MigrationProgress-model.js","./js/modules/MigrationProgress-utils.js","./js/modules/MigrationProgress-view.js","./js/modules/MigrationProgressStage-model.js","./js/modules/MigrationProgressStage-view.js","./js/multisite.js","./js/plugin-update.js","./js/script.js","./js/usage-tracking-notice.js","./js/usage-tracking.js","./sass/_migration-progress.scss","./sass/_progress-upgrade.scss","./sass/backups.scss","./sass/disabled.scss","./sass/plugin-update-styles.scss","./sass/styles.scss","webpackContext","req","webpackContextResolve","WPMDBBackups","_this","ajax_spinner","get_spinner_url","locationHashChanged","_asyncToGenerator3","_regenerator2","mark","_callee","backups","wrap","_context","prev","location","hash","isEmpty","backups_list","getElementById","innerHTML","loading_backups","getBackups","sent","displayBackups","stop","backups_rendered","_this2","is_pro","navigator","userAgent","match","onhashchange","JSON","parse","get_backups","doAJAX","wpmdb_error","error_msg","ajaxError","error_getting_backups","_context3","t0","tpl","classList","contains","backup","raw_name","modified","download","markup","render","addListener","ajaxGetDownloadFile","ajaxDeleteBackup","element","method","querySelectorAll","_ref5","_callee4","path","_context4","preventDefault","parentNode","_this3","abrupt","_x4","filePath","gzip","get_backup","href","redirect","error_downloading_backup","_context6","confirm","confirm_delete_backup","delete_backup","elem","querySelector","error_deleting_backup","_context7","setup","g","hadRuntime","regeneratorRuntime","oldRuntime","Op","hasOwn","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","inModule","runtime","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","getProto","NativeIteratorPrototype","Gp","GeneratorFunctionPrototype","Generator","GeneratorFunction","isGeneratorFunction","genFun","ctor","setPrototypeOf","__proto__","awrap","__await","defineIteratorMethods","AsyncIterator","async","innerFn","outerFn","tryLocsList","iter","reverse","pop","Context","reset","skipTempReset","_sent","delegate","tryEntries","resetTryEntry","rootRecord","completion","rval","dispatchException","exception","context","handle","loc","caught","record","entry","tryLoc","hasCatch","hasFinally","catchLoc","finallyLoc","finallyEntry","afterLoc","finish","catch","thrown","delegateYield","iterable","resultName","nextLoc","protoGenerator","generator","_invoke","state","doneResult","delegateResult","maybeInvokeDelegate","tryCatch","makeInvokeMethod","previousPromise","callInvokeWithMethodAndArg","Promise","unwrapped","return","pushTryEntry","locs","iteratorMethod","TO_STRING","pos","charCodeAt","getKeys","toLength","toAbsoluteIndex","IS_INCLUDES","$this","fromIndex","toObject","ObjectProto","addToUnscopables","_k","Arguments","DESCRIPTORS","META","KEY","$fails","wks","wksDefine","enumKeys","isArray","_create","gOPNExt","$GOPD","$GOPS","$DP","gOPD","gOPN","$JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","isEnum","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","protoDesc","sym","isSymbol","$defineProperty","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","j","wellKnownSymbols","k","for","keyFor","useSetter","useSimple","getOwnPropertyDescriptor","FAILS_ON_PRIMITIVES","replacer","$replacer","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","gOPS","pIE","getSymbols","symbols","windowNames","getWindowNames","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","classof","anInstance","forOf","speciesConstructor","task","microtask","newPromiseCapabilityModule","perform","promiseResolve","versions","v8","$Promise","isNode","FakePromise","PromiseRejectionEvent","isThenable","notify","isReject","_n","chain","_c","_v","ok","_s","reaction","exited","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","unhandled","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","executor","onFulfilled","onRejected","r","capability","all","remaining","$index","alreadyCalled","race","forbiddenField","isArrayIter","getIterFn","BREAK","RETURN","iterFn","ret","ArrayProto","getIteratorMethod","un","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","flush","standalone","toggle","node","createTextNode","observe","characterData","safe","SAFE_CLOSING","riter","from","skipClosing","arr","finally","onFinally","isFunction","try","callbackfn","click","ajax_handle_dismissible_notice","wpmdb_nonces","process_notice_link","closest","bindFirst","bindNth","changeEventOrder","newIndex","idx","handlers","_data","splice","WPMDBGlobals","show_ssl_notice","doing_save_profile","doing_ajax","profile_name_edited","migration_intent","doing_licence_registration_ajax","migration_paused","last_replace_switch","wpmdb_migration_type","connection_established","checked_licence","show_prefix_notice","force_reconnect","migration_selection","show_version_notice","migration_completed","currently_migrating","dump_filename","dump_path","remote_site","secret_key","form_data","elapsed_interval","completed_msg","tables_to_migrate","previous_progress_title","previous_progress_text_primary","previous_progress_text_secondary","cancelling_text","paused_text","migration_cancelled","flag_skip_delay","delay_between_requests","fade_duration","is_auto_pause_before_finalize","$connection_info_box","$push_select","$pull_select","$push_post_type_select","$pull_post_type_select","$push_select_backup","$pull_select_backup","z","arr1","arr2","pin","parents","wpmdbGetAjaxErrors","connection_local_server_problem","get_log","alert","update_log_problem","success","search","decodeURIComponent","remote_scheme","scheme","substr","$ssl_notice","this_tables","this_table_sizes_hr","create_table_select","connection_data","table_sizes_hr","profile","blur","maybe_show_select_table_notice","create_new_profile","profile_name","elements","not","serialize","save_profile","save_profile_problem","removeAttr","saved","updated_profile_id","new_profile_key","new_profile_id","new_li","before","updated_url","updated_profile_name","trim","history","pushState","$crumbs","this_plugin_base","prepend","cancelling_migration","visibility","cancelling_find_replace","completing_current_request","checkbox_wrap","$switch","$checkbox","toggleClass","switch_on","backup_table_prefix","uploads_dir","upload_dir_long","write_permission","$connection_status","$directory_permission_notice","$compatibility_older_mysql","$mst_required","$keep_active_plugins","$step_two","$backup_options","new_migration_type","wpmdb_toggle_migration_action_text","do_action","migration_type","last_migration_type","$pull_push_connection_info","connection_info","$migration_list_li","connection_textarea","focus","connection_box_changed","prefix","site_details","this_uploads_dir","this_upload_dir_long","this_prefix","write_permissions","maybe_show_backup_disabled_msg","get_domain_name","is_multisite","$old_replace_col","eq","maybe_show_mixed_cased_table_name_warning","upload_dir","$create_backup","$create_backup_label","$backup_option_disabled","old_url","old_path","previous_connection_data","remove_protocol","old_val","exclude_post_types_warning","skip_addons_check","should_check_licence","check_licence","refresh_debug_log","$proVersion","licence","update_licence_content","license_check_problem","licence_msg","support_msg","addons_msg","$support_content","$addons_content","$licence_content","dbrains_api_down","errors","subscription_expired","support","addons","addon_content","fadeIn","has_licence","get_tables_to_migrate","lower_case_table_names","licence_key","masked_licence","fetching_license","label","intent","migrating_stage_label","completed_stage_label","push_migration_label_migrating","push_migration_label_completed","pull_migration_label_migrating","pull_migration_label_completed","find_replace_label_migrating","find_replace_label_completed","exporting_please_wait","exporting_complete","update_domain_placeholder","apply_filters","parent_selector","unit","display_value","slider","pause","resumeTimer","find_replace_paused","off","exclude","temp_prefix","this_temp_prefix","substring","lock","display_info","amount","wpmdb_default_profile","disable_export_type_controls","establishing_remote_connection","verify_connection_to_remote_site","convert_post_type_selection","wpmdb_convert_post_type_selection","get_ajax_errors","enable_export_type_controls","maybe_show_mst_warning","maybe_show_ssl_warning","maybe_show_prefix_notice","set_connection_data","move_connection_info_box","loaded_tables","wpmdb_loaded_tables","loaded_post_types","wpmdb_loaded_post_types","select_post_types","$post_type_select","multiple","class","post_types","selected","wpmdb_convert_exclude_revisions","loaded_tables_backup","wpmdb_loaded_tables_backup","$table_select_backup","current_row","primary_keys","table","migration_complete","wpmdb_flush","wpmdb_call_next_hook","last_table","request_data","migration_state_id","migrate_table","bottleneck","path_current_site","domain_current_site","progress_text","table_process_problem","row_information","error_text","table_process_problem_empty_response","item_name","setText","migrate_table_recursive","cancel_success","migration_cancelled_success","find_replace_cancelled_success","completed_with_some_errors","migrate_complete_text","this_download_url","encodeURIComponent","completed_dump_located_at","finalizing_migration","finalize_migration","finalize_tables_problem","_this4","flushing","flush_problem","_this5","pauseTimer","pause_text","paused_before_finalize","find_replace_paused_before_finalize","paused","set_pause_resume_button","cancel_migration","resume","progress_msg","removing_local_sql","removing_local_backup","removing_local_temp_tables","removing_remote_sql","removing_remote_temp_tables","migration_cancellation_failed","manually_remove_temp_files","find_replace_cancelled","setStatus","$prefix_notice","please_select_one_table","please_select_one_table_import","please_select_one_table_backup","selected_tables","$table_select","mig_type","this_prefixed_tables","prefixed_tables","save_string","migrate_string","_this6","error_message","connection_info_missing","connection_words","connection_info_incorrect","validate_url","connection_info_url_invalid","key_length","connection_info_key_invalid","connection_info_local_url","connection_info_local_key","new_connection_info_contents","openssl_available","change_replace_values","refresh_table_selects","this_url","this_path","this_domain","filter","add_action","callable","add_hook","add_filter","do_hook","remove_action","remove_hook","remove_filter","hook_type","import_selected","$import_select","tables_to_search","tables_to_import","unrecognized_import_file","import_prefix","import_info","maybe_show_find_replace_options","find_replace_rows","import_label_completed","import_label_migrating","$import_file_status","import_profile_loaded","please_select_sql_file","upload_file_recursive","change","tables_to_backup","upload","migrate_button_import","searched","migrate_button_find_replace","files","reader","FileReader","$backup_selected_option","$unrecognized_file_notice","$old_url","$old_path","$new_url","$new_path","invalid_sql_file","parsing_sql_file","onloadend","readyState","DONE","file_data","import_file","localStorage_form_data","get_localStorage_form_data","URL","select_tables","remove_localStorage_form_data","opt","blob","readAsDataURL","start","next_slice","file_type","size_done","uploading_file_to_server","upload_import_successful","migration_text","importing_file_to_db","import_size","num_chunks","import_file_recursive","import_filename","chunk","current_query","table_sizes","startsWith","alter_table_name","table_rows","table_migrate_option","imported_table","get_tables_to_import","ready","localStorage_available","localStorage","setItem","removeItem","maybe_reload_page","set_localStorage_form_data","reload","serializeArray","field","field_name","getItem","load_data_from_localStorage","$input","input_type","when","select_backup","replace_old","replace_new","update_migrate_button_text","$overlayOriginal","$progressContentOriginal","MigrationProgressController","migration","$wrapper","$overlay","timerCount","timerStart","elapsedInterval","counterDisplay","originalTitle","setTitle","decodeErrorObject","startTimer","Date","setInterval","incrementTimer","getTimerCountInSeconds","pausedAt","clearInterval","displayCount","hours","minutes","seconds","pad","activeStage","numStages","currentStage","currentStatus","progressText","title_progress","restoreTitleElem","num","padChar","input","inputDecoded","fixProgressStageWidthForScrollBar","scrollBarWidth","offsetWidth","clientWidth","visibleProgressItems","leftPad","rightPad","newMigration","settings","replaceWith","proVersionIFrame","utils","debounce","update_multiselect","subsites","selected_subsite_ids","site_selected","blog_id","subsite_path","spinner","doing_check_licence","insertAfter","check_again_link","wpmdb_update_strings","check_license_again","_utils","globals","migration_progress_controller","onbeforeunload","returnValue","sure","run_fn","show_mst_warning","mst","mst_available","multisite","subsite_export","install","$status","plugin_compatibility","plugin_compatibility_settings_problem","valid_licence","max_request_size_container","max_request_size_slider","range","max_request","ui","get_max_request_display_info","set_slider_value","slide","max_request_size","update_max_request_size","max_request_size_problem","delay_between_requests_container","delay_between_requests_slider","update_delay_between_requests","delay_between_requests_problem","$container","$viewer","offset","scrollTop","top","children","establish_remote_connection_from_saved_profile","keypress","which","$licence_status","activate_licence","register_license_problem","enable_pro_licence","Number","is_first_activation","welcome_text","this_plugin_url","welcome_title","license_registered","delay","enter_license_key","clear_log","clear_log_problem","clear_error_log","multiselect","group","new_url_missing","new_file_path_missing","save_active_profile","this_table_sizes","this_table_rows","backup_option","table_option","data_type","get_intersect","backed_up","static_migration_label","get_migration_status_label","initiate_migration","local","remote","hide_overlay","enter_name_for_profile","icon","bubble","position","bubble_offset","left","stopPropagation","switch_to_plugin_tab","tab_name","nav_tab","$parent_tr","prev_id","original_value","new_value_input","sortable","get_query_var","lines","originalEvent","clipboardData","setData","reset_api_key","doing_reset_api_key_ajax","reset_api_key_problem","$connection_info","two_lines","one_line","select","execCommand","$confirmation","doing_plugin_compatibility_ajax","select_element","whitelist_plugins","blacklist_problem","remove_profile","$profile_li","$new_profile_li","profile_id","delete_migration_profile","remove_profile_problem","remove_profile_not_found","change_connection_info","enter_connection_info","allow_tracking","save_settings_problem","submit","new_contents","copying_license","copy_licence_to_remote_site","attempting_to_activate_licence","reactivate_licence","activate_licence_problem","wpmdb_dbrains_api_down","temporarily_activated_licence","licence_reactivated","get_table_prefix","lock_replace_url","pin_replace_url","set_checkbox","is_beta_plugins_installed","rollback_beta_to_stable","rollback_to_stable_url","optIn","send_migration_complete","_callee2","_context2","track_usage"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EACAC,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAhB,GACA,IAAAS,EAAAT,KAAAiB,WACA,WAA2B,OAAAjB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,oBC5DA,IAAAC,EAAAxB,EAAAD,QAAA,oBAAA0B,eAAAC,WACAD,OAAA,oBAAAE,WAAAD,WAAAC,KAEAC,SAAA,cAAAA,GACA,iBAAAC,UAAAL,oBCLA,IAAAM,EAAYjC,EAAQ,GAARA,CAAmB,OAC/BkC,EAAUlC,EAAQ,IAClBmC,EAAanC,EAAQ,GAAWmC,OAChCC,EAAA,mBAAAD,GAEAhC,EAAAD,QAAA,SAAAS,GACA,OAAAsB,EAAAtB,KAAAsB,EAAAtB,GACAyB,GAAAD,EAAAxB,KAAAyB,EAAAD,E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AMs+B,WAAY,6BAApB,EAAAzpB,EAAA9iB,SAAA+iB,EAAA/iB,QAAAgjB,KAAiD,SAAA47B,IAAA,IAAAlyC,EAAA,OAAAqW,EAAA/iB,QAAAmjB,KAAA,SAAA07B,GAAA,cAAAA,EAAAx7B,KAAAw7B,EAAAr3C,MAAA,UAC3C,MAAQkS,WAAW6jC,gBAAwC,UAAtB7jC,WAAWyK,OADL,CAAA06B,EAAAr3C,KAAA,eAAAq3C,EAAAr4B,OAAA,UAExC,GAFwC,cAK5C9Z,GACHwP,OAAQ,2BACRC,MAAOzC,WAAW0C,OAAO0iC,YACzBnX,mBAAoB15B,EAAM05B,oBARqBkX,EAAAx7B,KAAA,EAAAw7B,EAAAr3C,KAAA,EAYxBkI,EAAEoM,MACxBC,IAAKC,EACLza,KAAM,OACN0a,OAAO,EACPxP,KAAMC,IAhBwC,OAAAmyC,EAAA/6B,KAAA+6B,EAAAr3C,KAAA,gBAAAq3C,EAAAx7B,KAAA,EAAAw7B,EAAA55B,GAAA45B,EAAA,SAoB/CrwC,QAAQ3D,MAARg0C,EAAA55B,IApB+C,yBAAA45B,EAAA76B,SAAA46B,EAAAj8C,OAAA,4BC7BlD3D,OAAA2Q,sBCAA3Q,OAAA2Q,sBCAA3Q,OAAA2Q,sBCAA3Q,OAAA2Q,sBCAA3Q,OAAA2Q,sBCAA3Q,OAAA2Q","file":"wp-migrate-db-pro/free/../asset/build/js/bundle-1017.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 61);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8442a13e0e99b8451ac6","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_global.js\n// module id = 0\n// module chunks = 0","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks.js\n// module id = 1\n// module chunks = 0","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_core.js\n// module id = 2\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/typeof.js\n// module id = 3\n// module chunks = 0","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dp.js\n// module id = 4\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-object.js\n// module id = 5\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_descriptors.js\n// module id = 6\n// module chunks = 0","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_hide.js\n// module id = 7\n// module chunks = 0","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-object.js\n// module id = 8\n// module chunks = 0","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_has.js\n// module id = 9\n// module chunks = 0","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_export.js\n// module id = 10\n// module chunks = 0","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-iobject.js\n// module id = 11\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/classCallCheck.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/createClass.js\n// module id = 13\n// module chunks = 0","module.exports = true;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_library.js\n// module id = 14\n// module chunks = 0","module.exports = {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iterators.js\n// module id = 15\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_cof.js\n// module id = 16\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ctx.js\n// module id = 17\n// module chunks = 0","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_a-function.js\n// module id = 18\n// module chunks = 0","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_fails.js\n// module id = 19\n// module chunks = 0","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_property-desc.js\n// module id = 20\n// module chunks = 0","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_uid.js\n// module id = 21\n// module chunks = 0","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-to-string-tag.js\n// module id = 22\n// module chunks = 0","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_dom-create.js\n// module id = 23\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-primitive.js\n// module id = 24\n// module chunks = 0","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-integer.js\n// module id = 25\n// module chunks = 0","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_defined.js\n// module id = 26\n// module chunks = 0","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys.js\n// module id = 27\n// module chunks = 0","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared-key.js\n// module id = 28\n// module chunks = 0","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared.js\n// module id = 29\n// module chunks = 0","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-bug-keys.js\n// module id = 30\n// module chunks = 0","exports.f = require('./_wks');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-ext.js\n// module id = 31\n// module chunks = 0","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-define.js\n// module id = 32\n// module chunks = 0","exports.f = {}.propertyIsEnumerable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-pie.js\n// module id = 33\n// module chunks = 0","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_new-promise-capability.js\n// module id = 34\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ie8-dom-define.js\n// module id = 35\n// module chunks = 0","module.exports = require(\"regenerator-runtime\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/regenerator/index.js\n// module id = 36\n// module chunks = 0","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.string.iterator.js\n// module id = 37\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-define.js\n// module id = 38\n// module chunks = 0","module.exports = require('./_hide');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine.js\n// module id = 39\n// module chunks = 0","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-create.js\n// module id = 40\n// module chunks = 0","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys-internal.js\n// module id = 41\n// module chunks = 0","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-length.js\n// module id = 42\n// module chunks = 0","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_html.js\n// module id = 43\n// module chunks = 0","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-object.js\n// module id = 44\n// module chunks = 0","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/web.dom.iterable.js\n// module id = 45\n// module chunks = 0","exports.f = Object.getOwnPropertySymbols;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gops.js\n// module id = 46\n// module chunks = 0","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn.js\n// module id = 47\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _promise = require(\"../core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new _promise2.default(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return _promise2.default.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/asyncToGenerator.js\n// module id = 49\n// module chunks = 0","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_classof.js\n// module id = 50\n// module chunks = 0","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_species-constructor.js\n// module id = 51\n// module chunks = 0","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_task.js\n// module id = 52\n// module chunks = 0","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_perform.js\n// module id = 53\n// module chunks = 0","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_promise-resolve.js\n// module id = 54\n// module chunks = 0","export const handleAjaxError = ( header_text, error ) => {\n\n\tlet errorTemplate = `\n\t\t\t<p>${wpmdb_strings.ajax_php_errors}:</p>\n\t\t\t<p>${error.message}</p>\n\t`;\n\n\twpmdb.current_migration.setState( header_text, errorTemplate, 'error' );\n\twpmdb.common.migration_error = true;\n\twpmdb.functions.migration_complete_events();\n\tconsole.error( '🚨 🚒', error );\n\treturn;\n};\n\nexport const throwMDBError = ( parsed_response ) => {\n\tlet error_body;\n\n\tif ( undefined !== parsed_response.body ) {\n\t\twpmdb.common.non_fatal_errors += parsed_response.body;\n\t\terror_body = parsed_response.body;\n\t}\n\n\tif ( undefined !== parsed_response.msg ) {\n\t\terror_body = parsed_response.msg;\n\t}\n\n\tthrow new Error( error_body );\n};\n\nexport const jQueryAjaxError = ( responseText, jqXHR ) => {\n\tif ( 'undefined' !== typeof jqXHR.responseText && '' !== jqXHR.responseText ) {\n\t\tresponseText = jqXHR.responseText;\n\t} else if ( 'undefined' !== typeof jqXHR.statusText ) {\n\t\tresponseText = jqXHR.statusText;\n\t}\n\n\tconsole.error( jqXHR );\n\n\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, responseText, 'error' );\n\twpmdb.common.migration_error = true;\n\twpmdb.functions.migration_complete_events();\n\treturn responseText;\n};\n\nexport const doNextStep = ( fn, args, instance ) => {\n\twpmdb.common.next_step_in_migration = {\n\t\tfn: fn,\n\t\targs: args\n\t};\n\n\treturn wpmdb.functions.execute_next_step( instance );\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/helpers/utils.js","var MigrationProgressStageModel = require( './MigrationProgressStage-model' );\nvar $ = jQuery;\n\nvar MigrationProgressModel = Backbone.Model.extend( {\n\tdefaults: {\n\t\t_initialStages: null,\n\t\tstages: null,\n\t\tactiveStageName: null,\n\t\tstageModels: null,\n\t\tlocalTableRows: null,\n\t\tlocalTableSizes: null,\n\t\tremoteTableRows: null,\n\t\tremoteTableSizes: null,\n\t\tmigrationStatus: 'active',\n\t\tmigrationIntent: 'savefile'\n\t},\n\tinitialize: function() {\n\t\tthis.set( 'stageModels', {} );\n\t\tthis.set( '_initialStages', this.get( 'stages' ) );\n\t\tthis.set( 'stages', [] );\n\t\t_.each( this.get( '_initialStages' ), function( stage, items, dataType ) {\n\t\t\tthis.addStage( stage.name, items, dataType );\n\t\t}, this );\n\t},\n\taddStage: function( name, items, dataType, extend ) {\n\t\tvar itemsArr = [];\n\t\tvar stage;\n\n\t\t_.each( items, function( item ) {\n\t\t\tvar size, rows;\n\n\t\t\tif ( 'remote' === dataType ) {\n\t\t\t\tsize = this.get( 'remoteTableSizes' )[ item ];\n\t\t\t\trows = this.get( 'remoteTableRows' )[ item ];\n\t\t\t} else {\n\t\t\t\tsize = this.get( 'localTableSizes' )[ item ];\n\t\t\t\trows = this.get( 'localTableRows' )[ item ];\n\t\t\t}\n\n\t\t\titemsArr.push( {\n\t\t\t\tname: item,\n\t\t\t\tsize: size,\n\t\t\t\trows: rows\n\t\t\t} );\n\t\t}, this );\n\n\t\tstage = {\n\t\t\tname: name,\n\t\t\titems: itemsArr,\n\t\t\tdataType: dataType\n\t\t};\n\n\t\tif ( 'object' === typeof extend ) {\n\t\t\tstage = $.extend( stage, extend );\n\t\t}\n\n\t\tthis.addStageModel( stage );\n\n\t\tthis.trigger( 'stage:added', this.get( 'stageModels' )[ name ] );\n\t\tthis.get( 'stageModels' )[ name ].on( 'change', function() {\n\t\t\tthis.trigger( 'change' );\n\t\t}, this );\n\n\t\treturn this.getStageModel( stage.name );\n\t},\n\taddStageItem: function( stage, name, size, rows, displayName = '' ) {\n\t\tthis.getStageModel( stage ).addItem( name, size, rows, displayName );\n\t},\n\taddStageModel: function( stage ) {\n\t\tvar stages = this.get( 'stages' );\n\t\tvar stageModels = this.get( 'stageModels' );\n\t\tvar newStageModel = new MigrationProgressStageModel( stage );\n\n\t\tstages.push( stage );\n\t\tstageModels[ stage.name ] = newStageModel;\n\n\t\tthis.set( 'stages', stages );\n\t\tthis.set( 'stageModels', stageModels );\n\t},\n\tgetStageModel: function( name ) {\n\t\treturn this.get( 'stageModels' )[ name ];\n\t},\n\tgetStageItems: function( stage, map ) {\n\t\tvar stageModel = this.getStageModel( stage );\n\t\tvar items = stageModel.get( 'items' );\n\n\t\tif ( undefined === map ) {\n\t\t\treturn items;\n\t\t} else {\n\t\t\treturn items.map( function( item ) {\n\t\t\t\treturn item[ map ];\n\t\t\t} );\n\t\t}\n\t},\n\tsetActiveStage: function( stage ) {\n\t\tthis.setStageComplete();\n\t\tthis.set( 'activeStageName', stage );\n\t\tthis.getStageModel( stage ).set( 'status', 'active' );\n\t\tthis.trigger( 'change:activeStage' );\n\t},\n\tsetStageComplete: function( stage ) {\n\t\tif ( ! stage ) {\n\t\t\tstage = this.get( 'activeStageName' );\n\t\t}\n\t\tif ( null !== stage ) {\n\t\t\tthis.getStageModel( stage ).set( 'status', 'complete' );\n\t\t}\n\n\t\twpmdb.current_migration.currentStageNum = wpmdb.current_migration.currentStageNum + 1;\n\t},\n\tsetMigrationComplete: function() {\n\t\tvar lastStage = this.getStageModel( this.get( 'activeStageName' ) );\n\t\tthis.setStageComplete();\n\t\tthis.trigger( 'migrationComplete' );\n\t\tthis.set( 'migrationStatus', 'complete' );\n\t\tlastStage.activateTab();\n\t}\n} );\n\nmodule.exports = MigrationProgressModel;\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-model.js","var $ = jQuery;\nvar MigrationProgressStage = Backbone.Model.extend( {\n\tdefaults: {\n\t\tstatus: 'queued',\n\t\t_initialItems: null,\n\t\titems: null,\n\t\tnames: null,\n\t\tlookupItems: null,\n\t\ttotalSize: 0,\n\t\ttotalTransferred: 0,\n\t\tdataType: 'local',\n\t\tname: '',\n\t\titemsComplete: 0,\n\t\titemsCompleteArr: [],\n\t\tstrings: null\n\t},\n\tinitialize: function() {\n\t\tthis.initStrings();\n\n\t\tthis.set( '_initialItems', this.get( 'items' ).slice() );\n\t\tthis.set( 'items', [] );\n\t\tthis.set( 'names', [] );\n\t\tthis.set( 'lookupItems', {} );\n\t\tthis.set( 'itemsCompleteArr', [] );\n\n\t\t_.each( this.get( '_initialItems' ), function( item ) {\n\t\t\tthis.addItem( item.name, item.size, item.rows );\n\t\t}, this );\n\n\t\tthis.on( 'view:initialized', this.triggerItemViewInit );\n\n\t\tthis.on( 'change', function() {\n\t\t\twpmdb.current_migration.updateTitleElem();\n\t\t} );\n\t},\n\tinitStrings: function() {\n\t\tvar default_strings = {\n\t\t\tstage_title: this.get( 'name' ),\n\t\t\tmigrated: wpmdb_strings.migrated,\n\t\t\tqueued: wpmdb_strings.queued,\n\t\t\tactive: wpmdb_strings.running,\n\t\t\tcomplete: wpmdb_strings.complete,\n\t\t\thide: wpmdb_strings.hide,\n\t\t\tshow: wpmdb_strings.show,\n\t\t\titemsName: wpmdb_strings.tables\n\t\t};\n\t\tvar strings = this.get( 'strings' );\n\n\t\tstrings = ('object' === typeof strings) ? strings : {};\n\t\tstrings = $.extend( default_strings, strings );\n\n\t\tstrings.items_migrated = strings.itemsName + ' ' + strings.migrated;\n\t\tstrings.hide_items = strings.hide + ' ' + strings.itemsName;\n\t\tstrings.show_items = strings.show + ' ' + strings.itemsName;\n\n\t\tthis.set( 'strings', strings );\n\t},\n\taddItem: function( name, size, rows, displayName ) {\n\t\tvar items = this.get( 'items' );\n\t\tvar names = this.get( 'names' );\n\t\tif ( ~names.indexOf( name ) ) {\n\t\t\treturn;\n\t\t}\n\t\tnames.push( name );\n\t\tvar item = {\n\t\t\tname: name,\n\t\t\tsize: size,\n\t\t\trows: rows || size,\n\t\t\tstageName: this.get( 'name' ),\n\t\t\ttransferred: 0,\n\t\t\trowsTransferred: 0,\n\t\t\tcomplete: false,\n\n\t\t\ttitle: null,\n\t\t\tget $title() {\n\t\t\t\treturn this.title || this.createTitleElem()\n\t\t\t},\n\t\t\tset $title( title ) {\n\t\t\t\tthis.title = title\n\t\t\t},\n\t\t\tcreateTitleElem: function() {\n\t\t\t\tthis.title = $( '<p>' ).addClass( 'item-info' )\n\t\t\t\t\t.append( $( '<span class=\"name\" />' ).text( this.displayName || this.name ) )\n\t\t\t\t\t.append( ' ' )\n\t\t\t\t\t.append( $( '<span class=\"size\" />' ).text( '(' + wpmdb.functions.convertKBSizeToHRFixed( item.size ) + ')' ) );\n\t\t\t\treturn this.title\n\t\t\t},\n\n\t\t\tprogress: null,\n\t\t\tget $progress() {\n\t\t\t\treturn this.progress || this.createProgElem()\n\t\t\t},\n\t\t\tset $progress( prog ) {\n\t\t\t\tthis.progress = prog\n\t\t\t},\n\t\t\tcreateProgElem: function() {\n\t\t\t\tthis.progress = $( '<div class=\"progress-bar\"/>' ).css( 'width', '0%' );\n\t\t\t\treturn this.progress;\n\t\t\t},\n\n\t\t\tel: null,\n\t\t\tget $el() {\n\t\t\t\treturn this.el || this.createMainElem()\n\t\t\t},\n\t\t\tset $el( el ) {\n\t\t\t\tthis.el = el\n\t\t\t},\n\t\t\tcreateMainElem: function() {\n\t\t\t\tthis.el = $( '<div class=\"item-progress\" />' );\n\t\t\t\tthis.el.append( this.$title );\n\t\t\t\tthis.el.append( this.$progress );\n\t\t\t\tthis.el.append( '<span class=\"dashicons dashicons-yes\"/>' );\n\t\t\t\tthis.el.attr( 'id', 'item-' + this.name );\n\t\t\t\tthis.el.attr( 'data-stage', this.stageName );\n\t\t\t\treturn this.el;\n\t\t\t},\n\n\t\t\tupdateProgress( percent ) {\n\t\t\t\tvar $progress = this.$progress;\n\t\t\t\twindow.requestAnimationFrame( function() {\n\t\t\t\t\t$progress.css( 'width', percent + '%' )\n\t\t\t\t}.bind( this ) );\n\t\t\t},\n\n\t\t};\n\n\t\t// Only add the displayName if it's not empty\n\t\tif ( 'undefined' !== typeof(displayName) && displayName.length ) {\n\t\t\titem.displayName = displayName;\n\t\t}\n\n\t\titems.push( item );\n\n\t\tthis.get( 'lookupItems' )[ name ] = items.length - 1;\n\n\t\tthis.set( 'totalSize', parseFloat( this.get( 'totalSize' ) ) + parseFloat( size ) );\n\t\tthis.trigger( 'item:added', item );\n\t},\n\ttriggerItemViewInit: function() {\n\t\tvar items = this.get( 'items' );\n\t\tvar self = this;\n\t\t_.each( items, function( item ) {\n\t\t\tself.trigger( 'item:added', item );\n\t\t} );\n\t},\n\tgetTotalSizeTransferred: function() {\n\t\treturn this.get( 'totalTransferred' );\n\t},\n\tcountItemsComplete: function() {\n\t\treturn this.get( 'itemsComplete' );\n\t},\n\tgetTotalProgressPercent: function() {\n\t\tvar transferred = this.getTotalSizeTransferred();\n\t\tvar total = this.get( 'totalSize' );\n\t\tif ( 0 >= transferred || 0 >= total ) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst percent_transferred = Math.min( 100, Math.round( (transferred / total) * 100 ) );\n\t\treturn percent_transferred;\n\t},\n\tactivateTab: function() {\n\t\tthis.trigger( 'activateTab' );\n\t\twpmdb.current_migration.model.trigger( 'change:activeStage' );\n\t},\n\tsetItemComplete: function( itemName ) {\n\n\t\t// Guard: return if item has already been set complete\n\t\tvar itemsCompleteArr = this.get( 'itemsCompleteArr' );\n\t\tif ( ~itemsCompleteArr.indexOf( itemName ) ) {\n\t\t\treturn;\n\t\t}\n\t\titemsCompleteArr.push( itemName );\n\n\t\tvar item = this.getItemByName( itemName );\n\t\tvar totalTransferred = this.get( 'totalTransferred' );\n\t\tvar itemsComplete = this.get( 'itemsComplete' );\n\n\t\tthis.set( 'itemsComplete', ++itemsComplete );\n\n\t\ttotalTransferred += item.size - item.transferred;\n\t\tthis.set( 'totalTransferred', totalTransferred );\n\n\t\titem.transferred = item.size;\n\t\titem.complete = true;\n\t\titem.rowsTransferred = item.rows;\n\n\t\tthis.trigger( 'change change:items', item );\n\t},\n\tsetItemPercentTransferred( itemName, percentTransferred, batchSize, folderTransferred ) {\n\t\tlet item = this.getItemByName( itemName );\n\t\tlet transferred = batchSize / 1000;\n\n\t\tif ( 1 === percentTransferred ) {\n\t\t\titem.complete = true;\n\t\t\titem.transferred = transferred;\n\t\t\tlet itemsComplete = this.get( 'itemsComplete' );\n\t\t\tthis.set( 'itemsComplete', ++itemsComplete );\n\t\t\tthis.trigger( 'change change:items', item );\n\t\t}\n\t\titem.transferred = folderTransferred / 1000;\n\t\titem.exactPercent = percentTransferred;\n\t\tlet total_transferred = this.get( 'totalTransferred' );\n\t\ttotal_transferred += transferred;\n\n\t\tthis.set( 'totalTransferred', total_transferred );\n\t\tthis.trigger( 'change change:items', item );\n\t},\n\tsetItemRowsTransferred: function( itemName, numRows ) {\n\t\tvar amtDone, estTransferred;\n\t\tvar item = this.getItemByName( itemName );\n\t\tvar totalTransferred = this.get( 'totalTransferred' );\n\n\t\tif ( -1 === parseInt( numRows ) ) {\n\t\t\tamtDone = 1;\n\t\t} else {\n\t\t\tamtDone = Math.min( 1, numRows / item.rows );\n\t\t}\n\n\t\tif ( 1 === amtDone ) {\n\t\t\tthis.setItemComplete( itemName );\n\t\t\treturn;\n\t\t}\n\n\t\testTransferred = item.size * amtDone;\n\n\t\ttotalTransferred += estTransferred - item.transferred;\n\t\tthis.set( 'totalTransferred', totalTransferred );\n\n\t\titem.transferred = estTransferred;\n\t\titem.rowsTransferred = numRows;\n\t\tthis.trigger( 'change change:items', item );\n\t},\n\tgetItemByName: function( itemName ) {\n\t\tvar item = this.get( 'items' )[ this.get( 'lookupItems' )[ itemName ] ] || {};\n\t\tif ( itemName === item.name ) {\n\t\t\treturn item;\n\t\t} else {\n\t\t\treturn this.determineItemByName( itemName );\n\t\t}\n\t},\n\tdetermineItemByName: function( itemName ) {\n\t\tvar items = this.get( 'items' );\n\t\tfor ( var index = 0; index < items.length; index++ ) {\n\t\t\tvar item = items[ index ];\n\t\t\tif ( itemName === item.name ) {\n\t\t\t\tthis.get( 'lookupItems' ).itemName = index;\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n} );\n\nmodule.exports = MigrationProgressStage;\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgressStage-model.js","var MigrationProgressStageView = require( './MigrationProgressStage-view.js' );\nvar $ = jQuery;\n\nvar MigrationProgressView = Backbone.View.extend( {\n\ttagName: 'div',\n\tclassName: 'migration-progress-stages',\n\tid: 'migration-progress-stages',\n\tself: this,\n\tinitialize: function() {\n\t\tthis.$el.empty();\n\n\t\tthis.model.on( 'stage:added', function( stageModel ) {\n\t\t\tthis.addStageView( stageModel );\n\t\t}, this );\n\n\t\t_.each( this.model.get( 'stageModels' ), this.addStageView, this );\n\t},\n\taddStageView: function( stageModel ) {\n\t\tvar newStageSubView = new MigrationProgressStageView( {\n\t\t\tmodel: stageModel\n\t\t} );\n\t\tstageModel.trigger( 'view:initialized', newStageSubView );\n\t\tthis.$el.append( newStageSubView.$el );\n\t\tthis.$el.parent().find( '.stage-tabs' ).append( newStageSubView.$tabElem );\n\t}\n} );\n\nmodule.exports = MigrationProgressView;\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-view.js","var $ = jQuery;\n\nvar MigrationProgressStageView = Backbone.View.extend( {\n\ttagName: 'div',\n\tclassName: 'migration-progress-stage-container hide-tables',\n\t$totalProgressElem: null,\n\t$tabElem: null,\n\t$showHideTablesElem: null,\n\t$pauseBeforeFinalizeElem: null,\n\t$pauseBeforeFinalizeCheckbox: null,\n\t$itemsContainer: null,\n\titemViews: null,\n\tmaxDomNodes: 140,\n\tvisibleDomNodes: 0,\n\titemCount: 0,\n\tpercentDone: 0,\n\tsizeDone: 0,\n\ttablesDone: 0,\n\tqueuedElements: null,\n\t$truncationNotice: null,\n\t$truncationNoticeHiddenItems: null,\n\tshouldHideItemProgress: false,\n\tinitialize: function() {\n\t\tthis.$el.empty();\n\t\tthis.$el.attr( 'data-stage', this.model.get( 'name' ) ).addClass( 'queued ' + this.model.get( 'name' ) );\n\n\t\tthis.queuedElements = [];\n\n\t\tthis.initTotalProgressElem();\n\t\twpmdb.current_migration.view.$el.parent().find( '.stage-tabs' ).after( this.$totalProgressElem );\n\n\t\tthis.$itemsContainer = $( '<div class=progress-items />' );\n\t\tthis.$el.append( this.$itemsContainer );\n\n\t\tthis.initTabElem();\n\n\t\tthis.model.on( 'item:added', this.maybeAddElementToView, this );\n\n\t\t_.each( this.model.get( 'itemModels' ), this.maybeAddElementToView, this );\n\t\tthis.model.on( 'change', function() {\n\t\t\tthis.updateProgressElem();\n\t\t\tthis.updateStageTotals();\n\t\t}, this );\n\n\t\tthis.model.on( 'change:status', function( e ) {\n\t\t\tthis.$el.removeClass( 'queued active' ).addClass( this.model.get( 'status' ) );\n\t\t\tthis.$totalProgressElem.removeClass( 'queued active' ).addClass( this.model.get( 'status' ) );\n\t\t\tthis.$tabElem.removeClass( 'queued active' ).addClass( this.model.get( 'status' ) )\n\t\t\t\t.find( '.stage-status' ).text( this.model.get( 'strings' )[ this.model.get( 'status' ) ] );\n\t\t}, this );\n\n\t\tthis.model.on( 'change:items', function( item ) {\n\t\t\tif ( item.name ) {\n\t\t\t\tthis.setItemProgress( item );\n\t\t\t}\n\t\t}, this );\n\n\t\tthis.model.on( 'activateTab', function() {\n\t\t\tif ( 'complete' === wpmdb.current_migration.model.get( 'migrationStatus' ) ) {\n\t\t\t\tthis.$totalProgressElem.addClass( 'active' ).siblings().removeClass( 'active' );\n\t\t\t\tthis.$tabElem.addClass( 'active' ).siblings().removeClass( 'active' );\n\t\t\t\tthis.$el.addClass( 'active' ).siblings().removeClass( 'active' );\n\t\t\t}\n\t\t}, this );\n\t},\n\tinitTotalProgressElem: function() {\n\t\tthis.initShowHideTablesElem();\n\t\tthis.initPauseBeforeFinalizeElem();\n\n\t\tthis.$totalProgressElem = $( '<div class=\"stage-progress ' + this.model.get( 'name' ) + '\" />' )\n\t\t\t.append( '<span class=percent-complete>0</span>% ' + this.model.get( 'strings' ).complete + ' ' )\n\t\t\t.append( '<span class=\"size-complete-wrap\">(<span class=size-complete>0 MB</span> / <span class=size-total>0 MB</span>) </span>' )\n\t\t\t.append( '<span class=\"items-complete-wrap\"><span class=items-complete>0</span> <span class=lowercase >of</span> <span class=items-total>0</span> ' + this.model.get( 'strings' ).items_migrated + '</span>' )\n\t\t\t.append( this.$showHideTablesElem )\n\t\t\t.append( '<div class=progress-bar-wrapper><div class=progress-bar /></div>' );\n\n\t\tthis.updateStageTotals();\n\t},\n\tinitShowHideTablesElem: function() {\n\t\tthis.$showHideTablesElem = $( '<a class=\"show-hide-tables\">' ).text( this.model.get( 'strings' ).show_items );\n\t\tvar self = this;\n\t\tthis.$showHideTablesElem.on( 'click show-hide-progress-tables', function() {\n\t\t\tvar progTablesHidden;\n\t\t\tif ( self.$el.hasClass( 'hide-tables' ) ) { // show tables\n\t\t\t\tprogTablesHidden = false;\n\t\t\t\tself.$el.add( self.$el.siblings() ).removeClass( 'hide-tables' );\n\t\t\t\tself.$showHideTablesElem.text( self.model.get( 'strings' ).hide_items );\n\t\t\t} else { // hide tables\n\t\t\t\tprogTablesHidden = true;\n\t\t\t\tself.$el.add( self.$el.siblings() ).addClass( 'hide-tables' );\n\t\t\t\tself.$showHideTablesElem.text( self.model.get( 'strings' ).show_items );\n\t\t\t}\n\n\t\t\tif ( Boolean( progTablesHidden ) !== Boolean( wpmdb_data.prog_tables_hidden ) ) {\n\t\t\t\twpmdb_data.prog_tables_visibility_changed = true;\n\t\t\t\twpmdb_data.prog_tables_hidden = progTablesHidden;\n\t\t\t}\n\t\t} );\n\n\t\t// show progress tables on init if hidden is false\n\t\tif ( !wpmdb_data.prog_tables_hidden ) {\n\t\t\tthis.$showHideTablesElem.triggerHandler( 'show-hide-progress-tables' );\n\t\t}\n\n\t\t// make sure text reflects current state when showing\n\t\tthis.model.on( 'change:status activateTab', function() {\n\t\t\tif ( wpmdb_data.prog_tables_hidden ) {\n\t\t\t\tself.$showHideTablesElem.text( self.model.get( 'strings' ).show_items );\n\t\t\t} else {\n\t\t\t\tself.$showHideTablesElem.text( self.model.get( 'strings' ).hide_items );\n\t\t\t}\n\t\t} );\n\t},\n\tinitPauseBeforeFinalizeElem: function() {\n\t\tthis.$pauseBeforeFinalizeElem = $( '.pause-before-finalize' );\n\t\tthis.$pauseBeforeFinalizeCheckbox = this.$pauseBeforeFinalizeElem.find( 'input[type=checkbox]' );\n\t\tvar self = this;\n\t\tvar isChecked = false;\n\t\tvar migrationIntent = wpmdb.current_migration.model.get( 'migrationIntent' );\n\n\t\t// make sure checkbox is checked based on current state\n\t\tif ( wpmdb_data.pause_before_finalize ) {\n\t\t\tisChecked = true;\n\t\t}\n\t\tthis.$pauseBeforeFinalizeCheckbox.prop( 'checked', isChecked );\n\n\t\t// only display on certain migrations\n\t\tif ( -1 !== $.inArray( migrationIntent, [ 'push', 'pull', 'find_replace', 'import' ] ) ) {\n\t\t\tif ( 'find_replace' === migrationIntent ) {\n\t\t\t\t$( '#pause-before-finalize-label' ).text( wpmdb_strings.pause_before_finalize_find_replace );\n\t\t\t}\n\t\t\tthis.$pauseBeforeFinalizeElem.show();\n\t\t} else {\n\t\t\tthis.$pauseBeforeFinalizeElem.hide();\n\t\t}\n\n\t\t// hide on media stage\n\t\twpmdb.current_migration.model.on( 'change:activeStage', function() {\n\t\t\tif ( -1 !== $.inArray( wpmdb.current_migration.model.get( 'activeStageName' ), [\n\t\t\t\t'media',\n\t\t\t\t'themes',\n\t\t\t\t'plugins'\n\t\t\t] ) ) {\n\t\t\t\tself.$pauseBeforeFinalizeElem.hide();\n\t\t\t}\n\t\t} );\n\n\t\tthis.$pauseBeforeFinalizeElem.on( 'click', function() {\n\t\t\tvar pauseBeforeFinalizeValue = Boolean( self.$pauseBeforeFinalizeCheckbox.is( ':checked' ) );\n\t\t\tif ( pauseBeforeFinalizeValue !== Boolean( wpmdb_data.pause_before_finalize ) ) {\n\t\t\t\twpmdb_data.pause_before_finalize_changed = true;\n\t\t\t\twpmdb_data.pause_before_finalize = pauseBeforeFinalizeValue;\n\t\t\t}\n\t\t} );\n\t},\n\tinitTabElem: function() {\n\t\tvar self = this;\n\t\tthis.$tabElem = $( '<a class=stage-tab>' )\n\t\t\t.append( '<span class=stage-title>' + this.model.get( 'strings' ).stage_title + '</span> ' )\n\t\t\t.append( '<span class=stage-status>' + this.model.get( 'strings' ).queued + '</span> ' )\n\t\t\t.on( 'click', function() {\n\t\t\t\tself.model.activateTab();\n\t\t\t} );\n\t},\n\tupdateProgressElem: function() {\n\t\tvar percentDone = Math.max( 0, this.model.getTotalProgressPercent() );\n\t\tvar sizeDone = wpmdb.functions.convertKBSizeToHRFixed( Math.min( this.model.getTotalSizeTransferred(), this.model.get( 'totalSize' ) ) );\n\t\tvar tablesDone = Math.min( this.model.countItemsComplete(), this.model.get( 'items' ).length );\n\n\t\tif ( 'complete' === this.model.get( 'status' ) && 0 === this.model.get( 'totalSize' ) ) {\n\t\t\tpercentDone = 100;\n\t\t\tthis.$showHideTablesElem.fadeOut();\n\t\t}\n\n\t\tif ( percentDone !== this.percentDone ) {\n\t\t\tthis.percentDone = percentDone;\n\t\t\tthis.$totalProgressElem.find( '.percent-complete' ).text( percentDone );\n\t\t\tthis.$totalProgressElem.find( '.progress-bar-wrapper .progress-bar' ).css( { width: percentDone + '%' } );\n\t\t}\n\t\tif ( sizeDone != this.sizeDone ) {\n\t\t\tthis.sizeDone = sizeDone;\n\t\t\tthis.$totalProgressElem.find( '.size-complete' ).text( sizeDone );\n\t\t}\n\t\tif ( tablesDone != this.tablesDone ) {\n\t\t\tthis.tablesDone = tablesDone;\n\t\t\tthis.$totalProgressElem.find( '.items-complete' ).text( wpmdb.functions.wpmdb_add_commas( tablesDone ) );\n\t\t}\n\t},\n\tupdateStageTotals: function( itemCount ) {\n\t\titemCount = itemCount || this.model.get( 'items' ).length;\n\t\tif ( itemCount === this.itemCount ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.itemCount = itemCount;\n\t\tthis.$totalProgressElem.find( '.items-total' ).text( wpmdb.functions.wpmdb_add_commas( itemCount ) );\n\t\tthis.$totalProgressElem.find( '.size-total' ).text( wpmdb.functions.convertKBSizeToHRFixed( this.model.get( 'totalSize' ) ) );\n\n\t\tif ( !this.shouldHideItemProgress && 500 < itemCount ) {\n\t\t\tlet stageName = this.model.get( 'name' ).toLowerCase();\n\t\t\tif ( 'themes' == stageName || 'plugins' === stageName ) {\n\t\t\t\tthis.hideItemProgress();\n\t\t\t}\n\t\t}\n\t},\n\thideItemProgress: function() {\n\t\tif ( this.shouldHideItemProgress ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.shouldHideItemProgress = true;\n\t\tthis.$itemsContainer.empty();\n\t\tif ( this.$showHideTablesElem ) {\n\t\t\tthis.$showHideTablesElem.hide();\n\t\t}\n\t},\n\tmaybeAddElementToView: function( item ) {\n\t\tvar maxDomNodes = this.shouldHideItemProgress ? 0 : this.maxDomNodes;\n\t\tif ( this.visibleDomNodes < maxDomNodes ) {\n\t\t\t++this.visibleDomNodes;\n\t\t\tthis.$itemsContainer.append( item.$el );\n\t\t} else {\n\t\t\tthis.queuedElements.push( item );\n\t\t\tif ( !this.$truncationNotice ) {\n\t\t\t\tthis.showTruncationNotice();\n\t\t\t} else {\n\t\t\t\tthis.updateTruncationNotice();\n\t\t\t}\n\t\t}\n\t},\n\tshowTruncationNotice: function() {\n\t\tif ( this.$truncationNotice ) {\n\t\t\treturn;\n\t\t}\n\t\tvar hiddenItemsCount = this.shouldHideItemProgress ? this.model.get( 'items' ).length : this.queuedElements.length;\n\t\tthis.$truncationNotice = $( '<div class=\"truncation-notice\" >' + wpmdb_strings.progress_items_truncated_msg.replace( '%1$s', '<span class=\"hidden-items\">' + wpmdb.functions.wpmdb_add_commas( hiddenItemsCount ) + '</span>' ) + '</div>' );\n\t\tthis.$truncationNoticeHiddenItems = this.$truncationNotice.find( '.hidden-items' );\n\t\tthis.$itemsContainer.after( this.$truncationNotice );\n\t},\n\tupdateTruncationNotice: function() {\n\t\tvar hiddenItemsCount = this.shouldHideItemProgress ? this.model.get( 'items' ).length : this.queuedElements.length;\n\t\tthis.$truncationNoticeHiddenItems.text( wpmdb.functions.wpmdb_add_commas( hiddenItemsCount ) );\n\t},\n\tgetNextElementForView: function( $el ) {\n\t\tvar queueItem;\n\n\t\tif ( this.shouldHideItemProgress ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.queuedElements.length ) {\n\t\t\tif ( $el ) {\n\t\t\t\tthis.queuedElements.push( $el );\n\t\t\t}\n\t\t\tqueueItem = this.queuedElements.shift();\n\t\t\tif ( queueItem instanceof $ ) {\n\t\t\t\t$el = queueItem;\n\t\t\t} else {\n\t\t\t\t$el = queueItem.$el;\n\t\t\t}\n\t\t}\n\t\treturn $el;\n\t},\n\tsetItemProgress: function( item ) {\n\t\tvar percentDone = Math.min( 100, Math.ceil( 100 * (item.transferred / item.size) ) );\n\n\t\tif ( item.hasOwnProperty( 'exactPercent' ) ) {\n\t\t\tpercentDone = 100 * item.exactPercent;\n\t\t}\n\n\t\tif ( 0 === item.size ) {\n\t\t\tpercentDone = 100;\n\t\t}\n\n\t\titem.updateProgress( percentDone )\n\t\tif ( 100 <= percentDone || 0 === item.size ) {\n\t\t\tthis.elemComplete( item );\n\t\t}\n\t},\n\telemComplete: function( item ) {\n\t\tif ( this.shouldHideItemProgress ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $el = item.$el.addClass( 'complete' );\n\n\t\t// skip moving item to end of list if there's only one item in the list\n\t\tvar numItems = this.model.get( 'items' ).length;\n\t\tif ( 1 === numItems ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $nextEl = this.getNextElementForView( $el );\n\n\t\tvar height = $el.height();\n\t\tvar marginBottom = $el.css( 'margin-bottom' );\n\n\t\tvar $clone = false;\n\t\tif ( $nextEl === $el ) {\n\t\t\t$clone = $nextEl.clone().css( {\n\t\t\t\theight: 0,\n\t\t\t\tmarginBottom: 0,\n\t\t\t\tdisplay: 'block'\n\t\t\t} ).addClass( 'clone complete' );\n\t\t\t$clone.appendTo( this.$itemsContainer );\n\t\t}\n\t\t$el.css( { height: height, marginBottom: marginBottom } );\n\n\t\tsetTimeout( function() {\n\t\t\t$el.css( { height: 0, marginBottom: 0 } );\n\n\t\t\tvar timeout = 0;\n\t\t\tif ( $clone ) {\n\t\t\t\ttimeout = 250;\n\t\t\t\t$clone.css( { height: height, marginBottom: marginBottom } );\n\t\t\t\t$clone.find('.progress-bar').addClass('progress-bar-no-transition').css({width: '100%'});\n\t\t\t}\n\n\t\t\tsetTimeout( function() {\n\t\t\t\t$el.css( { display: 'none' } );\n\t\t\t\t$el.remove();\n\t\t\t\t$clone && $clone.remove();\n\n\t\t\t\tthis.$itemsContainer.find( '.item-progress:not(.clone)' ).last().after( $nextEl.css( {\n\t\t\t\t\theight: 'auto',\n\t\t\t\t\tmarginBottom: marginBottom,\n\t\t\t\t\tdisplay: 'block'\n\t\t\t\t} ) );\n\t\t\t}.bind( this ), timeout );\n\n\t\t}.bind( this ), 1000 );\n\n\t}\n} );\n\nmodule.exports = MigrationProgressStageView;\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgressStage-view.js","var $ = jQuery;\n\nmodule.exports = {\n\tupdateProgTableVisibilitySetting: function() {\n\t\tif ( ! wpmdb_data.prog_tables_visibility_changed ) {\n\t\t\treturn;\n\t\t}\n\t\twpmdb_data.prog_tables_visibility_changed = false;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_save_setting',\n\t\t\t\tnonce: wpmdb_data.nonces.save_setting,\n\t\t\t\tsetting: 'prog_tables_hidden',\n\t\t\t\tchecked: Boolean( wpmdb_data.prog_tables_hidden )\n\t\t\t},\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\tconsole.log( 'Could not save progress item visibility setting', errorThrown );\n\t\t\t}\n\t\t} );\n\t},\n\tupdatePauseBeforeFinalizeSetting: function() {\n\t\tif ( ! wpmdb_data.pause_before_finalize_changed ) {\n\t\t\treturn;\n\t\t}\n\t\twpmdb_data.pause_before_finalize_changed = false;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_save_setting',\n\t\t\t\tnonce: wpmdb_data.nonces.save_setting,\n\t\t\t\tsetting: 'pause_before_finalize',\n\t\t\t\tchecked: Boolean( wpmdb_data.pause_before_finalize )\n\t\t\t},\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\tconsole.log( 'Could not save pause before finalize setting', errorThrown );\n\t\t\t}\n\t\t} );\n\t}\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-utils.js","import WPMDBCommon from './src/js/helpers/wpmdbCommon';\n\nwindow.wpmdb = {\n\tfunctions : {},\n\tcommon : {\n\t\thooks: [],\n\t\tcall_stack: [],\n\t\tnon_fatal_errors: '',\n\t\tmigration_error: false\n\t}\n};\n\nwpmdb.functions = new WPMDBCommon();\n\nfunction importAll( require ) {\n\trequire.keys().forEach( function( file ) {\n\t\t// Don't load modules folder as there are already 'requires()` in place\n\t\tif ( -1 === file.indexOf( 'wpmdbCommon.js' ) && -1 === file.indexOf('./js/modules/') ) {\n\t\t\trequire( file );\n\t\t}\n\t} );\n}\n\nimportAll(\n\trequire.context(\n\t\t'imports-loader?$=>window.jQuery!./src', true, /^(.*\\.(js|sass|scss$))/im\n\t)\n );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/webpack.index.js","/**\n * Wrapper for wpmdb.functions, assigned in Webpack entry file\n */\nexport default class WPMDBCommon {\n\tconstructor() {}\n\t/**\n\t * Toggle proper translated strings based on migration type selected.\n\t *\n\t * To show the properly translated strings for the selected push or pull\n\t * migration type, we need to hide all strings then show the right\n\t * translated strings based on the migration type selected.\n\t *\n\t * @see https://github.com/deliciousbrains/wp-migrate-db-pro/issues/764\n\t *\n\t * @return void\n\t */\n\twpmdb_toggle_migration_action_text() {\n\t\tjQuery( '.action-text' ).hide();\n\t\tjQuery( '.action-text.' + jQuery( 'input[name=action]:checked' ).val() ).show();\n\t}\n\n\t/**\n\t * Return the currently selected migration type selected.\n\t *\n\t * @return string Will return `push`, `pull`, `savefile`, or `` for exporting as a file.\n\t */\n\twpmdb_migration_type() {\n\t\tvar action = jQuery( 'input[name=action]:checked' );\n\t\tif ( 0 === action.length ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn action.val();\n\t}\n\n\n\twpmdb_call_next_hook( ) {\n\t\tconst wpmdb = window.wpmdb;\n\t\tif ( !wpmdb.common.call_stack.length ) {\n\t\t\twpmdb.common.call_stack = wpmdb.common.hooks;\n\t\t}\n\n\t\tvar func = wpmdb.common.call_stack[ 0 ];\n\t\twpmdb.common.call_stack.shift();\n\t\tfunc.call( this );\n\t}\n\n\twpmdb_add_commas( number_string ) {\n\t\tnumber_string += '';\n\t\tvar number_parts = number_string.split( '.' );\n\t\tvar integer = number_parts[ 0 ];\n\t\tvar decimal = 1 < number_parts.length ? '.' + number_parts[ 1 ] : '';\n\t\tvar rgx = /(\\d+)(\\d{3})/;\n\t\twhile ( rgx.test( integer ) ) {\n\t\t\tinteger = integer.replace( rgx, '$1' + ',' + '$2' );\n\t\t}\n\t\treturn integer + decimal;\n\t}\n\n\twpmdb_parse_json( maybe_json ) {\n\t\tvar json_object = {};\n\t\ttry {\n\t\t\tjson_object = jQuery.parseJSON( maybe_json );\n\t\t}\n\t\tcatch ( e ) {\n\n\t\t\t// We simply return false here because the json data itself will never just contain a value of \"false\"\n\t\t\treturn false;\n\t\t}\n\t\treturn json_object;\n\t}\n\n\t/**\n\t * Global error method for detecting PHP or other errors in AJAX response\n\t *\n\t * @param title - the error title if not a PHP error\n\t * @param code - the error code if not a PHP error\n\t * @param text - the AJAX response text to sniff for errors\n\t * @param jqXHR - optional AJAX object used to enrich the error message\n\t *\n\t * @returns {string} - html error string with view error toggle element\n\t */\n\twpmdbGetAjaxErrors( title, code, text, jqXHR ) {\n\t\tvar jsonErrors = false;\n\t\tvar html = '';\n\n\t\tvar validJson = this.wpmdb_parse_json( text );\n\t\tif ( false === validJson ) {\n\t\t\tjsonErrors = true;\n\t\t\ttitle = wpmdb_strings.ajax_json_message;\n\t\t\tcode = '(#144)';\n\t\t\tvar originalText = text;\n\t\t\ttext = wpmdb_strings.ajax_json_errors + ' ' + code;\n\t\t\ttext += '<br><a class=\"show-errors-toggle\" href=\"#\">' + wpmdb_strings.view_error_messages + '</a> ';\n\t\t\ttext += '<div class=\"migration-php-errors\">' + originalText + '</div>';\n\t\t}\n\n\t\t// Only add local connection issue if php errors (#144) or jqXHR has been provided\n\t\tif ( jsonErrors || 'undefined' !== jqXHR ) {\n\t\t\thtml += '<strong>' + title + '</strong>' + ' &mdash; ';\n\t\t}\n\n\t\t// Only add extra error details if not php errors (#144) and jqXHR has been provided\n\t\tif ( !jsonErrors && 'undefined' !== jqXHR ) {\n\t\t\thtml += wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText;\n\t\t\thtml += '<br /><br />' + wpmdb_strings.response + ':<br />';\n\t\t}\n\n\t\t// Add code to the end of the error text if not json errors\n\t\tif ( !jsonErrors ) {\n\t\t\ttext += ' ' + code;\n\t\t}\n\n\t\t// Finally add the error message to the output\n\t\thtml += text;\n\n\t\treturn html;\n\t}\n\n\t/**\n\t * @TODO convert to functions object\n\t * @param str\n\t * @param delimiter\n\t * @returns {string}\n\t */\n\tpreg_quote( str, delimiter ) {\n\n\t\t// discuss at: http://phpjs.org/functions/preg_quote/\n\t\t// original by: booeyOH\n\t\t// improved by: Ates Goral (http://magnetiq.com)\n\t\t// improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n\t\t// improved by: Brett Zamir (http://brett-zamir.me)\n\t\t// bugfixed by: Onno Marsman\n\t\t// example 1: preg_quote(\"$40\");\n\t\t// returns 1: '\\\\$40'\n\t\t// example 2: preg_quote(\"*RRRING* Hello?\");\n\t\t// returns 2: '\\\\*RRRING\\\\* Hello\\\\?'\n\t\t// example 3: preg_quote(\"\\\\.+*?[^]$(){}=!<>|:\");\n\t\t// returns 3: '\\\\\\\\\\\\.\\\\+\\\\*\\\\?\\\\[\\\\^\\\\]\\\\$\\\\(\\\\)\\\\{\\\\}\\\\=\\\\!\\\\<\\\\>\\\\|\\\\:'\n\n\t\treturn String( str )\n\t\t\t.replace( new RegExp( '[.\\\\\\\\+*?\\\\[\\\\^\\\\]$(){}=!<>|:\\\\' + (delimiter || '') + '-]', 'g' ), '\\\\$&' );\n\t}\n\n\t/**\n\t * @TODO convert to functions object\n\t * @param table_prefix\n\t * @param desired_table\n\t * @param given_table\n\t * @returns {boolean}\n\t */\n\ttable_is( table_prefix, desired_table, given_table ) {\n\t\tif ( (table_prefix + desired_table).toLowerCase() === given_table.toLowerCase() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tvar escaped_given_table = this.preg_quote( given_table );\n\t\tvar regex = new RegExp( table_prefix + '([0-9]+)_' + desired_table, 'i' );\n\t\tvar results = regex.exec( escaped_given_table );\n\t\treturn null !== results;\n\t}\n\n\t/**\n\t * @TODO convert to functions object\n\t * @param table_prefix\n\t * @param table_name\n\t * @returns {*}\n\t */\n\tsubsite_for_table( table_prefix, table_name ) {\n\t\tvar escaped_table_name = this.preg_quote( table_name );\n\t\tvar regex = new RegExp( table_prefix + '([0-9]+)_', 'i' );\n\t\tvar results = regex.exec( escaped_table_name );\n\n\t\tif ( null === results ) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn results[ 1 ];\n\t\t}\n\t}\n\n\tconvertKBSizeToHR( size, dec, kbSize, retArray ) {\n\t\tvar retVal, units;\n\t\tkbSize = kbSize || 1000;\n\t\tdec = dec || 2;\n\n\t\tsize = parseFloat( size );\n\n\t\tif ( size < 1 && size > 0 ) {\n\t\t\tretVal = [ (size * kbSize).toFixed( 0 ), 'B' ];\n\t\t} else if ( kbSize > Math.abs( size ) ) {\n\t\t\tretVal = [ size.toFixed( 0 ), 'KB' ];\n\t\t} else {\n\t\t\tunits = [ 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' ];\n\t\t\tvar u = -1;\n\t\t\tdo {\n\t\t\t\tsize /= kbSize;\n\t\t\t\t++u;\n\t\t\t} while ( Math.abs( size ) >= kbSize && u < units.length - 1 );\n\t\t\tretVal = [ Math.round( size * Math.pow( 10, dec ) ) / Math.pow( 10, dec ), units[ u ] ];\n\t\t}\n\n\t\tif ( !retArray ) {\n\t\t\tretVal = retVal[ 0 ] + ' ' + retVal[ 1 ];\n\t\t}\n\t\treturn retVal;\n\t}\n\n\tconvertKBSizeToHRFixed( size, dec, kbSize ) {\n\t\tdec = dec || 2;\n\t\tvar hrSizeArray = this.convertKBSizeToHR( size, dec, kbSize, true );\n\n\t\t// Show 2 decimal points for MBs\n\t\tif ( 'MB' == hrSizeArray[ 1 ] ) {\n\t\t\treturn hrSizeArray[ 0 ].toFixed( 2 ) + ' ' + hrSizeArray[ 1 ];\n\t\t}\n\n\t\treturn hrSizeArray[ 0 ] + ' ' + hrSizeArray[ 1 ];\n\t}\n\n\tajax_handle_dismissible_notice( nonce, callback, ele ) {\n\t\tjQuery.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_process_notice_link',\n\t\t\t\tnonce: nonce,\n\t\t\t\tnotice: jQuery( ele ).data( 'notice' ),\n\t\t\t\ttype: jQuery( ele ).data( 'type' ),\n\t\t\t\treminder: jQuery( ele ).data( 'reminder' )\n\t\t\t},\n\t\t\tbeforeSend: callback( ele )\n\t\t} );\n\t}\n\n\tget_spinner_url() {\n\t\tvar admin_url = ajaxurl.replace( '/admin-ajax.php', '' ), spinner_url = admin_url + '/images/spinner';\n\n\t\tif ( 2 < window.devicePixelRatio ) {\n\t\t\tspinner_url += '-2x';\n\t\t}\n\t\tspinner_url += '.gif';\n\n\t\treturn spinner_url;\n\t}\n\n\texclude_post_types_warning() {\n\t\tvar excluded_post_types = $( '#select-post-types' ).val();\n\t\tvar excluded_post_types_text = '';\n\t\tvar $exclude_post_types_warning = $( '.exclude-post-types-warning' );\n\n\t\tif ( excluded_post_types ) {\n\t\t\texcluded_post_types_text = '<code>' + excluded_post_types.join( '</code>, <code>' ) + '</code>';\n\t\t\t$( '.excluded-post-types' ).html( excluded_post_types_text );\n\n\t\t\tif ( '0' === $exclude_post_types_warning.css( 'opacity' ) ) {\n\t\t\t\t$exclude_post_types_warning\n\t\t\t\t\t.css( { opacity: 0 } )\n\t\t\t\t\t.slideDown( 200 )\n\t\t\t\t\t.animate( { opacity: 1 } );\n\t\t\t}\n\t\t} else {\n\t\t\t$exclude_post_types_warning\n\t\t\t\t.css( { opacity: 0 } )\n\t\t\t\t.slideUp( 200 )\n\t\t\t\t.animate( { opacity: 0 } );\n\t\t}\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/helpers/wpmdbCommon.js","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/define-property.js\n// module id = 63\n// module chunks = 0","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/define-property.js\n// module id = 64\n// module chunks = 0","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.define-property.js\n// module id = 65\n// module chunks = 0","var map = {\n\t\"./js/backups.js\": 67,\n\t\"./js/dismissable-notices.js\": 108,\n\t\"./js/helpers/events.js\": 109,\n\t\"./js/helpers/utils.js\": 110,\n\t\"./js/helpers/wpmdbCommon.js\": 111,\n\t\"./js/helpers/wpmdbGlobals.js\": 112,\n\t\"./js/hook.js\": 113,\n\t\"./js/import.js\": 114,\n\t\"./js/localStorage.js\": 115,\n\t\"./js/modules/MigrationProgress-controller.js\": 116,\n\t\"./js/modules/MigrationProgress-model.js\": 117,\n\t\"./js/modules/MigrationProgress-utils.js\": 118,\n\t\"./js/modules/MigrationProgress-view.js\": 119,\n\t\"./js/modules/MigrationProgressStage-model.js\": 120,\n\t\"./js/modules/MigrationProgressStage-view.js\": 121,\n\t\"./js/multisite.js\": 122,\n\t\"./js/plugin-update.js\": 123,\n\t\"./js/script.js\": 124,\n\t\"./js/usage-tracking-notice.js\": 127,\n\t\"./js/usage-tracking.js\": 128,\n\t\"./sass/_migration-progress.scss\": 129,\n\t\"./sass/_progress-upgrade.scss\": 130,\n\t\"./sass/backups.scss\": 131,\n\t\"./sass/disabled.scss\": 132,\n\t\"./sass/plugin-update-styles.scss\": 133,\n\t\"./sass/styles.scss\": 134\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 66;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/wp-migrate-db-pro/asset/src ./node_modules/imports-loader?$=>window.jQuery ^(.*\\.(js|sass|scss$))/i\n// module id = 66\n// module chunks = 0","import {handleAjaxError} from 'src/wp-migrate-db-pro/asset/src/js/helpers/utils';\n\nconst $ = window.jQuery;\nconst wpmdb = window.wpmdb;\nconst ajaxurl = window.ajaxurl;\nconst _ = window._;\n\nexport default class WPMDBBackups {\n\tconstructor() {\n\t\tthis.backups_list = {};\n\t\tthis.backups_rendered = false;\n\t}\n\n\tajax_spinner = '<img src=\"' + wpmdb.functions.get_spinner_url() + '\" alt=\"\" class=\"ajax-spinner general-spinner\" />';\n\n\tsetup(){\n\t\tif ( \"false\" === wpmdb_data.is_pro ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdocument.addEventListener( 'DOMContentLoaded', () => {\n\t\t\tif ( window.location.hash === \"#backups\" ) {\n\t\t\t\tthis.locationHashChanged();\n\t\t\t}\n\t\t} );\n\n\t\tif ( navigator.userAgent.match( /Trident.*rv:11\\./ ) ) {\n\t\t\t$( 'body' ).addClass( 'ie11' );\n\t\t}\n\n\t\twindow.onhashchange = this.locationHashChanged;\n\t}\n\n\t/**\n\t * Wrapper for jQuery's $.ajax()\n\t * @param args\n\t * @returns {Promise<any>}\n\t */\n\tasync doAJAX( args ) {\n\t\tconst response = await $.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tcache: false,\n\t\t\tdata: args\n\t\t} );\n\n\t\tconst parsed_response = JSON.parse( response );\n\n\t\treturn parsed_response;\n\t}\n\n\t/**\n\t * Triggered onhashchange\n\t * @returns {Promise<void>}\n\t */\n\tlocationHashChanged = async () => {\n\t\tif ( window.location.hash === \"#backups\" ) {\n\t\t\tif ( _.isEmpty( this.backups_list ) ) {\n\t\t\t\tdocument.getElementById( 'wpmdb-backups-container' ).innerHTML = wpmdb_strings.loading_backups + this.ajax_spinner;\n\t\t\t}\n\n\t\t\tconst backups = await this.getBackups();\n\t\t\tif ( backups && 'object' === typeof backups ) {\n\t\t\t\tthis.displayBackups( backups );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns {Promise<*>}\n\t */\n\tasync getBackups() {\n\t\tconst args = {\n\t\t\taction: 'wpmdb_get_backups',\n\t\t\tnonce: wpmdb_data.nonces.get_backups\n\t\t};\n\n\t\ttry {\n\t\t\tif ( !_.isEmpty( this.backups_list ) ) {\n\t\t\t\treturn this.backups_list;\n\t\t\t}\n\n\t\t\tconst parsed_response = await this.doAJAX( args );\n\n\t\t\tif ( 'undefined' !== typeof(parsed_response.status) ) {\n\t\t\t\tdocument.getElementById( 'wpmdb-backups-container' ).innerHTML = parsed_response.status;\n\t\t\t\tthis.backups_list = parsed_response.status;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( 'undefined' !== typeof(parsed_response.wpmdb_error) ) {\n\t\t\t\tthrow new Error( parsed_response.error_msg );\n\t\t\t}\n\n\t\t\tthis.backups_list = parsed_response;\n\t\t\treturn parsed_response;\n\t\t} catch ( error ) {\n\t\t\tdocument.getElementById( 'wpmdb-backups-container' ).innerHTML = '';\n\t\t\tthis.ajaxError( wpmdb_strings.error_getting_backups, error );\n\t\t}\n\t}\n\n\tajaxError( error_msg, error ) {\n\t\tconst ele = document.getElementById( 'wpmdb-backups-messages' );\n\t\tconst tpl = `\n\t\t\t<p><strong>${error_msg}</strong></p>\n\t\t\t<p>${error}</p>\n\t\t`;\n\n\t\tif ( !ele.classList.contains( 'visible' ) ) {\n\t\t\tele.classList.add( 'visible' );\n\t\t}\n\n\t\tele.innerHTML = tpl;\n\t\tconsole.error( error );\n\t}\n\n\t/**\n\t * Renders individual backup rows\n\t * @param backup\n\t * @returns {string}\n\t */\n\trender( backup ) {\n\t\tconst path = backup.raw_name.replace( /\\.sql/, '' );\n\n\t\treturn `\n\t\t<ul class=\"backups-row\" id=\"${path}\">\n\t\t\t<li>${backup.modified}</li>\n\t\t\t<li>${backup.name}</li>\n\t\t\t<li><a href=\"#backups\" class=\"download-backup\">${wpmdb_strings.download}</a> <a href=\"#backups\" class=\"delete-backup\"></a></li>\n\t\t</ul>`;\n\t}\n\n\tdisplayBackups( backups ) {\n\t\tif ( this.backups_rendered ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markup = `${ backups.map( this.render ).join( '' ) }`;\n\n\t\tdocument.getElementById( 'wpmdb-backups-container' ).innerHTML = markup;\n\t\tthis.addListener( '.download-backup', this.ajaxGetDownloadFile );\n\t\tthis.addListener( '.delete-backup', this.ajaxDeleteBackup );\n\t\tthis.backups_rendered = true;\n\t}\n\n\tasync addListener( element, method ) {\n\t\t// Add event listeners for links\n\t\tdocument.querySelectorAll( element ).forEach( ( ele ) => {\n\t\t\tele.addEventListener( 'click', async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// Get path info from parent element data attritbute\n\t\t\t\tconst path = event.target.parentNode.parentNode.id;\n\t\t\t\tawait method.call( this, path );\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t} );\n\t}\n\n\tasync ajaxGetDownloadFile( filePath, gzip ) {\n\t\tconst args = {\n\t\t\taction: 'wpmdb_get_backup',\n\t\t\tpath: filePath,\n\t\t\tnonce: wpmdb_data.nonces.get_backup\n\t\t};\n\n\t\ttry {\n\t\t\tconst parsed_response = await this.doAJAX( args );\n\n\t\t\tif ( 'undefined' !== typeof(parsed_response.wpmdb_error) ) {\n\t\t\t\tthrow new Error( parsed_response.error_msg );\n\t\t\t}\n\n\t\t\tif( 'success' === parsed_response.status ){\n\t\t\t\tlocation.href = parsed_response.redirect;\n\t\t\t}\n\n\t\t\treturn parsed_response;\n\t\t} catch ( error ) {\n\t\t\tthis.ajaxError( wpmdb_strings.error_downloading_backup, error );\n\t\t}\n\t}\n\n\tasync ajaxDeleteBackup( path, gzip ) {\n\t\tif ( !window.confirm( wpmdb_strings.confirm_delete_backup ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst args = {\n\t\t\taction: 'wpmdb_delete_backup',\n\t\t\tpath: path,\n\t\t\tnonce: wpmdb_data.nonces.delete_backup\n\t\t};\n\n\t\ttry {\n\t\t\tconst parsed_response = await this.doAJAX( args );\n\n\t\t\tif ( 'undefined' !== typeof(parsed_response.wpmdb_error) ) {\n\t\t\t\tthrow new Error( parsed_response.error_msg );\n\t\t\t}\n\n\t\t\tif( 'deleted' === parsed_response.status ){\n\t\t\t\tvar elem = document.querySelector( `#${path}` );\n\t\t\t\telem.classList.add( 'wpmdb-backup-deleted' );\n\n\t\t\t\t// Remove element from the DOM after the CSS transform is complete\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t\t}, 1100 )\n\t\t\t}\n\n\t\t\treturn parsed_response;\n\t\t} catch ( error ) {\n\t\t\tthis.ajaxError( wpmdb_strings.error_deleting_backup, error );\n\t\t}\n\t}\n}\n\nconst wpmdb_backups = new WPMDBBackups();\nwpmdb_backups.setup();\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/backups.js","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// This method of obtaining a reference to the global object needs to be\n// kept identical to the way it is obtained in runtime.js\nvar g = (function() { return this })() || Function(\"return this\")();\n\n// Use `getOwnPropertyNames` because not all browsers support calling\n// `hasOwnProperty` on the global `self` object in a worker. See #183.\nvar hadRuntime = g.regeneratorRuntime &&\n Object.getOwnPropertyNames(g).indexOf(\"regeneratorRuntime\") >= 0;\n\n// Save the old regeneratorRuntime in case it needs to be restored later.\nvar oldRuntime = hadRuntime && g.regeneratorRuntime;\n\n// Force reevalutation of runtime.js.\ng.regeneratorRuntime = undefined;\n\nmodule.exports = require(\"./runtime\");\n\nif (hadRuntime) {\n // Restore the original runtime.\n g.regeneratorRuntime = oldRuntime;\n} else {\n // Remove the global property added by runtime.js.\n try {\n delete g.regeneratorRuntime;\n } catch(e) {\n g.regeneratorRuntime = undefined;\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/regenerator-runtime/runtime-module.js\n// module id = 68\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() { return this })() || Function(\"return this\")()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/regenerator-runtime/runtime.js\n// module id = 69\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol/iterator.js\n// module id = 70\n// module chunks = 0","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/iterator.js\n// module id = 71\n// module chunks = 0","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_string-at.js\n// module id = 72\n// module chunks = 0","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-create.js\n// module id = 73\n// module chunks = 0","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dps.js\n// module id = 74\n// module chunks = 0","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iobject.js\n// module id = 75\n// module chunks = 0","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_array-includes.js\n// module id = 76\n// module chunks = 0","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-absolute-index.js\n// module id = 77\n// module chunks = 0","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gpo.js\n// module id = 78\n// module chunks = 0","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.array.iterator.js\n// module id = 79\n// module chunks = 0","module.exports = function () { /* empty */ };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_add-to-unscopables.js\n// module id = 80\n// module chunks = 0","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-step.js\n// module id = 81\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol.js\n// module id = 82\n// module chunks = 0","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/index.js\n// module id = 83\n// module chunks = 0","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toObject = require('./_to-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $GOPS = require('./_object-gops');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n $GOPS.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });\n\n$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return $GOPS.f(toObject(it));\n }\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.symbol.js\n// module id = 84\n// module chunks = 0","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_meta.js\n// module id = 85\n// module chunks = 0","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-keys.js\n// module id = 86\n// module chunks = 0","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array.js\n// module id = 87\n// module chunks = 0","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn-ext.js\n// module id = 88\n// module chunks = 0","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopd.js\n// module id = 89\n// module chunks = 0","require('./_wks-define')('asyncIterator');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js\n// module id = 90\n// module chunks = 0","require('./_wks-define')('observable');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.observable.js\n// module id = 91\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/promise.js\n// module id = 92\n// module chunks = 0","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/promise.js\n// module id = 93\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.promise.js\n// module id = 94\n// module chunks = 0","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-instance.js\n// module id = 95\n// module chunks = 0","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_for-of.js\n// module id = 96\n// module chunks = 0","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-call.js\n// module id = 97\n// module chunks = 0","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array-iter.js\n// module id = 98\n// module chunks = 0","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.get-iterator-method.js\n// module id = 99\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_invoke.js\n// module id = 100\n// module chunks = 0","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_microtask.js\n// module id = 101\n// module chunks = 0","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_user-agent.js\n// module id = 102\n// module chunks = 0","var hide = require('./_hide');\nmodule.exports = function (target, src, safe) {\n for (var key in src) {\n if (safe && target[key]) target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine-all.js\n// module id = 103\n// module chunks = 0","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-species.js\n// module id = 104\n// module chunks = 0","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-detect.js\n// module id = 105\n// module chunks = 0","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.promise.finally.js\n// module id = 106\n// module chunks = 0","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.promise.try.js\n// module id = 107\n// module chunks = 0","(function( $ ) {\n\n\t//If there's an error message visible about the mu-plugins folder not being writable\n\tif ( 0 < $( '.wpmdb-compat-plugin-row-error' ).length ) {\n\t\t$( '[data-slug=\"wp-migrate-db-pro\"]' ).addClass( 'wpmdbpro-has-message' );\n\t}\n\n\t//For the free plugin the update class needs to be present\n\t$( '.wpmdbpro-custom' ).prev().addClass( 'update' );\n\n\t$( '.notice-link-plugins-page' ).click( function( e ) {\n\t\te.preventDefault();\n\t\tvar self = jQuery( this );\n\n\t\twpmdb.functions.ajax_handle_dismissible_notice( wpmdb_nonces.process_notice_link, function( ele ) {\n\t\t\t$( ele ).closest( '.wpmdbpro-custom' ).hide();\n\n\t\t\t// remove .wpmdb-has-message class from parent TR to add the bottom border back in\n\t\t\t$( ele ).closest( 'tr' ).siblings( 'tr.wpmdbpro-has-message' ).removeClass( 'wpmdbpro-has-message' );\n\t\t}, self );\n\n\t\t$( '.wpmdbpro-custom' ).prev().removeClass( 'update' );\n\t} );\n})( jQuery );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/dismissable-notices.js","$.fn.bindFirst = function (name, fn) {\n\tthis.bindNth(name, fn, 0);\n};\n\n$.fn.bindNth = function(name, fn, index) {\n\t// Bind event normally.\n\tthis.bind(name, fn);\n\t// Move to nth position.\n\tthis.changeEventOrder(name, index);\n};\n\n$.fn.changeEventOrder = function (names, newIndex) {\n\tvar that = this;\n\t// Allow for multiple events.\n\t$.each(names.split(' '), function (idx, name) {\n\t\tthat.each(function () {\n\t\t\tvar handlers = $._data(this, 'events')[name.split('.')[0]];\n\t\t\t// Validate requested position.\n\t\t\tnewIndex = Math.min(newIndex, handlers.length - 1);\n\t\t\thandlers.splice(newIndex, 0, handlers.pop());\n\t\t});\n\t});\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/helpers/events.js","const $ = window.jQuery;\nconst ajaxurl = window.ajaxurl;\nconst wpmdb_strings = window.wpmdb_strings;\nconst wpmdb_data = window.wpmdb_data;\n\nexport default class WPMDBGlobals {\n\tconstructor() {\n\t\tthis.show_ssl_notice = false;\n\t\tthis.doing_save_profile = false;\n\t\tthis.doing_ajax = false;\n\t\tthis.profile_name_edited = false;\n\t\tthis.migration_intent = null;\n\t\tthis.doing_licence_registration_ajax = false;\n\t\tthis.migration_paused = false;\n\t\tthis.last_replace_switch = wpmdb.functions.wpmdb_migration_type();\n\t\tthis.connection_established = false;\n\t\tthis.profile_name_edited = false;\n\t\tthis.checked_licence = false;\n\t\tthis.show_prefix_notice = false;\n\t\tthis.show_ssl_notice = false;\n\t\tthis.force_reconnect = false;\n\t\tthis.migration_selection = '';\n\t\tthis.show_version_notice = false;\n\t\tthis.migration_completed = false;\n\t\tthis.currently_migrating = false;\n\t\tthis.dump_filename = '';\n\t\tthis.dump_path = '';\n\t\tthis.migration_intent = '';\n\t\tthis.remote_site = null;\n\t\tthis.secret_key = null;\n\t\tthis.form_data = null;\n\t\tthis.stage = null;\n\t\tthis.elapsed_interval = null;\n\t\tthis.completed_msg = null;\n\t\tthis.tables_to_migrate = [];\n\t\tthis.migration_paused = false;\n\t\tthis.previous_progress_title = '';\n\t\tthis.previous_progress_text_primary = '';\n\t\tthis.previous_progress_text_secondary = '';\n\t\tthis.cancelling_text = '';\n\t\tthis.paused_text = '';\n\t\tthis.migration_cancelled = false;\n\t\tthis.flag_skip_delay = false;\n\t\tthis.delay_between_requests = 0;\n\t\tthis.fade_duration = 400;\n\t\tthis.pause_before_finalize = false;\n\t\tthis.is_auto_pause_before_finalize = false;\n\t\tthis.$connection_info_box = $( '.connection-info-wrapper' );\n\t\tthis.$push_select = window.wpmdb.$push_select = $( '#select-tables' ).clone();\n\t\tthis.$pull_select = window.wpmdb.$pull_select = $( '#select-tables' ).clone();\n\t\tthis.$push_post_type_select = $( '#select-post-types' ).clone();\n\t\tthis.$pull_post_type_select = $( '#select-post-types' ).clone();\n\t\tthis.$push_select_backup = $( '#select-backup' ).clone();\n\t\tthis.$pull_select_backup = $( '#select-backup' ).clone();\n\n\t\tthis.spinner_url = window.spinner_url = wpmdb.functions.get_spinner_url();\n\t\tthis.ajax_spinner = window.ajax_spinner = '<img src=\"' + this.spinner_url + '\" alt=\"\" class=\"ajax-spinner general-spinner\" />';\n\t}\n\n\tpad( n, width, z ) {\n\t\tz = z || '0';\n\t\tn = n + '';\n\t\treturn n.length >= width ? n : new Array( width - n.length + 1 ).join( z ) + n;\n\t}\n\n\tis_int( n ) {\n\t\tn = parseInt( n );\n\t\treturn 'number' === typeof n && 0 === n % 1;\n\t}\n\n\tget_intersect( arr1, arr2 ) {\n\t\tvar r = [], o = {}, l = arr2.length, i, v;\n\t\tfor ( i = 0; i < l; i++ ) {\n\t\t\to[ arr2[ i ] ] = true;\n\t\t}\n\t\tl = arr1.length;\n\t\tfor ( i = 0; i < l; i++ ) {\n\t\t\tv = arr1[ i ];\n\t\t\tif ( v in o ) {\n\t\t\t\tr.push( v );\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n\n\tpin_replace_url( pin ) {\n\t\tif ( true === pin && 1 > $( '.replace-row.pin' ).length && 1 === $( '#old-url' ).length ) {\n\t\t\t$( '#old-url' ).parents( '.replace-row' ).addClass( 'pin' );\n\t\t}\n\n\t\tif ( false === pin && 0 < $( '.replace-row.pin' ).length ) {\n\t\t\t$( '.replace-row.pin' ).removeClass( 'pin' );\n\t\t}\n\t}\n\n\t/**\n\t * Core plugin wrapper for the common AJAX error detecting method\n\t *\n\t * @param text\n\t * @param code\n\t * @param jqXHR\n\t *\n\t * @returns {string}\n\t */\n\tget_ajax_errors( text, code, jqXHR ) {\n\t\treturn wpmdb.functions.wpmdbGetAjaxErrors( wpmdb_strings.connection_local_server_problem, code, text, jqXHR );\n\t}\n\n\t// updates the debug log when the user switches to the help tab\n\trefresh_debug_log() {\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_get_log',\n\t\t\t\tnonce: wpmdb_data.nonces.get_log\n\t\t\t},\n\t\t\terror( jqXHR, textStatus, errorThrown ) {\n\t\t\t\talert( wpmdb_strings.update_log_problem );\n\t\t\t},\n\t\t\tsuccess( data ) {\n\t\t\t\t$( '.debug-log-textarea' ).val( data );\n\t\t\t}\n\t\t} );\n\t}\n\n\tget_query_var( name ) {\n\t\tname = name.replace( /[\\[]/, '\\\\[' ).replace( /[\\]]/, '\\\\]' );\n\t\tvar regex = new RegExp( '[\\\\?&]' + name + '=([^&#]*)' ),\n\t\t\tresults = regex.exec( location.search );\n\t\treturn null === results ? '' : decodeURIComponent( results[ 1 ].replace( /\\+/g, ' ' ) );\n\t}\n\n\tmaybe_show_ssl_warning( url, key, remote_scheme ) {\n\t\tvar scheme = url.substr( 0, url.indexOf( ':' ) );\n\t\tvar $ssl_notice = $( '.ssl-notice' );\n\n\t\tif ( !this.show_ssl_notice ) {\n\t\t\t$ssl_notice.hide();\n\t\t}\n\n\t\tif ( remote_scheme !== scheme && url.indexOf( 'https' ) !== -1 ) {\n\t\t\t$ssl_notice.show();\n\t\t\tthis.show_ssl_notice = true;\n\t\t\turl = url.replace( 'https', 'http' );\n\t\t\t$( '.pull-push-connection-info' ).val( url + '\\n' + key );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.show_ssl_notice = false;\n\t}\n\n\tvalidate_url( url ) {\n\t\treturn /^([a-z]([a-z]|\\d|\\+|-|\\.)*):(\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?((\\[(|(v[\\da-f]{1,}\\.(([a-z]|\\d|-|\\.|_|~)|[!\\$&'\\(\\)\\*\\+,;=]|:)+))\\])|((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d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8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test( url );\n\t}\n\n\trefresh_table_selects() {\n\t\tif ( undefined !== wpmdb_data && undefined !== wpmdb_data.this_tables && undefined !== wpmdb_data.this_table_sizes_hr ) {\n\t\t\tthis.$push_select = this.create_table_select( wpmdb_data.this_tables, wpmdb_data.this_table_sizes_hr, $( wpmdb.$push_select ).val() );\n\t\t}\n\n\t\tif ( undefined !== wpmdb.common.connection_data && undefined !== wpmdb.common.connection_data.tables && undefined !== wpmdb.common.connection_data.table_sizes_hr ) {\n\t\t\tthis.$pull_select = this.create_table_select( wpmdb.common.connection_data.tables, wpmdb.common.connection_data.table_sizes_hr, $( wpmdb.$pull_select ).val() );\n\t\t}\n\t}\n\n\tsave_active_profile() {\n\t\tvar profile;\n\t\t$( '.save-settings-button' ).blur();\n\n\t\tif ( this.doing_save_profile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( true === this.maybe_show_select_table_notice() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar create_new_profile = false;\n\n\t\tif ( $( '#create_new' ).is( ':checked' ) ) {\n\t\t\tcreate_new_profile = true;\n\t\t}\n\t\tvar profile_name = $( '.create-new-profile' ).val();\n\n\t\tthis.doing_save_profile = true;\n\t\tprofile = $( $( '#migrate-form' )[ 0 ].elements ).not( '.auth-credentials' ).serialize();\n\n\t\t$( '.save-settings-button' ).attr( 'disabled', 'disabled' )\n\t\t\t.after( '<img src=\"' + this.spinner_url + '\" alt=\"\" class=\"save-profile-ajax-spinner general-spinner\" />' );\n\n\t\tthis.doing_ajax = true;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_save_profile',\n\t\t\t\tprofile: profile,\n\t\t\t\tnonce: wpmdb_data.nonces.save_profile\n\t\t\t},\n\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\talert( wpmdb_strings.save_profile_problem );\n\t\t\t\t$( '.save-settings-button' ).removeAttr( 'disabled' );\n\t\t\t\t$( '.save-profile-ajax-spinner' ).remove();\n\t\t\t\t$( '.save-settings-button' ).after( '<span class=\"ajax-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t$( '.ajax-success-msg' ).fadeOut( 2000, function() {\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t} );\n\t\t\t\tthis.doing_save_profile = false;\n\t\t\t},\n\t\t\tsuccess: ( data ) => {\n\t\t\t\tvar updated_profile_id = parseInt( $( '#migrate-form input[name=save_migration_profile_option]:checked' ).val(), 10 ) + 1;\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t$( '.save-settings-button' ).removeAttr( 'disabled' );\n\t\t\t\t$( '.save-profile-ajax-spinner' ).remove();\n\t\t\t\t$( '.save-settings-button' ).after( '<span class=\"ajax-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t$( '.ajax-success-msg' ).fadeOut( 2000, function() {\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t} );\n\t\t\t\tthis.doing_save_profile = false;\n\t\t\t\t$( '.create-new-profile' ).val( '' );\n\n\t\t\t\tif ( create_new_profile ) {\n\t\t\t\t\tvar new_profile_key = parseInt( data, 10 );\n\t\t\t\t\tvar new_profile_id = new_profile_key + 1;\n\t\t\t\t\tvar new_li = $( '<li><span class=\"delete-profile\" data-profile-id=\"' + new_profile_id + '\"></span><label for=\"profile-' + new_profile_id + '\"><input id=\"profile-' + new_profile_id + '\" value=\"' + new_profile_key + '\" name=\"save_migration_profile_option\" type=\"radio\"></label></li>' );\n\t\t\t\t\tnew_li.find( 'label' ).append( document.createTextNode( ' ' + profile_name ) );\n\t\t\t\t\tupdated_profile_id = new_profile_id;\n\n\t\t\t\t\t$( '#create_new' ).parents( 'li' ).before( new_li );\n\t\t\t\t\t$( '#profile-' + new_profile_id ).attr( 'checked', 'checked' );\n\t\t\t\t}\n\n\t\t\t\t// Push updated profile id to history if available\n\t\t\t\tvar updated_url = window.location.href.replace( '#migrate', '' ).replace( /&wpmdb-profile=-?\\d+/, '' ) + '&wpmdb-profile=' + updated_profile_id;\n\t\t\t\tvar updated_profile_name = $( '#migrate-form input[name=save_migration_profile_option]:checked' ).parent().text().trim();\n\n\t\t\t\tif ( 'function' === typeof window.history.pushState ) {\n\t\t\t\t\tif ( $( '#migrate-form .crumbs' ).length ) {\n\t\t\t\t\t\t$( '#migrate-form .crumbs .crumb:last' ).text( updated_profile_name );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar $crumbs = $( '<div class=\"crumbs\" />' )\n\t\t\t\t\t\t\t.append( '<a class=\"crumb\" href=\"' + wpmdb_data.this_plugin_base + '\"> Saved Profiles </a>' )\n\t\t\t\t\t\t\t.append( '<span class=\"crumb\">' + updated_profile_name + '</span>' );\n\t\t\t\t\t\t$( '#migrate-form' ).prepend( $crumbs );\n\t\t\t\t\t}\n\t\t\t\t\twindow.history.pushState( { updated_profile_id: updated_profile_id }, null, updated_url );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tcancel_migration( event ) {\n\t\tthis.migration_cancelled = true;\n\t\tthis.cancelling_text = wpmdb_strings.cancelling_migration;\n\t\t$( '.migration-controls' ).css( { visibility: 'hidden' } );\n\n\t\tif ( 'find_replace' === this.migration_intent ) {\n\t\t\tthis.cancelling_text = wpmdb_strings.cancelling_find_replace;\n\t\t}\n\n\t\twpmdb.current_migration.setState( this.cancelling_text, wpmdb_strings.completing_current_request, 'cancelling' );\n\n\t\tif ( true === this.migration_paused ) {\n\t\t\tthis.migration_paused = false;\n\t\t\twpmdb.functions.execute_next_step();\n\t\t}\n\t}\n\n\t/**\n\t * Set checkbox\n\t *\n\t * @param string checkbox_wrap\n\t */\n\tset_checkbox( checkbox_wrap ) {\n\t\tconst $switch = $( '#' + checkbox_wrap );\n\t\tvar $checkbox = $switch.find( 'input[type=checkbox]' );\n\n\t\t$switch.toggleClass( 'on' ).find( 'span' ).toggleClass( 'checked' );\n\t\tvar switch_on = $switch.find( 'span.on' ).hasClass( 'checked' );\n\t\t$checkbox.attr( 'checked', switch_on ).trigger( 'change' );\n\t}\n\n\t// save file (export) / push / pull special conditions\n\tmove_connection_info_box() {\n\t\tvar $connection_status = $( '.connection-status' );\n\t\tvar $directory_permission_notice = $( '.directory-permission-notice' );\n\t\tvar $compatibility_older_mysql = $( '.compatibility-older-mysql' );\n\t\tvar $mst_required = $( '.mst-required' );\n\t\tvar $keep_active_plugins = $( '.keep-active-plugins' );\n\t\tvar $step_two = $( '.step-two' );\n\t\tvar $backup_options = $( '.backup-options' );\n\t\tvar new_migration_type = wpmdb.functions.wpmdb_migration_type();\n\t\tvar profile_name, table_prefix, backup_table_prefix, uploads_dir, upload_dir_long, write_permission;\n\n\t\t$connection_status.hide();\n\t\t$directory_permission_notice.hide();\n\t\t$step_two.show();\n\t\t$backup_options.show();\n\t\t$keep_active_plugins.show();\n\t\t$compatibility_older_mysql.hide();\n\t\t$mst_required.hide();\n\n\t\twpmdb.functions.wpmdb_toggle_migration_action_text();\n\n\t\t$( '.migrate-tab' ).attr( 'class', 'migrate-tab content-tab' ).addClass( wpmdb.functions.wpmdb_migration_type() );\n\n\t\t$.wpmdb.do_action( 'move_connection_info_box', {\n\t\t\tmigration_type: new_migration_type,\n\t\t\tlast_migration_type: this.last_replace_switch\n\t\t} );\n\n\t\tif ( -1 !== $.inArray( new_migration_type, [ 'push', 'pull' ] ) ) {\n\t\t\tvar $pull_push_connection_info = $( '.pull-push-connection-info' );\n\t\t\tvar connection_info = $.trim( $pull_push_connection_info.val() ).split( '\\n' );\n\t\t\tvar $migration_list_li = $( '.' + new_migration_type + '-list li' );\n\n\t\t\t$migration_list_li.append( this.$connection_info_box );\n\t\t\tthis.$connection_info_box.show( function() {\n\t\t\t\tvar connection_textarea = $( this ).find( '.pull-push-connection-info' );\n\t\t\t\tif ( !connection_textarea.val() ) {\n\t\t\t\t\tconnection_textarea.focus();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Reconnect if the migration type was just changed\n\t\t\tif ( new_migration_type !== this.last_replace_switch && 2 === connection_info.length ) {\n\t\t\t\twpmdb.force_reconnect = true;\n\t\t\t\t$migration_list_li.append( this.$connection_info_box );\n\t\t\t\t$pull_push_connection_info.removeClass( 'temp-disabled' ).attr( 'readonly', 'readonly' );\n\t\t\t\t$( '.connect-button' ).hide();\n\t\t\t\twpmdb.functions.connection_box_changed();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.connection_established ) {\n\t\t\t\t$connection_status.hide();\n\t\t\t\t$step_two.show();\n\n\t\t\t\twpmdb.functions.wpmdb_toggle_migration_action_text();\n\n\t\t\t\tif ( 'pull' === new_migration_type ) {\n\t\t\t\t\ttable_prefix = wpmdb.common.connection_data.prefix;\n\t\t\t\t\tbackup_table_prefix = wpmdb_data.site_details.prefix;\n\t\t\t\t\tuploads_dir = wpmdb_data.this_uploads_dir;\n\t\t\t\t\tupload_dir_long = wpmdb_data.this_upload_dir_long;\n\t\t\t\t\twrite_permission = wpmdb_data.write_permission;\n\t\t\t\t} else {\n\t\t\t\t\ttable_prefix = wpmdb_data.this_prefix;\n\t\t\t\t\tbackup_table_prefix = wpmdb.common.connection_data.prefix;\n\t\t\t\t\tuploads_dir = wpmdb.common.connection_data.uploads_dir;\n\t\t\t\t\tupload_dir_long = wpmdb.common.connection_data.upload_dir_long;\n\t\t\t\t\twrite_permission = wpmdb.common.connection_data.write_permissions;\n\t\t\t\t}\n\n\t\t\t\t$( '.table_prefix' ).html( table_prefix );\n\t\t\t\t$( '.backup-table-prefix' ).html( backup_table_prefix );\n\t\t\t\t$( '.uploads-dir' ).html( uploads_dir );\n\n\t\t\t\tthis.maybe_show_backup_disabled_msg( upload_dir_long, write_permission );\n\n\t\t\t\tif ( false === this.profile_name_edited ) {\n\t\t\t\t\tprofile_name = this.get_domain_name( wpmdb.common.connection_data.url );\n\t\t\t\t\t$( '.create-new-profile' ).val( profile_name );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$connection_status.show();\n\t\t\t\t$step_two.hide();\n\t\t\t}\n\n\t\t} else if ( -1 !== $.inArray( new_migration_type, [ 'find_replace', 'savefile' ] ) ) {\n\t\t\t$connection_status.hide();\n\t\t\t$step_two.show();\n\t\t\t$( '.table-prefix' ).html( wpmdb_data.this_prefix );\n\t\t\tif ( false === this.profile_name_edited ) {\n\t\t\t\t$( '.create-new-profile' ).val( '' );\n\t\t\t}\n\n\t\t\t$keep_active_plugins.hide();\n\n\t\t\tif ( 'savefile' === new_migration_type ) {\n\t\t\t\t$backup_options.hide();\n\t\t\t\t$compatibility_older_mysql.show();\n\n\t\t\t\tif ( 'false' === wpmdb_data.write_permission ) {\n\t\t\t\t\t$directory_permission_notice.show();\n\t\t\t\t\t$step_two.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( 'true' === wpmdb_data.is_multisite ) {\n\t\t\t\t\tvar $old_replace_col = $( '.old-replace-col' ).eq( 1 );\n\t\t\t\t\t$old_replace_col.parent().removeClass( 'pin' ).find( '.replace-remove-row' ).show();\n\t\t\t\t\t$old_replace_col.find( 'input' ).removeAttr( 'readonly' );\n\t\t\t\t}\n\n\t\t\t\tthis.maybe_show_backup_disabled_msg( wpmdb_data.this_upload_dir_long, wpmdb_data.write_permission );\n\t\t\t}\n\t\t}\n\n\t\tthis.maybe_show_mixed_cased_table_name_warning();\n\t}\n\n\tmaybe_show_backup_disabled_msg( upload_dir, write_permission ) {\n\t\tvar $create_backup = $( '#create-backup' );\n\t\tvar $create_backup_label = $( '#create-backup-label' );\n\t\tvar $backup_option_disabled = $( '.backup-option-disabled' );\n\n\t\t$create_backup.removeAttr( 'disabled' );\n\t\t$create_backup_label.removeClass( 'disabled' );\n\t\t$backup_option_disabled.hide();\n\n\t\tif ( 'false' === write_permission ) {\n\t\t\t$create_backup.prop( 'checked', false );\n\t\t\t$create_backup.attr( 'disabled', 'disabled' );\n\t\t\t$create_backup_label.addClass( 'disabled' );\n\t\t\t$backup_option_disabled.show();\n\t\t\t$( '.upload-directory-location' ).html( upload_dir );\n\t\t}\n\t}\n\n\tchange_replace_values() {\n\t\tvar old_url = null;\n\t\tvar old_path = null;\n\n\t\tconst self = this;\n\t\tif ( null !== wpmdb.common.previous_connection_data && 'object' === typeof wpmdb.common.previous_connection_data && wpmdb.common.previous_connection_data.url !== wpmdb.common.connection_data.url ) {\n\t\t\told_url = this.remove_protocol( wpmdb.common.previous_connection_data.url );\n\t\t\told_path = wpmdb.common.previous_connection_data.path;\n\t\t}\n\n\t\tif ( 'push' === wpmdb.functions.wpmdb_migration_type() || 'savefile' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\tif ( 'pull' === this.last_replace_switch ) {\n\t\t\t\t$( '.replace-row' ).each( function() {\n\t\t\t\t\tvar old_val = $( '.old-replace-col input', this ).val();\n\t\t\t\t\t$( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );\n\t\t\t\t\t$( '.replace-right-col input', this ).val( old_val );\n\t\t\t\t} );\n\t\t\t} else if ( 'push' === this.last_replace_switch && 'push' === wpmdb.functions.wpmdb_migration_type() && null !== old_url && null !== old_path ) {\n\t\t\t\t$( '.replace-row' ).each( function() {\n\t\t\t\t\tvar old_val = $( '.replace-right-col input', this ).val();\n\t\t\t\t\tif ( old_val === old_path ) {\n\t\t\t\t\t\t$( '.replace-right-col input', this ).val( wpmdb.common.connection_data.path );\n\t\t\t\t\t}\n\t\t\t\t\tif ( old_val === old_url ) {\n\t\t\t\t\t\t$( '.replace-right-col input', this ).val( self.remove_protocol( wpmdb.common.connection_data.url ) );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\t$.wpmdb.do_action( 'wpmdb_update_push_table_select' );\n\t\t\t$( '#select-post-types' ).remove();\n\t\t\t$( '.exclude-post-types-warning' ).after( this.$push_post_type_select );\n\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t\t$( '#select-backup' ).remove();\n\t\t\t$( '.backup-tables-wrap' ).prepend( this.$push_select_backup );\n\t\t} else if ( 'pull' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\tif ( '' === this.last_replace_switch || 'push' === this.last_replace_switch || 'savefile' === this.last_replace_switch ) {\n\t\t\t\t$( '.replace-row' ).each( function() {\n\t\t\t\t\tvar old_val = $( '.old-replace-col input', this ).val();\n\t\t\t\t\t$( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );\n\t\t\t\t\t$( '.replace-right-col input', this ).val( old_val );\n\t\t\t\t} );\n\t\t\t} else if ( 'pull' === this.last_replace_switch && 'pull' === wpmdb.functions.wpmdb_migration_type() && null !== old_url && null !== old_path ) {\n\t\t\t\t$( '.replace-row' ).each( function() {\n\t\t\t\t\tvar old_val = $( '.old-replace-col input', this ).val();\n\t\t\t\t\tif ( old_val === old_path ) {\n\t\t\t\t\t\t$( '.old-replace-col input', this ).val( wpmdb.common.connection_data.path );\n\t\t\t\t\t}\n\t\t\t\t\tif ( old_val === old_url ) {\n\t\t\t\t\t\t$( '.old-replace-col input', this ).val( self.remove_protocol( wpmdb.common.connection_data.url ) );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\t$.wpmdb.do_action( 'wpmdb_update_pull_table_select' );\n\t\t\t$( '#select-post-types' ).remove();\n\t\t\t$( '.exclude-post-types-warning' ).after( this.$pull_post_type_select );\n\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t\t$( '#select-backup' ).remove();\n\t\t\t$( '.backup-tables-wrap' ).prepend( this.$pull_select_backup );\n\t\t}\n\t\tthis.last_replace_switch = wpmdb.functions.wpmdb_migration_type();\n\t}\n\n\tswitch_to_plugin_tab( hash, skip_addons_check ) {\n\t\t$( '.nav-tab' ).removeClass( 'nav-tab-active' );\n\t\t$( '.nav-tab.' + hash ).addClass( 'nav-tab-active' );\n\t\t$( '.content-tab' ).hide();\n\t\t$( '.' + hash + '-tab' ).show();\n\n\t\tif ( 'settings' === hash ) {\n\t\t\tif ( true === this.should_check_licence() ) {\n\t\t\t\t$( 'p.licence-status' ).append( 'Checking License... ' ).append( this.ajax_spinner );\n\t\t\t\tthis.check_licence();\n\t\t\t}\n\t\t}\n\n\t\tif ( 'help' === hash ) {\n\t\t\tthis.refresh_debug_log();\n\t\t\tif ( true === this.should_check_licence() ) {\n\t\t\t\t$( '.support-content p' ).append( this.ajax_spinner );\n\t\t\t\tthis.check_licence();\n\t\t\t}\n\t\t}\n\n\t\tif ( 'addons' === hash && true !== skip_addons_check ) {\n\t\t\tif ( true === this.should_check_licence() ) {\n\t\t\t\t$( '.addons-content p' ).append( this.ajax_spinner );\n\t\t\t\tthis.check_licence();\n\t\t\t}\n\t\t}\n\t}\n\n\thide_overlay() {\n\t\t$( '#overlay' ).removeClass( 'show' ).addClass( 'hide' );\n\t\t$( '#overlay > div' ).removeClass( 'show' ).addClass( 'hide' );\n\t\twpmdb.current_migration.$proVersion.find( 'iframe' ).remove();\n\t\tsetTimeout( function() {\n\t\t\t$( '#overlay' ).remove();\n\t\t}, 500 );\n\t\tthis.migration_completed = false;\n\t}\n\n\tcheck_licence( licence ) {\n\t\tvar update_licence_content = !this.doing_licence_registration_ajax;\n\t\tthis.checked_licence = true;\n\t\tlet self = this;\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'json',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_check_licence',\n\t\t\t\tlicence: licence,\n\t\t\t\tcontext: 'all',\n\t\t\t\tnonce: wpmdb_data.nonces.check_licence\n\t\t\t},\n\t\t\terror( jqXHR, textStatus, errorThrown ) {\n\t\t\t\talert( wpmdb_strings.license_check_problem );\n\t\t\t},\n\t\t\tsuccess( data ) {\n\n\t\t\t\tvar $support_content = $( '.support-content' );\n\t\t\t\tvar $addons_content = $( '.addons-content' );\n\t\t\t\tvar $licence_content = $( '.licence-status:not(.notification-message)' );\n\t\t\t\tvar licence_msg, support_msg, addons_msg;\n\n\t\t\t\tif ( 'undefined' !== typeof data.dbrains_api_down ) {\n\t\t\t\t\tsupport_msg = data.dbrains_api_down + data.message;\n\t\t\t\t\taddons_msg = data.dbrains_api_down;\n\t\t\t\t} else if ( 'undefined' !== typeof data.errors ) {\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.errors.subscription_expired ) {\n\t\t\t\t\t\tlicence_msg = data.errors.subscription_expired.licence;\n\t\t\t\t\t\tsupport_msg = data.errors.subscription_expired.support;\n\t\t\t\t\t\taddons_msg = data.errors.subscription_expired.addons;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar msg = '';\n\t\t\t\t\t\tfor ( var key in data.errors ) {\n\t\t\t\t\t\t\tmsg += data.errors[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsupport_msg = msg;\n\t\t\t\t\t\taddons_msg = msg;\n\t\t\t\t\t}\n\t\t\t\t\tif ( 'undefined' !== typeof data.addon_content ) {\n\t\t\t\t\t\taddons_msg += '\\n' + data.addon_content;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsupport_msg = data.message;\n\t\t\t\t\taddons_msg = data.addon_content;\n\t\t\t\t}\n\n\t\t\t\tif ( update_licence_content ) {\n\t\t\t\t\t$licence_content.stop().fadeOut( self.fade_duration, function() {\n\t\t\t\t\t\tif ( 'undefined' === typeof licence_msg ) {\n\t\t\t\t\t\t\t$( this ).css( { visibility: 'hidden', display: 'block' } ).slideUp();\n\t\t\t\t\t\t\tlicence_msg = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$( this )\n\t\t\t\t\t\t\t.empty()\n\t\t\t\t\t\t\t.html( licence_msg )\n\t\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t\t.fadeIn( self.fade_duration );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t$support_content.stop().fadeOut( self.fade_duration, function() {\n\t\t\t\t\t$( this )\n\t\t\t\t\t\t.empty()\n\t\t\t\t\t\t.html( support_msg )\n\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t.fadeIn( self.fade_duration );\n\t\t\t\t} );\n\t\t\t\t$addons_content.stop().fadeOut( self.fade_duration, function() {\n\t\t\t\t\t$( this )\n\t\t\t\t\t\t.empty()\n\t\t\t\t\t\t.html( addons_msg )\n\t\t\t\t\t\t.stop()\n\t\t\t\t\t\t.fadeIn( self.fade_duration );\n\t\t\t\t} );\n\n\t\t\t\tif ( $( '#plugin-compatibility' ).is( ':not(:checked)' ) ) {\n\t\t\t\t\t$( '#compatibility-header' ).click();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tshould_check_licence() {\n\t\treturn false === this.checked_licence && '1' === wpmdb_data.has_licence && 'true' === wpmdb_data.is_pro;\n\t}\n\n\tmaybe_show_mixed_cased_table_name_warning() {\n\t\tif ( 'undefined' === typeof wpmdb.common.connection_data || false === wpmdb.common.connection_data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar migration_intent = wpmdb.functions.wpmdb_migration_type();\n\t\tvar tables_to_migrate = wpmdb.functions.get_tables_to_migrate( null, null );\n\n\t\t$( '.mixed-case-table-name-notice' ).hide();\n\n\t\tif ( null === tables_to_migrate ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttables_to_migrate = tables_to_migrate.join( '' );\n\n\t\t// The table names are all lowercase, no need to display the warning.\n\t\tif ( tables_to_migrate === tables_to_migrate.toLowerCase() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Do not display the warning if the remote lower_case_table_names does not equal \"1\" (i.e the only problematic setting)\n\t\t * Applies to push/export migrations.\n\t\t */\n\t\tif ( '1' !== wpmdb.common.connection_data.lower_case_table_names && ('push' === migration_intent || 'savefile' === migration_intent) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Do not display the warning if the local lower_case_table_names does not equal \"1\" (i.e the only problematic setting)\n\t\t * Only applies to pull migrations.\n\t\t */\n\t\tif ( '1' !== wpmdb_data.lower_case_table_names && 'pull' === migration_intent ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * At this stage we've determined:\n\t\t * 1. The source database contains at least one table that contains an uppercase character.\n\t\t * 2. The destination environment has lower_case_table_names set to 1.\n\t\t * 3. The source database table containing the uppercase letter will be converted to lowercase during the migration.\n\t\t */\n\n\t\tif ( 'push' === migration_intent || 'savefile' === migration_intent ) {\n\t\t\t$( '.mixed-case-table-name-notice.push' ).show();\n\t\t} else {\n\t\t\t$( '.mixed-case-table-name-notice.pull' ).show();\n\t\t}\n\t}\n\n\tenable_pro_licence( data, licence_key ) {\n\t\t$( '.licence-input, .register-licence' ).remove();\n\t\t$( '.licence-not-entered' ).prepend( data.masked_licence );\n\t\t$( '.support-content' ).empty().html( '<p>' + wpmdb_strings.fetching_license + '<img src=\"' + this.spinner_url + '\" alt=\"\" class=\"ajax-spinner general-spinner\" /></p>' );\n\t\tthis.check_licence( licence_key );\n\n\t\t$( '.migrate-selection label' ).removeClass( 'disabled' );\n\t\t$( '.migrate-selection input' ).removeAttr( 'disabled' );\n\t}\n\n\tget_domain_name( url ) {\n\t\tvar temp_url = url;\n\t\tvar domain = temp_url.replace( /\\/\\/(.*)@/, '//' ).replace( 'http://', '' ).replace( 'https://', '' ).replace( 'www.', '' );\n\t\treturn domain;\n\t}\n\n\tupdate_domain_placeholder( label, url, stage ) {\n\t\tvar domain = this.get_domain_name( url );\n\n\t\tif ( 'completed' === stage ) {\n\t\t\treturn label.replace( /\\%s\\s?/, '<span class=domain-label>' + domain + '</span>&nbsp;' );\n\t\t}\n\n\t\treturn label.replace( /\\%s(\\S*)\\s?/, '<span class=domain-label>' + domain + '$1</span>&nbsp;' );\n\t}\n\n\tget_migration_status_label( url, intent, stage ) {\n\t\tvar migrating_stage_label = '';\n\t\tvar completed_stage_label = '';\n\n\t\tswitch ( intent ) {\n\t\t\tcase 'push':\n\t\t\t\tmigrating_stage_label = wpmdb_strings.push_migration_label_migrating;\n\t\t\t\tcompleted_stage_label = wpmdb_strings.push_migration_label_completed;\n\t\t\t\tbreak;\n\t\t\tcase 'pull':\n\t\t\t\tmigrating_stage_label = wpmdb_strings.pull_migration_label_migrating;\n\t\t\t\tcompleted_stage_label = wpmdb_strings.pull_migration_label_completed;\n\t\t\t\tbreak;\n\t\t\tcase 'find_replace':\n\t\t\t\tmigrating_stage_label = wpmdb_strings.find_replace_label_migrating;\n\t\t\t\tcompleted_stage_label = wpmdb_strings.find_replace_label_completed;\n\t\t\t\tbreak;\n\t\t\tcase 'savefile':\n\t\t\t\tmigrating_stage_label = wpmdb_strings.exporting_please_wait;\n\t\t\t\tcompleted_stage_label = wpmdb_strings.exporting_complete;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tvar label = migrating_stage_label;\n\n\t\tif ( 'completed' === stage ) {\n\t\t\tlabel = completed_stage_label;\n\t\t}\n\n\t\tif ( 'push' === intent || 'pull' === intent ) {\n\t\t\tlabel = this.update_domain_placeholder( label, url, stage );\n\t\t}\n\n\t\tlabel = $.wpmdb.apply_filters( 'wpmdb_get_migration_status_label', label, {\n\t\t\tintent: intent,\n\t\t\tstage: stage\n\t\t} );\n\n\t\treturn label;\n\t}\n\n\tdisable_export_type_controls() {\n\t\t$( '.option-group' ).each( function( index ) {\n\t\t\t$( 'input', this ).attr( 'disabled', 'disabled' );\n\t\t\t$( 'label', this ).css( 'cursor', 'default' );\n\t\t} );\n\t}\n\n\tenable_export_type_controls() {\n\t\t$( '.option-group' ).each( function( index ) {\n\t\t\t$( 'input', this ).removeAttr( 'disabled' );\n\t\t\t$( 'label', this ).css( 'cursor', 'pointer' );\n\t\t} );\n\t}\n\n\tset_slider_value( parent_selector, value, unit, display ) {\n\t\tvar display_value = value;\n\n\t\tif ( undefined !== display ) {\n\t\t\tdisplay_value = display;\n\t\t}\n\n\t\t$( '.slider', parent_selector ).slider( 'value', parseInt( value ) );\n\t\t$( '.amount', parent_selector ).html( wpmdb.functions.wpmdb_add_commas( display_value ) + ' ' + unit );\n\t}\n\n\tset_pause_resume_button( event, instance ) {\n\t\tif ( true === this.migration_paused ) {\n\t\t\tthis.migration_paused = false;\n\t\t\tthis.doing_ajax = true;\n\n\t\t\twpmdb.current_migration.setState( this.previous_progress_title, this.previous_progress_text_primary, 'active' );\n\t\t\t$( '.pause-resume' ).html( wpmdb_strings.pause );\n\n\t\t\t// Resume the timer\n\t\t\twpmdb.current_migration.resumeTimer();\n\n\t\t\twpmdb.functions.execute_next_step( instance );\n\t\t} else {\n\t\t\tthis.migration_paused = true;\n\t\t\tthis.doing_ajax = false;\n\t\t\tthis.paused_text = wpmdb_strings.migration_paused;\n\t\t\tthis.previous_progress_title = $( '.progress-title' ).html();\n\t\t\tthis.previous_progress_text_primary = $( '.progress-text', '.progress-wrapper-primary' ).html();\n\t\t\tthis.previous_progress_text_secondary = $( '.progress-text', '.progress-wrapper-secondary ' ).html();\n\n\t\t\tif ( 'find_replace' === this.migration_intent ) {\n\t\t\t\tthis.paused_text = wpmdb_strings.find_replace_paused;\n\t\t\t}\n\n\t\t\twpmdb.current_migration.setState( this.paused_text, wpmdb_strings.completing_current_request, null );\n\t\t\t$( 'body' ).off( 'click', '.pause-resume' ); // Is re-bound at execute_next_step when migration is finally paused\n\t\t\t$( 'body' ).off( 'click', '.cancel' ); // Is re-bound at execute_next_step when migration is finally paused\n\t\t}\n\t}\n\n\t/**\n\t * Filter temporary tables out of wpmdb.functions.create_table_select().\n\t *\n\t * @param exclude\n\t * @param table_name\n\t * @returns {bool}\n\t */\n\tfilter_temp_tables( exclude, table_name ) {\n\t\tvar temp_prefix = wpmdb_data.this_temp_prefix;\n\n\t\tif ( 'pull' === wpmdb.functions.wpmdb_migration_type() && 'undefined' !== typeof wpmdb.common.connection_data && 'undefined' !== typeof wpmdb.common.connection_data.temp_prefix ) {\n\t\t\ttemp_prefix = wpmdb.common.connection_data.temp_prefix;\n\t\t}\n\n\t\tif ( temp_prefix === table_name.substring( 0, temp_prefix.length ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn exclude;\n\t}\n\n\tget_table_prefix( value, args ) {\n\t\treturn $( '.table-select-wrap .table-prefix' ).text();\n\t}\n\n\tlock_replace_url( lock ) {\n\t\tif ( true === lock ) {\n\t\t\t$( '.replace-row.pin .replace-right-col input[type=\"text\"]' ).attr( 'readonly', 'readonly' );\n\t\t\t$( '.replace-row.pin .arrow-col' ).addClass( 'disabled' );\n\t\t} else {\n\t\t\t$( '.replace-row.pin .replace-right-col input[type=\"text\"]' ).removeAttr( 'readonly' );\n\t\t\t$( '.replace-row.pin .arrow-col' ).removeClass( 'disabled' );\n\t\t}\n\t}\n\n\tset_connection_data( data ) {\n\t\twindow.wpmdb.common.previous_connection_data = wpmdb.common.connection_data;\n\t\twindow.wpmdb.common.connection_data = data;\n\t\t$.wpmdb.do_action( 'wpmdb_connection_data_updated', data );\n\t}\n\n\t/**\n\t * Returns formatted info for the Max Request Size slider.\n\t *\n\t * @param value\n\t * @return object\n\t */\n\tget_max_request_display_info( value ) {\n\t\tvar display_info = {};\n\n\t\tdisplay_info.unit = 'MB';\n\t\tdisplay_info.amount = (value / 1024).toFixed( 2 );\n\n\t\treturn display_info;\n\t}\n\n\testablish_remote_connection_from_saved_profile() {\n\t\tvar action = wpmdb.functions.wpmdb_migration_type();\n\t\tvar connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\\n' );\n\t\tif ( 'undefined' === typeof wpmdb_default_profile ||\n\t\t true === wpmdb_default_profile ||\n\t\t 'savefile' === action ||\n\t\t 'find_replace' === action ||\n\t\t 'import' === action ||\n\t\t this.doing_ajax ||\n\t\t !wpmdb_data.is_pro ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.doing_ajax = true;\n\t\tthis.disable_export_type_controls();\n\n\t\t$( '.connection-status' ).html( wpmdb_strings.establishing_remote_connection );\n\t\t$( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );\n\t\t$( '.connection-status' ).append( this.ajax_spinner );\n\n\t\tvar intent = wpmdb.functions.wpmdb_migration_type();\n\t\t// Hack to keep object scope\n\t\tconst self = this;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'json',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_verify_connection_to_remote_site',\n\t\t\t\turl: connection_info[ 0 ],\n\t\t\t\tkey: connection_info[ 1 ],\n\t\t\t\tintent: intent,\n\t\t\t\tnonce: wpmdb_data.nonces.verify_connection_to_remote_site,\n\t\t\t\tconvert_post_type_selection: wpmdb_convert_post_type_selection,\n\t\t\t\tprofile: wpmdb_data.profile\n\t\t\t},\n\t\t\terror( jqXHR, textStatus, errorThrown ){\n\t\t\t\t$( '.connection-status' ).html( self.get_ajax_errors( jqXHR.responseText, '(#102)', jqXHR ) );\n\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tself.doing_ajax = false;\n\t\t\t\tself.enable_export_type_controls();\n\t\t\t},\n\t\t\tsuccess( data ) {\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tself.doing_ajax = false;\n\t\t\t\tself.enable_export_type_controls();\n\n\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t$( '.connection-status' ).html( data.body );\n\t\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\n\t\t\t\t\tif ( data.body.indexOf( '401 Unauthorized' ) > -1 ) {\n\t\t\t\t\t\t$( '.basic-access-auth-wrapper' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( true === wpmdb.functions.maybe_show_mst_warning( data ) ) {\n\t\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tself.maybe_show_ssl_warning( connection_info[ 0 ], connection_info[ 1 ], data.scheme );\n\t\t\t\twpmdb.functions.maybe_show_prefix_notice( data.prefix );\n\n\t\t\t\t$( '.pull-push-connection-info' ).addClass( 'temp-disabled' );\n\t\t\t\t$( '.pull-push-connection-info' ).attr( 'readonly', 'readonly' );\n\t\t\t\t$( '.connect-button' ).hide();\n\n\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t$( '.step-two' ).show();\n\t\t\t\tself.connection_established = true;\n\t\t\t\tself.set_connection_data( data );\n\t\t\t\tself.move_connection_info_box();\n\n\t\t\t\tself.maybe_show_mixed_cased_table_name_warning();\n\n\t\t\t\tvar loaded_tables = '';\n\t\t\t\tif ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_tables ) {\n\t\t\t\t\tloaded_tables = wpmdb_loaded_tables;\n\t\t\t\t}\n\n\t\t\t\tself.$pull_select = wpmdb.functions.create_table_select( wpmdb.common.connection_data.tables, wpmdb.common.connection_data.table_sizes_hr, loaded_tables );\n\t\t\t\tvar loaded_post_types = '';\n\t\t\t\tif ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_post_types ) {\n\t\t\t\t\tif ( 'undefined' !== typeof data.select_post_types ) {\n\t\t\t\t\t\t$( '#exclude-post-types' ).attr( 'checked', 'checked' );\n\t\t\t\t\t\t$( '.post-type-select-wrap' ).show();\n\t\t\t\t\t\tloaded_post_types = data.select_post_types;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tloaded_post_types = wpmdb_loaded_post_types;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar $post_type_select = document.createElement( 'select' );\n\t\t\t\t$( $post_type_select ).attr( {\n\t\t\t\t\tmultiple: 'multiple',\n\t\t\t\t\tname: 'select_post_types[]',\n\t\t\t\t\tid: 'select-post-types',\n\t\t\t\t\tclass: 'multiselect'\n\t\t\t\t} );\n\n\t\t\t\t$.each( wpmdb.common.connection_data.post_types, function( index, value ) {\n\t\t\t\t\tvar selected = $.inArray( value, loaded_post_types );\n\t\t\t\t\tif ( -1 !== selected || (true === wpmdb_convert_exclude_revisions && 'revision' !== value) ) {\n\t\t\t\t\t\tselected = ' selected=\"selected\" ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselected = ' ';\n\t\t\t\t\t}\n\t\t\t\t\t$( $post_type_select ).append( '<option' + selected + 'value=\"' + value + '\">' + value + '</option>' );\n\t\t\t\t} );\n\n\t\t\t\tself.$pull_post_type_select = $post_type_select;\n\n\t\t\t\tvar loaded_tables_backup = '';\n\t\t\t\tif ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_tables_backup ) {\n\t\t\t\t\tloaded_tables_backup = wpmdb_loaded_tables_backup;\n\t\t\t\t}\n\n\t\t\t\tvar $table_select_backup = document.createElement( 'select' );\n\t\t\t\t$( $table_select_backup ).attr( {\n\t\t\t\t\tmultiple: 'multiple',\n\t\t\t\t\tname: 'select_backup[]',\n\t\t\t\t\tid: 'select-backup',\n\t\t\t\t\tclass: 'multiselect'\n\t\t\t\t} );\n\n\t\t\t\t$.each( wpmdb.common.connection_data.tables, function( index, value ) {\n\t\t\t\t\tvar selected = $.inArray( value, loaded_tables_backup );\n\t\t\t\t\tif ( -1 !== selected ) {\n\t\t\t\t\t\tselected = ' selected=\"selected\" ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselected = ' ';\n\t\t\t\t\t}\n\t\t\t\t\t$( $table_select_backup ).append( '<option' + selected + 'value=\"' + value + '\">' + value + ' (' + wpmdb.common.connection_data.table_sizes_hr[ value ] + ')</option>' );\n\t\t\t\t} );\n\n\t\t\t\tself.$push_select_backup = $table_select_backup;\n\n\t\t\t\tif ( 'pull' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_pull_table_select' );\n\t\t\t\t\t$( '#select-post-types' ).remove();\n\t\t\t\t\t$( '.exclude-post-types-warning' ).after( self.$pull_post_type_select );\n\t\t\t\t\t$( '#select-backup' ).remove();\n\t\t\t\t\t$( '.backup-tables-wrap' ).prepend( self.$pull_select_backup );\n\t\t\t\t\t$( '.table-prefix' ).html( data.prefix );\n\t\t\t\t\t$( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#select-backup' ).remove();\n\t\t\t\t\t$( '.backup-tables-wrap' ).prepend( self.$push_select_backup );\n\t\t\t\t}\n\n\t\t\t\t$.wpmdb.do_action( 'verify_connection_to_remote_site', wpmdb.common.connection_data );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Main method that shows migration progress in the UI\n\t * @param current_row\n\t * @param primary_keys\n\t * @param iterator\n\t */\n\tmigrate_table_recursive( current_row, primary_keys, iterator ) {\n\t\tlet i = iterator || 0;\n\n\t\tif ( i >= this.tables_to_migrate.length ) {\n\n\t\t\tif ( 'upload' === this.stage && wpmdb.current_migration.model.getStageItems( 'find_replace' ).length ) {\n\t\t\t\tthis.stage = 'find_replace';\n\t\t\t\tthis.tables_to_migrate = wpmdb.current_migration.model.getStageItems( 'find_replace', 'name' );\n\t\t\t\tthis.tables_to_migrate = this.tables_to_migrate.map( function( table ) {\n\t\t\t\t\treturn '_mig_' + table;\n\t\t\t\t} );\n\t\t\t\ti = 0;\n\t\t\t} else if ( 'backup' === this.stage ) {\n\n\t\t\t\tif ( -1 !== $.inArray( this.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\t\t\tthis.stage = 'migrate';\n\t\t\t\t} else if ( 'import' === this.migration_intent ) {\n\t\t\t\t\tthis.stage = 'upload';\n\t\t\t\t} else {\n\t\t\t\t\tthis.stage = this.migration_intent;\n\t\t\t\t}\n\n\t\t\t\twpmdb.current_migration.model.setActiveStage( this.stage );\n\n\t\t\t\tif ( 'find_replace' !== this.stage && 'migrate' !== this.stage ) {\n\t\t\t\t\twpmdb.functions.wpmdb_call_next_hook();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ti = 0;\n\n\t\t\t\t// should get from model\n\t\t\t\tthis.tables_to_migrate = wpmdb.functions.get_tables_to_migrate( null, null );\n\n\t\t\t} else {\n\t\t\t\t$( '.progress-label' ).removeClass( 'label-visible' );\n\n\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_before_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.wpmdb_flush );\n\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_after_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete_events );\n\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tvar last_table = 0;\n\t\tif ( i === (this.tables_to_migrate.length - 1) ) {\n\t\t\tlast_table = 1;\n\t\t}\n\n\t\tvar gzip = 0;\n\t\tif ( -1 !== $.inArray( this.migration_intent, [\n\t\t\t\t'push',\n\t\t\t\t'pull'\n\t\t\t] ) && 1 === parseInt( wpmdb.common.connection_data.gzip ) ) {\n\t\t\tgzip = 1;\n\t\t}\n\n\t\tvar request_data = {\n\t\t\taction: 'wpmdb_migrate_table',\n\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\ttable: this.tables_to_migrate[ i ],\n\t\t\tstage: this.stage,\n\t\t\tcurrent_row: current_row,\n\t\t\tlast_table: last_table,\n\t\t\tprimary_keys: primary_keys,\n\t\t\tgzip: gzip,\n\t\t\tnonce: wpmdb_data.nonces.migrate_table\n\t\t};\n\n\t\tif ( -1 !== $.inArray( this.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\trequest_data.bottleneck = wpmdb.common.connection_data.bottleneck;\n\t\t\trequest_data.prefix = wpmdb.common.connection_data.prefix;\n\t\t}\n\n\t\tif ( wpmdb.common.connection_data && wpmdb.common.connection_data.path_current_site && wpmdb.common.connection_data.domain ) {\n\t\t\trequest_data.path_current_site = wpmdb.common.connection_data.path_current_site;\n\t\t\trequest_data.domain_current_site = wpmdb.common.connection_data.domain;\n\t\t}\n\n\t\tthis.doing_ajax = true;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\ttimeout: 0,\n\t\t\tdata: request_data,\n\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\tvar progress_text = wpmdb_strings.table_process_problem + ' ' + this.tables_to_migrate[ i ] + '<br /><br />' + wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText + '<br /><br />' + wpmdb_strings.response + ':<br />' + jqXHR.responseText;\n\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, progress_text, 'error' );\n\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\tconsole.log( jqXHR );\n\t\t\t\tconsole.log( textStatus );\n\t\t\t\tconsole.log( errorThrown );\n\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t},\n\t\t\tsuccess: ( data ) => {\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\tdata = $.trim( data );\n\t\t\t\tvar row_information = wpmdb.functions.wpmdb_parse_json( data );\n\t\t\t\tvar error_text = '';\n\n\t\t\t\tif ( false === row_information || null === row_information ) {\n\n\t\t\t\t\t// should update model\n\t\t\t\t\tif ( '' === data || null === data ) {\n\t\t\t\t\t\terror_text = wpmdb_strings.table_process_problem_empty_response + ' ' + this.tables_to_migrate[ i ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror_text = this.get_ajax_errors( data, null, null );\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, error_text, 'error' );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( 'undefined' !== typeof row_information.wpmdb_error && 1 === row_information.wpmdb_error ) {\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, row_information.body, 'error' );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar item_name = this.tables_to_migrate[ i ];\n\t\t\t\tif ( 'import' === this.migration_intent && 'find_replace' === this.stage ) {\n\t\t\t\t\titem_name = item_name.replace( wpmdb_data.this_temp_prefix, '' );\n\t\t\t\t}\n\n\t\t\t\t//successful iteration\n\t\t\t\twpmdb.current_migration.setText();\n\t\t\t\twpmdb.current_migration.model.getStageModel( this.stage ).setItemRowsTransferred( item_name, row_information.current_row );\n\n\t\t\t\t// We need the returned file name for delivery or display to the user.\n\t\t\t\tif ( 1 === last_table && 'savefile' === this.migration_intent ) {\n\t\t\t\t\tif ( 'undefined' !== typeof row_information.dump_filename ) {\n\t\t\t\t\t\tthis.dump_filename = row_information.dump_filename;\n\t\t\t\t\t}\n\t\t\t\t\tif ( 'undefined' !== typeof row_information.dump_path ) {\n\t\t\t\t\t\tthis.dump_path = row_information.dump_path;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( -1 === parseInt( row_information.current_row ) ) {\n\t\t\t\t\ti++;\n\t\t\t\t\trow_information.current_row = '';\n\t\t\t\t\trow_information.primary_keys = '';\n\t\t\t\t}\n\n\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\tfn: wpmdb.functions.migrate_table_recursive,\n\t\t\t\t\targs: [ row_information.current_row, row_information.primary_keys, i ]\n\t\t\t\t};\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\t\t} );\n\n\t}\n\n\tmigration_complete_events() {\n\t\tif ( false === wpmdb.common.migration_error ) {\n\t\t\tif ( '' === wpmdb.common.non_fatal_errors ) {\n\t\t\t\tif ( 'savefile' !== this.migration_intent && true === $( '#save_computer' ).is( ':checked' ) ) {\n\t\t\t\t\twpmdb.current_migration.setText();\n\t\t\t\t}\n\n\t\t\t\tthis.completed_msg = this.completed_msg + '&nbsp;<div class=\"dashicons dashicons-yes\"></div>';\n\n\t\t\t\tif ( true === this.migration_cancelled ) {\n\t\t\t\t\tvar cancel_success = wpmdb_strings.migration_cancelled_success;\n\n\t\t\t\t\tif ( 'find_replace' === this.migration_intent ) {\n\t\t\t\t\t\tcancel_success = wpmdb_strings.find_replace_cancelled_success;\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.current_migration.setState( this.completed_msg, cancel_success, 'cancelled' );\n\t\t\t\t} else {\n\t\t\t\t\twpmdb.current_migration.setState( this.completed_msg, '', 'complete' );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.completed_with_some_errors, wpmdb.common.non_fatal_errors, 'error' );\n\t\t\t}\n\t\t}\n\n\t\t$( '.migration-controls' ).addClass( 'hidden' );\n\n\t\t// reset migration variables so consecutive migrations work correctly\n\t\twpmdb.common.hooks = [];\n\t\twpmdb.common.call_stack = [];\n\t\twpmdb.common.migration_error = false;\n\t\tthis.currently_migrating = false;\n\t\tthis.migration_completed = true;\n\t\tthis.migration_paused = false;\n\t\tthis.migration_cancelled = false;\n\t\tthis.doing_ajax = false;\n\t\twpmdb.common.non_fatal_errors = '';\n\t\tthis.tables_to_migrate = [];\n\n\t\t$( '.progress-label' ).remove();\n\t\t$( '.migration-progress-ajax-spinner' ).remove();\n\t\t$( '.close-progress-content' ).show();\n\t\t$( '#overlay' ).css( 'cursor', 'pointer' );\n\t\twpmdb.current_migration.model.setMigrationComplete();\n\t}\n\n\tmigration_complete() {\n\n\t\t$( '.migration-controls' ).addClass( 'hidden' );\n\n\t\tif ( 'savefile' === this.migration_intent ) {\n\t\t\tthis.currently_migrating = false;\n\t\t\tvar migrate_complete_text = wpmdb_strings.migration_complete;\n\t\t\tif ( $( '#save_computer' ).is( ':checked' ) ) {\n\t\t\t\tvar url = wpmdb_data.this_download_url + encodeURIComponent( this.dump_filename );\n\t\t\t\tif ( $( '#gzip_file' ).is( ':checked' ) ) {\n\t\t\t\t\turl += '&gzip=1';\n\t\t\t\t}\n\t\t\t\twindow.location = url;\n\t\t\t} else {\n\t\t\t\tmigrate_complete_text = wpmdb_strings.completed_dump_located_at + ' ' + this.dump_path;\n\t\t\t}\n\n\t\t\tif ( false === wpmdb.common.migration_error ) {\n\n\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\twpmdb.current_migration.setState( this.completed_msg, migrate_complete_text, 'complete' );\n\n\t\t\t}\n\n\t\t} else { // rename temp tables, delete old tables\n\n\t\t\twpmdb.current_migration.setState( null, wpmdb_strings.finalizing_migration, 'finalizing' );\n\n\t\t\tvar request_data = {\n\t\t\t\taction: 'wpmdb_finalize_migration',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\ttables: this.tables_to_migrate.join( ',' ),\n\t\t\t\tnonce: wpmdb_data.nonces.finalize_migration\n\t\t\t};\n\n\t\t\tif ( -1 !== $.inArray( this.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\t\trequest_data.prefix = wpmdb.common.connection_data.prefix;\n\t\t\t}\n\n\t\t\tthis.doing_ajax = true;\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: request_data,\n\t\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, wpmdb_strings.finalize_tables_problem, 'error' );\n\n\t\t\t\t\talert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: ( data ) => {\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\tif ( '1' !== $.trim( data ) ) {\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data, 'error' );\n\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\twpmdb_flush() {\n\t\tif ( 'savefile' !== this.migration_intent ) {\n\t\t\twpmdb.current_migration.setText( wpmdb_strings.flushing );\n\t\t\tthis.doing_ajax = true;\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_flush',\n\t\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\t\tnonce: wpmdb_data.nonces.flush\n\t\t\t\t},\n\t\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, wpmdb_strings.flush_problem, 'error' );\n\n\t\t\t\t\talert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: ( data ) => {\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\tif ( '1' !== $.trim( data ) ) {\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data, 'error' );\n\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\texecute_next_step() {\n\n\t\t// if delay is set, set a timeout for delay to recall this function, then return\n\t\tif ( 0 < this.delay_between_requests && false === this.flag_skip_delay ) {\n\t\t\tsetTimeout( function() {\n\t\t\t\tthis.flag_skip_delay = true;\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}, this.delay_between_requests );\n\t\t\treturn;\n\t\t} else {\n\t\t\tthis.flag_skip_delay = false;\n\t\t}\n\n\t\tif ( true === this.migration_paused ) {\n\t\t\t$( '.migration-progress-ajax-spinner' ).hide();\n\n\t\t\t// Pause the timer\n\t\t\twpmdb.current_migration.pauseTimer();\n\n\t\t\tvar pause_text = '';\n\t\t\tif ( true === this.is_auto_pause_before_finalize ) {\n\t\t\t\tpause_text = wpmdb_strings.paused_before_finalize;\n\t\t\t\tthis.is_auto_pause_before_finalize = false;\n\n\t\t\t\tif ( 'find_replace' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\tpause_text = wpmdb_strings.find_replace_paused_before_finalize;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_text = wpmdb_strings.paused;\n\t\t\t}\n\n\t\t\twpmdb.current_migration.setState( null, pause_text, 'paused' );\n\n\t\t\t// Re-bind Pause/Resume button to Resume when we are finally Paused\n\t\t\t$( 'body' ).on( 'click', '.pause-resume', function( event ) {\n\t\t\t\tthis.set_pause_resume_button( event );\n\t\t\t} );\n\t\t\t$( 'body' ).on( 'click', '.cancel', function( event ) {\n\t\t\t\tthis.cancel_migration( event );\n\t\t\t} );\n\t\t\t$( '.pause-resume' ).html( wpmdb_strings.resume );\n\n\t\t} else if ( true === this.migration_cancelled ) {\n\t\t\tthis.migration_intent = wpmdb.functions.wpmdb_migration_type();\n\n\t\t\tvar progress_msg;\n\n\t\t\tif ( 'savefile' === this.migration_intent ) {\n\t\t\t\tprogress_msg = wpmdb_strings.removing_local_sql;\n\t\t\t} else if ( 'pull' === this.migration_intent ) {\n\t\t\t\tif ( 'backup' === this.stage ) {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_local_backup;\n\t\t\t\t} else {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_local_temp_tables;\n\t\t\t\t}\n\t\t\t} else if ( 'push' === this.migration_intent ) {\n\t\t\t\tif ( 'backup' === this.stage ) {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_remote_sql;\n\t\t\t\t} else {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_remote_temp_tables;\n\t\t\t\t}\n\t\t\t}\n\t\t\twpmdb.current_migration.setText( progress_msg );\n\n\t\t\tvar request_data = {\n\t\t\t\taction: 'wpmdb_cancel_migration',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\tnonce: wpmdb_data.nonces.cancel_migration\n\t\t\t};\n\n\t\t\tthis.doing_ajax = true;\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: request_data,\n\t\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_cancellation_failed, wpmdb_strings.manually_remove_temp_files + '<br /><br />' + wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText + '<br /><br />' + wpmdb_strings.response + ':<br />' + jqXHR.responseText, 'error' );\n\t\t\t\t\tconsole.log( jqXHR );\n\t\t\t\t\tconsole.log( textStatus );\n\t\t\t\t\tconsole.log( errorThrown );\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: ( data ) => {\n\t\t\t\t\tthis.doing_ajax = false;\n\t\t\t\t\tdata = $.trim( data );\n\n\t\t\t\t\tif ( ('push' === this.migration_intent && '1' !== data) || ('push' !== this.migration_intent && '' !== data) ) {\n\n\t\t\t\t\t\tif ( 'undefined' !== typeof data && 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\t\tdata = data.wpmdb_error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_cancellation_failed, data, 'error' );\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.completed_msg = wpmdb_strings.migration_cancelled;\n\n\t\t\t\t\tif ( 'find_replace' === this.migration_intent ) {\n\t\t\t\t\t\tthis.completed_msg = wpmdb_strings.find_replace_cancelled;\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\twpmdb.current_migration.setStatus( 'cancelled' );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\twpmdb.common.next_step_in_migration.fn.apply( null, wpmdb.common.next_step_in_migration.args );\n\t\t}\n\t}\n\n\tmaybe_show_prefix_notice( prefix ) {\n\t\tvar $prefix_notice = $( '.prefix-notice' );\n\n\t\t$prefix_notice.hide();\n\n\t\tif ( prefix !== wpmdb_data.this_prefix ) {\n\t\t\t$( '.remote-prefix' ).html( prefix );\n\t\t\tthis.show_prefix_notice = true;\n\t\t\t$prefix_notice.show();\n\t\t}\n\t}\n\n\tmaybe_show_select_table_notice() {\n\n\t\t// check that they've selected some tables to migrate\n\t\tif ( $( '#migrate-selected' ).is( ':checked' ) && null === $( '#select-tables' ).val() ) {\n\t\t\tif ( 'import' !== wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\talert( wpmdb_strings.please_select_one_table );\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif ( $( '#import-find-replace' ).is( ':checked' ) && $( '#select-tables' ).is( ':visible' ) ) {\n\t\t\t\t\talert( wpmdb_strings.please_select_one_table_import );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check that they've selected some tables to backup\n\t\tif ( 'savefile' !== wpmdb.functions.wpmdb_migration_type() && $( '#backup-manual-select' ).is( ':checked' ) && null === $( '#select-backup' ).val() ) {\n\t\t\talert( wpmdb_strings.please_select_one_table_backup );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tremove_protocol( url ) {\n\t\treturn url.replace( /^https?:/i, '' );\n\t}\n\n\tcreate_table_select( tables, table_sizes_hr, selected_tables ) {\n\t\tvar $table_select = document.createElement( 'select' );\n\t\t$( $table_select ).attr( {\n\t\t\tmultiple: 'multiple',\n\t\t\tname: 'select_tables[]',\n\t\t\tid: 'select-tables',\n\t\t\tclass: 'multiselect'\n\t\t} );\n\n\t\tif ( 0 < tables.length ) {\n\t\t\t$.each( tables, function( index, table ) {\n\t\t\t\tif ( $.wpmdb.apply_filters( 'wpmdb_exclude_table', false, table ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar selected = ' ';\n\t\t\t\tif ( undefined !== selected_tables && null !== selected_tables && 0 < selected_tables.length && -1 !== $.inArray( table, selected_tables ) ) {\n\t\t\t\t\tselected = ' selected=\"selected\" ';\n\t\t\t\t}\n\n\t\t\t\tvar size = '';\n\t\t\t\tif ( 0 !== table_sizes_hr.length ) {\n\t\t\t\t\tsize = ' (' + table_sizes_hr[ table ] + ')';\n\t\t\t\t}\n\n\t\t\t\t$( $table_select ).append( '<option' + selected + 'value=\"' + table + '\">' + table + size + '</option>' );\n\t\t\t} );\n\t\t}\n\n\t\treturn $table_select;\n\t}\n\n\t/**\n\t * Returns tables selected for migration.\n\t *\n\t * @returns {array}\n\t *\n\t * Also handler for wpmdb_get_tables_to_migrate filter, disregards input values as it is the primary source.\n\t */\n\tget_tables_to_migrate() {\n\t\tvar tables = [];\n\t\tvar mig_type = wpmdb.functions.wpmdb_migration_type();\n\t\tvar table_intent = $( 'input[name=table_migrate_option]:checked' ).val();\n\n\t\t// Grab tables as per what the user has selected from the multiselect box or all prefixed tables.\n\t\tif ( 'migrate_select' === table_intent ) {\n\t\t\ttables = $( '#select-tables' ).val();\n\t\t} else {\n\t\t\tif ( 'pull' !== mig_type && 'undefined' !== typeof wpmdb_data.this_prefixed_tables ) {\n\t\t\t\ttables = wpmdb_data.this_prefixed_tables;\n\t\t\t} else if ( 'pull' === mig_type && 'undefined' !== typeof wpmdb.common.connection_data && 'undefined' !== typeof wpmdb.common.connection_data.prefixed_tables ) {\n\t\t\t\ttables = wpmdb.common.connection_data.prefixed_tables;\n\t\t\t}\n\t\t}\n\n\t\treturn tables;\n\t}\n\n\tupdate_migrate_button_text() {\n\t\tvar migration_intent = wpmdb.functions.wpmdb_migration_type();\n\t\tvar save_string = ($( '#save-migration-profile' ).is( ':checked' )) ? '_save' : '';\n\t\tvar migrate_string = 'migrate_button_' + (('savefile' === migration_intent) ? 'export' : migration_intent) + save_string;\n\t\t$( '.migrate-db .button-primary' ).val( wpmdb_strings[ migrate_string ] );\n\t}\n\n\t// fired when the connection info box changes (e.g. gets pasted into)\n\tconnection_box_changed() {\n\t\tvar $this = $( '.pull-push-connection-info' );\n\n\t\tif ( -1 === $.inArray( wpmdb.functions.wpmdb_migration_type(), [ 'push', 'pull' ] ) ||\n\t\t (this.doing_ajax || $( $this ).hasClass( 'temp-disabled' )) && false === wpmdb.force_reconnect ) {\n\t\t\treturn;\n\t\t}\n\n\t\twpmdb.force_reconnect = false;\n\t\tvar data = $( '.pull-push-connection-info' ).val();\n\n\t\tvar connection_info = $.trim( data ).split( '\\n' );\n\t\tvar error = false;\n\t\tvar error_message = '';\n\n\t\tif ( '' === connection_info ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_missing;\n\t\t}\n\n\t\t// attempt to format the connection info from a single line\n\t\tif ( 1 === connection_info.length && !error ) {\n\t\t\tvar connection_words = $.trim( data ).split( ' ' );\n\t\t\tif ( 2 === connection_words.length ) {\n\t\t\t\tconnection_info = connection_words;\n\t\t\t}\n\t\t}\n\n\t\tif ( 2 !== connection_info.length && !error ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_incorrect;\n\t\t}\n\n\t\tif ( !error && !this.validate_url( connection_info[ 0 ] ) ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_url_invalid;\n\t\t}\n\n\t\tvar key_length = 0;\n\n\t\tif ( 'undefined' !== typeof connection_info[ 1 ] ) {\n\t\t\tkey_length = connection_info[ 1 ].length;\n\t\t}\n\n\t\tif ( !error && 32 !== key_length && 40 !== key_length ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_key_invalid;\n\t\t}\n\n\t\tif ( !error && connection_info[ 0 ] === wpmdb_data.connection_info[ 0 ] ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_local_url;\n\t\t}\n\n\t\tif ( !error && connection_info[ 1 ] === wpmdb_data.connection_info[ 1 ] ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_local_key;\n\t\t}\n\t\tif ( error ) {\n\t\t\t$( '.connection-status' ).html( error_message );\n\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\treturn;\n\t\t}\n\n\t\tvar new_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\n\t\t// If connection info is a single line\n\t\tif ( 1 === $.trim( data ).split( '\\n' ).length ) {\n\n\t\t\t// Repopulate the input with the info on two lines\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t}\n\n\t\tif ( false === wpmdb_data.openssl_available ) {\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( 'https://', 'http://' );\n\t\t\tnew_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t}\n\n\t\tthis.show_prefix_notice = false;\n\t\tthis.doing_ajax = true;\n\t\tthis.disable_export_type_controls();\n\n\t\tif ( $( '.basic-access-auth-wrapper' ).is( ':visible' ) ) {\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( /\\/\\/(.*)@/, '//' );\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( '//', '//' + encodeURIComponent( $.trim( $( '.auth-username' ).val() ) ) + ':' + encodeURIComponent( $.trim( $( '.auth-password' ).val() ) ) + '@' );\n\t\t\tnew_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t\t$( '.basic-access-auth-wrapper' ).hide();\n\t\t}\n\n\t\t$( '.step-two' ).hide();\n\t\t$( '.ssl-notice' ).hide();\n\t\t$( '.prefix-notice' ).hide();\n\t\t$( '.connection-status' ).show();\n\n\t\t$( '.connection-status' ).html( wpmdb_strings.establishing_remote_connection );\n\t\t$( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );\n\t\t$( '.connection-status' ).append( this.ajax_spinner );\n\n\t\tvar intent = wpmdb.functions.wpmdb_migration_type();\n\n\t\tthis.profile_name_edited = false;\n\n\t\treturn $.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'json',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_verify_connection_to_remote_site',\n\t\t\t\turl: connection_info[ 0 ],\n\t\t\t\tkey: connection_info[ 1 ],\n\t\t\t\tintent: intent,\n\t\t\t\tnonce: wpmdb_data.nonces.verify_connection_to_remote_site\n\t\t\t},\n\t\t\terror: ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t\t$( '.connection-status' ).html( this.get_ajax_errors( jqXHR.responseText, '(#100)', jqXHR ) );\n\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\tthis.enable_export_type_controls();\n\t\t\t},\n\t\t\tsuccess: ( data ) => {\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tthis.doing_ajax = false;\n\t\t\t\tthis.enable_export_type_controls();\n\n\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t$( '.connection-status' ).html( data.body );\n\t\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\n\t\t\t\t\tif ( data.body.indexOf( '401 Unauthorized' ) > -1 ) {\n\t\t\t\t\t\t$( '.basic-access-auth-wrapper' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$( '.pull-push-connection-info' ).hasClass( 'temp-disabled' ) && !$( '.connect-button' ).is( ':visible' ) ) {\n\t\t\t\t\t\t$( '.pull-push-connection-info' ).removeAttr( 'readonly' );\n\t\t\t\t\t\t$( '.connect-button' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( true === wpmdb.functions.maybe_show_mst_warning( data ) ) {\n\t\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.maybe_show_ssl_warning( connection_info[ 0 ], connection_info[ 1 ], data.scheme );\n\n\t\t\t\tvar profile_name = this.get_domain_name( data.url );\n\t\t\t\t$( '.create-new-profile' ).val( profile_name );\n\n\t\t\t\t$( '.pull-push-connection-info' ).addClass( 'temp-disabled' );\n\t\t\t\t$( '.pull-push-connection-info' ).attr( 'readonly', 'readonly' );\n\t\t\t\t$( '.connect-button' ).hide();\n\n\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t$( '.step-two' ).show();\n\n\t\t\t\twpmdb.functions.maybe_show_prefix_notice( data.prefix );\n\n\t\t\t\tthis.connection_established = true;\n\t\t\t\tthis.set_connection_data( data );\n\t\t\t\tthis.move_connection_info_box();\n\t\t\t\tthis.change_replace_values();\n\n\t\t\t\tthis.maybe_show_mixed_cased_table_name_warning();\n\n\t\t\t\tthis.refresh_table_selects( null, null, this );\n\n\t\t\t\tthis.$push_select_backup = $( this.$pull_select ).clone();\n\t\t\t\t$( this.$push_select_backup ).attr( {\n\t\t\t\t\tname: 'select_backup[]',\n\t\t\t\t\tid: 'select-backup'\n\t\t\t\t} );\n\n\t\t\t\tvar $post_type_select = document.createElement( 'select' );\n\t\t\t\t$( $post_type_select ).attr( {\n\t\t\t\t\tmultiple: 'multiple',\n\t\t\t\t\tname: 'select_post_types[]',\n\t\t\t\t\tid: 'select-post-types',\n\t\t\t\t\tclass: 'multiselect'\n\t\t\t\t} );\n\n\t\t\t\t$.each( wpmdb.common.connection_data.post_types, function( index, value ) {\n\t\t\t\t\t$( $post_type_select ).append( '<option value=\"' + value + '\">' + value + '</option>' );\n\t\t\t\t} );\n\n\t\t\t\tthis.$pull_post_type_select = $post_type_select;\n\n\t\t\t\t$( '#new-path-missing-warning, #new-url-missing-warning' ).hide();\n\n\t\t\t\tif ( 'pull' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\t$( '#new-url' ).val( this.remove_protocol( wpmdb_data.this_url ) );\n\t\t\t\t\t$( '#new-path' ).val( wpmdb_data.this_path );\n\t\t\t\t\tif ( 'true' === wpmdb_data.is_multisite ) {\n\t\t\t\t\t\t$( '#new-domain' ).val( wpmdb_data.this_domain );\n\t\t\t\t\t\t$( '.replace-row.pin .old-replace-col input[type=\"text\"]' ).val( this.remove_protocol( data.url ) );\n\t\t\t\t\t}\n\t\t\t\t\t$( '#old-url' ).val( this.remove_protocol( data.url ) );\n\t\t\t\t\t$( '#old-path' ).val( data.path );\n\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_pull_table_select' );\n\t\t\t\t\t$( '#select-post-types' ).remove();\n\t\t\t\t\t$( '.exclude-post-types-warning' ).after( this.$pull_post_type_select );\n\t\t\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t\t\t\t$( '.table-prefix' ).html( data.prefix );\n\t\t\t\t\t$( '.backup-table-prefix' ).html( wpmdb_data.site_details.prefix );\n\t\t\t\t\t$( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#new-url' ).val( this.remove_protocol( data.url ) );\n\t\t\t\t\t$( '#new-path' ).val( data.path );\n\n\t\t\t\t\tif ( 'true' === wpmdb_data.is_multisite ) {\n\t\t\t\t\t\t$( '.replace-row.pin .old-replace-col input[type=\"text\"]' ).val( this.remove_protocol( wpmdb_data.this_url ) );\n\t\t\t\t\t}\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_push_table_select' );\n\t\t\t\t\t$( '#select-backup' ).remove();\n\t\t\t\t\t$( '.backup-tables-wrap' ).prepend( this.$push_select_backup );\n\t\t\t\t}\n\n\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\tfn: $.wpmdb.do_action,\n\t\t\t\t\targs: [ 'verify_connection_to_remote_site', wpmdb.common.connection_data ]\n\t\t\t\t};\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\t\t} );\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/helpers/wpmdbGlobals.js","(function( $ ) {\n\n\t$.wpmdb = {\n\t\t/**\n\t\t * Implement a WordPress-link Hook System for Javascript\n\t\t * TODO: Change 'tag' to 'args', allow number (priority), string (tag), object (priority+tag)\n\t\t */\n\t\thooks: { action: {}, filter: {} },\n\t\tadd_action: function( action, callable, tag, self ) {\n\t\t\tjQuery.wpmdb.add_hook( 'action', action, callable, tag, self );\n\t\t},\n\t\tadd_filter: function( action, callable, tag, self ) {\n\t\t\tjQuery.wpmdb.add_hook( 'filter', action, callable, tag, self );\n\t\t},\n\t\tdo_action: function( action, args ) {\n\t\t\tjQuery.wpmdb.do_hook( 'action', action, null, args );\n\t\t},\n\t\tapply_filters: function( action, value, args ) {\n\t\t\treturn jQuery.wpmdb.do_hook( 'filter', action, value, args );\n\t\t},\n\t\tremove_action: function( action, tag ) {\n\t\t\tjQuery.wpmdb.remove_hook( 'action', action, tag );\n\t\t},\n\t\tremove_filter: function( action, tag ) {\n\t\t\tjQuery.wpmdb.remove_hook( 'filter', action, tag );\n\t\t},\n\t\tadd_hook: function( hook_type, action, callable, tag, self ) {\n\t\t\tif ( undefined === jQuery.wpmdb.hooks[ hook_type ][ action ] ) {\n\t\t\t\tjQuery.wpmdb.hooks[ hook_type ][ action ] = [];\n\t\t\t}\n\t\t\tvar hooks = jQuery.wpmdb.hooks[ hook_type ][ action ];\n\t\t\tif ( undefined === tag ) {\n\t\t\t\ttag = action + '_' + hooks.length;\n\t\t\t}\n\t\t\tjQuery.wpmdb.hooks[ hook_type ][ action ].push( { tag: tag, callable: callable, instance: self } );\n\t\t},\n\t\tdo_hook: function( hook_type, action, value, args ) {\n\t\t\tif ( undefined !== jQuery.wpmdb.hooks[ hook_type ][ action ] ) {\n\t\t\t\tvar hooks = jQuery.wpmdb.hooks[ hook_type ][ action ];\n\t\t\t\tfor ( var i = 0; i < hooks.length; i++ ) {\n\t\t\t\t\tif ( 'action' === hook_type ) {\n\n\t\t\t\t\t\t// .call (value of this, arg1, arg2) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call\n\t\t\t\t\t\thooks[ i ].callable.call( hooks[ i ].instance, args, hooks[ i ].instance );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = hooks[ i ].callable.call( hooks[ i ].instance, value, args, hooks[ i ].instance );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 'filter' === hook_type ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t},\n\t\tremove_hook: function( hook_type, action, tag ) {\n\t\t\tif ( undefined !== jQuery.wpmdb.hooks[ hook_type ][ action ] ) {\n\t\t\t\tvar hooks = jQuery.wpmdb.hooks[ hook_type ][ action ];\n\t\t\t\tfor ( var i = hooks.length - 1; 0 < i; i-- ) {\n\t\t\t\t\tif ( undefined === tag || tag === hooks[ i ].tag ) {\n\t\t\t\t\t\thooks.splice( i, 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n})( jQuery );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/hook.js","(function( $, wpmdb ) {\n\n\tvar import_selected = false;\n\tvar $import_select = $( '#select-tables' ).clone();\n\tvar tables_to_search = [];\n\tvar tables_to_import = [];\n\tvar unrecognized_import_file = false;\n\tvar import_prefix = '';\n\tvar import_info = {};\n\tvar ajax_spinner = '<img src=\"' + wpmdb.functions.get_spinner_url() + '\" alt=\"\" class=\"ajax-spinner general-spinner\" />';\n\n\t/**\n\t * Returns the migration status label for imports\n\t *\n\t * @param string label\n\t * @param object args\n\t *\n\t * @returns {string}\n\t */\n\tfunction import_migration_status_label( label, args ) {\n\t\tif ( 'import' === args.intent ) {\n\t\t\tif ( 'completed' === args.stage ) {\n\t\t\t\tlabel = wpmdb_strings.import_label_completed;\n\t\t\t} else {\n\t\t\t\tlabel = wpmdb_strings.import_label_migrating;\n\t\t\t}\n\t\t}\n\n\t\treturn label;\n\t}\n\t$.wpmdb.add_filter( 'wpmdb_get_migration_status_label', import_migration_status_label );\n\n\t/**\n\t * Updates the connection info box for imports\n\t *\n\t * @param object args\n\t */\n\tfunction import_connection_info_box( args ) {\n\t\tvar $import_file_status = $( '.import-file-status' );\n\n\t\tif ( 'import' === args.migration_type ) {\n\n\t\t\tif ( ! import_selected ) {\n\t\t\t\t$( '.step-two' ).hide();\n\n\t\t\t\tif ( $import_file_status.hasClass( 'profile-loaded' ) ) {\n\t\t\t\t\t$import_file_status.attr( 'class', 'import-file-status profile-loaded notification-message success-notice' );\n\t\t\t\t\t$import_file_status.html( wpmdb_strings.import_profile_loaded );\n\t\t\t\t} else {\n\t\t\t\t\t$import_file_status.html( wpmdb_strings.please_select_sql_file );\n\t\t\t\t}\n\n\t\t\t\t$import_file_status.show();\n\t\t\t} else {\n\t\t\t\tif ( unrecognized_import_file ) {\n\t\t\t\t\t$( '.unrecognized-import-file-notice' ).show();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmaybe_show_find_replace_options();\n\n\t\t\t$( '.mst-options' ).hide();\n\t\t\t$( '.import-find-replace-option, .import-active-plugin-option' ).show();\n\t\t} else {\n\t\t\t$( '.find-replace-rows, .table-options, .advanced-options, .exclude-post-types-options, label[for=\"backup-selected\"]' ).show();\n\t\t\t$( '.import-find-replace-option, .find-replace-options, .import-file-status, .import-active-plugin-option, .unrecognized-import-file-notice' ).hide();\n\n\t\t\tif ( 'search_all_imported' === $( 'input[name=table_migrate_option]:checked' ).val() ) {\n\t\t\t\t$( 'input[name=table_migrate_option][value=migrate_only_with_prefix]' ).prop( 'checked', true );\n\t\t\t}\n\t\t}\n\t}\n\t$.wpmdb.add_action( 'move_connection_info_box', import_connection_info_box );\n\n\t/**\n\t * Starts the upload process for the import\n\t *\n\t * @param stage\n\t */\n\tfunction maybe_initiate_import( stage ) {\n\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\tif ( 'backup' === stage ) {\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migrate_table_recursive );\n\t\t\t}\n\n\t\t\twpmdb.common.hooks.push( wpmdb.functions.upload_file_recursive );\n\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\twpmdb.functions.execute_next_step();\n\t\t}\n\t}\n\t$.wpmdb.add_action( 'wpmdb_migration_initiated', maybe_initiate_import );\n\n\t/**\n\t * Restores the import select when changing migration types\n\t */\n\tfunction update_import_table_select() {\n\t\t$( '#select-tables' ).remove();\n\t\t$( '.select-tables-wrap' ).prepend( $import_select );\n\t\t$( '#select-tables' ).change();\n\t}\n\t$.wpmdb.add_action( 'wpmdb_update_import_table_select', update_import_table_select );\n\n\t/**\n\t * Updates the selected tables for the \"Backup tables that will be replaced during the import\" option\n\t *\n\t * @param tables_to_backup\n\t *\n\t * @return array\n\t */\n\tfunction backup_selected_for_import( tables_to_backup ) {\n\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\ttables_to_backup = tables_to_import;\n\t\t}\n\n\t\treturn tables_to_backup;\n\t}\n\t$.wpmdb.add_filter( 'wpmdb_backup_selected_tables', backup_selected_for_import );\n\n\t/**\n\t * Adds the import migration stage\n\t *\n\t * object args\n\t */\n\tfunction add_import_stage( args ) {\n\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\twpmdb.current_migration.model.addStage( 'upload', [], 'local', {\n\t\t\t\tstrings: {\n\t\t\t\t\tstage_title: wpmdb_strings.upload\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twpmdb.current_migration.model.addStage( 'import', [], 'local', {\n\t\t\t\tstrings: {\n\t\t\t\t\tstage_title: wpmdb_strings.migrate_button_import\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( $( '#import-find-replace' ).is( ':checked' ) ) {\n\t\t\t\ttables_to_search = args.tables_to_migrate;\n\t\t\t\twpmdb.current_migration.model.addStage( 'find_replace', [], 'local', {\n\t\t\t\t\tstrings: {\n\t\t\t\t\t\tmigrated: wpmdb_strings.searched,\n\t\t\t\t\t\tstage_title: wpmdb_strings.migrate_button_find_replace\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\t$.wpmdb.add_action( 'wpmdb_add_migration_stages', add_import_stage );\n\n\t/**\n\t * Adds any info necessary to begin an import\n\t *\n\t * @param object request_data\n\t *\n\t * @return {object}\n\t */\n\tfunction initiate_import_request_data( request_data ) {\n\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\trequest_data.import_info = import_info;\n\t\t}\n\n\t\treturn request_data;\n\t}\n\t$.wpmdb.add_filter( 'wpmdb_initiate_migration_request_data', initiate_import_request_data );\n\n\t/**\n\t * Gets more information about the import file and loads step-two\n\t *\n\t * @param event\n\t */\n\tfunction get_import_info( event ) {\n\t\tvar files = event.target.files; // FileList object\n\t\tvar file = files[0];\n\t\tvar reader = new FileReader();\n\t\tvar $import_file_status = $( '.import-file-status' );\n\t\tvar $backup_selected_option = $( 'label[for=\"backup-selected\"]' );\n\t\tvar $prefix_notice = $( '.prefix-notice' );\n\t\tvar $unrecognized_file_notice = $( '.unrecognized-import-file-notice' );\n\t\tvar $step_two = $( '.step-two' );\n\t\tvar $old_url = $( '#old-url' );\n\t\tvar $old_path = $( '#old-path' );\n\t\tvar $new_url = $( '#new-url' );\n\t\tvar $new_path = $( '#new-path' );\n\n\t\t$import_file_status.hide().attr( 'class', 'import-file-status' );\n\t\t$prefix_notice.hide();\n\t\t$unrecognized_file_notice.hide();\n\t\t$step_two.hide();\n\t\t$( '.mst-required ' ).hide();\n\n\t\tif ( ! files.length ) {\n\t\t\tif ( import_selected ) {\n\t\t\t\t$step_two.hide();\n\t\t\t\t$import_file_status.text( wpmdb_strings.please_select_sql_file ).show();\n\t\t\t\timport_selected = false;\n\t\t\t}\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tif ( '.sql' === file.name.slice( -4 ) || '.sql.gz' === file.name.slice( -7 ) ) {\n\t\t\t\timport_selected = true;\n\t\t\t} else {\n\t\t\t\t$import_file_status.addClass( 'notification-message error-notice migration-error' ).text( wpmdb_strings.invalid_sql_file ).show();\n\t\t\t\t$step_two.hide();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\timport_prefix = '';\n\n\t\t$import_file_status.text( wpmdb_strings.parsing_sql_file ).append( ajax_spinner ).show();\n\n\t\treader.onloadend = function( event ) {\n\t\t\tif ( event.target.readyState !== FileReader.DONE ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_get_import_info',\n\t\t\t\t\tfile_data: event.target.result,\n\t\t\t\t\tnonce: wpmdb_data.nonces.import_file\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\tconsole.log( jqXHR, textStatus, errorThrown );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\t$import_file_status.hide();\n\n\t\t\t\t\tif ( true === wpmdb.functions.maybe_show_mst_warning( data ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$step_two.show();\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\t$import_file_status.text( data.body ).addClass( 'notification-message error-notice migration-error' ).show();\n\t\t\t\t\t\t$step_two.hide();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar localStorage_form_data = wpmdb.functions.get_localStorage_form_data();\n\t\t\t\t\t\timport_info = data;\n\n\t\t\t\t\t\tif ( 'undefined' !== typeof data.prefix ) {\n\t\t\t\t\t\t\timport_prefix = data.prefix;\n\t\t\t\t\t\t\t$( '.table-prefix' ).text( data.prefix );\n\t\t\t\t\t\t\twpmdb.functions.maybe_show_prefix_notice( data.prefix );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'undefined' !== typeof data.tables ) {\n\t\t\t\t\t\t\ttables_to_import = data.tables;\n\t\t\t\t\t\t\t$backup_selected_option.show();\n\n\t\t\t\t\t\t\t// Update the find & replace values\n\t\t\t\t\t\t\tif ( ! localStorage_form_data ) {\n\t\t\t\t\t\t\t\t$old_url.val( wpmdb.functions.remove_protocol( data.URL ) );\n\t\t\t\t\t\t\t\t$old_path.val( data.path );\n\t\t\t\t\t\t\t\t$new_url.val( wpmdb.functions.remove_protocol( wpmdb_data.this_url ) );\n\t\t\t\t\t\t\t\t$new_path.val( wpmdb_data.this_path );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update the select with tables that will be imported\n\t\t\t\t\t\t\tvar loaded_tables = [];\n\t\t\t\t\t\t\tvar loaded_post_types = [];\n\n\t\t\t\t\t\t\tif ( localStorage_form_data ) {\n\t\t\t\t\t\t\t\tloaded_tables = localStorage_form_data.select_tables;\n\t\t\t\t\t\t\t\tloaded_post_types = localStorage_form_data.select_post_types;\n\t\t\t\t\t\t\t\twpmdb.functions.remove_localStorage_form_data();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( 'migrate_only_with_prefix' === $( 'input[name=table_migrate_option]:checked' ).val() && ! $import_file_status.hasClass( 'profile-loaded' ) ) {\n\t\t\t\t\t\t\t\t\t$( 'input[name=table_migrate_option][value=search_all_imported]' ).prop( 'checked', true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_tables ) {\n\t\t\t\t\t\t\t\tloaded_tables = wpmdb_loaded_tables;\n\t\t\t\t\t\t\t\tloaded_post_types = wpmdb_loaded_post_types;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$import_select = wpmdb.functions.create_table_select( data.tables, [], loaded_tables );\n\t\t\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_import_table_select' );\n\n\t\t\t\t\t\t\tif ( 'undefined' !== typeof data.post_types ) {\n\t\t\t\t\t\t\t\tvar $post_type_select = document.createElement( 'select' );\n\t\t\t\t\t\t\t\t$( $post_type_select ).attr( {\n\t\t\t\t\t\t\t\t\tmultiple: 'multiple',\n\t\t\t\t\t\t\t\t\tname: 'select_post_types[]',\n\t\t\t\t\t\t\t\t\tid: 'select-post-types',\n\t\t\t\t\t\t\t\t\tclass: 'multiselect'\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t$.each( data.post_types, function( index, value ) {\n\t\t\t\t\t\t\t\t\tvar selected = $.inArray( value, loaded_post_types );\n\t\t\t\t\t\t\t\t\tif ( -1 !== selected || ( true === wpmdb_convert_exclude_revisions && 'revision' !== value ) ) {\n\t\t\t\t\t\t\t\t\t\tselected = true;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tselected = false;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvar opt = document.createElement( 'option' );\n\t\t\t\t\t\t\t\t\topt.value = value;\n\t\t\t\t\t\t\t\t\topt.text = value;\n\t\t\t\t\t\t\t\t\topt.selected = selected;\n\t\t\t\t\t\t\t\t\t$post_type_select.add( opt, null );\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t$( '#select-post-types' ).remove();\n\t\t\t\t\t\t\t\t$( '.exclude-post-types-warning' ).after( $post_type_select );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( unrecognized_import_file ) {\n\t\t\t\t\t\t\t\tunrecognized_import_file = false;\n\t\t\t\t\t\t\t\tmaybe_show_find_replace_options();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$unrecognized_file_notice.show();\n\t\t\t\t\t\t\t$backup_selected_option.hide();\n\t\t\t\t\t\t\t$( '.table-options' ).hide();\n\t\t\t\t\t\t\tunrecognized_import_file = true;\n\n\t\t\t\t\t\t\t$new_url.val( $old_url.val() );\n\t\t\t\t\t\t\t$new_path.val( $old_path.val() );\n\t\t\t\t\t\t\t$old_url.val( '' );\n\t\t\t\t\t\t\t$old_path.val( '' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tvar blob = file.slice( 0, 1024 * 1000 );\n\t\treader.readAsDataURL( blob );\n\t}\n\t$( '#import-file' ).on( 'change', get_import_info );\n\n\t/**\n\t * Displays the find and replace options for imports\n\t */\n\tfunction maybe_show_find_replace_options() {\n\t\tvar find_replace_rows = $( '.find-replace-rows' );\n\t\treturn $( '#import-find-replace' ).is( ':checked' ) ? find_replace_rows.show() : find_replace_rows.hide();\n\t}\n\t$( '#import-find-replace' ).on( 'click', maybe_show_find_replace_options );\n\n\tfunction maybe_show_table_options() {\n\t\tif ( ! unrecognized_import_file ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetTimeout( function() {\n\t\t\tif ( $( '.find-replace-options-toggle .expand-collapse-arrow' ).hasClass( 'collapsed' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$( '.table-options' ).hide();\n\t\t}, 1 );\n\t}\n\t$( '.find-replace-options-toggle' ).on( 'click', maybe_show_table_options );\n\n\t/**\n\t * Updates both `keep_active_plugins` checkboxes when one is changed.\n\t */\n\tfunction update_keep_active_plugins_option() {\n\t\t$( 'input[name=keep_active_plugins]' ).prop( 'checked', $( this ).is( ':checked' ) );\n\t}\n\t$( 'input[name=keep_active_plugins]' ).on( 'click', update_keep_active_plugins_option );\n\n\t/**\n\t * Recursively upload an import file\n\t *\n\t * @param int start\n\t */\n\twpmdb.functions.upload_file_recursive = function( start ) {\n\t\tstart = 'undefined' === typeof start ? 0 : start;\n\n\t\tvar file = document.getElementById( 'import-file' ).files[0];\n\t\tvar slice_size = 1000 * 1024; // 1 MB\n\t\tvar next_slice = start + slice_size + 1;\n\t\tvar reader = new FileReader();\n\n\t\tif ( 0 === start ) {\n\t\t\twpmdb.current_migration.model.addStageItem( 'upload', file.name, file.size / 1000, Math.ceil( file.size / slice_size ) );\n\t\t}\n\n\t\treader.onloadend = function( event ) {\n\t\t\tif ( event.target.readyState !== FileReader.DONE ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_upload_file',\n\t\t\t\t\tfile_data: event.target.result,\n\t\t\t\t\tfile: file.name,\n\t\t\t\t\tfile_type: file.type,\n\t\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\t\tstage: 'import',\n\t\t\t\t\timport_info: import_info,\n\t\t\t\t\tnonce: wpmdb_data.nonces.import_file\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\tconsole.log( jqXHR, textStatus, errorThrown );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\twpmdb.current_migration.setText();\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data.body, 'error' );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar size_done = start + slice_size;\n\n\t\t\t\t\twpmdb.current_migration.setText( wpmdb_strings.uploading_file_to_server );\n\t\t\t\t\twpmdb.current_migration.model.getStageModel( 'upload' ).setItemRowsTransferred( file.name, Math.ceil( size_done / slice_size ) );\n\n\t\t\t\t\tif ( next_slice < file.size ) {\n\t\t\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\t\t\tfn: wpmdb.functions.upload_file_recursive,\n\t\t\t\t\t\t\targs: [ next_slice ]\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\t\t\tfn: wpmdb.functions.upload_import_successful,\n\t\t\t\t\t\t\targs: [ file ]\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tvar blob = file.slice( start, next_slice );\n\t\treader.readAsDataURL( blob );\n\t};\n\n\t/**\n\t * Prepares the import stage\n\t *\n\t * @param file\n\t */\n\twpmdb.functions.upload_import_successful = function( file ) {\n\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_prepare_import_file',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\tnonce: wpmdb_data.nonces.import_file\n\t\t\t},\n\t\t\tdataType: 'json',\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\tconsole.log( jqXHR, textStatus, errorThrown );\n\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t},\n\t\t\tsuccess: function( response ) {\n\t\t\t\tvar item_name = file.name;\n\t\t\t\tvar migration_text = wpmdb_strings.importing_file_to_db;\n\n\t\t\t\tif ( '.gz' === item_name.slice( -3 ) ) {\n\t\t\t\t\titem_name = file.name.slice( 0, -3 );\n\t\t\t\t}\n\n\t\t\t\tmigration_text = migration_text.replace( /\\%s\\s?/, item_name );\n\t\t\t\twpmdb.current_migration.setText( migration_text );\n\n\t\t\t\twpmdb.current_migration.model.addStageItem( 'import', item_name, response.import_size / 1000, response.num_chunks );\n\t\t\t\twpmdb.current_migration.model.setActiveStage( 'import' );\n\n\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\tfn: wpmdb.functions.import_file_recursive,\n\t\t\t\t\targs: [ {\n\t\t\t\t\t\timport_filename: response.import_file,\n\t\t\t\t\t\titem_name: item_name,\n\t\t\t\t\t\tchunk: 0,\n\t\t\t\t\t\tcurrent_query: ''\n\t\t\t\t\t} ]\n\t\t\t\t};\n\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\t\t} );\n\t};\n\n\t/**\n\t * Recursively imports chunks to the database\n\t *\n\t * @param object args\n\t */\n\twpmdb.functions.import_file_recursive = function( args ) {\n\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_import_file',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\tchunk: args.chunk,\n\t\t\t\tcurrent_query: args.current_query,\n\t\t\t\timport_file: args.import_filename,\n\t\t\t\tnonce: wpmdb_data.nonces.import_file\n\t\t\t},\n\t\t\tdataType: 'json',\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\tconsole.log( jqXHR, textStatus, errorThrown );\n\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t},\n\t\t\tsuccess: function( response ) {\n\t\t\t\tif ( 'undefined' !== typeof response.wpmdb_error && 1 === response.wpmdb_error ) {\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, response.body, 'error' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twpmdb.current_migration.model.getStageModel( 'import' ).setItemRowsTransferred( args.item_name, response.chunk );\n\n\t\t\t\tif ( response.chunk >= response.num_chunks ) {\n\n\t\t\t\t\twpmdb.current_migration.model.getStageModel( 'import' ).setItemRowsTransferred( args.item_name, ++response.chunk );\n\n\t\t\t\t\tif ( $( '#import-find-replace' ).is( ':checked' ) ) {\n\n\t\t\t\t\t\tif ( unrecognized_import_file ) {\n\t\t\t\t\t\t\t$.each( response.table_sizes, function( table, size ) {\n\t\t\t\t\t\t\t\tif ( table.startsWith( wpmdb_data.this_temp_prefix ) && wpmdb_data.alter_table_name !== table ) {\n\t\t\t\t\t\t\t\t\tvar table_name = table.replace( wpmdb_data.this_temp_prefix, '' );\n\t\t\t\t\t\t\t\t\twpmdb.current_migration.model.addStageItem( 'find_replace', table_name, response.table_sizes[ table ], response.table_rows[ table ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar table_migrate_option = $( 'input[name=table_migrate_option]:checked' ).val();\n\n\t\t\t\t\t\t\tif ( 'migrate_only_with_prefix' === table_migrate_option ) {\n\t\t\t\t\t\t\t\ttables_to_search = tables_to_import.filter( function( table ) {\n\t\t\t\t\t\t\t\t\treturn import_prefix === table.substring( 0, import_prefix.length );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else if ( 'search_all_imported' === table_migrate_option ) {\n\t\t\t\t\t\t\t\ttables_to_search = tables_to_import;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$.each( tables_to_search, function( key, table ) {\n\t\t\t\t\t\t\t\tvar imported_table = wpmdb_data.this_temp_prefix + table;\n\t\t\t\t\t\t\t\tif ( response.table_sizes.hasOwnProperty( imported_table ) ) {\n\t\t\t\t\t\t\t\t\twpmdb.current_migration.model.addStageItem( 'find_replace', table, response.table_sizes[ imported_table ], response.table_rows[ imported_table ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttables_to_search = [];\n\n\t\t\t\t\t\twpmdb.current_migration.model.setActiveStage( 'find_replace' );\n\t\t\t\t\t\tconst tables_to_migrate = wpmdb.functions.get_tables_to_migrate();\n\n\t\t\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\t\t\tfn: wpmdb.functions.migrate_table_recursive,\n\t\t\t\t\t\t\targs: [ '-1', '', tables_to_migrate.length ]\n\t\t\t\t\t\t};\n\t\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( '.progress-label' ).removeClass( 'label-visible' );\n\t\t\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_before_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete );\n\t\t\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.wpmdb_flush );\n\t\t\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_after_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete_events );\n\t\t\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\t\tfn: wpmdb.functions.import_file_recursive,\n\t\t\t\t\t\targs: [ {\n\t\t\t\t\t\t\timport_filename: args.import_filename,\n\t\t\t\t\t\t\titem_name: args.item_name,\n\t\t\t\t\t\t\tchunk: response.chunk,\n\t\t\t\t\t\t\tcurrent_query: response.current_query\n\t\t\t\t\t\t} ]\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\t\t} );\n\t};\n\n\twpmdb.functions.get_tables_to_import = function() {\n\t\treturn tables_to_import;\n\t};\n\n})( jQuery, wpmdb );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/import.js","(function( $, wpmdb ) {\n\n\t$( document ).ready( function() {\n\n\t\twpmdb.functions.localStorage_available = function() {\n\t\t\ttry {\n\t\t\t\tlocalStorage.setItem( 'wpmdb_test', 'wpmdb_test' );\n\t\t\t\tlocalStorage.removeItem( 'wpmdb_test', 'wpmdb_test' );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch ( e ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\twpmdb.functions.maybe_reload_page = function() {\n\t\t\tvar migration_type = wpmdb.functions.wpmdb_migration_type();\n\n\t\t\tif ( ! wpmdb.functions.localStorage_available() ||\n\t\t\t 'cancelled' === wpmdb.current_migration.status ||\n\t\t\t true === wpmdb.common.migration_error ||\n\t\t\t $('.progress-overlay-container').hasClass('wpmdb-error') ||\n\t\t\t -1 === $.inArray( migration_type, [ 'pull', 'import', 'find_replace' ] )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( 'true' === wpmdb_data.is_multisite &&\n\t\t\t $( '#mst-select-subsite' ).is( ':checked' ) &&\n\t\t\t wpmdb_data.this_domain !== $( '#mst-selected-subsite option:selected' ).text()\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar tables_to_migrate = wpmdb.functions.get_tables_to_migrate();\n\n\t\t\tif ( 'import' === migration_type ) {\n\t\t\t\ttables_to_migrate = wpmdb.functions.get_tables_to_import();\n\t\t\t}\n\n\t\t\tif ( -1 === $.inArray( wpmdb_data.this_prefix + 'options', tables_to_migrate ) &&\n\t\t\t -1 === $.inArray( wpmdb_data.this_prefix + 'usermeta', tables_to_migrate ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twpmdb.functions.set_localStorage_form_data();\n\t\t\tlocation.reload();\n\t\t};\n\n\t\twpmdb.functions.set_localStorage_form_data = function() {\n\t\t\tvar data = {};\n\n\t\t\t$.each( $( '#migrate-form' ).serializeArray(), function( index, field ) {\n\t\t\t\tif ( '[]' === field.name.substr( -2 ) ) {\n\t\t\t\t\tvar field_name = field.name.slice( 0, -2 );\n\t\t\t\t\tif ( 'undefined' === typeof data[ field_name ] ) {\n\t\t\t\t\t\tdata[ field_name ] = [];\n\t\t\t\t\t}\n\t\t\t\t\tdata[ field_name ].push( field.value );\n\t\t\t\t} else {\n\t\t\t\t\tdata[ field.name ] = field.value;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tlocalStorage.setItem( 'wpmdb_migrate_form', JSON.stringify( data ) );\n\t\t};\n\n\t\twpmdb.functions.get_localStorage_form_data = function() {\n\t\t\tvar form_data = localStorage.getItem( 'wpmdb_migrate_form' );\n\n\t\t\tif ( null === form_data ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tform_data = JSON.parse( form_data );\n\t\t\t}\n\t\t\tcatch ( err ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn form_data;\n\t\t};\n\n\t\twpmdb.functions.remove_localStorage_form_data = function() {\n\t\t\tlocalStorage.removeItem( 'wpmdb_migrate_form' );\n\t\t};\n\n\t\twpmdb.functions.load_data_from_localStorage = function() {\n\t\t\tvar form_data = wpmdb.functions.get_localStorage_form_data();\n\n\t\t\tif ( ! form_data ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$.each( form_data, function( name, value ) {\n\t\t\t\tvar $input = $( '[name=\"' + name + '\"]' );\n\t\t\t\tvar input_type = $input.attr( 'type' );\n\n\t\t\t\tif ( 'action' === name ) {\n\t\t\t\t\twpmdb.migration_selection = value;\n\t\t\t\t\t$( '#' + value ).prop( 'checked', true );\n\t\t\t\t} else {\n\t\t\t\t\tif ( 'radio' === input_type ) {\n\t\t\t\t\t\t$( '[name=\"' + name + '\"][value=\"' + value + '\"]' ).prop( 'checked', true );\n\t\t\t\t\t} else if ( 'checkbox' === input_type ) {\n\t\t\t\t\t\t$input.prop( 'checked', true );\n\n\t\t\t\t\t\tif ( $input.parent().hasClass( 'checkbox-label' ) ) {\n\t\t\t\t\t\t\t$input.parent().next().show();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$input.val( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t$( '.option-group input[type=radio]' ).change();\n\t\t\t$( '.' + wpmdb.migration_selection + '-list ul' ).show();\n\n\t\t\t$.when( wpmdb.functions.connection_box_changed() ).done( function() {\n\t\t\t\tif ( 'migrate_select' === $( 'input[name=table_migrate_option]:checked' ).val() ) {\n\t\t\t\t\tif ( 'undefined' !== typeof form_data.select_tables ) {\n\t\t\t\t\t\t$( '#select-tables' ).val( form_data.select_tables );\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '.table-options .expandable-content, .select-tables-wrap' ).show();\n\t\t\t\t\t$( '.table-options .expand-collapse-arrow' ).removeClass( 'collapsed' );\n\t\t\t\t} else {\n\t\t\t\t\t$( '.select-tables-wrap' ).hide();\n\t\t\t\t}\n\n\t\t\t\tif ( 'backup_manual_select' === $( 'input[name=backup_option]:checked' ).val() ) {\n\t\t\t\t\tif ( 'undefined' !== typeof form_data.select_backup ) {\n\t\t\t\t\t\t$( '#select-backup' ).val( form_data.select_backup );\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '.backup-tables-wrap' ).show();\n\t\t\t\t}\n\n\t\t\t\tif ( 'undefined' !== typeof form_data.select_post_types ) {\n\t\t\t\t\t$( '#select-post-types' ).val( form_data.select_post_types );\n\t\t\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t\t\t}\n\n\t\t\t\tif ( 'undefined' !== typeof form_data.replace_old ) {\n\n\t\t\t\t\t$( '.replace-row' ).not( '.original-repeatable-field' ).remove();\n\n\t\t\t\t\tvar n = 1;\n\t\t\t\t\t$.each( form_data.replace_old, function( index, value ) {\n\t\t\t\t\t\tif ( ! $( '.replace-row:nth-child(' + n + ')' ).length ) {\n\t\t\t\t\t\t\t$( '.replace-row' ).last().after( $( '.original-repeatable-field' ).clone().removeClass( 'original-repeatable-field' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$( '.replace-row:nth-child(' + n + ') [name=\"replace_old[]\"]' ).val( value );\n\t\t\t\t\t\t$( '.replace-row:nth-child(' + n + ') [name=\"replace_new[]\"]' ).val( form_data.replace_new[ index ] );\n\t\t\t\t\t\tn++;\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twpmdb.functions.update_migrate_button_text();\n\n\t\t\tif ( 'import' !== wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\twpmdb.functions.remove_localStorage_form_data();\n\t\t\t}\n\t\t};\n\t\twpmdb.functions.load_data_from_localStorage();\n\n\t} );\n\n} )( jQuery, wpmdb );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/localStorage.js","var $ = jQuery;\nvar MigrationProgressModel = require( './MigrationProgress-model' );\nvar MigrationProgressView = require( './MigrationProgress-view' );\nvar $overlayOriginal = $( '<div id=\"overlay\" class=\"hide\"></div>' );\nvar $progressContentOriginal = $( '.progress-content' ).clone().addClass( 'hide' );\nvar $proVersion = $( '.pro-version' ).addClass( 'hide' );\n\n$overlayOriginal.append( $proVersion );\n\nvar MigrationProgressController = {\n\tmigration: {\n\t\tmodel: {},\n\t\tview: {},\n\t\t$progress: {},\n\t\t$wrapper: {},\n\t\t$overlay: {},\n\t\tstatus: 'active',\n\t\ttitle: '',\n\t\ttext: '',\n\t\ttimerCount: 0,\n\t\ttimerStart: 0,\n\t\telapsedInterval: 0,\n\t\tcurrentStageNum: 0,\n\t\tcounterDisplay: false,\n\t\toriginalTitle: document.title,\n\t\tsetTitle: function( title ) {\n\t\t\tthis.$progress.find( '.progress-title' ).html( title );\n\t\t\tthis.title = title;\n\t\t},\n\t\tsetStatus: function( status ) {\n\t\t\tthis.$progress\n\t\t\t\t.removeClass( this.status )\n\t\t\t\t.addClass( ( 'error' === status ) ? 'wpmdb-error' : status );\n\n\t\t\t// Possible statuses include: 'error', 'paused', 'complete', 'cancelling'\n\t\t\tif ( 'error' === status ) {\n\t\t\t\tthis.$progress.find( '.progress-text' ).addClass( 'migration-error' );\n\t\t\t}\n\n\t\t\tthis.status = status;\n\n\t\t\tthis.updateTitleElem();\n\t\t},\n\t\tsetText: function( text ) {\n\t\t\tif ( 'string' !== typeof text ) {\n\t\t\t\ttext = '';\n\t\t\t}\n\n\t\t\tif ( 0 >= text.indexOf( 'wpmdb_error' ) ) {\n\t\t\t\ttext = this.decodeErrorObject( text );\n\t\t\t}\n\n\t\t\tthis.$progress.find( '.progress-text' ).html( text );\n\t\t\tthis.text = text;\n\t\t},\n\t\tsetState: function( title, text, status ) {\n\t\t\tif ( null !== title ) {\n\t\t\t\tthis.setTitle( title );\n\t\t\t}\n\t\t\tif ( null !== text ) {\n\t\t\t\tthis.setText( text );\n\t\t\t}\n\t\t\tif ( null !== status ) {\n\t\t\t\tthis.setStatus( status );\n\t\t\t}\n\t\t},\n\t\tstartTimer: function() {\n\t\t\tthis.timerStart = Date.now();\n\t\t\tthis.timerCount = 0;\n\t\t\tthis.counterDisplay = $( '.timer' );\n\t\t\tthis.elapsedInterval = setInterval( this.incrementTimer.bind( this ), 1000 );\n\t\t},\n\t\tgetTimerCountInSeconds() {\n\t\t\treturn Math.floor( (Date.now() - this.timerStart) / 1000 );\n\t\t},\n\t\tpauseTimer: function() {\n\t\t\tthis.pausedAt = Date.now()\n\t\t\tclearInterval( this.elapsedInterval );\n\t\t},\n\t\tresumeTimer: function() {\n\t\t\tthis.timerStart += Date.now() - this.pausedAt;\n\t\t\tthis.elapsedInterval = setInterval( this.incrementTimer.bind( this ), 1000 );\n\t\t},\n\t\tincrementTimer: function() {\n\t\t\tthis.timerCount = this.getTimerCountInSeconds();\n\t\t\tthis.displayCount();\n\t\t},\n\t\tdisplayCount: function() {\n\t\t\tvar hours = Math.floor( this.timerCount / 3600 ) % 24;\n\t\t\tvar minutes = Math.floor( this.timerCount / 60 ) % 60;\n\t\t\tvar seconds = this.timerCount % 60;\n\t\t\tvar display = this.pad( hours, 2, 0 ) + ':' + this.pad( minutes, 2, 0 ) + ':' + this.pad( seconds, 2, 0 );\n\t\t\tthis.counterDisplay.html( display );\n\t\t},\n\t\tupdateTitleElem: function() {\n\t\t\tvar activeStage = this.model.get( 'activeStageName' );\n\t\t\tvar stageModel = this.model.getStageModel( activeStage );\n\t\t\tvar percentDone = Math.max( 0, stageModel.getTotalProgressPercent() );\n\t\t\tvar numStages = this.model.get( 'stages' ).length;\n\t\t\tvar currentStage = this.currentStageNum;\n\t\t\tvar currentStatus = this.status;\n\t\t\tvar progressText = wpmdb_strings.title_progress;\n\n\t\t\tif ( 'complete' === stageModel.get( 'status' ) && 0 === stageModel.get( 'totalSize' ) ) {\n\t\t\t\tpercentDone = 100;\n\t\t\t}\n\n\t\t\tprogressText = progressText.replace( '%1$s', percentDone + '%' );\n\t\t\tprogressText = progressText.replace( '%2$s', currentStage );\n\t\t\tprogressText = progressText.replace( '%3$s', numStages );\n\n\t\t\tif ( 1 === numStages ) {\n\t\t\t\tprogressText = percentDone + '%';\n\t\t\t}\n\n\t\t\tif ( wpmdb_strings[ 'title_' + currentStatus ] ) {\n\t\t\t\tprogressText = wpmdb_strings[ 'title_' + currentStatus ];\n\t\t\t}\n\n\t\t\tprogressText = progressText + ' - ' + this.originalTitle;\n\n\t\t\tdocument.title = progressText;\n\t\t},\n\t\trestoreTitleElem: function() {\n\t\t\tdocument.title = this.originalTitle;\n\t\t},\n\t\tpad: function( num, width, padChar ) {\n\t\t\tpadChar = padChar || '0';\n\t\t\tnum = num + '';\n\t\t\treturn num.length >= width ? num : new Array( width - num.length + 1 ).join( padChar ) + num;\n\t\t},\n\n\t\t// fixes error objects that have been mangled by html encoding\n\t\tdecodeErrorObject: function( input ) {\n\t\t\tvar inputDecoded = input\n\t\t\t\t.replace( /\\{&quot;/g, '{#q!#' )\n\t\t\t\t.replace( /\\&quot;}/g, '#q!#}' )\n\t\t\t\t.replace( /,&quot;/g, ',#q!#' )\n\t\t\t\t.replace( /&quot;:/g, '#q!#:' )\n\t\t\t\t.replace( /:&quot;/g, ':#q!#' )\n\t\t\t\t.replace( /&quot;/g, '\\\\\"' )\n\t\t\t\t.replace( /#q!#/g, '\"' )\n\t\t\t\t.replace( /&gt;/g, '>' )\n\t\t\t\t.replace( /&lt;/g, '<' );\n\t\t\ttry {\n\t\t\t\tinputDecoded = JSON.parse( inputDecoded );\n\t\t\t} catch ( e ) {\n\t\t\t\treturn input;\n\t\t\t}\n\t\t\treturn ( 'object' === typeof inputDecoded && 'undefined' !== typeof inputDecoded.body ) ? inputDecoded : input;\n\t\t},\n\t\tfixProgressStageWidthForScrollBar: function() {\n\t\t\tvar scrollBarWidth = Math.abs( this.$wrapper[0].offsetWidth - this.$wrapper[0].clientWidth );\n\t\t\tvar visibleProgressItems = this.$wrapper.find( '.active .progress-items' );\n\t\t\tvar leftPad = parseInt( visibleProgressItems.css( 'padding-left' ), 10 );\n\t\t\tvar rightPad = parseInt( visibleProgressItems.css( 'padding-right' ), 10 );\n\n\t\t\tif ( 0 !== scrollBarWidth || ( 0 === scrollBarWidth && rightPad !== leftPad ) ) {\n\t\t\t\tvisibleProgressItems.css( 'padding-right', leftPad - scrollBarWidth + 'px' );\n\t\t\t}\n\t\t}\n\t},\n\tnewMigration: function( settings ) {\n\t\t$( '#overlay' ).remove();\n\t\t$( '.progress-content' ).remove();\n\t\tthis.migration.$overlay = $overlayOriginal.clone();\n\n\t\t$( '#wpwrap' ).append( this.migration.$overlay );\n\n\t\tthis.migration.model = new MigrationProgressModel( settings );\n\t\tthis.migration.view = new MigrationProgressView( {\n\t\t\tmodel: this.migration.model\n\t\t} );\n\n\t\tthis.migration.$progress = $progressContentOriginal.clone();\n\t\tthis.migration.$wrapper = this.migration.view.$el;\n\t\tthis.migration.$progress.find( '.migration-progress-stages' ).replaceWith( this.migration.$wrapper );\n\n\t\tthis.migration.$proVersion = this.migration.$overlay.find( '.pro-version' );\n\t\tvar proVersionIFrame = this.migration.$proVersion.find( 'iframe' ).remove().clone();\n\n\t\tthis.migration.$overlay.prepend( this.migration.$progress );\n\n\t\t// timeout needed so class is added after elements are appended to dom and transition runs.\n\t\tvar self = this;\n\t\tsetTimeout( function() {\n\t\t\tself.migration.$overlay.add( self.migration.$progress ).add( self.migration.$proVersion ).removeClass( 'hide' ).addClass( 'show' );\n\t\t\tif ( self.migration.$proVersion.length ) {\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tself.migration.$proVersion.find( '.iframe' ).append( proVersionIFrame );\n\t\t\t\t}, 500 );\n\t\t\t}\n\t\t}, 0 );\n\n\t\tthis.migration.currentStageNum = 0;\n\n\t\tthis.migration.$proVersion.on( 'click', '.close-pro-version', function() {\n\t\t\tself.migration.$proVersion.find( 'iframe' ).remove();\n\t\t\tself.migration.$proVersion.addClass( 'hide remove' );\n\t\t\tsetTimeout( function() {\n\t\t\t\tself.migration.$proVersion.remove();\n\t\t\t}, 500 );\n\t\t} );\n\n\t\tthis.migration.model.on( 'migrationComplete', function() {\n\t\t\tself.utils.updateProgTableVisibilitySetting();\n\t\t\tself.utils.updatePauseBeforeFinalizeSetting();\n\t\t\tself.migration.pauseTimer();\n\t\t} );\n\n\t\t$( window ).on( 'resize', _.debounce( this.migration.fixProgressStageWidthForScrollBar.bind( this.migration ), 100 ) );\n\t\tthis.migration.model.on( 'change:activeStage', this.migration.fixProgressStageWidthForScrollBar.bind( this.migration ) );\n\n\t\treturn this.migration;\n\t},\n\tutils: require( './MigrationProgress-utils' )\n};\n\nmodule.exports = MigrationProgressController;\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/modules/MigrationProgress-controller.js","(function( $, wpmdb ) {\n\twpmdb.functions.update_multiselect = function( element, subsites, selected_subsite_ids ) {\n\t\t$( element ).empty();\n\n\t\tif ( 0 < Object.keys( subsites ).length ) {\n\t\t\tconst table_prefix = $.wpmdb.apply_filters( 'wpmdb_get_table_prefix', null, null );\n\t\t\tvar site_selected = false;\n\t\t\t$.each( subsites, function( blog_id, subsite_path ) {\n\t\t\t\tif ( $.wpmdb.apply_filters( 'wpmdb_exclude_subsite', false, blog_id ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar selected = ' ';\n\t\t\t\tif ( ( undefined === selected_subsite_ids || null === selected_subsite_ids || 0 === selected_subsite_ids.length ) ||\n\t\t\t\t ( undefined !== selected_subsite_ids && null !== selected_subsite_ids && 0 < selected_subsite_ids.length && -1 !== $.inArray( blog_id, selected_subsite_ids ) )\n\t\t\t\t) {\n\t\t\t\t\tselected = ' selected=\"selected\" ';\n\t\t\t\t\tsite_selected = true;\n\t\t\t\t}\n\t\t\t\tsubsite_path += ' (' + table_prefix + ( ( '1' !== blog_id ) ? blog_id + '_' : '' ) + ')';\n\t\t\t\t$( element ).append( '<option' + selected + 'value=\"' + blog_id + '\">' + subsite_path + '</option>' );\n\t\t\t} );\n\n\t\t\t// If nothing selected (maybe IDs differ between saved profile and current config) revert to default of all selected.\n\t\t\tif ( false === site_selected ) {\n\t\t\t\twpmdb.functions.update_multiselect( element, subsites, [] );\n\t\t\t}\n\t\t}\n\t};\n})( jQuery, wpmdb );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/multisite.js","(function( $ ) {\n\n\tvar doing_check_licence = false;\n\tvar fade_duration = 650;\n\n\tvar admin_url = ajaxurl.replace( '/admin-ajax.php', '' );\n\tvar spinner_url = admin_url + '/images/spinner';\n\tvar spinner;\n\tif ( 2 < window.devicePixelRatio ) {\n\t\tspinner_url += '-2x';\n\t}\n\tspinner_url += '.gif';\n\tspinner = $( '<img src=\"' + spinner_url + '\" alt=\"\" class=\"check-licence-spinner\" />' );\n\n\t$( document ).ready( function() {\n\n\t\t$( 'body' ).on( 'click', '.check-my-licence-again', function( e ) {\n\t\t\te.preventDefault();\n\t\t\t$( this ).blur();\n\n\t\t\tif ( doing_check_licence ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tdoing_check_licence = true;\n\n\t\t\t$( this ).hide();\n\t\t\tspinner.insertAfter( this );\n\n\t\t\tvar check_again_link = ' <a class=\"check-my-licence-again\" href=\"#\">' + wpmdb_update_strings.check_license_again + '</a>';\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_check_licence',\n\t\t\t\t\tnonce: wpmdb_nonces.check_licence,\n\t\t\t\t\tcontext: 'update'\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\tdoing_check_licence = false;\n\t\t\t\t\t$( '.wpmdb-licence-error-notice' ).fadeOut( fade_duration, function() {\n\t\t\t\t\t\t$( '.wpmdb-licence-error-notice' ).empty()\n\t\t\t\t\t\t\t.html( wpmdb_update_strings.license_check_problem + check_again_link )\n\t\t\t\t\t\t\t.fadeIn( fade_duration );\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tdoing_check_licence = false;\n\t\t\t\t\tif ( 'undefined' !== typeof data.errors ) {\n\t\t\t\t\t\tvar msg = '';\n\t\t\t\t\t\tfor ( var key in data.errors ) {\n\t\t\t\t\t\t\tmsg += data.errors[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$( '.wpmdb-licence-error-notice' ).fadeOut( fade_duration, function() {\n\t\t\t\t\t\t\t$( '.check-licence-spinner' ).remove();\n\t\t\t\t\t\t\t$( '.wpmdb-licence-error-notice' ).empty()\n\t\t\t\t\t\t\t\t.html( msg )\n\t\t\t\t\t\t\t\t.fadeIn( fade_duration );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Success\n\t\t\t\t\t\t// Fade out, empty wpmdb custom error content, swap back in the original wordpress upgrade message, fade in\n\t\t\t\t\t\t$( '.wpmdbpro-custom-visible' ).fadeOut( fade_duration, function() {\n\t\t\t\t\t\t\t$( '.check-licence-spinner' ).remove();\n\t\t\t\t\t\t\t$( '.wpmdbpro-custom-visible' ).empty()\n\t\t\t\t\t\t\t\t.html( $( '.wpmdb-original-update-row' ).html() )\n\t\t\t\t\t\t\t\t.fadeIn( fade_duration );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t$( '.wpmdbpro-custom' ).prev().addClass( 'wpmdbpro-has-message' );\n\n\t} );\n})( jQuery );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/plugin-update.js","import WPMDBGlobals from './helpers/wpmdbGlobals';\nimport {jQueryAjaxError} from 'src/wp-migrate-db-pro/asset/src/js/helpers/utils';\nconst globals = new WPMDBGlobals();\nconst wpmdb = window.wpmdb || {};\n\n(function( $, wpmdb ) {\n\n\twpmdb.migration_progress_controller = require( './modules/MigrationProgress-controller' );\n\twpmdb.current_migration = null;\n\twpmdb.migration_selection = wpmdb.functions.wpmdb_migration_type();\n\n\twindow.onbeforeunload = function( e ) {\n\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() && !$( '.step-two' ).is( ':visible' ) ) {\n\t\t\twpmdb.functions.remove_localStorage_form_data();\n\t\t}\n\n\t\tif ( globals.currently_migrating ) {\n\t\t\te = e || window.event;\n\n\t\t\t// For IE and Firefox prior to version 4\n\t\t\tif ( e ) {\n\t\t\t\te.returnValue = wpmdb_strings.sure;\n\t\t\t}\n\n\t\t\t// For Safari\n\t\t\treturn wpmdb_strings.sure;\n\t\t}\n\t};\n\n\twpmdb.functions.exclude_post_types_warning = function() {\n\t\tvar excluded_post_types = $( '#select-post-types' ).val();\n\t\tvar excluded_post_types_text = '';\n\t\tvar $exclude_post_types_warning = $( '.exclude-post-types-warning' );\n\n\t\tif ( excluded_post_types ) {\n\t\t\texcluded_post_types_text = '<code>' + excluded_post_types.join( '</code>, <code>' ) + '</code>';\n\t\t\t$( '.excluded-post-types' ).html( excluded_post_types_text );\n\n\t\t\tif ( '0' === $exclude_post_types_warning.css( 'opacity' ) ) {\n\t\t\t\t$exclude_post_types_warning\n\t\t\t\t\t.css( { opacity: 0 } )\n\t\t\t\t\t.slideDown( 200 )\n\t\t\t\t\t.animate( { opacity: 1 } );\n\t\t\t}\n\t\t} else {\n\t\t\t$exclude_post_types_warning\n\t\t\t\t.css( { opacity: 0 } )\n\t\t\t\t.slideUp( 200 )\n\t\t\t\t.animate( { opacity: 0 } );\n\t\t}\n\t};\n\n\t//Main method that shows migration progress in the UI\n\twpmdb.functions.migrate_table_recursive = function( current_row, primary_keys, iterator ) {\n\t\tlet i = iterator || 0;\n\n\t\tif ( i >= globals.tables_to_migrate.length ) {\n\n\t\t\tif ( 'upload' === globals.stage && wpmdb.current_migration.model.getStageItems( 'find_replace' ).length ) {\n\t\t\t\tglobals.stage = 'find_replace';\n\t\t\t\tglobals.tables_to_migrate = wpmdb.current_migration.model.getStageItems( 'find_replace', 'name' );\n\t\t\t\tglobals.tables_to_migrate = globals.tables_to_migrate.map( function( table ) {\n\t\t\t\t\treturn '_mig_' + table;\n\t\t\t\t} );\n\t\t\t\ti = 0;\n\t\t\t} else if ( 'backup' === globals.stage ) {\n\n\t\t\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\t\t\tglobals.stage = 'migrate';\n\t\t\t\t} else if ( 'import' === globals.migration_intent ) {\n\t\t\t\t\tglobals.stage = 'upload';\n\t\t\t\t} else {\n\t\t\t\t\tglobals.stage = globals.migration_intent;\n\t\t\t\t}\n\n\t\t\t\twpmdb.current_migration.model.setActiveStage( globals.stage );\n\n\t\t\t\tif ( 'find_replace' !== globals.stage && 'migrate' !== globals.stage ) {\n\t\t\t\t\twpmdb.functions.wpmdb_call_next_hook();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ti = 0;\n\n\t\t\t\t// should get from model\n\t\t\t\tglobals.tables_to_migrate = wpmdb.functions.get_tables_to_migrate( null, null );\n\n\t\t\t} else {\n\t\t\t\t$( '.progress-label' ).removeClass( 'label-visible' );\n\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_before_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.wpmdb_flush );\n\t\t\t\twpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_after_migration_complete_hooks', wpmdb.common.hooks );\n\t\t\t\twpmdb.common.hooks.push( wpmdb.functions.migration_complete_events );\n\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tvar last_table = 0;\n\t\tif ( i === ( globals.tables_to_migrate.length - 1 ) ) {\n\t\t\tlast_table = 1;\n\t\t}\n\n\t\tvar gzip = 0;\n\t\tif ( -1 !== $.inArray( globals.migration_intent, [\n\t\t\t\t'push',\n\t\t\t\t'pull'\n\t\t\t] ) && 1 === parseInt( wpmdb.common.connection_data.gzip ) ) {\n\t\t\tgzip = 1;\n\t\t}\n\n\t\tvar request_data = {\n\t\t\taction: 'wpmdb_migrate_table',\n\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\ttable: globals.tables_to_migrate[ i ],\n\t\t\tstage: globals.stage,\n\t\t\tcurrent_row: current_row,\n\t\t\tlast_table: last_table,\n\t\t\tprimary_keys: primary_keys,\n\t\t\tgzip: gzip,\n\t\t\tnonce: wpmdb_data.nonces.migrate_table\n\t\t};\n\n\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\trequest_data.bottleneck = wpmdb.common.connection_data.bottleneck;\n\t\t\trequest_data.prefix = wpmdb.common.connection_data.prefix;\n\t\t}\n\n\t\tif ( wpmdb.common.connection_data && wpmdb.common.connection_data.path_current_site && wpmdb.common.connection_data.domain ) {\n\t\t\trequest_data.path_current_site = wpmdb.common.connection_data.path_current_site;\n\t\t\trequest_data.domain_current_site = wpmdb.common.connection_data.domain;\n\t\t}\n\n\t\tglobals.doing_ajax = true;\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tcache: false,\n\t\t\ttimeout: 0,\n\t\t\tdata: request_data,\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\tvar progress_text = wpmdb_strings.table_process_problem + ' ' + globals.tables_to_migrate[ i ] + '<br /><br />' + wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText + '<br /><br />' + wpmdb_strings.response + ':<br />' + jqXHR.responseText;\n\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, progress_text, 'error' );\n\n\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\tconsole.log( jqXHR );\n\t\t\t\tconsole.log( textStatus );\n\t\t\t\tconsole.log( errorThrown );\n\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t},\n\t\t\tsuccess: function( data ) {\n\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\tdata = $.trim( data );\n\t\t\t\tvar row_information = wpmdb.functions.wpmdb_parse_json( data );\n\t\t\t\tvar error_text = '';\n\n\t\t\t\tif ( false === row_information || null === row_information ) {\n\n\t\t\t\t\t// should update model\n\t\t\t\t\tif ( '' === data || null === data ) {\n\t\t\t\t\t\terror_text = wpmdb_strings.table_process_problem_empty_response + ' ' + globals.tables_to_migrate[ i ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror_text = globals.get_ajax_errors( data, null, null );\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, error_text, 'error' );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( 'undefined' !== typeof row_information.wpmdb_error && 1 === row_information.wpmdb_error ) {\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, row_information.body, 'error' );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar item_name = globals.tables_to_migrate[ i ];\n\t\t\t\tif ( 'import' === globals.migration_intent && 'find_replace' === globals.stage ) {\n\t\t\t\t\titem_name = item_name.replace( wpmdb_data.this_temp_prefix, '' );\n\t\t\t\t}\n\n\t\t\t\t//successful iteration\n\t\t\t\twpmdb.current_migration.setText();\n\t\t\t\twpmdb.current_migration.model.getStageModel( globals.stage ).setItemRowsTransferred( item_name, row_information.current_row );\n\n\t\t\t\t// We need the returned file name for delivery or display to the user.\n\t\t\t\tif ( 1 === last_table && 'savefile' === globals.migration_intent ) {\n\t\t\t\t\tif ( 'undefined' !== typeof row_information.dump_filename ) {\n\t\t\t\t\t\tglobals.dump_filename = row_information.dump_filename;\n\t\t\t\t\t}\n\t\t\t\t\tif ( 'undefined' !== typeof row_information.dump_path ) {\n\t\t\t\t\t\tglobals.dump_path = row_information.dump_path;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( -1 === parseInt( row_information.current_row ) ) {\n\t\t\t\t\ti++;\n\t\t\t\t\trow_information.current_row = '';\n\t\t\t\t\trow_information.primary_keys = '';\n\t\t\t\t}\n\n\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\tfn: wpmdb.functions.migrate_table_recursive,\n\t\t\t\t\targs: [ row_information.current_row, row_information.primary_keys, i ]\n\t\t\t\t};\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\t\t} );\n\n\t};\n\n\twpmdb.functions.migration_complete_events = function() {\n\t\tif ( false === wpmdb.common.migration_error ) {\n\t\t\tif ( '' === wpmdb.common.non_fatal_errors ) {\n\t\t\t\tif ( 'savefile' !== globals.migration_intent && true === $( '#save_computer' ).is( ':checked' ) ) {\n\t\t\t\t\twpmdb.current_migration.setText();\n\t\t\t\t}\n\n\t\t\t\tglobals.completed_msg = globals.completed_msg + '&nbsp;<div class=\"dashicons dashicons-yes\"></div>';\n\n\t\t\t\tif ( true === globals.migration_cancelled ) {\n\t\t\t\t\tvar cancel_success = wpmdb_strings.migration_cancelled_success;\n\n\t\t\t\t\tif ( 'find_replace' === globals.migration_intent ) {\n\t\t\t\t\t\tcancel_success = wpmdb_strings.find_replace_cancelled_success;\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.current_migration.setState( globals.completed_msg, cancel_success, 'cancelled' );\n\t\t\t\t} else {\n\t\t\t\t\twpmdb.current_migration.setState( globals.completed_msg, '', 'complete' );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.completed_with_some_errors, wpmdb.common.non_fatal_errors, 'error' );\n\t\t\t}\n\t\t}\n\n\t\t$( '.migration-controls' ).addClass( 'hidden' );\n\n\t\t// reset migration variables so consecutive migrations work correctly\n\t\twpmdb.common.hooks = [];\n\t\twpmdb.common.call_stack = [];\n\t\twpmdb.common.migration_error = false;\n\t\tglobals.currently_migrating = false;\n\t\tglobals.migration_completed = true;\n\t\tglobals.migration_paused = false;\n\t\tglobals.migration_cancelled = false;\n\t\tglobals.doing_ajax = false;\n\t\twpmdb.common.non_fatal_errors = '';\n\t\tglobals.tables_to_migrate = [];\n\n\t\t$( '.progress-label' ).remove();\n\t\t$( '.migration-progress-ajax-spinner' ).remove();\n\t\t$( '.close-progress-content' ).show();\n\t\t$( '#overlay' ).css( 'cursor', 'pointer' );\n\t\twpmdb.current_migration.model.setMigrationComplete();\n\t};\n\n\twpmdb.functions.migration_complete = function() {\n\n\t\t$( '.migration-controls' ).addClass( 'hidden' );\n\n\t\tif ( 'savefile' === globals.migration_intent ) {\n\t\t\tglobals.currently_migrating = false;\n\t\t\tvar migrate_complete_text = wpmdb_strings.migration_complete;\n\t\t\tif ( $( '#save_computer' ).is( ':checked' ) ) {\n\t\t\t\tvar url = wpmdb_data.this_download_url + encodeURIComponent( globals.dump_filename );\n\t\t\t\tif ( $( '#gzip_file' ).is( ':checked' ) ) {\n\t\t\t\t\turl += '&gzip=1';\n\t\t\t\t}\n\t\t\t\t// Event to hook on to when Migration is completely finished\n\t\t\t\t$('body').trigger( 'wpmdb_done' );\n\t\t\t\twindow.location = url;\n\t\t\t} else {\n\t\t\t\t// Event to hook on to when Migration is completely finished\n\t\t\t\t$('body').trigger( 'wpmdb_done' );\n\t\t\t\tmigrate_complete_text = wpmdb_strings.completed_dump_located_at + ' ' + globals.dump_path;\n\t\t\t}\n\n\t\t\tif ( false === wpmdb.common.migration_error ) {\n\n\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\twpmdb.current_migration.setState( globals.completed_msg, migrate_complete_text, 'complete' );\n\n\t\t\t}\n\n\t\t} else { // rename temp tables, delete old tables\n\n\t\t\twpmdb.current_migration.setState( null, wpmdb_strings.finalizing_migration, 'finalizing' );\n\n\t\t\tvar request_data = {\n\t\t\t\taction: 'wpmdb_finalize_migration',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\ttables: globals.tables_to_migrate.join( ',' ),\n\t\t\t\tnonce: wpmdb_data.nonces.finalize_migration\n\t\t\t};\n\n\t\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\t\trequest_data.prefix = wpmdb.common.connection_data.prefix;\n\t\t\t}\n\n\t\t\tglobals.doing_ajax = true;\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: request_data,\n\t\t\t\terror: function( jqXHR ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tlet responseText = wpmdb_strings.finalize_tables_problem;\n\t\t\t\t\tjQueryAjaxError( responseText, jqXHR );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tif ( 'undefined' !== typeof data && 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data.body, 'error' );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\n\twpmdb.functions.wpmdb_flush = function() {\n\t\tif ( 'savefile' !== globals.migration_intent ) {\n\t\t\twpmdb.current_migration.setText( wpmdb_strings.flushing );\n\t\t\tglobals.doing_ajax = true;\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_flush',\n\t\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\t\tnonce: wpmdb_data.nonces.flush\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, wpmdb_strings.flush_problem, 'error' );\n\n\t\t\t\t\talert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tif ( '1' !== $.trim( data ) ) {\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data, 'error' );\n\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Event to hook on to when Migration is completely finished\n\t\t\t\t\t$('body').trigger( 'wpmdb_done' );\n\t\t\t\t\twpmdb.common.next_step_in_migration = { fn: wpmdb.functions.wpmdb_call_next_hook };\n\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\n\twpmdb.functions.execute_next_step = function( instance = null, run_fn = true ) {\n\n\t\t// if delay is set, set a timeout for delay to recall this function, then return\n\t\tif ( 0 < globals.delay_between_requests && false === globals.flag_skip_delay ) {\n\t\t\tsetTimeout( function() {\n\t\t\t\tglobals.flag_skip_delay = true;\n\t\t\t\twpmdb.functions.execute_next_step( instance );\n\t\t\t}, globals.delay_between_requests );\n\t\t\treturn;\n\t\t} else {\n\t\t\tglobals.flag_skip_delay = false;\n\t\t}\n\n\t\tif ( true === globals.migration_paused ) {\n\t\t\t$( '.migration-progress-ajax-spinner' ).hide();\n\n\t\t\t// Pause the timer\n\t\t\twpmdb.current_migration.pauseTimer();\n\n\t\t\tvar pause_text = '';\n\t\t\tif ( true === globals.is_auto_pause_before_finalize ) {\n\t\t\t\tpause_text = wpmdb_strings.paused_before_finalize;\n\t\t\t\tglobals.is_auto_pause_before_finalize = false;\n\n\t\t\t\tif ( 'find_replace' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\tpause_text = wpmdb_strings.find_replace_paused_before_finalize;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_text = wpmdb_strings.paused;\n\t\t\t}\n\n\t\t\twpmdb.current_migration.setState( null, pause_text, 'paused' );\n\n\t\t\t// Re-bind Pause/Resume button to Resume when we are finally Paused\n\t\t\t$( 'body' ).on( 'click', '.pause-resume', function( event ) {\n\t\t\t\tglobals.set_pause_resume_button( event, instance );\n\t\t\t} );\n\t\t\t$( 'body' ).on( 'click', '.cancel', function( event ) {\n\t\t\t\tglobals.cancel_migration( event );\n\t\t\t} );\n\t\t\t$( '.pause-resume' ).html( wpmdb_strings.resume );\n\n\t\t} else if ( true === globals.migration_cancelled ) {\n\t\t\tglobals.migration_intent = wpmdb.functions.wpmdb_migration_type();\n\n\t\t\tvar progress_msg;\n\n\t\t\tif ( 'savefile' === globals.migration_intent ) {\n\t\t\t\tprogress_msg = wpmdb_strings.removing_local_sql;\n\t\t\t} else if ( 'pull' === globals.migration_intent ) {\n\t\t\t\tif ( 'backup' === globals.stage ) {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_local_backup;\n\t\t\t\t} else {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_local_temp_tables;\n\t\t\t\t}\n\t\t\t} else if ( 'push' === globals.migration_intent ) {\n\t\t\t\tif ( 'backup' === globals.stage ) {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_remote_sql;\n\t\t\t\t} else {\n\t\t\t\t\tprogress_msg = wpmdb_strings.removing_remote_temp_tables;\n\t\t\t\t}\n\t\t\t}\n\t\t\twpmdb.current_migration.setText( progress_msg );\n\n\t\t\tvar request_data = {\n\t\t\t\taction: 'wpmdb_cancel_migration',\n\t\t\t\tmigration_state_id: wpmdb.migration_state_id,\n\t\t\t\tnonce: wpmdb_data.nonces.cancel_migration\n\t\t\t};\n\n\t\t\tglobals.doing_ajax = true;\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: request_data,\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_cancellation_failed, wpmdb_strings.manually_remove_temp_files + '<br /><br />' + wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText + '<br /><br />' + wpmdb_strings.response + ':<br />' + jqXHR.responseText, 'error' );\n\t\t\t\t\tconsole.log( jqXHR );\n\t\t\t\t\tconsole.log( textStatus );\n\t\t\t\t\tconsole.log( errorThrown );\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tdata = $.trim( data );\n\n\t\t\t\t\tif ( ( 'push' === globals.migration_intent && '1' !== data ) || ( 'push' !== globals.migration_intent && '' !== data ) ) {\n\n\t\t\t\t\t\tif ( 'undefined' !== typeof data && 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\t\tdata = data.wpmdb_error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_cancellation_failed, data, 'error' );\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tglobals.completed_msg = wpmdb_strings.migration_cancelled;\n\n\t\t\t\t\tif ( 'find_replace' === globals.migration_intent ) {\n\t\t\t\t\t\tglobals.completed_msg = wpmdb_strings.find_replace_cancelled;\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\twpmdb.current_migration.setStatus( 'cancelled' );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif(run_fn){\n\t\t\t\twpmdb.common.next_step_in_migration.fn.apply( instance, wpmdb.common.next_step_in_migration.args );\n\t\t\t}\n\n\t\t}\n\t};\n\n\twpmdb.functions.maybe_show_prefix_notice = ( prefix ) => {\n\t\tvar $prefix_notice = $( '.prefix-notice' );\n\n\t\t$prefix_notice.hide();\n\n\t\tif ( prefix !== wpmdb_data.this_prefix ) {\n\t\t\t$( '.remote-prefix' ).html( prefix );\n\t\t\tglobals.show_prefix_notice = true;\n\t\t\t$prefix_notice.show();\n\t\t}\n\t};\n\n\twpmdb.functions.maybe_show_mst_warning = function( data ) {\n\t\tconst migration_type = wpmdb.functions.wpmdb_migration_type();\n\t\tlet show_mst_warning = false;\n\n\t\tif ( -1 !== $.inArray( migration_type, [ 'push', 'pull' ] ) && 'undefined' !== typeof data.site_details ) {\n\t\t\tif ( wpmdb_data.site_details.is_multisite !== data.site_details.is_multisite ) {\n\t\t\t\tif ( 'undefined' === typeof wpmdb.mst || 'undefined' === typeof data.mst_available || '1' !== data.mst_available ) {\n\t\t\t\t\tshow_mst_warning = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( 'import' === migration_type ) {\n\t\t\tif ( 'undefined' !== typeof data.multisite && 'undefined' !== typeof data.subsite_export ) {\n\t\t\t\tif (\n\t\t\t\t\t( 'false' === wpmdb_data.site_details.is_multisite && 'true' === data.multisite && 'true' !== data.subsite_export ) ||\n\t\t\t\t\t( 'true' === wpmdb_data.site_details.is_multisite && 'false' === data.multisite )\n\t\t\t\t) {\n\t\t\t\t\tshow_mst_warning = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tshow_mst_warning = $.wpmdb.apply_filters( 'wpmdb_show_mst_warning', show_mst_warning );\n\n\t\tif ( show_mst_warning ) {\n\t\t\t$( '.mst-required' ).show();\n\t\t}\n\n\t\treturn show_mst_warning;\n\n\t};\n\n\twpmdb.functions.maybe_show_select_table_notice = function() {\n\n\t\t// check that they've selected some tables to migrate\n\t\tif ( $( '#migrate-selected' ).is( ':checked' ) && null === $( '#select-tables' ).val() ) {\n\t\t\tif ( 'import' !== wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\talert( wpmdb_strings.please_select_one_table );\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif ( $( '#import-find-replace' ).is( ':checked' ) && $( '#select-tables' ).is( ':visible' ) ) {\n\t\t\t\t\talert( wpmdb_strings.please_select_one_table_import );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check that they've selected some tables to backup\n\t\tif ( 'savefile' !== wpmdb.functions.wpmdb_migration_type() && $( '#backup-manual-select' ).is( ':checked' ) && null === $( '#select-backup' ).val() ) {\n\t\t\talert( wpmdb_strings.please_select_one_table_backup );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\twpmdb.functions.remove_protocol = function( url ) {\n\t\treturn url.replace( /^https?:/i, '' );\n\t};\n\n\twpmdb.functions.create_table_select = function( tables, table_sizes_hr, selected_tables ) {\n\t\tvar $table_select = document.createElement( 'select' );\n\t\t$( $table_select ).attr( {\n\t\t\tmultiple: 'multiple',\n\t\t\tname: 'select_tables[]',\n\t\t\tid: 'select-tables',\n\t\t\tclass: 'multiselect'\n\t\t} );\n\n\t\tif ( 0 < tables.length ) {\n\t\t\t$.each( tables, function( index, table ) {\n\t\t\t\tif ( $.wpmdb.apply_filters( 'wpmdb_exclude_table', false, table ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar selected = ' ';\n\t\t\t\tif ( undefined !== selected_tables && null !== selected_tables && 0 < selected_tables.length && -1 !== $.inArray( table, selected_tables ) ) {\n\t\t\t\t\tselected = ' selected=\"selected\" ';\n\t\t\t\t}\n\n\t\t\t\tvar size = '';\n\t\t\t\tif ( 0 !== table_sizes_hr.length ) {\n\t\t\t\t\tsize = ' (' + table_sizes_hr[ table ] + ')';\n\t\t\t\t}\n\n\t\t\t\t$( $table_select ).append( '<option' + selected + 'value=\"' + table + '\">' + table + size + '</option>' );\n\t\t\t} );\n\t\t}\n\n\t\treturn $table_select;\n\t};\n\n\t/**\n\t * Returns tables selected for migration.\n\t *\n\t * @returns {array}\n\t *\n\t * Also handler for wpmdb_get_tables_to_migrate filter, disregards input values as it is the primary source.\n\t */\n\twpmdb.functions.get_tables_to_migrate = function() {\n\t\tvar tables = [];\n\t\tvar mig_type = wpmdb.functions.wpmdb_migration_type();\n\t\tvar table_intent = $( 'input[name=table_migrate_option]:checked' ).val();\n\n\t\t// Grab tables as per what the user has selected from the multiselect box or all prefixed tables.\n\t\tif ( 'migrate_select' === table_intent ) {\n\t\t\ttables = $( '#select-tables' ).val();\n\t\t} else {\n\t\t\tif ( 'pull' !== mig_type && 'undefined' !== typeof wpmdb_data.this_prefixed_tables ) {\n\t\t\t\ttables = wpmdb_data.this_prefixed_tables;\n\t\t\t} else if ( 'pull' === mig_type && 'undefined' !== typeof wpmdb.common.connection_data && 'undefined' !== typeof wpmdb.common.connection_data.prefixed_tables ) {\n\t\t\t\ttables = wpmdb.common.connection_data.prefixed_tables;\n\t\t\t}\n\t\t}\n\n\t\treturn tables;\n\t};\n\n\twpmdb.functions.update_migrate_button_text = function() {\n\t\tvar migration_intent = wpmdb.functions.wpmdb_migration_type();\n\t\tvar save_string = ( $( '#save-migration-profile' ).is( ':checked' ) ) ? '_save' : '';\n\t\tvar migrate_string = 'migrate_button_' + ( ( 'savefile' === migration_intent ) ? 'export' : migration_intent ) + save_string;\n\t\t$( '.migrate-db .button-primary' ).val( wpmdb_strings[ migrate_string ] );\n\t};\n\n\t// fired when the connection info box changes (e.g. gets pasted into)\n\twpmdb.functions.connection_box_changed = function() {\n\t\tvar $this = $( '.pull-push-connection-info' );\n\n\t\tif ( -1 === $.inArray( wpmdb.functions.wpmdb_migration_type(), [ 'push', 'pull' ] ) ||\n\t\t ( globals.doing_ajax || $( $this ).hasClass( 'temp-disabled' ) ) && false === wpmdb.force_reconnect ) {\n\t\t\treturn;\n\t\t}\n\n\t\twpmdb.force_reconnect = false;\n\t\tvar data = $( '.pull-push-connection-info' ).val();\n\n\t\tvar connection_info = $.trim( data ).split( '\\n' );\n\t\tvar error = false;\n\t\tvar error_message = '';\n\n\t\tif ( '' === connection_info ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_missing;\n\t\t}\n\n\t\t// attempt to format the connection info from a single line\n\t\tif ( 1 === connection_info.length && !error ) {\n\t\t\tvar connection_words = $.trim( data ).split( ' ' );\n\t\t\tif ( 2 === connection_words.length ) {\n\t\t\t\tconnection_info = connection_words;\n\t\t\t}\n\t\t}\n\n\t\tif ( 2 !== connection_info.length && !error ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_incorrect;\n\t\t}\n\n\t\tif ( !error && !globals.validate_url( connection_info[ 0 ] ) ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_url_invalid;\n\t\t}\n\n\t\tvar key_length = 0;\n\n\t\tif ( 'undefined' !== typeof connection_info[ 1 ] ) {\n\t\t\tkey_length = connection_info[ 1 ].length;\n\t\t}\n\n\t\tif ( !error && 32 !== key_length && 40 !== key_length ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_key_invalid;\n\t\t}\n\n\t\tif ( !error && connection_info[ 0 ] === wpmdb_data.connection_info[ 0 ] ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_local_url;\n\t\t}\n\n\t\tif ( !error && connection_info[ 1 ] === wpmdb_data.connection_info[ 1 ] ) {\n\t\t\terror = true;\n\t\t\terror_message = wpmdb_strings.connection_info_local_key;\n\t\t}\n\t\tif ( error ) {\n\t\t\t$( '.connection-status' ).html( error_message );\n\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\treturn;\n\t\t}\n\n\t\tvar new_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\n\t\t// If connection info is a single line\n\t\tif ( 1 === $.trim( data ).split( '\\n' ).length ) {\n\n\t\t\t// Repopulate the input with the info on two lines\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t}\n\n\t\tif ( false === wpmdb_data.openssl_available ) {\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( 'https://', 'http://' );\n\t\t\tnew_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t}\n\n\t\tglobals.show_prefix_notice = false;\n\t\tglobals.doing_ajax = true;\n\t\tglobals.disable_export_type_controls();\n\n\t\tif ( $( '.basic-access-auth-wrapper' ).is( ':visible' ) ) {\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( /\\/\\/(.*)@/, '//' );\n\t\t\tconnection_info[ 0 ] = connection_info[ 0 ].replace( '//', '//' + encodeURIComponent( $.trim( $( '.auth-username' ).val() ) ) + ':' + encodeURIComponent( $.trim( $( '.auth-password' ).val() ) ) + '@' );\n\t\t\tnew_connection_info_contents = connection_info[ 0 ] + '\\n' + connection_info[ 1 ];\n\t\t\t$( '.pull-push-connection-info' ).val( new_connection_info_contents );\n\t\t\t$( '.basic-access-auth-wrapper' ).hide();\n\t\t}\n\n\t\t$( '.step-two' ).hide();\n\t\t$( '.ssl-notice' ).hide();\n\t\t$( '.prefix-notice' ).hide();\n\t\t$( '.connection-status' ).show();\n\n\t\t$( '.connection-status' ).html( wpmdb_strings.establishing_remote_connection );\n\t\t$( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );\n\t\t$( '.connection-status' ).append( globals.ajax_spinner );\n\n\t\tvar intent = wpmdb.functions.wpmdb_migration_type();\n\n\t\tglobals.profile_name_edited = false;\n\n\t\treturn $.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'json',\n\t\t\tcache: false,\n\t\t\tdata: {\n\t\t\t\taction: 'wpmdb_verify_connection_to_remote_site',\n\t\t\t\turl: connection_info[ 0 ],\n\t\t\t\tkey: connection_info[ 1 ],\n\t\t\t\tintent: intent,\n\t\t\t\tnonce: wpmdb_data.nonces.verify_connection_to_remote_site\n\t\t\t},\n\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t$( '.connection-status' ).html( globals.get_ajax_errors( jqXHR.responseText, '(#100)', jqXHR ) );\n\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\tglobals.enable_export_type_controls();\n\t\t\t},\n\t\t\tsuccess: function( data ) {\n\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\tglobals.enable_export_type_controls();\n\n\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t$( '.connection-status' ).html( data.body );\n\t\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\n\t\t\t\t\tif ( data.body.indexOf( '401 Unauthorized' ) > -1 ) {\n\t\t\t\t\t\t$( '.basic-access-auth-wrapper' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$( '.pull-push-connection-info' ).hasClass( 'temp-disabled' ) && !$( '.connect-button' ).is( ':visible' ) ) {\n\t\t\t\t\t\t$( '.pull-push-connection-info' ).removeAttr( 'readonly' );\n\t\t\t\t\t\t$( '.connect-button' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( true === wpmdb.functions.maybe_show_mst_warning( data ) ) {\n\t\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tglobals.maybe_show_ssl_warning( connection_info[ 0 ], connection_info[ 1 ], data.scheme );\n\n\t\t\t\tvar profile_name = globals.get_domain_name( data.url );\n\t\t\t\t$( '.create-new-profile' ).val( profile_name );\n\n\t\t\t\t$( '.pull-push-connection-info' ).addClass( 'temp-disabled' );\n\t\t\t\t$( '.pull-push-connection-info' ).attr( 'readonly', 'readonly' );\n\t\t\t\t$( '.connect-button' ).hide();\n\n\t\t\t\t$( '.connection-status' ).hide();\n\t\t\t\t$( '.step-two' ).show();\n\n\t\t\t\twpmdb.functions.maybe_show_prefix_notice( data.prefix );\n\n\t\t\t\tglobals.connection_established = true;\n\t\t\t\tglobals.set_connection_data( data );\n\t\t\t\tglobals.move_connection_info_box();\n\t\t\t\tglobals.change_replace_values();\n\n\t\t\t\tglobals.maybe_show_mixed_cased_table_name_warning();\n\n\t\t\t\tglobals.refresh_table_selects(null, null, this);\n\n\t\t\t\tglobals.$push_select_backup = $( globals.$pull_select ).clone();\n\t\t\t\t$( globals.$push_select_backup ).attr( {\n\t\t\t\t\tname: 'select_backup[]',\n\t\t\t\t\tid: 'select-backup'\n\t\t\t\t} );\n\n\t\t\t\tvar $post_type_select = document.createElement( 'select' );\n\t\t\t\t$( $post_type_select ).attr( {\n\t\t\t\t\tmultiple: 'multiple',\n\t\t\t\t\tname: 'select_post_types[]',\n\t\t\t\t\tid: 'select-post-types',\n\t\t\t\t\tclass: 'multiselect'\n\t\t\t\t} );\n\n\t\t\t\t$.each( wpmdb.common.connection_data.post_types, function( index, value ) {\n\t\t\t\t\t$( $post_type_select ).append( '<option value=\"' + value + '\">' + value + '</option>' );\n\t\t\t\t} );\n\n\t\t\t\tglobals.$pull_post_type_select = $post_type_select;\n\n\t\t\t\t$( '#new-path-missing-warning, #new-url-missing-warning' ).hide();\n\n\t\t\t\tif ( 'pull' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\t$( '#new-url' ).val( wpmdb.functions.remove_protocol( wpmdb_data.this_url ) );\n\t\t\t\t\t$( '#new-path' ).val( wpmdb_data.this_path );\n\t\t\t\t\tif ( 'true' === wpmdb_data.is_multisite ) {\n\t\t\t\t\t\t$( '#new-domain' ).val( wpmdb_data.this_domain );\n\t\t\t\t\t\t$( '.replace-row.pin .old-replace-col input[type=\"text\"]' ).val( wpmdb.functions.remove_protocol( data.url ) );\n\t\t\t\t\t}\n\t\t\t\t\t$( '#old-url' ).val( wpmdb.functions.remove_protocol( data.url ) );\n\t\t\t\t\t$( '#old-path' ).val( data.path );\n\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_pull_table_select' );\n\t\t\t\t\t$( '#select-post-types' ).remove();\n\t\t\t\t\t$( '.exclude-post-types-warning' ).after( globals.$pull_post_type_select );\n\t\t\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t\t\t\t$( '.table-prefix' ).html( data.prefix );\n\t\t\t\t\t$( '.backup-table-prefix' ).html( wpmdb_data.site_details.prefix );\n\t\t\t\t\t$( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#new-url' ).val( wpmdb.functions.remove_protocol( data.url ) );\n\t\t\t\t\t$( '#new-path' ).val( data.path );\n\n\t\t\t\t\tif ( 'true' === wpmdb_data.is_multisite ) {\n\t\t\t\t\t\t$( '.replace-row.pin .old-replace-col input[type=\"text\"]' ).val( wpmdb.functions.remove_protocol( wpmdb_data.this_url ) );\n\t\t\t\t\t}\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_update_push_table_select' );\n\t\t\t\t\t$( '#select-backup' ).remove();\n\t\t\t\t\t$( '.backup-tables-wrap' ).prepend( globals.$push_select_backup );\n\t\t\t\t}\n\n\t\t\t\t$('body').trigger( 'wpmdb_connection_fired' );\n\n\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\tfn: $.wpmdb.do_action,\n\t\t\t\t\targs: [ 'verify_connection_to_remote_site', wpmdb.common.connection_data ]\n\t\t\t\t};\n\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t}\n\n\t\t} );\n\n\t};\n\n\t/**\n\t *\n\t * ========= DOM ready =========\n\t *\n\t * Mostly direct DOM manipulation specific code\n\t *\n\t */\n\t$( document ).ready( function() {\n\t\twpmdb.migration_state_id = '';\n\n\t\t$( '#plugin-compatibility' ).change( function( e ) {\n\t\t\tvar install = '1';\n\t\t\tvar $status = $( this ).closest( 'td' ).next( 'td' ).find( '.setting-status' );\n\n\t\t\tif ( !$( this ).is( ':checked' ) ) {\n\t\t\t\tinstall = '0';\n\t\t\t}\n\n\t\t\t$( '.plugin-compatibility-wrap' ).toggle();\n\n\t\t\t$status.find( '.ajax-success-msg' ).remove();\n\t\t\t$status.append( globals.ajax_spinner );\n\t\t\t$( '#plugin-compatibility' ).attr( 'disabled', 'disabled' );\n\t\t\t$( '.plugin-compatibility' ).addClass( 'disabled' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_plugin_compatibility',\n\t\t\t\t\tinstall: install,\n\t\t\t\t\tnonce: wpmdb_data.nonces.plugin_compatibility\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.plugin_compatibility_settings_problem + '\\r\\n\\r\\n' + wpmdb_strings.status + ' ' + jqXHR.status + ' ' + jqXHR.statusText + '\\r\\n\\r\\n' + wpmdb_strings.response + '\\r\\n' + jqXHR.responseText );\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\t$( '#plugin-compatibility' ).removeAttr( 'disabled' );\n\t\t\t\t\t$( '.plugin-compatibility' ).removeClass( 'disabled' );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tif ( '' !== $.trim( data ) ) {\n\t\t\t\t\t\talert( data );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$status.append( '<span class=\"ajax-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t\t\t$( '.ajax-success-msg' ).fadeOut( 2000, function() {\n\t\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\t$( '#plugin-compatibility' ).removeAttr( 'disabled' );\n\t\t\t\t\t$( '.plugin-compatibility' ).removeClass( 'disabled' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\tif ( $( '#plugin-compatibility' ).is( ':checked' ) ) {\n\t\t\t$( '.plugin-compatibility-wrap' ).show();\n\t\t}\n\n\t\tif ( 0 <= navigator.userAgent.indexOf( 'MSIE' ) || 0 <= navigator.userAgent.indexOf( 'Trident' ) ) {\n\t\t\t$( '.ie-warning' ).show();\n\t\t}\n\n\t\tif ( 0 <= navigator.userAgent.indexOf( 'Edge' ) ) {\n\t\t\t$( '.edge-warning' ).show();\n\t\t}\n\n\t\tif ( 0 === wpmdb_data.valid_licence ) {\n\t\t\t$( '#savefile' ).prop( 'checked', true );\n\t\t}\n\t\tvar max_request_size_container = $( '.max-request-size' );\n\t\tvar max_request_size_slider = $( '.slider', max_request_size_container );\n\t\tmax_request_size_slider.slider( {\n\t\t\trange: 'min',\n\t\t\tvalue: parseInt( wpmdb_data.max_request / 1024 ),\n\t\t\tmin: 512,\n\t\t\tmax: parseInt( wpmdb_data.bottleneck / 1024 ),\n\t\t\tstep: 256,\n\t\t\tcreate: function( event, ui ) {\n\t\t\t\tvar display_info = globals.get_max_request_display_info( wpmdb_data.max_request / 1024 );\n\t\t\t\tglobals.set_slider_value( max_request_size_container, wpmdb_data.max_request / 1024, display_info.unit, display_info.amount );\n\t\t\t},\n\t\t\tslide: function( event, ui ) {\n\t\t\t\tvar display_info = globals.get_max_request_display_info( ui.value );\n\t\t\t\tglobals.set_slider_value( max_request_size_container, ui.value, display_info.unit, display_info.amount );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\t$( '.slider-success-msg' ).remove();\n\t\t\t\t$( '.amount', max_request_size_container ).after( '<img src=\"' + globals.spinner_url + '\" alt=\"\" class=\"slider-spinner general-spinner\" />' );\n\t\t\t\tmax_request_size_slider.slider( 'disable' );\n\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'wpmdb_update_max_request_size',\n\t\t\t\t\t\tmax_request_size: parseInt( ui.value ),\n\t\t\t\t\t\tnonce: wpmdb_data.nonces.update_max_request_size\n\t\t\t\t\t},\n\t\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t\tmax_request_size_slider.slider( 'enable' );\n\t\t\t\t\t\t$( '.slider-spinner', max_request_size_container ).remove();\n\t\t\t\t\t\talert( wpmdb_strings.max_request_size_problem );\n\t\t\t\t\t\tvar display_info = globals.get_max_request_display_info( wpmdb_data.max_request / 1024 );\n\t\t\t\t\t\tglobals.set_slider_value( max_request_size_container, wpmdb_data.max_request / 1024, display_info.unit, display_info.amount );\n\t\t\t\t\t\tmax_request_size_slider.slider( 'enable' );\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tmax_request_size_slider.slider( 'enable' );\n\t\t\t\t\t\t$( '.slider-label-wrapper', max_request_size_container ).append( '<span class=\"slider-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t\t\t$( '.slider-success-msg', max_request_size_container ).fadeOut( 2000, function() {\n\t\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t\t} );\n\t\t\t\t\t\t$( '.slider-spinner', max_request_size_container ).remove();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tvar delay_between_requests_container = $( '.delay-between-requests' );\n\t\tvar delay_between_requests_slider = $( '.slider', delay_between_requests_container );\n\t\tdelay_between_requests_slider.slider( {\n\t\t\trange: 'min',\n\t\t\tvalue: parseInt( wpmdb_data.delay_between_requests / 1000 ),\n\t\t\tmin: 0,\n\t\t\tmax: 10,\n\t\t\tstep: 1,\n\t\t\tcreate: function( event, ui ) {\n\t\t\t\tglobals.set_slider_value( delay_between_requests_container, wpmdb_data.delay_between_requests / 1000, 's' );\n\t\t\t},\n\t\t\tslide: function( event, ui ) {\n\t\t\t\tglobals.set_slider_value( delay_between_requests_container, ui.value, 's' );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\t$( '.slider-success-msg' ).remove();\n\t\t\t\t$( '.amount', delay_between_requests_container ).after( '<img src=\"' + globals.spinner_url + '\" alt=\"\" class=\"slider-spinner general-spinner\" />' );\n\t\t\t\tdelay_between_requests_slider.slider( 'disable' );\n\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'wpmdb_update_delay_between_requests',\n\t\t\t\t\t\tdelay_between_requests: parseInt( ui.value * 1000 ),\n\t\t\t\t\t\tnonce: wpmdb_data.nonces.update_delay_between_requests\n\t\t\t\t\t},\n\t\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t\tdelay_between_requests_slider.slider( 'enable' );\n\t\t\t\t\t\t$( '.slider-spinner', delay_between_requests_container ).remove();\n\t\t\t\t\t\talert( wpmdb_strings.delay_between_requests_problem );\n\t\t\t\t\t\tglobals.set_slider_value( delay_between_requests_container, wpmdb_data.delay_between_requests / 1000, 's' );\n\t\t\t\t\t\tdelay_between_requests_slider.slider( 'enable' );\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\twpmdb_data.delay_between_requests = parseInt( ui.value * 1000 );\n\t\t\t\t\t\tdelay_between_requests_slider.slider( 'enable' );\n\t\t\t\t\t\t$( '.slider-label-wrapper', delay_between_requests_container ).append( '<span class=\"slider-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t\t\t$( '.slider-success-msg', delay_between_requests_container ).fadeOut( 2000, function() {\n\t\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t\t} );\n\t\t\t\t\t\t$( '.slider-spinner', delay_between_requests_container ).remove();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t$( '.help-tab .video' ).each( function() {\n\t\t\tvar $container = $( this ),\n\t\t\t\t$viewer = $( '.video-viewer' );\n\n\t\t\t$( 'a', this ).click( function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t$viewer.attr( 'src', '//www.youtube.com/embed/' + $container.data( 'video-id' ) + '?autoplay=1' );\n\t\t\t\t$viewer.show();\n\t\t\t\tvar offset = $viewer.offset();\n\t\t\t\t$( window ).scrollTop( offset.top - 50 );\n\t\t\t} );\n\t\t} );\n\n\t\t$( '.backup-options' ).show();\n\t\t$( '.keep-active-plugins' ).show();\n\t\tif ( 'savefile' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t$( '.backup-options' ).hide();\n\t\t\t$( '.keep-active-plugins' ).hide();\n\t\t}\n\n\t\tglobals.last_replace_switch = wpmdb.functions.wpmdb_migration_type();\n\n\t\t/**\n\t\t * Handle 'Check License Again' functionality found in expired license messages.\n\t\t */\n\t\t$( '.content-tab' ).on( 'click', '.check-my-licence-again', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tglobals.checked_licence = false;\n\t\t\t$( e.target ).replaceWith( 'Checking... ' + globals.ajax_spinner );\n\t\t\tglobals.check_licence( null, 'all' );\n\t\t} );\n\n\t\t$.wpmdb.add_action( 'wpmdb_refresh_table_selects', globals.refresh_table_selects, '', globals );\n\n\t\tfunction update_push_table_select() {\n\t\t\t$( '#select-tables' ).remove();\n\t\t\t$( '.select-tables-wrap' ).prepend( globals.$push_select );\n\t\t\t$( '#select-tables' ).change();\n\t\t}\n\n\t\t$.wpmdb.add_action( 'wpmdb_update_push_table_select', update_push_table_select );\n\n\t\tfunction update_pull_table_select() {\n\t\t\t$( '#select-tables' ).remove();\n\t\t\t$( '.select-tables-wrap' ).prepend( globals.$pull_select );\n\t\t\t$( '#select-tables' ).change();\n\t\t}\n\n\t\t$.wpmdb.add_action( 'wpmdb_update_pull_table_select', update_pull_table_select );\n\n\t\tfunction disable_table_migration_options() {\n\t\t\t$( '#migrate-selected' ).parents( '.option-section' ).children( '.header-expand-collapse' ).children( '.expand-collapse-arrow' ).removeClass( 'collapsed' );\n\t\t\t$( '.table-select-wrap' ).show();\n\t\t\t$( '#migrate-only-with-prefix' ).prop( 'checked', false );\n\t\t\t$( '#migrate-selected' ).prop( 'checked', true );\n\t\t\t$( '.table-migrate-options' ).hide();\n\t\t\t$( '.select-tables-wrap' ).show();\n\t\t}\n\n\t\t$.wpmdb.add_action( 'wpmdb_disable_table_migration_options', disable_table_migration_options );\n\n\t\tfunction enable_table_migration_options() {\n\t\t\t$( '.table-migrate-options' ).show();\n\t\t}\n\n\t\t$.wpmdb.add_action( 'wpmdb_enable_table_migration_options', enable_table_migration_options );\n\n\t\tfunction select_all_tables() {\n\t\t\t$( '#select-tables' ).children( 'option' ).prop( 'selected', true );\n\t\t\t$( '#select-tables' ).change();\n\t\t}\n\n\t\t$.wpmdb.add_action( 'wpmdb_select_all_tables', select_all_tables );\n\n\t\tfunction base_old_url( value, args ) {\n\t\t\treturn globals.remove_protocol( wpmdb_data.this_url );\n\t\t}\n\n\t\t$.wpmdb.add_filter( 'wpmdb_base_old_url', base_old_url );\n\n\t\t// automatically validate connection info if we're loading a saved profile\n\t\tglobals.establish_remote_connection_from_saved_profile();\n\n\t\t// add to <a> tags which act as JS event buttons, will not jump page to top and will deselect the button\n\t\t$( 'body' ).on( 'click', '.js-action-link', function( e ) {\n\t\t\te.preventDefault();\n\t\t\t$( this ).blur();\n\t\t} );\n\n\t\t$( '.licence-input' ).keypress( function( e ) {\n\t\t\tif ( 13 === e.which ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( '.register-licence' ).click();\n\t\t\t}\n\t\t} );\n\n\t\t// registers your licence\n\t\t$( 'body' ).on( 'click', '.register-licence', function( e ) {\n\t\t\te.preventDefault();\n\n\t\t\tif ( globals.doing_licence_registration_ajax ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar licence_key = $.trim( $( '.licence-input' ).val() );\n\t\t\tvar $licence_status = $( '.licence-status' );\n\n\t\t\t$licence_status.removeClass( 'notification-message error-notice success-notice' );\n\n\t\t\tif ( '' === licence_key ) {\n\t\t\t\t$licence_status.html( '<div class=\"notification-message error-notice\">' + wpmdb_strings.enter_license_key + '</div>' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$licence_status.empty().removeClass( 'success' );\n\t\t\tglobals.doing_licence_registration_ajax = true;\n\t\t\t$( '.button.register-licence' ).after( '<img src=\"' + globals.spinner_url + '\" alt=\"\" class=\"register-licence-ajax-spinner general-spinner\" />' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'JSON',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_activate_licence',\n\t\t\t\t\tlicence_key: licence_key,\n\t\t\t\t\tnonce: wpmdb_data.nonces.activate_licence,\n\t\t\t\t\tcontext: 'licence'\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\tglobals.doing_licence_registration_ajax = false;\n\t\t\t\t\t$( '.register-licence-ajax-spinner' ).remove();\n\t\t\t\t\t$licence_status.html( wpmdb_strings.register_license_problem );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.register-licence-ajax-spinner' ).remove();\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.errors ) {\n\t\t\t\t\t\tvar msg = '';\n\t\t\t\t\t\tfor ( var key in data.errors ) {\n\t\t\t\t\t\t\tmsg += data.errors[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$licence_status.html( msg );\n\n\t\t\t\t\t\tif ( 'undefined' !== typeof data.masked_licence ) {\n\t\t\t\t\t\t\tglobals.enable_pro_licence( data, licence_key );\n\t\t\t\t\t\t\t$( '.migrate-tab .invalid-licence' ).hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( 'undefined' !== typeof data.wpmdb_error && 'undefined' !== typeof data.body ) {\n\t\t\t\t\t\t$licence_status.html( data.body );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( 1 === Number( data.is_first_activation ) ) {\n\t\t\t\t\t\t\twpmdb_strings.welcome_text = wpmdb_strings.welcome_text.replace( '%1$s', 'https://deliciousbrains.com/wp-migrate-db-pro/doc/quick-start-guide/?utm_campaign=support%2Bdocs&utm_source=MDB%2BPaid&utm_medium=insideplugin' );\n\t\t\t\t\t\t\twpmdb_strings.welcome_text = wpmdb_strings.welcome_text.replace( '%2$s', 'https://deliciousbrains.com/wp-migrate-db-pro/videos/?utm_campaign=support%2Bdocs&utm_source=MDB%2BPaid&utm_medium=insideplugin' );\n\n\t\t\t\t\t\t\t$licence_status.after(\n\t\t\t\t\t\t\t\t'<div id=\"welcome-wrap\">' +\n\t\t\t\t\t\t\t\t'<img id=\"welcome-img\" src=\"' + wpmdb_data.this_plugin_url + 'asset/build/img/mdb-banner.svg\" />' +\n\t\t\t\t\t\t\t\t'<div class=\"welcome-text\">' +\n\t\t\t\t\t\t\t\t'<h3>' + wpmdb_strings.welcome_title + '</h3>' +\n\t\t\t\t\t\t\t\t'<p>' + wpmdb_strings.welcome_text + '</p>' +\n\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t\t'</div>'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$licence_status.html( wpmdb_strings.license_registered ).delay( 5000 ).fadeOut( 1000, function() {\n\t\t\t\t\t\t\t$( this ).css( { visibility: 'hidden', display: 'block' } ).slideUp();\n\t\t\t\t\t\t} );\n\t\t\t\t\t\t$licence_status.addClass( 'success notification-message success-notice' );\n\t\t\t\t\t\tglobals.enable_pro_licence( data, licence_key );\n\t\t\t\t\t\t$( '.invalid-licence' ).hide();\n\t\t\t\t\t}\n\n\t\t\t\t\tglobals.doing_licence_registration_ajax = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t// clears the debug log\n\t\t$( '.clear-log' ).click( function() {\n\t\t\t$( '.ajax-spinner, .ajax-success-msg' ).remove();\n\t\t\t$( this ).after( globals.ajax_spinner );\n\t\t\t$( '.debug-log-textarea' ).val( '' );\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_clear_log',\n\t\t\t\t\tnonce: wpmdb_data.nonces.clear_log\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\talert( wpmdb_strings.clear_log_problem );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.ajax-spinner, .ajax-success-msg' ).remove();\n\t\t\t\t\tglobals.refresh_debug_log();\n\t\t\t\t\t$( '.clear-log' ).after( '<span class=\"ajax-success-msg\">' + wpmdb_strings.clear_error_log + '</span>' );\n\t\t\t\t\t$( '.ajax-success-msg' ).fadeOut( 2000, function() {\n\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// select all tables\n\t\t$( '.multiselect-select-all' ).click( function() {\n\t\t\tvar multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );\n\t\t\t$( 'option', multiselect ).prop( 'selected', 1 );\n\t\t\t$( multiselect ).focus().trigger( 'change' );\n\t\t} );\n\n\t\t// deselect all tables\n\t\t$( '.multiselect-deselect-all' ).click( function() {\n\t\t\tvar multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );\n\t\t\t$( 'option', multiselect ).removeAttr( 'selected' );\n\t\t\t$( multiselect ).focus().trigger( 'change' );\n\t\t} );\n\n\t\t// invert table selection\n\t\t$( '.multiselect-invert-selection' ).click( function() {\n\t\t\tvar multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );\n\n\t\t\t$( 'option', multiselect ).each( function() {\n\t\t\t\tvar selected = $(this).prop('selected');\n\t\t\t\t$( this ).prop( 'selected', !selected );\n\t\t\t} );\n\t\t\t$( multiselect ).focus().trigger( 'change' );\n\t\t} );\n\n\t\t// on option select hide all \"advanced\" option divs and show the correct div for the option selected\n\t\t$( '.option-group input[type=radio]' ).change( function() {\n\t\t\tvar group = $( this ).closest( '.option-group' );\n\t\t\t$( 'ul', group ).hide();\n\t\t\tvar parent = $( this ).closest( 'li' );\n\t\t\t$( 'ul', parent ).show();\n\t\t} );\n\n\t\t// on page load, expand hidden divs for selected options (browser form cache)\n\t\t$( '.option-group' ).each( function() {\n\t\t\t$( '.option-group input[type=radio]' ).each( function() {\n\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\tvar parent = $( this ).closest( 'li' );\n\t\t\t\t\t$( 'ul', parent ).show();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// expand and collapse content on click\n\t\t$( '.header-expand-collapse' ).click( function() {\n\t\t\tvar target = null;\n\n\t\t\tif ( undefined !== $( this ).data( 'next' ) ) {\n\t\t\t\ttarget = $( this ).data( 'next' );\n\t\t\t}\n\n\t\t\tif ( $( '.expand-collapse-arrow', this ).hasClass( 'collapsed' ) ) {\n\t\t\t\t$( '.expand-collapse-arrow', this ).removeClass( 'collapsed' );\n\t\t\t\tif ( target ) {\n\t\t\t\t\t$( target ).show();\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).next().show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$( '.expand-collapse-arrow', this ).addClass( 'collapsed' );\n\t\t\t\tif ( target ) {\n\t\t\t\t\t$( target ).hide();\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).next().hide();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t$( '.checkbox-label input[type=checkbox]' ).change( function() {\n\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t$( this ).parent().next().show();\n\t\t\t} else {\n\t\t\t\t$( this ).parent().next().hide();\n\t\t\t}\n\t\t} );\n\n\t\t// warning for excluding post types\n\t\t$( '.select-post-types-wrap' ).on( 'change', '#select-post-types', function() {\n\t\t\twpmdb.functions.exclude_post_types_warning();\n\t\t} );\n\n\t\tif ( $( '#exclude-post-types' ).is( ':checked' ) ) {\n\t\t\tif ( $( '#select-post-types' ).val() ) {\n\t\t\t\t$( '.exclude-post-types-warning' ).css( { display: 'block', opacity: 1 } );\n\t\t\t}\n\t\t}\n\n\t\t// special expand and collapse content on click for save migration profile\n\t\t$( '#save-migration-profile' ).change( function() {\n\t\t\twpmdb.functions.update_migrate_button_text();\n\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t$( '.save-settings-button' ).show();\n\t\t\t} else {\n\t\t\t\t$( '.save-settings-button' ).hide();\n\t\t\t}\n\t\t} );\n\n\t\tif ( $( '#save-migration-profile' ).is( ':checked' ) ) {\n\t\t\t$( '.save-settings-button' ).show();\n\t\t}\n\n\t\t$( '.create-new-profile' ).focus( function() {\n\t\t\t$( '#create_new' ).prop( 'checked', true );\n\t\t} );\n\n\t\t$( '.checkbox-label input[type=checkbox]' ).each( function() {\n\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t$( this ).parent().next().show();\n\t\t\t}\n\t\t} );\n\n\t\t// AJAX migrate button\n\t\t$( '.migrate-db-button' ).click( function( event ) {\n\t\t\t$( this ).blur();\n\n\t\t\tevent.preventDefault();\n\t\t\twpmdb.migration_state_id = '';\n\n\t\t\tif ( false === $.wpmdb.apply_filters( 'wpmdb_migration_profile_ready', true ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( true === wpmdb.functions.maybe_show_select_table_notice() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar new_url_missing = false;\n\t\t\tvar new_file_path_missing = false;\n\t\t\tif ( $( '#new-url' ).length && !$( '#new-url' ).val() ) {\n\t\t\t\t$( '#new-url-missing-warning' ).show();\n\t\t\t\t$( '#new-url' ).focus();\n\t\t\t\t$( 'html,body' ).scrollTop( 0 );\n\t\t\t\tnew_url_missing = true;\n\t\t\t}\n\n\t\t\tif ( $( '#new-path' ).length && !$( '#new-path' ).val() ) {\n\t\t\t\t$( '#new-path-missing-warning' ).show();\n\t\t\t\tif ( false === new_url_missing ) {\n\t\t\t\t\t$( '#new-path' ).focus();\n\t\t\t\t\t$( 'html,body' ).scrollTop( 0 );\n\t\t\t\t}\n\t\t\t\tnew_file_path_missing = true;\n\t\t\t}\n\n\t\t\tif ( true === new_url_missing || true === new_file_path_missing ) {\n\t\t\t\tif ( 'import' === wpmdb.functions.wpmdb_migration_type() ) {\n\t\t\t\t\tif ( $( '#import-find-replace' ).is( ':checked' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// also save profile\n\t\t\tif ( $( '#save-migration-profile' ).is( ':checked' ) ) {\n\t\t\t\tglobals.save_active_profile();\n\t\t\t}\n\n\t\t\tglobals.form_data = $( $( '#migrate-form' )[ 0 ].elements ).not( '.auth-credentials' ).serialize();\n\n\t\t\tglobals.migration_intent = wpmdb.functions.wpmdb_migration_type();\n\n\t\t\tglobals.stage = 'backup';\n\n\t\t\tif ( 'savefile' === globals.migration_intent ) {\n\t\t\t\tglobals.stage = 'migrate';\n\t\t\t}\n\n\t\t\tif ( false === $( '#create-backup' ).is( ':checked' ) ) {\n\t\t\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'savefile', 'push', 'pull' ] ) ) {\n\t\t\t\t\tglobals.stage = 'migrate';\n\t\t\t\t} else if ( 'import' === globals.migration_intent ) {\n\t\t\t\t\tglobals.stage = 'upload';\n\t\t\t\t} else {\n\t\t\t\t\tglobals.stage = globals.migration_intent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twpmdb.current_migration = wpmdb.migration_progress_controller.newMigration( {\n\t\t\t\tlocalTableSizes: wpmdb_data.this_table_sizes,\n\t\t\t\tlocalTableRows: wpmdb_data.this_table_rows,\n\t\t\t\tremoteTableSizes: 'undefined' !== typeof wpmdb.common.connection_data ? wpmdb.common.connection_data.table_sizes : null,\n\t\t\t\tremoteTableRows: 'undefined' !== typeof wpmdb.common.connection_data ? wpmdb.common.connection_data.table_rows : null,\n\t\t\t\tmigrationIntent: wpmdb.functions.wpmdb_migration_type()\n\t\t\t} );\n\n\t\t\tvar backup_option = $( 'input[name=backup_option]:checked' ).val();\n\t\t\tvar table_option = $( 'input[name=table_migrate_option]:checked' ).val();\n\t\t\tvar selected_tables = '';\n\t\t\tvar data_type = '';\n\n\t\t\t// set up backup stage\n\t\t\tif ( 'backup' === globals.stage ) {\n\t\t\t\tif ( 'migrate_only_with_prefix' === table_option && 'backup_selected' === backup_option && 'import' !== globals.migration_intent ) {\n\t\t\t\t\tbackup_option = 'backup_only_with_prefix';\n\t\t\t\t}\n\t\t\t\tif ( 'push' === globals.migration_intent ) {\n\t\t\t\t\tdata_type = 'remote';\n\t\t\t\t\tif ( 'backup_only_with_prefix' === backup_option ) {\n\t\t\t\t\t\tglobals.tables_to_migrate = wpmdb.common.connection_data.prefixed_tables;\n\t\t\t\t\t} else if ( 'backup_selected' === backup_option ) {\n\t\t\t\t\t\tselected_tables = $( '#select-tables' ).val();\n\t\t\t\t\t\tselected_tables = $.wpmdb.apply_filters( 'wpmdb_backup_selected_tables', selected_tables );\n\t\t\t\t\t\tglobals.tables_to_migrate = globals.get_intersect( selected_tables, wpmdb.common.connection_data.tables );\n\t\t\t\t\t} else if ( 'backup_manual_select' === backup_option ) {\n\t\t\t\t\t\tglobals.tables_to_migrate = $( '#select-backup' ).val();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdata_type = 'local';\n\t\t\t\t\tif ( 'backup_only_with_prefix' === backup_option ) {\n\t\t\t\t\t\tglobals.tables_to_migrate = wpmdb_data.this_prefixed_tables;\n\t\t\t\t\t} else if ( 'backup_selected' === backup_option ) {\n\t\t\t\t\t\tselected_tables = $( '#select-tables' ).val();\n\t\t\t\t\t\tselected_tables = $.wpmdb.apply_filters( 'wpmdb_backup_selected_tables', selected_tables );\n\t\t\t\t\t\tglobals.tables_to_migrate = globals.get_intersect( selected_tables, wpmdb_data.this_tables );\n\t\t\t\t\t} else if ( 'backup_manual_select' === backup_option ) {\n\t\t\t\t\t\tglobals.tables_to_migrate = $( '#select-backup' ).val();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twpmdb.current_migration.model.addStage( 'backup', globals.tables_to_migrate, data_type, {\n\t\t\t\t\tstrings: {\n\t\t\t\t\t\tmigrated: wpmdb_strings.backed_up\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// set up migration stage\n\t\t\tif ( 'pull' === globals.migration_intent ) {\n\t\t\t\tdata_type = 'remote';\n\t\t\t} else {\n\t\t\t\tdata_type = 'local';\n\t\t\t}\n\n\t\t\tif ( 'find_replace' === globals.migration_intent ) {\n\t\t\t\twpmdb.current_migration.model.addStage( 'find_replace', wpmdb.functions.get_tables_to_migrate( null, null ), data_type, {\n\t\t\t\t\tstrings: {\n\t\t\t\t\t\tmigrated: wpmdb_strings.searched,\n\t\t\t\t\t\tstage_title: wpmdb_strings.migrate_button_find_replace\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else if ( -1 !== $.inArray( globals.migration_intent, [ 'savefile', 'push', 'pull' ] ) ) {\n\t\t\t\twpmdb.current_migration.model.addStage( 'migrate', wpmdb.functions.get_tables_to_migrate( null, null ), data_type );\n\t\t\t}\n\n\t\t\t// add any additional migration stages via hook\n\t\t\t$.wpmdb.do_action( 'wpmdb_add_migration_stages', {\n\t\t\t\tdata_type: data_type,\n\t\t\t\ttables_to_migrate: wpmdb.functions.get_tables_to_migrate( null, null )\n\t\t\t} );\n\n\t\t\tvar table_intent = $( 'input[name=table_migrate_option]:checked' ).val();\n\t\t\tvar connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\\n' );\n\t\t\tvar table_rows = '';\n\n\t\t\tglobals.remote_site = connection_info[ 0 ];\n\t\t\tglobals.secret_key = connection_info[ 1 ];\n\n\t\t\tvar static_migration_label = globals.get_migration_status_label( globals.remote_site, globals.migration_intent, 'migrating' );\n\t\t\tglobals.completed_msg = globals.get_migration_status_label( globals.remote_site, globals.migration_intent, 'completed' );\n\n\t\t\tif ( -1 !== $.inArray( globals.stage, [ 'find_replace', 'backup', 'migrate' ] ) ) {\n\t\t\t\tglobals.tables_to_migrate = wpmdb.current_migration.model.getStageItems( globals.stage, 'name' );\n\t\t\t}\n\n\t\t\twpmdb.current_migration.model.setActiveStage( globals.stage );\n\n\t\t\twpmdb.current_migration.setTitle( static_migration_label );\n\n\t\t\twpmdb.current_migration.startTimer();\n\n\t\t\tglobals.currently_migrating = true;\n\t\t\twpmdb.current_migration.setStatus( 'active' );\n\n\t\t\tvar request_data = {\n\t\t\t\taction: 'wpmdb_initiate_migration',\n\t\t\t\tintent: globals.migration_intent,\n\t\t\t\turl: globals.remote_site,\n\t\t\t\tkey: globals.secret_key,\n\t\t\t\tform_data: globals.form_data,\n\t\t\t\tstage: globals.stage,\n\t\t\t\tnonce: wpmdb_data.nonces.initiate_migration\n\t\t\t};\n\n\t\t\trequest_data.site_details = {\n\t\t\t\tlocal: wpmdb_data.site_details\n\t\t\t};\n\n\t\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'push', 'pull' ] ) ) {\n\t\t\t\trequest_data.temp_prefix = wpmdb.common.connection_data.temp_prefix;\n\t\t\t\trequest_data.site_details.remote = wpmdb.common.connection_data.site_details;\n\t\t\t}\n\n\t\t\t// site_details can have a very large number of elements that blows out PHP's max_input_vars\n\t\t\t// so we reduce it down to one variable for this one POST.\n\t\t\trequest_data.site_details = JSON.stringify( request_data.site_details );\n\n\t\t\trequest_data = $.wpmdb.apply_filters( 'wpmdb_initiate_migration_request_data', request_data, request_data );\n\n\t\t\tglobals.doing_ajax = true;\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: request_data,\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\n\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, globals.get_ajax_errors( jqXHR.responseText, '(#112)', jqXHR ), 'error' );\n\n\t\t\t\t\tconsole.log( jqXHR );\n\t\t\t\t\tconsole.log( textStatus );\n\t\t\t\t\tconsole.log( errorThrown );\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\twpmdb.functions.migration_complete_events();\n\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tif ( 'undefined' !== typeof data && 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\twpmdb.common.migration_error = true;\n\t\t\t\t\t\twpmdb.functions.migration_complete_events();\n\t\t\t\t\t\twpmdb.current_migration.setState( wpmdb_strings.migration_failed, data.body, 'error' );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\twpmdb.migration_state_id = data.migration_state_id;\n\n\t\t\t\t\tvar i = 0;\n\n\t\t\t\t\t// Set delay between requests - use max of local/remote values, 0 if doing export\n\t\t\t\t\tglobals.delay_between_requests = 0;\n\t\t\t\t\tif ( 'savefile' !== globals.migration_intent && 'undefined' !== typeof wpmdb.common.connection_data && 'undefined' !== typeof wpmdb.common.connection_data.delay_between_requests || 'import' === globals.migration_intent ) {\n\t\t\t\t\t\tif ( 'import' === globals.migration_intent ) {\n\t\t\t\t\t\t\tglobals.delay_between_requests = wpmdb_data.delay_between_requests;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tglobals.delay_between_requests = Math.max( parseInt( wpmdb_data.delay_between_requests ), parseInt( wpmdb.common.connection_data.delay_between_requests ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( -1 !== $.inArray( globals.migration_intent, [ 'savefile', 'push', 'pull', 'find_replace' ] ) ) {\n\t\t\t\t\t\twpmdb.common.next_step_in_migration = {\n\t\t\t\t\t\t\tfn: wpmdb.functions.migrate_table_recursive,\n\t\t\t\t\t\t\targs: [ '-1', '']\n\t\t\t\t\t\t};\n\t\t\t\t\t\twpmdb.functions.execute_next_step();\n\t\t\t\t\t}\n\n\t\t\t\t\t$.wpmdb.do_action( 'wpmdb_migration_initiated', globals.stage );\n\t\t\t\t}\n\n\t\t\t} ); // end ajax\n\n\t\t} );\n\n\t\tglobals.update_migrate_button_text();\n\n\t\t// close progress pop up once migration is completed\n\t\t$( 'body' ).on( 'click', '.close-progress-content-button', function( e ) {\n\t\t\tglobals.hide_overlay();\n\t\t\twpmdb.current_migration.restoreTitleElem();\n\t\t\twpmdb.functions.maybe_reload_page();\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '#overlay', function( e ) {\n\t\t\tif ( true === globals.migration_completed && e.target === this ) {\n\t\t\t\tglobals.hide_overlay();\n\t\t\t\twpmdb.current_migration.restoreTitleElem();\n\t\t\t\twpmdb.functions.maybe_reload_page();\n\t\t\t}\n\t\t} );\n\n\t\t// AJAX save button profile\n\t\t$( '.save-settings-button' ).click( function( event ) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( '' === $.trim( $( '.create-new-profile' ).val() ) && $( '#create_new' ).is( ':checked' ) ) {\n\t\t\t\talert( wpmdb_strings.enter_name_for_profile );\n\t\t\t\t$( '.create-new-profile' ).focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tglobals.save_active_profile();\n\t\t} );\n\n\t\t// move around textarea depending on whether or not the push/pull options are selected\n\t\tglobals.move_connection_info_box();\n\n\t\t$( '.migrate-selection.option-group input[type=radio]' ).change( function() {\n\t\t\tglobals.move_connection_info_box();\n\t\t\twpmdb.migration_selection = wpmdb.functions.wpmdb_migration_type();\n\t\t\tif ( globals.connection_established ) {\n\t\t\t\tglobals.change_replace_values();\n\t\t\t}\n\t\t\twpmdb.functions.update_migrate_button_text();\n\t\t} );\n\n\t\t// hide second section if pull or push is selected with no connection established\n\t\tif ( ( 'pull' === wpmdb.functions.wpmdb_migration_type() || 'push' === wpmdb.functions.wpmdb_migration_type() ) && !globals.connection_established ) {\n\t\t\t$( '.step-two' ).hide();\n\t\t\t$( '.connection-status' ).show();\n\t\t}\n\n\t\t// show / hide GUID helper description\n\t\t$( '.general-helper' ).click( function( e ) {\n\t\t\te.preventDefault();\n\t\t\tvar icon = $( this ),\n\t\t\t\tbubble = $( this ).next();\n\n\t\t\t// Close any that are already open\n\t\t\t$( '.helper-message' ).not( bubble ).hide();\n\n\t\t\tvar position = icon.position();\n\t\t\tif ( bubble.hasClass( 'bottom' ) ) {\n\t\t\t\tvar bubble_offset = 1;\n\n\t\t\t\tif ( true === bubble.hasClass( 'compatibility-help' ) ) {\n\t\t\t\t\tbubble_offset = 6;\n\t\t\t\t} else if ( $( this ).is( ':first-child' ) ) {\n\t\t\t\t\tbubble_offset = 3;\n\t\t\t\t}\n\t\t\t\tbubble.css( {\n\t\t\t\t\tleft: ( ( position.left - bubble.width() / 2 ) - bubble_offset ) + 'px',\n\t\t\t\t\ttop: ( position.top + icon.height() + 9 ) + 'px'\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tbubble.css( {\n\t\t\t\t\tleft: ( position.left + icon.width() + 9 ) + 'px',\n\t\t\t\t\ttop: ( position.top + icon.height() / 2 - 18 ) + 'px'\n\t\t\t\t} );\n\t\t\t}\n\t\t\tbubble.toggle();\n\t\t\te.stopPropagation();\n\t\t} );\n\n\t\t$( 'body' ).click( function() {\n\t\t\t$( '.helper-message' ).hide();\n\t\t} );\n\n\t\t$( '.helper-message' ).click( function( e ) {\n\t\t\te.stopPropagation();\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.show-errors-toggle', function( e ) {\n\t\t\te.preventDefault();\n\t\t\t$( this ).next( '.migration-php-errors' ).toggle();\n\t\t} );\n\n\t\t// migrate / settings tabs\n\t\t$( '.nav-tab' ).click( function() {\n\t\t\tvar hash = $( this ).attr( 'data-div-name' );\n\t\t\thash = hash.replace( '-tab', '' );\n\t\t\twindow.location.hash = hash;\n\t\t\tglobals.switch_to_plugin_tab( hash, false );\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', 'a[href^=\"#\"]', function( event ) {\n\t\t\tvar href = $( event.target ).attr( 'href' );\n\t\t\tvar tab_name = href.substr( 1 );\n\n\t\t\tif ( tab_name ) {\n\t\t\t\tvar nav_tab = $( '.' + tab_name );\n\t\t\t\tif ( 1 === nav_tab.length ) {\n\t\t\t\t\tnav_tab.trigger( 'click' );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// repeatable fields\n\t\t$( 'body' ).on( 'click', '.add-row', function() {\n\t\t\tvar $parent_tr = $( this ).parents( 'tr' );\n\t\t\t$parent_tr.before( $( '.original-repeatable-field' ).clone().removeClass( 'original-repeatable-field' ) );\n\t\t\t$parent_tr.prev().find( '.old-replace-col input' ).focus();\n\t\t} );\n\n\t\t// repeatable fields\n\t\t$( 'body' ).on( 'click', '.replace-remove-row', function() {\n\t\t\t$( this ).parents( 'tr' ).remove();\n\t\t\tif ( 2 >= $( '.replace-row' ).length ) {\n\t\t\t\t$( '.no-replaces-message' ).show();\n\t\t\t}\n\n\t\t\tvar prev_id = $( this ).prev().attr( 'id' );\n\t\t\tif ( 'new-url' === prev_id || 'new-path' === prev_id ) {\n\t\t\t\t$( '#' + prev_id + '-missing-warning' ).hide();\n\t\t\t}\n\t\t} );\n\n\t\t// Hide New URL & New Path Warnings on change.\n\t\t$( 'body' )\n\t\t\t.on( 'change', '#new-url', function() {\n\t\t\t\t$( '#new-url-missing-warning' ).hide();\n\t\t\t} )\n\t\t\t.on( 'change', '#new-path', function() {\n\t\t\t\t$( '#new-path-missing-warning' ).hide();\n\t\t\t} );\n\n\t\t// Copy Find field to associated Replace field on arrow click.\n\t\t$( 'body' ).on( 'click', '.arrow-col', function() {\n\t\t\tvar replace_row_arrow = this;\n\n\t\t\tif ( $( replace_row_arrow ).hasClass( 'disabled' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar original_value = $( replace_row_arrow ).prev( 'td' ).find( 'input' ).val();\n\t\t\tvar new_value_input = $( replace_row_arrow ).next( 'td' ).find( 'input' );\n\t\t\tnew_value_input.val( original_value );\n\n\t\t\t// Hide New URL or New Path Warning if changed.\n\t\t\tif ( 'new-url' === new_value_input.prop( 'id' ) ) {\n\t\t\t\t$( '#new-url-missing-warning' ).hide();\n\t\t\t} else if ( 'new-path' === new_value_input.prop( 'id' ) ) {\n\t\t\t\t$( '#new-path-missing-warning' ).hide();\n\t\t\t}\n\t\t} );\n\n\t\t$( '.add-replace' ).click( function() {\n\t\t\t$( '.replace-fields' ).prepend( $( '.original-repeatable-field' ).clone().removeClass( 'original-repeatable-field' ) );\n\t\t\t$( '.no-replaces-message' ).hide();\n\t\t} );\n\n\t\t$( '#find-and-replace-sort tbody' ).sortable( {\n\t\t\titems: '> tr:not(.pin)',\n\t\t\thandle: 'td:first',\n\t\t\tstart: function() {\n\t\t\t\t$( '.sort-handle' ).css( 'cursor', '-webkit-grabbing' );\n\t\t\t\t$( '.sort-handle' ).css( 'cursor', '-moz-grabbing' );\n\t\t\t},\n\t\t\tstop: function() {\n\t\t\t\t$( '.sort-handle' ).css( 'cursor', '-webkit-grab' );\n\t\t\t\t$( '.sort-handle' ).css( 'cursor', '-moz-grab' );\n\t\t\t}\n\t\t} );\n\n\t\tvar hash = '';\n\n\t\t// check for hash in url (settings || migrate) switch tabs accordingly\n\t\tif ( window.location.hash ) {\n\t\t\thash = window.location.hash.substring( 1 );\n\t\t\tglobals.switch_to_plugin_tab( hash, false );\n\t\t}\n\n\t\tif ( '' !== globals.get_query_var( 'install-plugin' ) ) {\n\t\t\thash = 'addons';\n\t\t\tglobals.checked_licence = true;\n\t\t\tglobals.switch_to_plugin_tab( hash, true );\n\t\t}\n\n\t\t// process notice links clicks, eg. dismiss, reminder\n\t\t$( '.notice-link' ).click( function( e ) {\n\t\t\te.preventDefault();\n\n\t\t\t// process notice links clicks, eg. dismiss, reminder\n\t\t\twpmdb.functions.ajax_handle_dismissible_notice( wpmdb_data.nonces.process_notice_link, function( ele ) {\n\t\t\t\t$( ele ).closest( '.inline-message' ).hide();\n\t\t\t}, $( this ) );\n\t\t} );\n\n\t\t// When read-only connection info is copied, convert it to one line\n\t\t$( '#connection_info' ).on( 'copy', function( e ) {\n\t\t\tvar $this = $( this );\n\n\t\t\t// Test for two lines\n\t\t\tvar lines = $this.val().split( '\\n' );\n\t\t\tif ( 2 === lines.length ) {\n\n\t\t\t\t// Wrapping in a try in case there's no browser support\n\t\t\t\ttry {\n\n\t\t\t\t\t// Combine the two lines into one\n\t\t\t\t\te.originalEvent.clipboardData.setData( 'text/plain', lines.join( ' ' ) );\n\t\t\t\t\te.preventDefault(); // Default behaviour is to copy any selected text\n\t\t\t\t}\n\t\t\t\tcatch ( err ) {\n\n\t\t\t\t\t// Do nothing. Allow normal copying\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// regenerates the saved secret key\n\t\t$( '.reset-api-key' ).click( function() {\n\t\t\tvar answer = confirm( wpmdb_strings.reset_api_key );\n\n\t\t\tif ( !answer || globals.doing_reset_api_key_ajax ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tglobals.doing_reset_api_key_ajax = true;\n\t\t\t$( '.reset-api-key' ).after( '<img src=\"' + globals.spinner_url + '\" alt=\"\" class=\"reset-api-key-ajax-spinner general-spinner\" />' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_reset_api_key',\n\t\t\t\t\tnonce: wpmdb_data.nonces.reset_api_key\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.reset_api_key_problem );\n\t\t\t\t\t$( '.reset-api-key-ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_reset_api_key_ajax = false;\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.reset-api-key-ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_reset_api_key_ajax = false;\n\t\t\t\t\t$( '.connection-info' ).val( data );\n\t\t\t\t\twpmdb_data.connection_info = $.trim( data ).split( '\\n' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t// Copy the connection info to the clipboard\n\t\t$( '.copy-api-key' ).click( function() {\n\n\t\t\tvar $el = $( this );\n\n\t\t\t// Get connection_info input\n\t\t\tvar $connection_info = $( '#connection_info' );\n\n\t\t\t// Get the connection info\n\t\t\tvar two_lines = $connection_info.val();\n\n\t\t\t// Make it one line, if it's two\n\t\t\tvar one_line = two_lines.replace( '\\n', ' ' );\n\n\t\t\t// Replace two lines with one\n\t\t\t$connection_info.val( one_line );\n\n\t\t\t// Select the input val\n\t\t\t$connection_info.select();\n\n\t\t\ttry {\n\n\t\t\t\t// Copy connection_info\n\t\t\t\tdocument.execCommand( 'copy' );\n\n\t\t\t\t// Unselect connection_info input\n\t\t\t\t$connection_info.blur();\n\n\t\t\t\t// show confirmation\n\t\t\t\t$el.css( 'color', 'transparent' );\n\t\t\t\tvar $confirmation = $( '.copy-api-key-confirmation' ).show();\n\n\t\t\t\t// fadeout confirmation\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$confirmation.fadeOut( 'fast' );\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t$el.css( 'color', '' );\n\t\t\t\t\t}, 200 );\n\n\t\t\t\t}, 1000 );\n\t\t\t}\n\t\t\tcatch ( err ) {\n\t\t\t\talert( 'please press Ctrl/Cmd+C to copy' );\n\t\t\t}\n\n\t\t\t// Replace the input val with the two lines\n\t\t\t$connection_info.val( two_lines );\n\t\t} );\n\n\t\t$( 'input[name=table_migrate_option]' ).change( function() {\n\t\t\t$( '.select-tables-wrap' ).hide();\n\n\t\t\tif ( 'migrate_select' === $( this ).val() ) {\n\t\t\t\t$( '.select-tables-wrap' ).show();\n\t\t\t}\n\t\t} );\n\n\t\t$( '.show-multiselect' ).each( function() {\n\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t$( this ).parents( '.option-section' ).children( '.header-expand-collapse' ).children( '.expand-collapse-arrow' ).removeClass( 'collapsed' );\n\t\t\t\t$( this ).parents( '.expandable-content' ).show();\n\t\t\t\t$( this ).parents( '.expandable-content' ).children( '.select-wrap' ).toggle();\n\t\t\t}\n\t\t} );\n\n\t\t$( 'input[name=backup_option]' ).change( function() {\n\t\t\t$( '.backup-tables-wrap' ).hide();\n\t\t\tif ( 'backup_manual_select' === $( this ).val() ) {\n\t\t\t\t$( '.backup-tables-wrap' ).show();\n\t\t\t}\n\t\t} );\n\n\t\tif ( $( '#backup-manual-select' ).is( ':checked' ) ) {\n\t\t\t$( '.backup-tables-wrap' ).show();\n\t\t}\n\n\t\t$( '.plugin-compatibility-save' ).click( function() {\n\t\t\tif ( globals.doing_plugin_compatibility_ajax ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$( this ).addClass( 'disabled' );\n\t\t\tvar select_element = $( '#selected-plugins' );\n\t\t\t$( select_element ).attr( 'disabled', 'disabled' );\n\n\t\t\t$( '.plugin-compatibility-success-msg' ).remove();\n\n\t\t\tglobals.doing_plugin_compatibility_ajax = true;\n\t\t\t$( this ).after( '<img src=\"' + globals.spinner_url + '\" alt=\"\" class=\"plugin-compatibility-spinner general-spinner\" />' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_whitelist_plugins',\n\t\t\t\t\twhitelist_plugins: $( select_element ).val(),\n\t\t\t\t\tnonce: wpmdb_data.nonces.whitelist_plugins\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.blacklist_problem + '\\r\\n\\r\\n' + wpmdb_strings.status + ' ' + jqXHR.status + ' ' + jqXHR.statusText + '\\r\\n\\r\\n' + wpmdb_strings.response + '\\r\\n' + jqXHR.responseText );\n\t\t\t\t\t$( select_element ).removeAttr( 'disabled' );\n\t\t\t\t\t$( '.plugin-compatibility-save' ).removeClass( 'disabled' );\n\t\t\t\t\tglobals.doing_plugin_compatibility_ajax = false;\n\t\t\t\t\t$( '.plugin-compatibility-spinner' ).remove();\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tif ( '' !== $.trim( data ) ) {\n\t\t\t\t\t\talert( data );\n\t\t\t\t\t}\n\t\t\t\t\t$( select_element ).removeAttr( 'disabled' );\n\t\t\t\t\t$( '.plugin-compatibility-save' ).removeClass( 'disabled' );\n\t\t\t\t\tglobals.doing_plugin_compatibility_ajax = false;\n\t\t\t\t\t$( '.plugin-compatibility-spinner' ).remove();\n\t\t\t\t\t$( '.plugin-compatibility-save' ).after( '<span class=\"plugin-compatibility-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t\t$( '.plugin-compatibility-success-msg' ).fadeOut( 2000 );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// delete a profile from the migrate form area\n\t\t$( 'body' ).on( 'click', '.delete-profile', function() {\n\t\t\tvar name = $( this ).next().clone();\n\t\t\t$( 'input', name ).remove();\n\t\t\tname = $.trim( $( name ).html() );\n\t\t\tvar answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );\n\n\t\t\tif ( !answer ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar $profile_li = $( this ).parent();\n\n\t\t\tif ( $profile_li.find( 'input:checked' ).length ) {\n\t\t\t\tvar $new_profile_li = $profile_li.siblings().last();\n\t\t\t\t$new_profile_li.find( 'input[type=radio]' ).prop( 'checked', 'checked' );\n\t\t\t\t$new_profile_li.find( 'input[type=text]' ).focus();\n\t\t\t\t$( '#migrate-form .crumbs .crumb:last' ).text( 'New Profile' );\n\n\t\t\t\tif ( 'function' === typeof window.history.pushState ) {\n\t\t\t\t\tvar updated_url = window.location.href.replace( '#migrate', '' ).replace( /&wpmdb-profile=-?\\d+/, '' ) + '&wpmdb-profile=-1';\n\t\t\t\t\twindow.history.pushState( { updated_profile_id: -1 }, null, updated_url );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$profile_li.fadeOut( 500 );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_delete_migration_profile',\n\t\t\t\t\tprofile_id: $( this ).attr( 'data-profile-id' ),\n\t\t\t\t\tnonce: wpmdb_data.nonces.delete_migration_profile\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.remove_profile_problem );\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tif ( '-1' === data ) {\n\t\t\t\t\t\talert( wpmdb_strings.remove_profile_not_found );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t// deletes a profile from the main profile selection screen\n\t\t$( '.main-list-delete-profile-link' ).click( function() {\n\t\t\tvar name = $( this ).prev().html();\n\t\t\tvar answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );\n\n\t\t\tif ( !answer ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$( this ).parent().fadeOut( 500 );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_delete_migration_profile',\n\t\t\t\t\tprofile_id: $( this ).attr( 'data-profile-id' ),\n\t\t\t\t\tnonce: wpmdb_data.nonces.delete_migration_profile\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.remove_profile_problem );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t// warn the user when editing the connection info after a connection has been established\n\t\t$( 'body' ).on( 'click', '.temp-disabled', function() {\n\t\t\tvar answer = confirm( wpmdb_strings.change_connection_info );\n\n\t\t\tif ( answer ) {\n\t\t\t\t$( '.ssl-notice' ).hide();\n\t\t\t\t$( '.different-plugin-version-notice' ).hide();\n\t\t\t\t$( '.migrate-db-button' ).show();\n\t\t\t\t$( '.temp-disabled' ).removeAttr( 'readonly' );\n\t\t\t\t$( '.temp-disabled' ).removeClass( 'temp-disabled' );\n\t\t\t\t$( '.connect-button' ).show();\n\t\t\t\t$( '.step-two' ).hide();\n\t\t\t\t$( '.connection-status' ).show().html( wpmdb_strings.enter_connection_info );\n\t\t\t\tglobals.connection_established = false;\n\t\t\t}\n\t\t} );\n\n\t\t// ajax request for settings page when checking/unchecking setting radio buttons\n\t\t$( '.settings-tab input[type=checkbox]' ).change( function() {\n\t\t\tif ( 'plugin-compatibility' === $( this ).attr( 'id' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar checked = $( this ).is( ':checked' );\n\t\t\tvar setting = $( this ).attr( 'id' );\n\t\t\tvar $status = $( this ).closest( 'td' ).next( 'td' ).find( '.setting-status' );\n\n\t\t\t//Usge tracking setting\n\t\t\tif ( 'allow_tracking' === $( this ).attr( 'id' ) ) {\n\t\t\t\twpmdb_data.allow_tracking = checked ? '1' : '';\n\t\t\t}\n\n\t\t\t$( '.ajax-success-msg' ).remove();\n\t\t\t$status.after( globals.ajax_spinner );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'text',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_save_setting',\n\t\t\t\t\tchecked: checked,\n\t\t\t\t\tsetting: setting,\n\t\t\t\t\tnonce: wpmdb_data.nonces.save_setting\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\talert( wpmdb_strings.save_settings_problem );\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\t$status.append( '<span class=\"ajax-success-msg\">' + wpmdb_strings.saved + '</span>' );\n\t\t\t\t\t$( '.ajax-success-msg' ).fadeOut( 2000, function() {\n\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t// disable form submissions\n\t\t$( '.migrate-form' ).submit( function( e ) {\n\t\t\te.preventDefault();\n\t\t} );\n\n\t\t// fire connection_box_changed when the connect button is pressed\n\t\t$( '.connect-button' ).click( function( event ) {\n\t\t\tevent.preventDefault();\n\t\t\t$( this ).blur();\n\t\t\twpmdb.functions.connection_box_changed();\n\t\t} );\n\n\t\t// send paste even to connection_box_changed() function\n\t\t$( '.pull-push-connection-info' ).bind( 'paste', function( e ) {\n\t\t\tvar $this = this;\n\t\t\tsetTimeout( function() {\n\t\t\t\twpmdb.functions.connection_box_changed();\n\t\t\t}, 0 );\n\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.try-again', function() {\n\t\t\t$( '.pull-push-connection-info' ).removeClass( 'temp-disabled' );\n\t\t\twpmdb.functions.connection_box_changed();\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.try-http', function() {\n\t\t\tvar connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\\n' );\n\t\t\tvar new_url = connection_info[ 0 ].replace( 'https', 'http' );\n\t\t\tvar new_contents = new_url + '\\n' + connection_info[ 1 ];\n\t\t\t$( '.pull-push-connection-info' ).val( new_contents );\n\t\t\twpmdb.functions.connection_box_changed();\n\t\t} );\n\n\t\t$( '.create-new-profile' ).change( function() {\n\t\t\tglobals.profile_name_edited = true;\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.temporarily-disable-ssl', function() {\n\t\t\tvar hash = '';\n\t\t\tif ( window.location.hash ) {\n\t\t\t\thash = window.location.hash.substring( 1 );\n\t\t\t}\n\t\t\t$( this ).attr( 'href', $( this ).attr( 'href' ) + '&hash=' + hash );\n\t\t} );\n\n\t\t// Sets the initial Pause/Resume button event to Pause\n\t\t$( 'body' ).on( 'click', '.pause-resume', function( event ) {\n\t\t\tglobals.set_pause_resume_button( event );\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.cancel', function( event ) {\n\t\t\tglobals.cancel_migration( event );\n\t\t} );\n\n\t\t$( '.enter-licence' ).click( function() {\n\t\t\t$( '.settings' ).click();\n\t\t\t$( '.licence-input' ).focus();\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.copy-licence-to-remote-site', function() {\n\t\t\t$( '.connection-status' ).html( wpmdb_strings.copying_license );\n\t\t\t$( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );\n\t\t\t$( '.connection-status' ).append( globals.ajax_spinner );\n\n\t\t\tvar connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\\n' );\n\n\t\t\tglobals.doing_ajax = true;\n\t\t\tglobals.disable_export_type_controls();\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_copy_licence_to_remote_site',\n\t\t\t\t\turl: connection_info[ 0 ],\n\t\t\t\t\tkey: connection_info[ 1 ],\n\t\t\t\t\tnonce: wpmdb_data.nonces.copy_licence_to_remote_site\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t$( '.connection-status' ).html( globals.get_ajax_errors( jqXHR.responseText, '(#143)', jqXHR ) );\n\t\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tglobals.enable_export_type_controls();\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t\tglobals.enable_export_type_controls();\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\t$( '.connection-status' ).html( data.body );\n\t\t\t\t\t\t$( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );\n\n\t\t\t\t\t\tif ( data.body.indexOf( '401 Unauthorized' ) > -1 ) {\n\t\t\t\t\t\t\t$( '.basic-access-auth-wrapper' ).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twpmdb.functions.connection_box_changed();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t$( 'body' ).on( 'click', '.reactivate-licence', function( e ) {\n\t\t\tglobals.doing_ajax = true;\n\n\t\t\t$( '.invalid-licence' ).empty().html( wpmdb_strings.attempting_to_activate_licence );\n\t\t\t$( '.invalid-licence' ).append( globals.ajax_spinner );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcache: false,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'wpmdb_reactivate_licence',\n\t\t\t\t\tnonce: wpmdb_data.nonces.reactivate_licence\n\t\t\t\t},\n\t\t\t\terror: function( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t$( '.invalid-licence' ).html( wpmdb_strings.activate_licence_problem );\n\t\t\t\t\t$( '.invalid-licence' ).append( '<br /><br />' + wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText + '<br /><br />' + wpmdb_strings.response + '<br />' + jqXHR.responseText );\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_ajax = false;\n\t\t\t\t},\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t$( '.ajax-spinner' ).remove();\n\t\t\t\t\tglobals.doing_ajax = false;\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {\n\t\t\t\t\t\t$( '.invalid-licence' ).html( data.body );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'undefined' !== typeof data.wpmdb_dbrains_api_down && 1 === data.wpmdb_dbrains_api_down ) {\n\t\t\t\t\t\t$( '.invalid-licence' ).html( wpmdb_strings.temporarily_activated_licence );\n\t\t\t\t\t\t$( '.invalid-licence' ).append( data.body );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '.invalid-licence' ).empty().html( wpmdb_strings.licence_reactivated );\n\t\t\t\t\tlocation.reload();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\t$( 'input[name=table_migrate_option]' ).change( function() {\n\t\t\tglobals.maybe_show_mixed_cased_table_name_warning();\n\t\t\t$.wpmdb.do_action( 'wpmdb_tables_to_migrate_changed' );\n\t\t} );\n\n\t\t$( 'body' ).on( 'change', '#select-tables', function() {\n\t\t\tglobals.maybe_show_mixed_cased_table_name_warning();\n\t\t\t$.wpmdb.do_action( 'wpmdb_tables_to_migrate_changed' );\n\t\t} );\n\n\t\t$.wpmdb.add_filter( 'wpmdb_get_table_prefix', globals.get_table_prefix );\n\t\t$.wpmdb.add_filter( 'wpmdb_get_tables_to_migrate', wpmdb.functions.get_tables_to_migrate );\n\t\t$.wpmdb.add_action( 'wpmdb_lock_replace_url', globals.lock_replace_url );\n\t\t$.wpmdb.add_action( 'wpmdb_pin_replace_url', globals.pin_replace_url );\n\t\t$.wpmdb.add_action( 'move_connection_info_box', wpmdb.functions.exclude_post_types_warning );\n\n\t\t$.wpmdb.add_filter( 'wpmdb_before_migration_complete_hooks', function( hooks ) {\n\t\t\tglobals.pause_before_finalize = !!$( 'input[name=pause_before_finalize]:checked' ).length;\n\t\t\tif ( true === globals.pause_before_finalize && 'savefile' !== globals.migration_intent ) {\n\t\t\t\tglobals.set_pause_resume_button( null ); // don't just set migration_paused to true, since `set_pause_resume_button` will get double bound to clicking resume\n\t\t\t\twindow.is_auto_pause_before_finalize = true;\n\t\t\t}\n\t\t\treturn hooks;\n\t\t} );\n\n\t\t$( '.wpmdb-switch' ).on( 'click', function( e ) {\n\t\t\tif ( !$( this ).hasClass( 'disabled' ) ) {\n\t\t\t\tglobals.set_checkbox( $( this ).attr( 'id' ) );\n\t\t\t}\n\t\t} );\n\n\t\t$( '#beta_optin-wrap' ).on( 'click', function( e ) {\n\t\t\tvar switch_on = $( this ).find( 'span.on' ).hasClass( 'checked' );\n\t\t\tif ( switch_on ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !wpmdb_data.is_beta_plugins_installed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar answer = confirm( wpmdb_strings.rollback_beta_to_stable );\n\n\t\t\tif ( !answer ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twindow.location = wpmdb_data.rollback_to_stable_url;\n\t\t} );\n\n\t} );\n})( jQuery, wpmdb );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/script.js","// allow enable/disable of usage tracking from non-dismissable notice\njQuery( function() {\n\tjQuery('.wpmdb-opt-usage-tracking').on( 'click', function(e) {\n\t\te.preventDefault();\n\t\tvar optIn = e.target.classList.contains('opt-yes') ? true : false\n\n\t\tjQuery('.wpmdb-usage-tracking-notice .links').text( (optIn) ? \"Thanks!\" : \"Done.\" );\n\t\tjQuery('.wpmdb-usage-tracking-notice').delay(1000).fadeOut(200);\n\n\t\tvar $switch = jQuery('#allow_tracking-wrap');\n\t\tif( optIn ) {\n\t\t\tif( ! $switch.hasClass('on') ) {\n\t\t\t\t$switch.trigger('click');\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif( $switch.hasClass('on') ) {\n\t\t\t\t$switch.trigger('click');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$switch.find('input[type=checkbox]').trigger('change');\n\t} );\n});\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/usage-tracking-notice.js","const $ = window.jQuery;\nconst wpmdb = window.wpmdb;\nconst ajaxurl = window.ajaxurl;\nconst _ = window._;\n\n$( function() {\n\t$( 'body' ).on( 'wpmdb_done', async function() {\n\t\tif ( '1' !== wpmdb_data.allow_tracking || wpmdb_data.is_pro === 'false' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet args = {\n\t\t\taction: 'wpmdb_track_migration_complete',\n\t\t\tnonce: wpmdb_data.nonces.send_migration_complete,\n\t\t\tmigration_state_id: wpmdb.migration_state_id\n\t\t};\n\n\t\ttry {\n\t\t\tconst response = await $.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tcache: false,\n\t\t\t\tdata: args\n\t\t\t} );\n\n\t\t} catch ( error ) {\n\t\t\tconsole.error( error );\n\t\t}\n\t} );\n\n\t$.wpmdb.add_action( 'wpmdb_migration_initiated', async function() {\n\t\tif ( '1' !== wpmdb_data.allow_tracking || wpmdb_data.is_pro === 'false' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet args = {\n\t\t\taction: 'wpmdb_maybe_collect_data',\n\t\t\tnonce: wpmdb_data.nonces.track_usage,\n\t\t\tmigration_state_id: wpmdb.migration_state_id\n\t\t};\n\n\t\ttry {\n\t\t\tconst response = await $.ajax( {\n\t\t\t\turl: ajaxurl,\n\t\t\t\ttype: 'POST',\n\t\t\t\tcache: false,\n\t\t\t\tdata: args\n\t\t\t} );\n\n\t\t} catch ( error ) {\n\t\t\tconsole.error( error );\n\t\t}\n\t} );\n} );\n\n\n\n// WEBPACK FOOTER //\n// ./src/wp-migrate-db-pro/asset/src/js/usage-tracking.js","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/_migration-progress.scss\n// module id = 129\n// module chunks = 0","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/_progress-upgrade.scss\n// module id = 130\n// module chunks = 0","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/backups.scss\n// module id = 131\n// module chunks = 0","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/disabled.scss\n// module id = 132\n// module chunks = 0","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/plugin-update-styles.scss\n// module id = 133\n// module chunks = 0","/*** IMPORTS FROM imports-loader ***/\nvar $ = window.jQuery;\n\n// removed by extract-text-webpack-plugin\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/imports-loader?$=>window.jQuery!./src/wp-migrate-db-pro/asset/src/sass/styles.scss\n// module id = 134\n// module chunks = 0"],"sourceRoot":""}
 
class/ClassMap.php ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeliciousBrains\WPMDB;
4
+
5
+ use DeliciousBrains\WPMDB\Common\BackupExport;
6
+ use DeliciousBrains\WPMDB\Common\Cli\CliManager;
7
+ use DeliciousBrains\WPMDB\Common\Compatibility\CompatibilityManager;
8
+ use DeliciousBrains\WPMDB\Common\Error\ErrorLog;
9
+ use DeliciousBrains\WPMDB\Common\Http\Helper;
10
+ use DeliciousBrains\WPMDB\Common\Http\RemotePost;
11
+ use DeliciousBrains\WPMDB\Common\Http\Scramble;
12
+ use DeliciousBrains\WPMDB\Common\Http\WPMDBRestAPIServer;
13
+ use DeliciousBrains\WPMDB\Common\Migration\FinalizeMigration;
14
+ use DeliciousBrains\WPMDB\Common\Migration\InitiateMigration;
15
+ use DeliciousBrains\WPMDB\Common\Migration\MigrationHelper;
16
+ use DeliciousBrains\WPMDB\Common\Migration\MigrationManager;
17
+ use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
18
+ use DeliciousBrains\WPMDB\Common\MigrationState\StateDataContainer;
19
+ use DeliciousBrains\WPMDB\Common\Plugin\Assets;
20
+ use DeliciousBrains\WPMDB\Common\Plugin\PluginManagerBase;
21
+ use DeliciousBrains\WPMDB\Common\Profile\ProfileImporter;
22
+ use DeliciousBrains\WPMDB\Common\Profile\ProfileManager;
23
+ use DeliciousBrains\WPMDB\Common\Properties\DynamicProperties;
24
+ use DeliciousBrains\WPMDB\Common\Replace;
25
+ use DeliciousBrains\WPMDB\Common\Settings\Settings;
26
+ use DeliciousBrains\WPMDB\Common\Settings\SettingsManager;
27
+ use DeliciousBrains\WPMDB\Common\Sql\Table;
28
+ use DeliciousBrains\WPMDB\Common\Sql\TableHelper;
29
+ use DeliciousBrains\WPMDB\Common\UI\Notice;
30
+ use DeliciousBrains\WPMDB\Common\UI\TemplateBase;
31
+ use DeliciousBrains\WPMDB\Common\Migration\Flush;
32
+
33
+ class ClassMap
34
+ {
35
+
36
+ public $filesystem;
37
+ public $properties;
38
+ public $util;
39
+ public $settings;
40
+ public $settings_manager;
41
+ public $error_log;
42
+ public $dynamic_props;
43
+ public $scrambler;
44
+ public $migration_state;
45
+ public $http;
46
+ public $migration_state_manager;
47
+ public $migration_helper;
48
+ public $form_data;
49
+ public $state_data_container;
50
+ public $remote_post;
51
+ public $table_helper;
52
+ public $multisite;
53
+ public $http_helper;
54
+ public $table;
55
+ public $backup_export;
56
+ public $migration_manager;
57
+ public $initiate_migration;
58
+ public $finalize_migration;
59
+ public $replace;
60
+ public $notice;
61
+ public $profile_manager;
62
+ public $template_base;
63
+ public $compatibility_manager;
64
+ public $assets;
65
+ public $plugin_manager_base;
66
+ public $cli_manager;
67
+ public $cli;
68
+ public $WPMDBRestAPIServer;
69
+ public $flush;
70
+ /**
71
+ * @var ProfileImporter
72
+ */
73
+ public $profile_importer;
74
+
75
+ public function __construct()
76
+ {
77
+ $this->state_data_container = new StateDataContainer();
78
+ $this->filesystem = new Common\Filesystem\Filesystem();
79
+ $this->properties = new Common\Properties\Properties();
80
+ $this->util = new Common\Util\Util($this->properties, $this->filesystem);
81
+ $this->WPMDBRestAPIServer = new WPMDBRestAPIServer($this->properties);
82
+
83
+ $this->settings = new Settings(
84
+ $this->util,
85
+ $this->filesystem
86
+ );
87
+
88
+
89
+ $this->error_log = new ErrorLog(
90
+ $this->settings,
91
+ $this->filesystem,
92
+ $this->util,
93
+ $this->properties
94
+ );
95
+
96
+ $this->dynamic_props = new DynamicProperties();
97
+ $this->scrambler = new Scramble();
98
+ $this->migration_state = new Common\MigrationState\MigrationState();
99
+ $this->http = new Common\Http\Http(
100
+ $this->util,
101
+ $this->filesystem,
102
+ $this->scrambler,
103
+ $this->properties,
104
+ $this->error_log
105
+ );
106
+
107
+ $this->migration_state_manager = new MigrationStateManager(
108
+ $this->error_log,
109
+ $this->util,
110
+ new Common\MigrationState\MigrationState(),
111
+ $this->http,
112
+ $this->properties,
113
+ $this->state_data_container
114
+ );
115
+
116
+ $this->form_data = new Common\FormData\FormData(
117
+ $this->util,
118
+ $this->migration_state_manager
119
+ );
120
+
121
+ $this->http_helper = new Helper(
122
+ $this->settings,
123
+ $this->http
124
+ );
125
+
126
+ $this->multisite = new Common\Multisite\Multisite(
127
+ $this->migration_state_manager,
128
+ $this->properties,
129
+ $this->util
130
+ );
131
+
132
+ $this->table_helper = new TableHelper(
133
+ $this->form_data,
134
+ $this->migration_state_manager,
135
+ $this->http
136
+ );
137
+
138
+ //RemotePost
139
+ $this->remote_post = new RemotePost(
140
+ $this->util,
141
+ $this->filesystem,
142
+ $this->migration_state_manager,
143
+ $this->settings,
144
+ $this->error_log,
145
+ $this->scrambler,
146
+ $this->properties
147
+ );
148
+
149
+ $this->replace = new Replace(
150
+ $this->migration_state_manager,
151
+ $this->table_helper,
152
+ $this->error_log,
153
+ $this->util,
154
+ $this->form_data,
155
+ $this->properties
156
+ );
157
+
158
+ // Notice
159
+ $this->notice = new Notice();
160
+
161
+ //Table
162
+ $this->table = new Table(
163
+ $this->filesystem,
164
+ $this->util,
165
+ $this->error_log,
166
+ $this->migration_state_manager,
167
+ $this->form_data,
168
+ $this->table_helper,
169
+ $this->multisite,
170
+ $this->http,
171
+ $this->http_helper,
172
+ $this->remote_post,
173
+ $this->properties,
174
+ $this->replace
175
+ );
176
+ $this->profile_importer = new ProfileImporter($this->util, $this->table);
177
+ // BackupExport
178
+ $this->backup_export = new BackupExport(
179
+ $this->settings,
180
+ $this->filesystem,
181
+ $this->table_helper,
182
+ $this->http,
183
+ $this->form_data,
184
+ $this->table,
185
+ $this->properties,
186
+ $this->migration_state_manager
187
+ );
188
+
189
+ $this->assets = new Assets(
190
+ $this->http,
191
+ $this->error_log,
192
+ $this->filesystem,
193
+ $this->properties,
194
+ $this->settings,
195
+ $this->util
196
+ );
197
+
198
+
199
+ $this->migration_helper = new MigrationHelper(
200
+ $this->multisite,
201
+ $this->util,
202
+ $this->table,
203
+ $this->filesystem,
204
+ $this->properties,
205
+ $this->settings,
206
+ $this->assets
207
+ );
208
+ //InitiateMigration
209
+ $this->initiate_migration = new InitiateMigration(
210
+ $this->migration_state_manager,
211
+ new Common\MigrationState\MigrationState(),
212
+ $this->table,
213
+ $this->http,
214
+ $this->http_helper,
215
+ $this->util,
216
+ $this->remote_post,
217
+ $this->form_data,
218
+ $this->filesystem,
219
+ $this->error_log,
220
+ $this->properties,
221
+ $this->migration_helper,
222
+ $this->backup_export
223
+ );
224
+
225
+ //FinalizeMigration
226
+ $this->finalize_migration = new FinalizeMigration(
227
+ $this->migration_state_manager,
228
+ $this->table,
229
+ $this->http,
230
+ $this->table_helper,
231
+ $this->http_helper,
232
+ $this->util,
233
+ $this->remote_post,
234
+ $this->form_data,
235
+ $this->properties,
236
+ $this->migration_helper
237
+ );
238
+
239
+ // MigrationManager
240
+ $this->migration_manager = new MigrationManager(
241
+ $this->migration_state_manager,
242
+ new Common\MigrationState\MigrationState(),
243
+ $this->table,
244
+ $this->http,
245
+ $this->table_helper,
246
+ $this->http_helper,
247
+ $this->util,
248
+ $this->remote_post,
249
+ $this->form_data,
250
+ $this->filesystem,
251
+ $this->error_log,
252
+ $this->backup_export,
253
+ $this->multisite,
254
+ $this->initiate_migration,
255
+ $this->finalize_migration,
256
+ $this->properties,
257
+ $this->WPMDBRestAPIServer,
258
+ $this->migration_helper
259
+ );
260
+
261
+ // ProfileManager
262
+ $this->profile_manager = new ProfileManager(
263
+ $this->http,
264
+ $this->http_helper,
265
+ $this->properties,
266
+ $this->settings,
267
+ $this->migration_state_manager,
268
+ $this->util,
269
+ $this->error_log,
270
+ $this->table,
271
+ $this->form_data,
272
+ $this->assets,
273
+ $this->WPMDBRestAPIServer,
274
+ $this->profile_importer
275
+ );
276
+
277
+ // TemplateBase
278
+ $this->template_base = new TemplateBase(
279
+ $this->settings,
280
+ $this->util,
281
+ $this->profile_manager,
282
+ $this->filesystem,
283
+ $this->table,
284
+ $this->properties
285
+ );
286
+
287
+ // CompatibilityManager
288
+ $this->compatibility_manager = new CompatibilityManager(
289
+ $this->filesystem,
290
+ $this->settings,
291
+ $this->notice,
292
+ $this->http,
293
+ $this->http_helper,
294
+ $this->template_base,
295
+ $this->migration_state_manager,
296
+ $this->util,
297
+ $this->properties,
298
+ $this->WPMDBRestAPIServer
299
+ );
300
+
301
+ $this->settings_manager = new SettingsManager(
302
+ $this->http,
303
+ $this->settings,
304
+ $this->migration_state_manager,
305
+ $this->error_log,
306
+ $this->http_helper,
307
+ $this->WPMDBRestAPIServer,
308
+ $this->util
309
+ );
310
+
311
+ $this->plugin_manager_base = new PluginManagerBase(
312
+ $this->settings,
313
+ $this->assets,
314
+ $this->util,
315
+ $this->table,
316
+ $this->http,
317
+ $this->filesystem,
318
+ $this->multisite,
319
+ $this->properties,
320
+ $this->migration_helper,
321
+ $this->WPMDBRestAPIServer,
322
+ $this->http_helper,
323
+ $this->template_base,
324
+ $this->notice
325
+ );
326
+
327
+ $this->cli_manager = new CliManager();
328
+
329
+ $this->cli = new Common\Cli\Cli(
330
+ $this->form_data,
331
+ $this->util,
332
+ $this->cli_manager,
333
+ $this->table,
334
+ $this->error_log,
335
+ $this->initiate_migration,
336
+ $this->finalize_migration,
337
+ $this->http_helper,
338
+ $this->migration_manager,
339
+ $this->migration_state_manager
340
+ );
341
+ $this->flush = new Flush($this->http_helper, $this->util, $this->remote_post, $this->http);
342
+ }
343
+ }
class/Common/BackupExport.php CHANGED
@@ -5,143 +5,162 @@ namespace DeliciousBrains\WPMDB\Common;
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
6
  use DeliciousBrains\WPMDB\Common\FormData\FormData;
7
  use DeliciousBrains\WPMDB\Common\Http\Http;
 
8
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
9
- use DeliciousBrains\WPMDB\Common\MigrationState\StateDataContainer;
10
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
11
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
12
  use DeliciousBrains\WPMDB\Common\Sql\Table;
13
  use DeliciousBrains\WPMDB\Common\Sql\TableHelper;
14
 
15
- class BackupExport {
16
- /**
17
- * @var Filesystem
18
- */
19
- private $filesystem;
20
- /**
21
- * @var TableHelper
22
- */
23
- private $table_helper;
24
- /**
25
- * @var Http
26
- */
27
- private $http;
28
- /**
29
- * @var Table
30
- */
31
- private $table;
32
- /**
33
- * @var FormData
34
- */
35
- private $form_data;
36
- /**
37
- * @var Properties
38
- */
39
- private $props;
40
- /**
41
- * @var Settings
42
- */
43
- private $settings;
44
- /**
45
- * @var MigrationStateManager
46
- */
47
- private $migration_state_manager;
48
-
49
- public function __construct(
50
- Settings $settings,
51
- Filesystem $filesystem,
52
- TableHelper $table_helper,
53
- Http $http,
54
- FormData $form_data,
55
- Table $table,
56
- Properties $properties,
57
- MigrationStateManager $migration_state_manager
58
- ) {
59
- $this->props = $properties;
60
- $this->settings = $settings->get_settings();
61
- $this->filesystem = $filesystem;
62
- $this->table_helper = $table_helper;
63
- $this->http = $http;
64
- $this->form_data = $form_data;
65
- $this->table = $table;
66
- $this->migration_state_manager = $migration_state_manager;
67
- }
68
-
69
- function register() {
70
- add_filter( 'wpmdb_backup_header_included_tables', array( $this, 'backup_header_included_tables' ) );
71
- }
72
-
73
- function delete_export_file( $filename, $is_backup ) {
74
- $dump_file = $this->table_helper->format_dump_name( $filename );
75
-
76
- if ( true == $is_backup ) {
77
- $dump_file = preg_replace( '/.gz$/', '', $dump_file );
78
- }
79
-
80
- $dump_file = $this->filesystem->get_upload_info( 'path' ) . DIRECTORY_SEPARATOR . $dump_file;
81
-
82
- if ( empty( $dump_file ) || false === $this->filesystem->file_exists( $dump_file ) ) {
83
- $return = array( 'wpmdb_error' => 1, 'body' => __( 'MySQL export file not found.', 'wp-migrate-db' ) );
84
-
85
- return $this->http->end_ajax( json_encode( $return ) );
86
- }
87
-
88
- if ( false === $this->filesystem->unlink( $dump_file ) ) {
89
- $return = array( 'wpmdb_error' => 1, 'body' => __( 'Could not delete the MySQL export file.', 'wp-migrate-db' ) );
90
-
91
- return $this->http->end_ajax( json_encode( $return ) );
92
- }
93
- }
94
-
95
- /**
96
- * Determine which tables to backup (if required).
97
- *
98
- * @param $profile
99
- * @param $prefixed_tables
100
- * @param $all_tables
101
- *
102
- * @return mixed|void
103
- */
104
- public function get_tables_to_backup( $profile, $prefixed_tables, $all_tables ) {
105
- $tables_to_backup = array();
106
-
107
- switch ( $profile['backup_option'] ) {
108
- case 'backup_only_with_prefix':
109
- $tables_to_backup = $prefixed_tables;
110
- break;
111
- case 'backup_selected':
112
- /**
113
- * When tables to migrate is tables with prefix, select_tables
114
- * might be empty. Intersecting it with remote/local tables
115
- * throws notice/warning and won't backup the file either.
116
- */
117
- if ( 'migrate_only_with_prefix' === $profile['table_migrate_option'] ) {
118
- $tables_to_backup = $prefixed_tables;
119
- } else {
120
- $tables_to_backup = array_intersect( $profile['select_tables'], $all_tables );
121
- }
122
- break;
123
- case 'backup_manual_select':
124
- $tables_to_backup = array_intersect( $profile['select_backup'], $all_tables );
125
- break;
126
- }
127
-
128
- return apply_filters( 'wpmdb_tables_to_backup', $tables_to_backup, $profile );
129
- }
130
-
131
- /**
132
- * Updates the database backup header with the tables that were backed up.
133
- *
134
- * @param $included_tables
135
- *
136
- * @return mixed|void
137
- */
138
- public function backup_header_included_tables( $included_tables ) {
139
- $state_data = $this->migration_state_manager->set_post_data();
140
- $form_data = $this->form_data->getFormData();
141
- if ( 'backup' === $state_data['stage'] ) {
142
- $included_tables = $this->get_tables_to_backup( $form_data, $this->table->get_tables( 'prefix' ), $this->table->get_tables() );
143
- }
144
-
145
- return $included_tables;
146
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  }
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
6
  use DeliciousBrains\WPMDB\Common\FormData\FormData;
7
  use DeliciousBrains\WPMDB\Common\Http\Http;
8
+ use DeliciousBrains\WPMDB\Common\MigrationPersistence\Persistence;
9
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
 
10
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
11
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
12
  use DeliciousBrains\WPMDB\Common\Sql\Table;
13
  use DeliciousBrains\WPMDB\Common\Sql\TableHelper;
14
 
15
+ class BackupExport
16
+ {
17
+
18
+ /**
19
+ * @var Filesystem
20
+ */
21
+ private $filesystem;
22
+ /**
23
+ * @var TableHelper
24
+ */
25
+ private $table_helper;
26
+ /**
27
+ * @var Http
28
+ */
29
+ private $http;
30
+ /**
31
+ * @var Table
32
+ */
33
+ private $table;
34
+ /**
35
+ * @var FormData
36
+ */
37
+ private $form_data;
38
+ /**
39
+ * @var Properties
40
+ */
41
+ private $props;
42
+ /**
43
+ * @var Settings
44
+ */
45
+ private $settings;
46
+ /**
47
+ * @var MigrationStateManager
48
+ */
49
+ private $migration_state_manager;
50
+
51
+ public function __construct(
52
+ Settings $settings,
53
+ Filesystem $filesystem,
54
+ TableHelper $table_helper,
55
+ Http $http,
56
+ FormData $form_data,
57
+ Table $table,
58
+ Properties $properties,
59
+ MigrationStateManager $migration_state_manager
60
+ ) {
61
+ $this->props = $properties;
62
+ $this->settings = $settings->get_settings();
63
+ $this->filesystem = $filesystem;
64
+ $this->table_helper = $table_helper;
65
+ $this->http = $http;
66
+ $this->form_data = $form_data;
67
+ $this->table = $table;
68
+ $this->migration_state_manager = $migration_state_manager;
69
+ }
70
+
71
+ public function register()
72
+ {
73
+ add_filter('wpmdb_backup_header_included_tables', array($this, 'backup_header_included_tables'));
74
+ }
75
+
76
+ public function delete_export_file($filename, $is_backup)
77
+ {
78
+ $dump_file = $this->table_helper->format_dump_name($filename);
79
+
80
+ if (true === $is_backup) {
81
+ $dump_file = preg_replace('/.gz$/', '', $dump_file);
82
+ }
83
+
84
+ $dump_file = $this->filesystem->get_upload_info('path') . DIRECTORY_SEPARATOR . $dump_file;
85
+
86
+ if (empty($dump_file) || false === $this->filesystem->file_exists($dump_file)) {
87
+ return $this->http->end_ajax(new \WP_Error('wp-migrate-db-export-not-found', __('MySQL export file not found.', 'wp-migrate-db')));
88
+ }
89
+
90
+ if (false === $this->filesystem->unlink($dump_file)) {
91
+ return $this->http->end_ajax(new \WP_Error('wp-migrate-db-export-not-found', __('Could not delete the MySQL export file.', 'wp-migrate-db')));
92
+ }
93
+
94
+ return null;
95
+ }
96
+
97
+ /**
98
+ * Determine which tables to backup (if required).
99
+ *
100
+ * @param $profile
101
+ * @param $prefixed_tables
102
+ * @param $all_tables
103
+ *
104
+ * @return mixed|void
105
+ */
106
+ public function get_tables_to_backup($profile, $prefixed_tables, $all_tables)
107
+ {
108
+ $tables_to_backup = array();
109
+
110
+ switch ($profile['backup_option']) {
111
+ case 'backup_only_with_prefix':
112
+ $tables_to_backup = $prefixed_tables;
113
+ break;
114
+ case 'backup_selected':
115
+ $selected_tables = isset($profile['select_backup']) && !empty($profile['select_backup']) ? $profile['select_backup'] : $profile['select_tables'];
116
+
117
+ /**
118
+ * When tables to migrate is tables with prefix, select_tables
119
+ * might be empty. Intersecting it with remote/local tables
120
+ * throws notice/warning and won't backup the file either.
121
+ */
122
+ if ('migrate_only_with_prefix' === $profile['table_migrate_option'] || empty($selected_tables)) {
123
+ $tables_to_backup = $prefixed_tables;
124
+ } else {
125
+ $selected_tables = isset($profile['select_backup']) && !empty($profile['select_backup']) ? $profile['select_backup'] : $profile['select_tables'];
126
+ $tables_to_backup = array_intersect($selected_tables, $all_tables);
127
+ }
128
+ break;
129
+ case 'backup_manual_select':
130
+ $tables_to_backup = array_intersect($profile['select_backup'], $all_tables);
131
+ break;
132
+ }
133
+
134
+ return apply_filters('wpmdb_tables_to_backup', $tables_to_backup, $profile);
135
+ }
136
+
137
+ /**
138
+ * Updates the database backup header with the tables that were backed up.
139
+ *
140
+ * @param $included_tables
141
+ *
142
+ * @return mixed|void
143
+ */
144
+ public function backup_header_included_tables($included_tables)
145
+ {
146
+ $state_data = $this->migration_state_manager->set_post_data();
147
+ $form_data = $this->form_data->getFormData();
148
+
149
+ if ('backup' === $state_data['stage']) {
150
+ $included_tables = $this->get_tables_to_backup($form_data, $this->table->get_tables('prefix'), $this->table->get_tables());
151
+ }
152
+
153
+ return $included_tables;
154
+ }
155
+
156
+ public function setup_backups()
157
+ {
158
+ $dump_filename = wp_basename($this->table->get_sql_dump_info('backup', 'path'));
159
+ $dump_filename = substr($dump_filename, 0, -4);
160
+
161
+ return [
162
+ $dump_filename,
163
+ $this->table->get_sql_dump_info('backup', 'url'),
164
+ ];
165
+ }
166
  }
class/Common/Cli/Cli.php CHANGED
@@ -9,12 +9,15 @@ use DeliciousBrains\WPMDB\Common\Migration\FinalizeMigration;
9
  use DeliciousBrains\WPMDB\Common\Migration\InitiateMigration;
10
  use DeliciousBrains\WPMDB\Common\Migration\MigrationManager;
11
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
 
12
  use DeliciousBrains\WPMDB\Common\Properties\DynamicProperties;
13
  use DeliciousBrains\WPMDB\Common\Sql\Table;
14
  use DeliciousBrains\WPMDB\Common\Util\Util;
15
  use DeliciousBrains\WPMDB\Container;
 
16
 
17
- class Cli {
 
18
 
19
  /**
20
  * Migration profile.
@@ -75,6 +78,10 @@ class Cli {
75
  * @var MigrationStateManager
76
  */
77
  protected $migration_state_manager;
 
 
 
 
78
  /**
79
  * @var DynamicProperties
80
  */
@@ -92,6 +99,7 @@ class Cli {
92
  MigrationManager $migration_manager,
93
  MigrationStateManager $migration_state_manager
94
  ) {
 
95
  $this->form_data = $form_data;
96
  $this->util = $util;
97
  $this->cli_manager = $cli_manager;
@@ -103,10 +111,12 @@ class Cli {
103
  $this->migration_manager = $migration_manager;
104
  $this->migration_state_manager = $migration_state_manager;
105
  $this->dynamic_properties = DynamicProperties::getInstance();
 
106
  }
107
 
108
- public function register() {
109
- add_filter( 'wpmdb_cli_finalize_migration_response', array( $this, 'finalize_ajax' ), 10, 2 );
 
110
  }
111
 
112
  /**
@@ -116,27 +126,27 @@ class Cli {
116
  *
117
  * @return mixed|WP_Error
118
  */
119
- public function pre_cli_migration_check( $profile ) {
120
- if ( is_array( $profile ) ) {
121
- $query_str = http_build_query( $profile );
122
- $profile = $this->form_data->parse_migration_form_data( $query_str );
123
- $profile = wp_parse_args( $profile, array(
124
- 'save_computer' => '0',
125
- 'gzip_file' => '0',
126
- 'replace_guids' => '0',
127
- 'exclude_transients' => '0',
128
- 'exclude_spam' => '0',
129
- 'keep_active_plugins' => '0',
130
- 'compatibility_older_mysql' => '0',
131
- ) );
132
  }
133
 
134
- $this->profile = $profile = apply_filters( 'wpmdb_cli_profile_before_migration', $profile );
 
 
 
135
 
136
- if ( is_wp_error( $profile ) ) {
137
- return $profile;
 
 
138
  }
139
 
 
 
140
  return true;
141
  }
142
 
@@ -148,97 +158,101 @@ class Cli {
148
  *
149
  * @return bool|WP_Error Returns true if succeed or WP_Error if failed.
150
  */
151
-
152
-
153
- public function cli_migration( $profile, $assoc_args = array() ) {
154
- $pre_check = $this->pre_cli_migration_check( $profile );
155
- if ( is_wp_error( $pre_check ) ) {
156
  return $pre_check;
157
  }
158
 
159
  // At this point, $profile has been checked a retrieved into $this->profile, so should not be used in this function any further.
160
- if ( empty( $this->profile ) ) {
161
- return $this->cli_error( __( 'Profile not found or unable to be generated from params.', 'wp-migrate-db-cli' ) );
162
  }
163
- unset( $profile );
164
 
165
  $this->util->set_time_limit();
166
  $this->cli_manager->set_cli_migration();
167
 
168
- if ( 'savefile' === $this->profile['action'] ) {
169
  $this->post_data['intent'] = 'savefile';
170
- if ( ! empty( $this->profile['export_dest'] ) ) {
171
  $this->post_data['export_dest'] = $this->profile['export_dest'];
172
  } else {
173
  $this->post_data['export_dest'] = 'ORIGIN';
174
  }
175
  }
176
 
177
- if ( 'find_replace' === $this->profile['action'] ) {
178
  $this->post_data['intent'] = 'find_replace';
179
  }
180
 
181
- if ( 'import' === $this->profile['action'] ) {
182
  $this->post_data['intent'] = 'import';
183
 
184
- if ( ! isset( $this->profile['import_file'] ) ) {
185
- if ( isset( $assoc_args['import-file'] ) ) {
186
  $this->profile['import_file'] = $assoc_args['import-file'];
187
  } else {
188
- return $this->cli_error( __( 'Missing path to import file. Use --import-file=/path/to/import.sql.gz', 'wp-migrate-db' ) );
189
  }
190
  }
191
  }
192
 
 
 
 
 
 
 
 
193
  // Ensure local site_details available.
194
  $this->post_data['site_details']['local'] = $this->util->site_details();
195
 
196
- $this->profile = apply_filters( 'wpmdb_cli_filter_before_cli_initiate_migration', $this->profile, $this->post_data );
197
 
198
- if ( is_wp_error( $this->profile ) ) {
199
- \WP_CLI::error( $this->profile->get_error_message() );
200
  }
201
 
202
  // Check for tables specified in migration profile that do not exist in the source database
203
- if ( ! empty( $this->profile['select_tables'] ) && 'import' !== $this->profile['action'] ) {
204
- $source_tables = apply_filters( 'wpmdb_cli_filter_source_tables', $this->table->get_tables(), $this->profile );
205
 
206
- if ( ! empty( $source_tables ) ) {
207
  // Return error if selected tables do not exist in source database
208
  $nonexistent_tables = array();
209
- foreach ( $this->profile['select_tables'] as $table ) {
210
- if ( ! in_array( $table, $source_tables ) ) {
211
  $nonexistent_tables[] = $table;
212
  }
213
  }
214
 
215
- if ( ! empty( $nonexistent_tables ) ) {
216
- $local_or_remote = ( 'pull' === $this->profile['action'] ) ? 'remote' : 'local';
217
 
218
- return $this->cli_error( sprintf( __( 'The following table(s) do not exist in the %1$s database: %2$s', 'wp-migrate-db-cli' ), $local_or_remote, implode( ', ', $nonexistent_tables ) ) );
219
  }
220
  }
221
  }
222
 
223
- if ( ! empty( $this->dynamic_properties->post_data ) ) {
224
  $this->post_data = $this->dynamic_properties->post_data;
225
  }
226
 
227
- if ( is_wp_error( $this->profile ) ) {
228
  return $this->profile;
229
  }
230
 
231
- do_action( 'wpmdb_cli_before_migration', $this->post_data, $this->profile );
232
  $this->migration = $this->cli_initiate_migration();
233
 
234
- if ( is_wp_error( $this->migration ) ) {
235
  return $this->migration;
236
  }
237
 
238
- $this->post_data['migration_state_id'] = $this->migration['migration_state_id'];
239
-
240
- if ( 'import' === $this->profile['action'] ) {
241
- if ( $this->profile['create_backup'] ) {
242
  $tables_to_process = $this->migrate_tables();
243
  } else {
244
  $tables_to_process = $this->get_tables_to_migrate();
@@ -247,16 +261,17 @@ class Cli {
247
  $tables_to_process = $this->migrate_tables();
248
  }
249
 
250
- if ( is_wp_error( $tables_to_process ) ) {
251
  return $tables_to_process;
252
  }
253
 
254
- $this->post_data['tables'] = implode( ',', $tables_to_process );
255
 
256
- do_action( 'wpmdb_cli_during_cli_migration', $this->post_data, $this->profile );
257
 
258
  $finalize = $this->finalize_migration();
259
- if ( is_wp_error( $finalize ) || 'savefile' === $this->profile['action'] ) {
 
260
  return $finalize;
261
  }
262
 
@@ -271,28 +286,33 @@ class Cli {
271
  *
272
  * @return WP_Error|string
273
  */
274
- function verify_cli_response( $response, $function_name ) {
275
- $response = trim( $response );
276
- if ( false === $response ) {
277
- return $this->cli_error( $this->error_log->getError() );
278
  }
279
 
280
- if ( false === Util::is_json( $response ) ) {
281
- return $this->cli_error( sprintf( __( 'We were expecting a JSON response, instead we received: %2$s (function name: %1$s)', 'wp-migrate-db-cli' ), $function_name, $response ) );
 
282
  }
283
 
284
- $response = json_decode( $response, true );
285
- if ( isset( $response['wpmdb_error'] ) ) {
286
- return $this->cli_error( $response['body'] );
 
 
 
 
287
  }
288
 
289
  // Display warnings and non fatal error messages as CLI warnings without aborting.
290
- if ( isset( $response['wpmdb_warning'] ) || isset( $response['wpmdb_non_fatal_error'] ) ) {
291
- $body = ( isset ( $response['cli_body'] ) ) ? $response['cli_body'] : $response['body'];
292
- $messages = maybe_unserialize( $body );
293
- foreach ( ( array ) $messages as $message ) {
294
- if ( $message ) {
295
- \WP_CLI::warning( self::cleanup_message( $message ) );
296
  }
297
  }
298
  }
@@ -307,8 +327,9 @@ class Cli {
307
  *
308
  * @return \WP_Error.
309
  */
310
- function cli_error( $message ) {
311
- return new \WP_Error( 'wpmdb_cli_error', self::cleanup_message( $message ) );
 
312
  }
313
 
314
  /**
@@ -318,10 +339,11 @@ class Cli {
318
  *
319
  * @return string $message.
320
  */
321
- static function cleanup_message( $message ) {
322
- $message = html_entity_decode( $message, ENT_QUOTES );
323
- $message = preg_replace( '#<br\s*/?>#', "\n", $message );
324
- $message = trim( strip_tags( $message ) );
 
325
 
326
  return $message;
327
  }
@@ -331,30 +353,30 @@ class Cli {
331
  *
332
  * @return array|WP_Error
333
  */
334
- function cli_initiate_migration() {
335
- do_action( 'wpmdb_cli_before_initiate_migration', $this->profile );
 
336
 
337
- \WP_CLI::log( __( 'Initiating migration...', 'wp-migrate-db-cli' ) );
338
 
339
  $migration_args = $this->post_data;
340
- $migration_args['form_data'] = http_build_query( $this->profile );
341
  $migration_args['stage'] = 'migrate';
342
  $migration_args['site_details']['local'] = $this->util->site_details();
343
 
344
- if ( 'find_replace' === $this->profile['action'] ) {
345
  $migration_args['stage'] = 'find_replace';
346
-
347
  }
348
 
349
- $this->post_data = apply_filters( 'wpmdb_cli_initiate_migration_args', $migration_args, $this->profile );
350
 
351
- $this->post_data['site_details'] = json_encode( $this->post_data['site_details'] );
352
 
353
- $response = $this->initiate_migration( $this->post_data );
354
 
355
- $initiate_migration_response = $this->verify_cli_response( $response, 'initiate_migration()' );
356
- if ( ! is_wp_error( $initiate_migration_response ) ) {
357
- $initiate_migration_response = apply_filters( 'wpmdb_cli_initiate_migration_response', $initiate_migration_response );
358
  }
359
 
360
  return $initiate_migration_response;
@@ -365,14 +387,15 @@ class Cli {
365
  *
366
  * @return array|WP_Error
367
  */
368
- function get_tables_to_migrate() {
369
- $tables_to_migrate = $this->table->get_tables( 'prefix' );
 
370
 
371
  // @TODO Hack to get profile and post_data info available in other areas of the codebase...
372
  $this->dynamic_properties->profile = $this->profile;
373
  $this->dynamic_properties->post_data = $this->post_data;
374
 
375
- return apply_filters( 'wpmdb_cli_tables_to_migrate', $tables_to_migrate, $this->profile, $this->migration );
376
  }
377
 
378
  /**
@@ -383,25 +406,26 @@ class Cli {
383
  *
384
  * @return cli\progress\Bar|WP_CLI\NoOp
385
  */
386
- function get_progress_bar( $tables, $stage ) {
 
387
 
388
- $progress_label = __( 'Exporting tables', 'wp-migrate-db-cli' );
389
 
390
- if ( 'find_replace' === $this->profile['action'] ) {
391
- $progress_label = __( 'Running find & replace', 'wp-migrate-db-cli' );
392
 
393
- if ( 1 === $stage ) {
394
- $progress_label = __( 'Performing backup', 'wp-migrate-db-cli' );
395
  }
396
  }
397
 
398
- $progress_label = apply_filters( 'wpmdb_cli_progress_label', $progress_label, $stage, $tables );
399
 
400
- $progress_label = str_pad( $progress_label, 20, ' ' );
401
 
402
- $count = $this->get_total_rows_from_table_list( $tables, $stage );
403
 
404
- return \WP_CLI\Utils\make_progress_bar( $progress_label, $count );
405
  }
406
 
407
  /**
@@ -412,17 +436,18 @@ class Cli {
412
  *
413
  * @return Int
414
  */
415
- function get_total_rows_from_table_list( $tables, $stage ) {
 
416
  static $cached_results = array();
417
 
418
- if ( isset( $cached_results[ $stage ] ) ) {
419
- return $cached_results[ $stage ];
420
  }
421
 
422
- $table_rows = $this->get_row_counts_from_table_list( $tables, $stage );
423
- $cached_results[ $stage ] = array_sum( array_intersect_key( $table_rows, array_flip( $tables ) ) );
424
 
425
- return $cached_results[ $stage ];
426
  }
427
 
428
  /**
@@ -433,61 +458,63 @@ class Cli {
433
  *
434
  * @return mixed
435
  */
436
- function get_row_counts_from_table_list( $tables, $stage ) {
 
437
  static $cached_results = array();
438
 
439
- if ( isset( $cached_results[ $stage ] ) ) {
440
- return $cached_results[ $stage ];
441
  }
442
 
443
  $local_table_rows = $this->table->get_table_row_count();
444
- $cached_results[ $stage ] = apply_filters( 'wpmdb_cli_get_row_counts_from_table_list', $local_table_rows, $stage );
445
 
446
- return $cached_results[ $stage ];
447
  }
448
 
449
  /**
450
  * @return array|mixed|string|void|WP_Error
451
  */
452
- function migrate_tables() {
 
453
  $tables_to_migrate = $this->get_tables_to_migrate();
454
  $this->dynamic_properties->post_data = $this->post_data;
455
 
456
  $tables = $tables_to_migrate;
457
  $stage_iterator = 2;
458
 
459
- $filtered_vars = apply_filters( 'wpmdb_cli_filter_before_migrate_tables', array(
460
  'tables' => $tables,
461
  'stage_iterator' => $stage_iterator,
462
- ) );
463
- if ( ! is_array( $filtered_vars ) ) {
464
  return $filtered_vars;
465
  } else {
466
- extract( $filtered_vars, EXTR_OVERWRITE );
467
  }
468
 
469
- if ( empty( $tables ) ) {
470
- return $this->cli_error( __( 'No tables selected for migration.', 'wp-migrate-db' ) );
471
  }
472
 
473
- $table_rows = $this->get_row_counts_from_table_list( $tables, $stage_iterator );
474
 
475
- do_action( 'wpmdb_cli_before_migrate_tables', $this->profile, $this->migration );
476
 
477
- $notify = $this->get_progress_bar( $tables, $stage_iterator );
478
  $args = $this->post_data;
479
 
480
  do {
481
  $migration_progress = 0;
482
 
483
- foreach ( $tables as $key => $table ) {
484
- $current_row = - 1;
485
  $primary_keys = '';
486
  $table_progress = 0;
487
  $table_progress_last = 0;
488
 
489
  $args['table'] = $table;
490
- $args['last_table'] = ( $key == count( $tables ) - 1 ) ? '1' : '0';
491
 
492
  do {
493
  // reset the current chunk
@@ -495,28 +522,28 @@ class Cli {
495
 
496
  $args['current_row'] = $current_row;
497
  $args['primary_keys'] = $primary_keys;
498
- $args = apply_filters( 'wpmdb_cli_migrate_table_args', $args, $this->profile, $this->migration );
499
 
500
- $response = $this->migrate_table( $args );
501
 
502
- $migrate_table_response = $this->verify_cli_response( $response, 'migrate_table()' );
503
 
504
- if ( is_wp_error( $migrate_table_response ) ) {
505
  return $migrate_table_response;
506
  }
507
 
508
- $migrate_table_response = apply_filters( 'wpmdb_cli_migrate_table_response', $migrate_table_response, $_POST, $this->profile, $this->migration );
509
 
510
  $current_row = $migrate_table_response['current_row'];
511
  $primary_keys = $migrate_table_response['primary_keys'];
512
 
513
  $last_migration_progress = $migration_progress;
514
 
515
- if ( - 1 == $current_row ) {
516
  $migration_progress -= $table_progress;
517
- $migration_progress += $table_rows[ $table ];
518
  } else {
519
- if ( 0 === $table_progress_last ) {
520
  $table_progress_last = $current_row;
521
  $table_progress = $table_progress_last;
522
  $migration_progress += $table_progress_last;
@@ -530,31 +557,30 @@ class Cli {
530
 
531
  $increment = $migration_progress - $last_migration_progress;
532
 
533
- $notify->tick( $increment );
534
-
535
- } while ( - 1 != $current_row );
536
  }
537
 
538
  $notify->finish();
539
 
540
- ++ $stage_iterator;
541
  $args['stage'] = 'migrate';
542
 
543
- if ( 'find_replace' === $args['intent'] ) {
544
  $args['stage'] = 'find_replace';
545
  }
546
 
547
- if ( 'import' === $args['intent'] ) {
548
  break;
549
  }
550
 
551
  $tables = $tables_to_migrate;
552
- $table_rows = $this->get_row_counts_from_table_list( $tables, $stage_iterator );
553
 
554
- if ( $stage_iterator < 3 ) {
555
- $notify = $this->get_progress_bar( $tables, $stage_iterator );
556
  }
557
- } while ( $stage_iterator < 3 );
558
 
559
  $this->post_data = $args;
560
 
@@ -566,31 +592,33 @@ class Cli {
566
  *
567
  * @return bool|WP_Error
568
  */
569
- function finalize_migration() {
570
- do_action( 'wpmdb_cli_before_finalize_migration', $this->profile, $this->migration );
 
571
 
572
- \WP_CLI::log( __( 'Cleaning up...', 'wp-migrate-db-cli' ) );
573
 
574
- $finalize = apply_filters( 'wpmdb_cli_finalize_migration', true, $this->profile, $this->migration );
575
- if ( is_wp_error( $finalize ) ) {
576
  return $finalize;
577
  }
578
 
579
- $this->post_data = apply_filters( 'wpmdb_cli_finalize_migration_args', $this->post_data, $this->profile, $this->migration );
580
 
581
  $this->dynamic_properties->post_data = $this->post_data;
582
 
583
- if ( 'savefile' === $this->post_data['intent'] ) {
584
  return $this->finalize_export();
585
  }
586
 
587
- $response = null;
588
- $response = apply_filters( 'wpmdb_cli_finalize_migration_response', $response, $this->post_data );
589
- if ( ! empty( $response ) && '1' !== $response ) {
590
- return $this->cli_error( $response );
 
591
  }
592
 
593
- do_action( 'wpmdb_cli_after_finalize_migration', $this->profile, $this->migration );
594
 
595
  return true;
596
  }
@@ -602,12 +630,13 @@ class Cli {
602
  *
603
  * @return string
604
  */
605
- function initiate_migration( $args = false ) {
606
- $_POST = $args;
607
- $response = $this->initiate_migration->ajax_initiate_migration();
 
608
 
609
- return $response;
610
- }
611
 
612
  /**
613
  * stub for ajax_migrate_table()
@@ -616,7 +645,8 @@ class Cli {
616
  *
617
  * @return string
618
  */
619
- function migrate_table( $args = false ) {
 
620
  $_POST = $args;
621
  $response = $this->migration_manager->ajax_migrate_table();
622
 
@@ -631,14 +661,15 @@ class Cli {
631
  *
632
  * @return string
633
  */
634
- function finalize_ajax( $response, $post_data ) {
 
635
  // don't send redundant POST variables
636
- $args = $this->http_helper->filter_post_elements( $post_data, array( 'action', 'migration_state_id', 'prefix', 'tables' ) );
637
  $_POST = $args;
638
 
639
  $response = $this->finalize_migration->ajax_finalize_migration();
640
 
641
- return trim( $response );
642
  }
643
 
644
  /**
@@ -646,18 +677,19 @@ class Cli {
646
  *
647
  * @return string|error
648
  */
649
- function finalize_export() {
 
650
  $state_data = $this->migration_state_manager->set_post_data();
651
 
652
  $temp_file = $state_data['dump_path'];
653
- if ( 'ORIGIN' === $state_data['export_dest'] ) {
654
  $response = $temp_file;
655
  } else {
656
  $dest_file = $state_data['export_dest'];
657
- if ( file_exists( $temp_file ) && rename( $temp_file, $dest_file ) ) {
658
  $response = $dest_file;
659
  } else {
660
- $response = $this->cli_error( __( 'Unable to move exported file.', 'wp-migrate-db' ) );
661
  }
662
  }
663
 
@@ -671,10 +703,11 @@ class Cli {
671
  *
672
  * @return array
673
  */
674
- public function get_unknown_args( $assoc_args = array() ) {
 
675
  $unknown_args = array();
676
 
677
- if ( empty( $assoc_args ) ) {
678
  return $unknown_args;
679
  }
680
 
@@ -690,8 +723,8 @@ class Cli {
690
  'include-transients',
691
  );
692
 
693
- $known_args = apply_filters( 'wpmdb_cli_filter_get_extra_args', $known_args );
694
- $unknown_args = array_diff( array_keys( $assoc_args ), $known_args );
695
 
696
  return $unknown_args;
697
  }
@@ -704,43 +737,51 @@ class Cli {
704
  *
705
  * @return array|WP_Error
706
  */
707
- public function get_profile_data_from_args( $args, $assoc_args ) {
708
- $export_dest = null;
 
 
 
 
 
709
  //load correct cli class
710
- if ( function_exists( 'wp_migrate_db_pro_cli_addon' ) && function_exists( 'wp_migrate_db_pro' ) ) {
711
  $wpmdb_cli = wp_migrate_db_pro_cli_addon();
712
- } elseif ( function_exists( 'wpmdb_pro_cli' ) ) {
713
  $wpmdb_cli = wpmdb_pro_cli();
714
  } else {
715
  $wpmdb_cli = wpmdb_cli();
716
  }
717
 
718
- $unknown_args = $this->get_unknown_args( $assoc_args );
719
 
720
- if ( ! empty( $unknown_args ) ) {
721
- $message = __( 'Parameter errors: ', 'wp-migrate-db-cli' );
722
- foreach ( $unknown_args as $unknown_arg ) {
723
- $message .= "\n " . sprintf( __( 'unknown %s parameter', 'wp-migrate-db-cli' ), '--' . $unknown_arg );
724
  }
725
 
726
- if ( is_a( $wpmdb_cli, 'WPMDBPro_CLI' ) ) {
727
- $message .= "\n" . __( 'Please make sure that you have activated the appropriate addons for WP Migrate DB Pro.', 'wp-migrate-db-cli' );
 
 
 
728
  }
729
 
730
- return $wpmdb_cli->cli_error( $message );
731
  }
732
 
733
- foreach ( $assoc_args as $key => $value ) {
734
- if ( empty( $value ) ) {
735
- \WP_CLI::warning( __( '--' . $key . ' parameter needs a value.', 'wp-migrate-db-cli' ) );
736
  }
737
  }
738
 
739
- if ( empty( $assoc_args['action'] ) ) {
740
- return $wpmdb_cli->cli_error( __( 'Missing action parameter', 'wp-migrate-db-cli' ) );
741
  }
742
 
743
- if ( 'savefile' === $assoc_args['action'] && ! empty( $assoc_args['export_dest'] ) ) {
744
  $export_dest = $assoc_args['export_dest'];
745
  }
746
 
@@ -749,48 +790,46 @@ class Cli {
749
  // --find=<old> and --replace=<new>
750
  $replace_old = array();
751
  $replace_new = array();
752
- if ( ! empty( $assoc_args['find'] ) ) {
753
- $replace_old = str_getcsv( $assoc_args['find'] );
754
  } else {
755
- if ( 'find_replace' === $assoc_args['action'] ) {
756
- if ( empty( $assoc_args['replace'] ) ) {
757
- return $wpmdb_cli->cli_error( __( 'Missing find and replace values.', 'wp-migrate-db-cli' ) );
758
  }
759
 
760
- return $wpmdb_cli->cli_error( __( 'Find value is required.', 'wp-migrate-db-cli' ) );
761
  }
762
  }
763
- if ( ! empty( $assoc_args['replace'] ) ) {
764
- $replace_new = str_getcsv( $assoc_args['replace'] );
765
  } else {
766
- if ( 'find_replace' === $assoc_args['action'] ) {
767
- return $wpmdb_cli->cli_error( __( 'Replace value is required.', 'wp-migrate-db-cli' ) );
768
  }
769
  }
770
- if ( count( $replace_old ) !== count( $replace_new ) ) {
771
- return $wpmdb_cli->cli_error( sprintf( __( '%1$s and %2$s must contain the same number of values', 'wp-migrate-db-cli' ), '--find', '--replace' ) );
772
  }
773
- array_unshift( $replace_old, '' );
774
- array_unshift( $replace_new, '' );
775
 
776
  // --exclude-spam
777
- $exclude_spam = intval( isset( $assoc_args['exclude-spam'] ) );
778
 
779
  // --gzip-file
780
- $gzip_file = intval( isset( $assoc_args['gzip-file'] ) );
781
 
782
- $select_post_types = array();
 
783
 
784
  // --exclude-post-revisions
785
- if ( ! empty( $assoc_args['exclude-post-revisions'] ) ) {
786
- $select_post_types[] = 'revision';
 
787
  }
788
 
789
- $exclude_post_types = count( $select_post_types ) > 0 ? 1 : 0;
790
-
791
  // --skip-replace-guids
792
  $replace_guids = 1;
793
- if ( isset( $assoc_args['skip-replace-guids'] ) ) {
794
  $replace_guids = 0;
795
  }
796
 
@@ -798,32 +837,57 @@ class Cli {
798
  $table_migrate_option = 'migrate_only_with_prefix';
799
 
800
  // --include-transients.
801
- $exclude_transients = intval( ! isset( $assoc_args['include-transients'] ) );
802
 
803
  //cleanup filename for exports
804
- if ( ! empty( $export_dest ) ) {
805
- if ( $gzip_file ) {
806
- if ( 'gz' !== pathinfo( $export_dest, PATHINFO_EXTENSION ) ) {
807
- if ( 'sql' === pathinfo( $export_dest, PATHINFO_EXTENSION ) ) {
808
  $export_dest .= '.gz';
809
  } else {
810
  $export_dest .= '.sql.gz';
811
  }
812
  }
813
- } elseif ( 'sql' !== pathinfo( $export_dest, PATHINFO_EXTENSION ) ) {
814
- $export_dest = preg_replace( '/(\.sql)?(\.gz)?$/i', '', $export_dest ) . '.sql';
815
  }
816
 
817
  // ensure export destination is writable
818
- if ( ! @touch( $export_dest ) ) {
819
- return $wpmdb_cli->cli_error( sprintf( __( 'Cannot write to file "%1$s". Please ensure that the specified directory exists and is writable.', 'wp-migrate-db-cli' ), $export_dest ) );
820
  }
821
  }
822
 
823
- $profile = compact( 'action', 'replace_old', 'table_migrate_option', 'replace_new', 'select_tables', 'exclude_post_types', 'select_post_types', 'replace_guids', 'exclude_spam', 'gzip_file', 'exclude_transients', 'export_dest' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
824
 
825
- $profile = apply_filters( 'wpmdb_cli_filter_get_profile_data_from_args', $profile, $args, $assoc_args );
826
 
827
- return $profile;
828
  }
829
  }
9
  use DeliciousBrains\WPMDB\Common\Migration\InitiateMigration;
10
  use DeliciousBrains\WPMDB\Common\Migration\MigrationManager;
11
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
12
+ use DeliciousBrains\WPMDB\Common\Profile\ProfileImporter;
13
  use DeliciousBrains\WPMDB\Common\Properties\DynamicProperties;
14
  use DeliciousBrains\WPMDB\Common\Sql\Table;
15
  use DeliciousBrains\WPMDB\Common\Util\Util;
16
  use DeliciousBrains\WPMDB\Container;
17
+ use DeliciousBrains\WPMDB\Common\MigrationPersistence\Persistence;
18
 
19
+ class Cli
20
+ {
21
 
22
  /**
23
  * Migration profile.
78
  * @var MigrationStateManager
79
  */
80
  protected $migration_state_manager;
81
+ /**
82
+ * @var ProfileImporter
83
+ */
84
+ protected $profile_importer;
85
  /**
86
  * @var DynamicProperties
87
  */
99
  MigrationManager $migration_manager,
100
  MigrationStateManager $migration_state_manager
101
  ) {
102
+
103
  $this->form_data = $form_data;
104
  $this->util = $util;
105
  $this->cli_manager = $cli_manager;
111
  $this->migration_manager = $migration_manager;
112
  $this->migration_state_manager = $migration_state_manager;
113
  $this->dynamic_properties = DynamicProperties::getInstance();
114
+ $this->profile_importer = new ProfileImporter($this->util, $this->table);
115
  }
116
 
117
+ public function register()
118
+ {
119
+ add_filter('wpmdb_cli_finalize_migration_response', array($this, 'finalize_ajax'), 10, 2);
120
  }
121
 
122
  /**
126
  *
127
  * @return mixed|WP_Error
128
  */
129
+ public function pre_cli_migration_check($profile)
130
+ {
131
+ $profile = apply_filters('wpmdb_cli_profile_before_migration', $profile);
132
+
133
+ if (is_wp_error($profile)) {
134
+ return $profile;
 
 
 
 
 
 
 
135
  }
136
 
137
+ if (is_array($profile)) {
138
+ Persistence::cleanupStateOptions();
139
+ $profile = $this->form_data->parse_and_save_migration_form_data(json_encode($profile));
140
+ }
141
 
142
+ $this->profile = $profile;
143
+
144
+ if (!isset($this->profile['current_migration']['stages'])) {
145
+ $this->profile['current_migration']['stages'] = array('tables');
146
  }
147
 
148
+ $this->profile['current_migration']['migration_id'] = Util::uuidv4();
149
+
150
  return true;
151
  }
152
 
158
  *
159
  * @return bool|WP_Error Returns true if succeed or WP_Error if failed.
160
  */
161
+ public function cli_migration($profile, $assoc_args = array())
162
+ {
163
+ $pre_check = $this->pre_cli_migration_check($profile);
164
+ if (is_wp_error($pre_check)) {
 
165
  return $pre_check;
166
  }
167
 
168
  // At this point, $profile has been checked a retrieved into $this->profile, so should not be used in this function any further.
169
+ if (empty($this->profile)) {
170
+ return $this->cli_error(__('Profile not found or unable to be generated from params.', 'wp-migrate-db-cli'));
171
  }
172
+ unset($profile);
173
 
174
  $this->util->set_time_limit();
175
  $this->cli_manager->set_cli_migration();
176
 
177
+ if ('savefile' === $this->profile['action']) {
178
  $this->post_data['intent'] = 'savefile';
179
+ if (!empty($this->profile['export_dest'])) {
180
  $this->post_data['export_dest'] = $this->profile['export_dest'];
181
  } else {
182
  $this->post_data['export_dest'] = 'ORIGIN';
183
  }
184
  }
185
 
186
+ if ('find_replace' === $this->profile['action']) {
187
  $this->post_data['intent'] = 'find_replace';
188
  }
189
 
190
+ if ('import' === $this->profile['action']) {
191
  $this->post_data['intent'] = 'import';
192
 
193
+ if (!isset($this->profile['import_file'])) {
194
+ if (isset($assoc_args['import-file'])) {
195
  $this->profile['import_file'] = $assoc_args['import-file'];
196
  } else {
197
+ return $this->cli_error(__('Missing path to import file. Use --import-file=/path/to/import.sql.gz', 'wp-migrate-db'));
198
  }
199
  }
200
  }
201
 
202
+ if (
203
+ isset($this->profile['current_migration'], $this->profile['current_migration']['intent'])
204
+ && 'backup_local' === $this->profile['current_migration']['intent']
205
+ ) {
206
+ $this->post_data['intent'] = 'savefile';
207
+ }
208
+
209
  // Ensure local site_details available.
210
  $this->post_data['site_details']['local'] = $this->util->site_details();
211
 
212
+ $this->profile = apply_filters('wpmdb_cli_filter_before_cli_initiate_migration', $this->profile, $this->post_data);
213
 
214
+ if (is_wp_error($this->profile)) {
215
+ \WP_CLI::error($this->profile->get_error_message());
216
  }
217
 
218
  // Check for tables specified in migration profile that do not exist in the source database
219
+ if (!empty($this->profile['select_tables']) && 'import' !== $this->profile['action']) {
220
+ $source_tables = apply_filters('wpmdb_cli_filter_source_tables', $this->table->get_tables(), $this->profile);
221
 
222
+ if (!empty($source_tables)) {
223
  // Return error if selected tables do not exist in source database
224
  $nonexistent_tables = array();
225
+ foreach ($this->profile['select_tables'] as $table) {
226
+ if (!in_array($table, $source_tables)) {
227
  $nonexistent_tables[] = $table;
228
  }
229
  }
230
 
231
+ if (!empty($nonexistent_tables)) {
232
+ $local_or_remote = ('pull' === $this->profile['action']) ? 'remote' : 'local';
233
 
234
+ return $this->cli_error(sprintf(__('The following table(s) do not exist in the %1$s database: %2$s', 'wp-migrate-db-cli'), $local_or_remote, implode(', ', $nonexistent_tables)));
235
  }
236
  }
237
  }
238
 
239
+ if (!empty($this->dynamic_properties->post_data)) {
240
  $this->post_data = $this->dynamic_properties->post_data;
241
  }
242
 
243
+ if (is_wp_error($this->profile)) {
244
  return $this->profile;
245
  }
246
 
247
+ do_action('wpmdb_cli_before_migration', $this->post_data, $this->profile);
248
  $this->migration = $this->cli_initiate_migration();
249
 
250
+ if (is_wp_error($this->migration)) {
251
  return $this->migration;
252
  }
253
 
254
+ if ('import' === $this->profile['action']) {
255
+ if ($this->profile['create_backup']) {
 
 
256
  $tables_to_process = $this->migrate_tables();
257
  } else {
258
  $tables_to_process = $this->get_tables_to_migrate();
261
  $tables_to_process = $this->migrate_tables();
262
  }
263
 
264
+ if (is_wp_error($tables_to_process)) {
265
  return $tables_to_process;
266
  }
267
 
268
+ $this->post_data['tables'] = implode(',', $tables_to_process);
269
 
270
+ do_action('wpmdb_cli_during_cli_migration', $this->post_data, $this->profile);
271
 
272
  $finalize = $this->finalize_migration();
273
+
274
+ if (is_wp_error($finalize) || in_array($this->profile['action'], ['savefile', 'backup_local'])) {
275
  return $finalize;
276
  }
277
 
286
  *
287
  * @return WP_Error|string
288
  */
289
+ function verify_cli_response($response, $function_name)
290
+ {
291
+ if (is_wp_error($response)) {
292
+ return $response;
293
  }
294
 
295
+ $response = trim($response);
296
+ if (false === $response) {
297
+ return $this->cli_error($this->error_log->getError());
298
  }
299
 
300
+ if (false === Util::is_json($response)) {
301
+ return $this->cli_error(sprintf(__('We were expecting a JSON response, instead we received: %2$s (function name: %1$s)', 'wp-migrate-db-cli'), $function_name, $response));
302
+ }
303
+
304
+ $response = json_decode($response, true);
305
+ if (isset($response['wpmdb_error'])) {
306
+ return $this->cli_error($response['body']);
307
  }
308
 
309
  // Display warnings and non fatal error messages as CLI warnings without aborting.
310
+ if (isset($response['wpmdb_warning']) || isset($response['wpmdb_non_fatal_error'])) {
311
+ $body = (isset($response['cli_body'])) ? $response['cli_body'] : $response['body'];
312
+ $messages = maybe_unserialize($body);
313
+ foreach ((array) $messages as $message) {
314
+ if ($message) {
315
+ \WP_CLI::warning(self::cleanup_message($message));
316
  }
317
  }
318
  }
327
  *
328
  * @return \WP_Error.
329
  */
330
+ function cli_error($message)
331
+ {
332
+ return new \WP_Error('wpmdb_cli_error', self::cleanup_message($message));
333
  }
334
 
335
  /**
339
  *
340
  * @return string $message.
341
  */
342
+ static function cleanup_message($message)
343
+ {
344
+ $message = html_entity_decode($message, ENT_QUOTES);
345
+ $message = preg_replace('#<br\s*/?>#', "\n", $message);
346
+ $message = trim(strip_tags($message));
347
 
348
  return $message;
349
  }
353
  *
354
  * @return array|WP_Error
355
  */
356
+ function cli_initiate_migration()
357
+ {
358
+ do_action('wpmdb_cli_before_initiate_migration', $this->profile);
359
 
360
+ \WP_CLI::log(__('Initiating migration...', 'wp-migrate-db-cli'));
361
 
362
  $migration_args = $this->post_data;
363
+ $migration_args['form_data'] = json_encode($this->profile);
364
  $migration_args['stage'] = 'migrate';
365
  $migration_args['site_details']['local'] = $this->util->site_details();
366
 
367
+ if ('find_replace' === $this->profile['action']) {
368
  $migration_args['stage'] = 'find_replace';
 
369
  }
370
 
371
+ $this->post_data = apply_filters('wpmdb_cli_initiate_migration_args', $migration_args, $this->profile);
372
 
373
+ $this->post_data['site_details'] = json_encode($this->post_data['site_details']);
374
 
375
+ $response = $this->initiate_migration($this->post_data);
376
 
377
+ $initiate_migration_response = $this->verify_cli_response($response, 'initiate_migration()');
378
+ if (!is_wp_error($initiate_migration_response)) {
379
+ $initiate_migration_response = apply_filters('wpmdb_cli_initiate_migration_response', $initiate_migration_response);
380
  }
381
 
382
  return $initiate_migration_response;
387
  *
388
  * @return array|WP_Error
389
  */
390
+ function get_tables_to_migrate()
391
+ {
392
+ $tables_to_migrate = $this->table->get_tables('prefix');
393
 
394
  // @TODO Hack to get profile and post_data info available in other areas of the codebase...
395
  $this->dynamic_properties->profile = $this->profile;
396
  $this->dynamic_properties->post_data = $this->post_data;
397
 
398
+ return apply_filters('wpmdb_cli_tables_to_migrate', $tables_to_migrate, $this->profile, $this->migration);
399
  }
400
 
401
  /**
406
  *
407
  * @return cli\progress\Bar|WP_CLI\NoOp
408
  */
409
+ function get_progress_bar($tables, $stage)
410
+ {
411
 
412
+ $progress_label = __('Exporting tables', 'wp-migrate-db-cli');
413
 
414
+ if ('find_replace' === $this->profile['action']) {
415
+ $progress_label = __('Running find & replace', 'wp-migrate-db-cli');
416
 
417
+ if (1 === $stage) {
418
+ $progress_label = __('Performing backup', 'wp-migrate-db-cli');
419
  }
420
  }
421
 
422
+ $progress_label = apply_filters('wpmdb_cli_progress_label', $progress_label, $stage, $tables);
423
 
424
+ $progress_label = str_pad($progress_label, 20, ' ');
425
 
426
+ $count = $this->get_total_rows_from_table_list($tables, $stage);
427
 
428
+ return \WP_CLI\Utils\make_progress_bar($progress_label, $count);
429
  }
430
 
431
  /**
436
  *
437
  * @return Int
438
  */
439
+ function get_total_rows_from_table_list($tables, $stage)
440
+ {
441
  static $cached_results = array();
442
 
443
+ if (isset($cached_results[$stage])) {
444
+ return $cached_results[$stage];
445
  }
446
 
447
+ $table_rows = $this->get_row_counts_from_table_list($tables, $stage);
448
+ $cached_results[$stage] = array_sum(array_intersect_key($table_rows, array_flip($tables)));
449
 
450
+ return $cached_results[$stage];
451
  }
452
 
453
  /**
458
  *
459
  * @return mixed
460
  */
461
+ function get_row_counts_from_table_list($tables, $stage)
462
+ {
463
  static $cached_results = array();
464
 
465
+ if (isset($cached_results[$stage])) {
466
+ return $cached_results[$stage];
467
  }
468
 
469
  $local_table_rows = $this->table->get_table_row_count();
470
+ $cached_results[$stage] = apply_filters('wpmdb_cli_get_row_counts_from_table_list', $local_table_rows, $stage);
471
 
472
+ return $cached_results[$stage];
473
  }
474
 
475
  /**
476
  * @return array|mixed|string|void|WP_Error
477
  */
478
+ function migrate_tables()
479
+ {
480
  $tables_to_migrate = $this->get_tables_to_migrate();
481
  $this->dynamic_properties->post_data = $this->post_data;
482
 
483
  $tables = $tables_to_migrate;
484
  $stage_iterator = 2;
485
 
486
+ $filtered_vars = apply_filters('wpmdb_cli_filter_before_migrate_tables', array(
487
  'tables' => $tables,
488
  'stage_iterator' => $stage_iterator,
489
+ ));
490
+ if (!is_array($filtered_vars)) {
491
  return $filtered_vars;
492
  } else {
493
+ extract($filtered_vars, EXTR_OVERWRITE);
494
  }
495
 
496
+ if (empty($tables)) {
497
+ return $this->cli_error(__('No tables selected for migration.', 'wp-migrate-db'));
498
  }
499
 
500
+ $table_rows = $this->get_row_counts_from_table_list($tables, $stage_iterator);
501
 
502
+ do_action('wpmdb_cli_before_migrate_tables', $this->profile, $this->migration);
503
 
504
+ $notify = $this->get_progress_bar($tables, $stage_iterator);
505
  $args = $this->post_data;
506
 
507
  do {
508
  $migration_progress = 0;
509
 
510
+ foreach ($tables as $key => $table) {
511
+ $current_row = -1;
512
  $primary_keys = '';
513
  $table_progress = 0;
514
  $table_progress_last = 0;
515
 
516
  $args['table'] = $table;
517
+ $args['last_table'] = ($key == count($tables) - 1) ? '1' : '0';
518
 
519
  do {
520
  // reset the current chunk
522
 
523
  $args['current_row'] = $current_row;
524
  $args['primary_keys'] = $primary_keys;
525
+ $args = apply_filters('wpmdb_cli_migrate_table_args', $args, $this->profile, $this->migration);
526
 
527
+ $response = $this->migrate_table($args);
528
 
529
+ $migrate_table_response = $this->verify_cli_response($response, 'migrate_table()');
530
 
531
+ if (is_wp_error($migrate_table_response)) {
532
  return $migrate_table_response;
533
  }
534
 
535
+ $migrate_table_response = apply_filters('wpmdb_cli_migrate_table_response', $migrate_table_response, $_POST, $this->profile, $this->migration);
536
 
537
  $current_row = $migrate_table_response['current_row'];
538
  $primary_keys = $migrate_table_response['primary_keys'];
539
 
540
  $last_migration_progress = $migration_progress;
541
 
542
+ if (-1 == $current_row) {
543
  $migration_progress -= $table_progress;
544
+ $migration_progress += $table_rows[$table];
545
  } else {
546
+ if (0 === $table_progress_last) {
547
  $table_progress_last = $current_row;
548
  $table_progress = $table_progress_last;
549
  $migration_progress += $table_progress_last;
557
 
558
  $increment = $migration_progress - $last_migration_progress;
559
 
560
+ $notify->tick($increment);
561
+ } while (-1 != $current_row);
 
562
  }
563
 
564
  $notify->finish();
565
 
566
+ ++$stage_iterator;
567
  $args['stage'] = 'migrate';
568
 
569
+ if ('find_replace' === $args['intent']) {
570
  $args['stage'] = 'find_replace';
571
  }
572
 
573
+ if ('import' === $args['intent']) {
574
  break;
575
  }
576
 
577
  $tables = $tables_to_migrate;
578
+ $table_rows = $this->get_row_counts_from_table_list($tables, $stage_iterator);
579
 
580
+ if ($stage_iterator < 3) {
581
+ $notify = $this->get_progress_bar($tables, $stage_iterator);
582
  }
583
+ } while ($stage_iterator < 3);
584
 
585
  $this->post_data = $args;
586
 
592
  *
593
  * @return bool|WP_Error
594
  */
595
+ function finalize_migration()
596
+ {
597
+ do_action('wpmdb_cli_before_finalize_migration', $this->profile, $this->migration);
598
 
599
+ \WP_CLI::log(__('Cleaning up...', 'wp-migrate-db-cli'));
600
 
601
+ $finalize = apply_filters('wpmdb_cli_finalize_migration', true, $this->profile, $this->migration);
602
+ if (is_wp_error($finalize)) {
603
  return $finalize;
604
  }
605
 
606
+ $this->post_data = apply_filters('wpmdb_cli_finalize_migration_args', $this->post_data, $this->profile, $this->migration);
607
 
608
  $this->dynamic_properties->post_data = $this->post_data;
609
 
610
+ if ('savefile' === $this->post_data['intent']) {
611
  return $this->finalize_export();
612
  }
613
 
614
+ $response = apply_filters('wpmdb_cli_finalize_migration_response', null, $this->post_data);
615
+ $response = $this->verify_cli_response($response, 'finalize_migration()');
616
+
617
+ if (is_wp_error($response)) {
618
+ return $response;
619
  }
620
 
621
+ do_action('wpmdb_cli_after_finalize_migration', $this->profile, $this->migration);
622
 
623
  return true;
624
  }
630
  *
631
  * @return string
632
  */
633
+ function initiate_migration($args = false)
634
+ {
635
+ $_POST = $args;
636
+ $response = $this->initiate_migration->ajax_initiate_migration();
637
 
638
+ return $response;
639
+ }
640
 
641
  /**
642
  * stub for ajax_migrate_table()
645
  *
646
  * @return string
647
  */
648
+ function migrate_table($args = false)
649
+ {
650
  $_POST = $args;
651
  $response = $this->migration_manager->ajax_migrate_table();
652
 
661
  *
662
  * @return string
663
  */
664
+ function finalize_ajax($response, $post_data)
665
+ {
666
  // don't send redundant POST variables
667
+ $args = $this->http_helper->filter_post_elements($post_data, array('action', 'migration_state_id', 'prefix', 'tables', 'profileID', 'profileType'));
668
  $_POST = $args;
669
 
670
  $response = $this->finalize_migration->ajax_finalize_migration();
671
 
672
+ return $this->verify_cli_response($response, 'finalize_ajax()');
673
  }
674
 
675
  /**
677
  *
678
  * @return string|error
679
  */
680
+ function finalize_export()
681
+ {
682
  $state_data = $this->migration_state_manager->set_post_data();
683
 
684
  $temp_file = $state_data['dump_path'];
685
+ if (!isset($state_data['export_dest']) || 'ORIGIN' === $state_data['export_dest']) {
686
  $response = $temp_file;
687
  } else {
688
  $dest_file = $state_data['export_dest'];
689
+ if (file_exists($temp_file) && rename($temp_file, $dest_file)) {
690
  $response = $dest_file;
691
  } else {
692
+ $response = $this->cli_error(__('Unable to move exported file.', 'wp-migrate-db'));
693
  }
694
  }
695
 
703
  *
704
  * @return array
705
  */
706
+ public function get_unknown_args($assoc_args = array())
707
+ {
708
  $unknown_args = array();
709
 
710
+ if (empty($assoc_args)) {
711
  return $unknown_args;
712
  }
713
 
723
  'include-transients',
724
  );
725
 
726
+ $known_args = apply_filters('wpmdb_cli_filter_get_extra_args', $known_args);
727
+ $unknown_args = array_diff(array_keys($assoc_args), $known_args);
728
 
729
  return $unknown_args;
730
  }
737
  *
738
  * @return array|WP_Error
739
  */
740
+ public function get_profile_data_from_args($args, $assoc_args)
741
+ {
742
+ $name = null;
743
+ $export_dest = null;
744
+ $create_backup = '0';
745
+ $cli_profile = true;
746
+
747
  //load correct cli class
748
+ if (function_exists('wp_migrate_db_pro_cli_addon') && function_exists('wp_migrate_db_pro')) {
749
  $wpmdb_cli = wp_migrate_db_pro_cli_addon();
750
+ } elseif (function_exists('wpmdb_pro_cli')) {
751
  $wpmdb_cli = wpmdb_pro_cli();
752
  } else {
753
  $wpmdb_cli = wpmdb_cli();
754
  }
755
 
756
+ $unknown_args = $this->get_unknown_args($assoc_args);
757
 
758
+ if (!empty($unknown_args)) {
759
+ $message = __('Parameter errors: ', 'wp-migrate-db-cli');
760
+ foreach ($unknown_args as $unknown_arg) {
761
+ $message .= "\n " . sprintf(__('unknown %s parameter', 'wp-migrate-db-cli'), '--' . $unknown_arg);
762
  }
763
 
764
+ if (
765
+ is_a($wpmdb_cli, '\DeliciousBrains\WPMDB\Pro\Cli\Export') ||
766
+ is_a($wpmdb_cli, '\DeliciousBrains\WPMDBCli\Cli')
767
+ ) {
768
+ $message .= "\n" . __('Please make sure that you have activated the appropriate addons for WP Migrate DB Pro.', 'wp-migrate-db-cli');
769
  }
770
 
771
+ return $wpmdb_cli->cli_error($message);
772
  }
773
 
774
+ foreach ($assoc_args as $key => $value) {
775
+ if (empty($value)) {
776
+ \WP_CLI::warning(__('--' . $key . ' parameter needs a value.', 'wp-migrate-db-cli'));
777
  }
778
  }
779
 
780
+ if (empty($assoc_args['action'])) {
781
+ return $wpmdb_cli->cli_error(__('Missing action parameter', 'wp-migrate-db-cli'));
782
  }
783
 
784
+ if ('savefile' === $assoc_args['action'] && !empty($assoc_args['export_dest'])) {
785
  $export_dest = $assoc_args['export_dest'];
786
  }
787
 
790
  // --find=<old> and --replace=<new>
791
  $replace_old = array();
792
  $replace_new = array();
793
+ if (!empty($assoc_args['find'])) {
794
+ $replace_old = str_getcsv($assoc_args['find']);
795
  } else {
796
+ if ('find_replace' === $assoc_args['action']) {
797
+ if (empty($assoc_args['replace'])) {
798
+ return $wpmdb_cli->cli_error(__('Missing find and replace values.', 'wp-migrate-db-cli'));
799
  }
800
 
801
+ return $wpmdb_cli->cli_error(__('Find value is required.', 'wp-migrate-db-cli'));
802
  }
803
  }
804
+ if (!empty($assoc_args['replace'])) {
805
+ $replace_new = str_getcsv($assoc_args['replace']);
806
  } else {
807
+ if ('find_replace' === $assoc_args['action']) {
808
+ return $wpmdb_cli->cli_error(__('Replace value is required.', 'wp-migrate-db-cli'));
809
  }
810
  }
811
+ if (count($replace_old) !== count($replace_new)) {
812
+ return $wpmdb_cli->cli_error(sprintf(__('%1$s and %2$s must contain the same number of values', 'wp-migrate-db-cli'), '--find', '--replace'));
813
  }
 
 
814
 
815
  // --exclude-spam
816
+ $exclude_spam = (int)isset($assoc_args['exclude-spam']);
817
 
818
  // --gzip-file
819
+ $gzip_file = (int)isset($assoc_args['gzip-file']);
820
 
821
+ $select_post_types = $this->table->get_post_types();
822
+ $exclude_post_types = '0';
823
 
824
  // --exclude-post-revisions
825
+ if (!empty($assoc_args['exclude-post-revisions'])) {
826
+ $select_post_types = ['revision']; // This gets flipped around in ProfileImporter::profileFormat().
827
+ $exclude_post_types = '1';
828
  }
829
 
 
 
830
  // --skip-replace-guids
831
  $replace_guids = 1;
832
+ if (isset($assoc_args['skip-replace-guids'])) {
833
  $replace_guids = 0;
834
  }
835
 
837
  $table_migrate_option = 'migrate_only_with_prefix';
838
 
839
  // --include-transients.
840
+ $exclude_transients = intval(!isset($assoc_args['include-transients']));
841
 
842
  //cleanup filename for exports
843
+ if (!empty($export_dest)) {
844
+ if ($gzip_file) {
845
+ if ('gz' !== pathinfo($export_dest, PATHINFO_EXTENSION)) {
846
+ if ('sql' === pathinfo($export_dest, PATHINFO_EXTENSION)) {
847
  $export_dest .= '.gz';
848
  } else {
849
  $export_dest .= '.sql.gz';
850
  }
851
  }
852
+ } elseif ('sql' !== pathinfo($export_dest, PATHINFO_EXTENSION)) {
853
+ $export_dest = preg_replace('/(\.sql)?(\.gz)?$/i', '', $export_dest) . '.sql';
854
  }
855
 
856
  // ensure export destination is writable
857
+ if (!@touch($export_dest)) {
858
+ return $wpmdb_cli->cli_error(sprintf(__('Cannot write to file "%1$s". Please ensure that the specified directory exists and is writable.', 'wp-migrate-db-cli'), $export_dest));
859
  }
860
  }
861
 
862
+ $profile = compact(
863
+ 'action',
864
+ 'replace_old',
865
+ 'table_migrate_option',
866
+ 'replace_new',
867
+ 'select_tables',
868
+ 'exclude_post_types',
869
+ 'select_post_types',
870
+ 'replace_guids',
871
+ 'exclude_spam',
872
+ 'gzip_file',
873
+ 'exclude_transients',
874
+ 'export_dest',
875
+ 'create_backup',
876
+ 'name',
877
+ 'cli_profile'
878
+ );
879
+
880
+ $home = preg_replace('/^https?:/', '', home_url());
881
+ $path = esc_html(addslashes($this->util->get_absolute_root_file_path()));
882
+
883
+ $old_profile = apply_filters('wpmdb_cli_filter_get_profile_data_from_args', $profile, $args, $assoc_args);
884
+
885
+ if (is_wp_error($old_profile)) {
886
+ return $old_profile;
887
+ }
888
 
889
+ $new_profile = $this->profile_importer->profileFormat($old_profile, $home, $path);
890
 
891
+ return array_merge($old_profile, $new_profile);
892
  }
893
  }
class/Common/Cli/CliManager.php CHANGED
@@ -4,19 +4,21 @@ namespace DeliciousBrains\WPMDB\Common\Cli;
4
 
5
  use DeliciousBrains\WPMDB\Common\Properties\DynamicProperties;
6
 
7
- class CliManager {
 
8
 
9
  /**
10
  * @var DynamicProperties
11
  */
12
  private $dynamic_properties;
13
 
14
- public function __construct(
15
- ) {
16
  $this->dynamic_properties = DynamicProperties::getInstance();
17
  }
18
 
19
- function set_cli_migration() {
 
20
  DynamicProperties::getInstance()->doing_cli_migration = true;
21
  }
22
  }
4
 
5
  use DeliciousBrains\WPMDB\Common\Properties\DynamicProperties;
6
 
7
+ class CliManager
8
+ {
9
 
10
  /**
11
  * @var DynamicProperties
12
  */
13
  private $dynamic_properties;
14
 
15
+ public function __construct()
16
+ {
17
  $this->dynamic_properties = DynamicProperties::getInstance();
18
  }
19
 
20
+ function set_cli_migration()
21
+ {
22
  DynamicProperties::getInstance()->doing_cli_migration = true;
23
  }
24
  }
class/Common/Cli/Command.php CHANGED
@@ -2,10 +2,12 @@
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Cli;
4
 
5
- class Command {
 
6
 
7
- public static function register() {
8
- \WP_CLI::add_command( 'migratedb', 'DeliciousBrains\WPMDB\Common\Cli\Command' );
 
9
  }
10
 
11
  /**
@@ -60,22 +62,23 @@ class Command {
60
  * @param array $args
61
  * @param array $assoc_args
62
  */
63
- public function export( $args, $assoc_args ) {
 
64
 
65
  $assoc_args['action'] = 'savefile';
66
- $assoc_args['export_dest'] = trim( $args[0] );
67
 
68
- if ( empty( $assoc_args['export_dest'] ) ) {
69
- \WP_CLI::error( Cli::cleanup_message( __( 'You must provide a destination filename.', 'wp-migrate-db-cli' ) ) );
70
  }
71
 
72
- $profile = $this->_get_profile_data_from_args( $args, $assoc_args );
73
 
74
- if ( is_wp_error( $profile ) ) {
75
- \WP_CLI::error( $profile );
76
  }
77
 
78
- $this->_perform_cli_migration( $profile );
79
  }
80
 
81
  /**
@@ -102,16 +105,6 @@ class Command {
102
  * Should be used in conjunction with the --find=<strings> argument, see it's
103
  * documentation for further explanation of the find & replace functionality.
104
  *
105
- * [--backup=<prefix|selected|table_one,table_two,table_etc>]
106
- * : Perform a backup of the destination site's database tables before replacing it.
107
- *
108
- * Accepted values:
109
- *
110
- * * prefix - Backup only tables that begin with your installation's
111
- * table prefix (e.g. wp_)
112
- * * selected - Backup only tables selected for migration (as in --include-tables)
113
- * * A comma separated list of the tables to backup.
114
- *
115
  * [--exclude-post-revisions]
116
  * : Exclude post revisions from the find & replace.
117
  *
@@ -135,17 +128,18 @@ class Command {
135
  *
136
  * @subcommand find-replace
137
  */
138
- public function find_replace( $args, $assoc_args ) {
 
139
 
140
  $assoc_args['action'] = 'find_replace';
141
 
142
- $profile = $this->_get_profile_data_from_args( $args, $assoc_args );
143
 
144
- if ( is_wp_error( $profile ) ) {
145
- \WP_CLI::error( $profile );
146
  }
147
 
148
- $this->_perform_cli_migration( $profile );
149
  }
150
 
151
  /**
@@ -156,10 +150,11 @@ class Command {
156
  *
157
  * @return array|WP_Error
158
  */
159
- protected function _get_profile_data_from_args( $args, $assoc_args ) {
 
160
  // Load the correct CLI class
161
- if ( function_exists( 'wpmdb_pro_cli' ) ) {
162
- if ( function_exists( 'wp_migrate_db_pro_cli_addon' ) ) {
163
  $wpmdb_cli = wp_migrate_db_pro_cli_addon();
164
  } else {
165
  $wpmdb_cli = wpmdb_pro_cli();
@@ -168,7 +163,7 @@ class Command {
168
  $wpmdb_cli = wpmdb_cli();
169
  }
170
 
171
- return $wpmdb_cli->get_profile_data_from_args( $args, $assoc_args );
172
  }
173
 
174
  /**
@@ -178,34 +173,35 @@ class Command {
178
  *
179
  * @return void
180
  */
181
- protected function _perform_cli_migration( $profile ) {
 
182
  $wpmdb_cli = null;
183
 
184
  //load correct cli class
185
- if ( function_exists( 'wpmdb_pro_cli' ) ) {
186
  $wpmdb_cli = wpmdb_pro_cli();
187
  } else {
188
  $wpmdb_cli = wpmdb_cli();
189
  }
190
 
191
- if ( empty( $wpmdb_cli ) ) {
192
- \WP_CLI::error( __( 'WP Migrate DB CLI class not available.', 'wp-migrate-db-cli' ) );
193
 
194
  return;
195
  }
196
 
197
- $result = $wpmdb_cli->cli_migration( $profile );
198
 
199
- if ( ! is_wp_error( $result ) ) {
200
- $success_msg = sprintf( __( 'Export saved to: %s', 'wp-migrate-db-cli' ), $result );
201
 
202
- if ( 'find_replace' === $profile['action'] ) {
203
- $success_msg = __( 'Find & Replace complete', 'wp-migrate-db-cli' );
204
  }
205
 
206
- \WP_CLI::success( $success_msg );
207
- } elseif ( is_wp_error( $result ) ) {
208
- \WP_CLI::error( Cli::cleanup_message( $result->get_error_message() ) );
209
  }
210
  }
211
  }
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Cli;
4
 
5
+ class Command
6
+ {
7
 
8
+ public static function register()
9
+ {
10
+ \WP_CLI::add_command('migratedb', 'DeliciousBrains\WPMDB\Common\Cli\Command');
11
  }
12
 
13
  /**
62
  * @param array $args
63
  * @param array $assoc_args
64
  */
65
+ public function export($args, $assoc_args)
66
+ {
67
 
68
  $assoc_args['action'] = 'savefile';
69
+ $assoc_args['export_dest'] = trim($args[0]);
70
 
71
+ if (empty($assoc_args['export_dest'])) {
72
+ \WP_CLI::error(Cli::cleanup_message(__('You must provide a destination filename.', 'wp-migrate-db-cli')));
73
  }
74
 
75
+ $profile = $this->_get_profile_data_from_args($args, $assoc_args);
76
 
77
+ if (is_wp_error($profile)) {
78
+ \WP_CLI::error($profile);
79
  }
80
 
81
+ $this->_perform_cli_migration($profile);
82
  }
83
 
84
  /**
105
  * Should be used in conjunction with the --find=<strings> argument, see it's
106
  * documentation for further explanation of the find & replace functionality.
107
  *
 
 
 
 
 
 
 
 
 
 
108
  * [--exclude-post-revisions]
109
  * : Exclude post revisions from the find & replace.
110
  *
128
  *
129
  * @subcommand find-replace
130
  */
131
+ public function find_replace($args, $assoc_args)
132
+ {
133
 
134
  $assoc_args['action'] = 'find_replace';
135
 
136
+ $profile = $this->_get_profile_data_from_args($args, $assoc_args);
137
 
138
+ if (is_wp_error($profile)) {
139
+ \WP_CLI::error($profile);
140
  }
141
 
142
+ $this->_perform_cli_migration($profile);
143
  }
144
 
145
  /**
150
  *
151
  * @return array|WP_Error
152
  */
153
+ protected function _get_profile_data_from_args($args, $assoc_args)
154
+ {
155
  // Load the correct CLI class
156
+ if (function_exists('wpmdb_pro_cli')) {
157
+ if (function_exists('wp_migrate_db_pro_cli_addon')) {
158
  $wpmdb_cli = wp_migrate_db_pro_cli_addon();
159
  } else {
160
  $wpmdb_cli = wpmdb_pro_cli();
163
  $wpmdb_cli = wpmdb_cli();
164
  }
165
 
166
+ return $wpmdb_cli->get_profile_data_from_args($args, $assoc_args);
167
  }
168
 
169
  /**
173
  *
174
  * @return void
175
  */
176
+ protected function _perform_cli_migration($profile)
177
+ {
178
  $wpmdb_cli = null;
179
 
180
  //load correct cli class
181
+ if (function_exists('wpmdb_pro_cli')) {
182
  $wpmdb_cli = wpmdb_pro_cli();
183
  } else {
184
  $wpmdb_cli = wpmdb_cli();
185
  }
186
 
187
+ if (empty($wpmdb_cli)) {
188
+ \WP_CLI::error(__('WP Migrate DB CLI class not available.', 'wp-migrate-db-cli'));
189
 
190
  return;
191
  }
192
 
193
+ $result = $wpmdb_cli->cli_migration($profile);
194
 
195
+ if (!is_wp_error($result)) {
196
+ $success_msg = sprintf(__('Export saved to: %s', 'wp-migrate-db-cli'), $result);
197
 
198
+ if ('find_replace' === $profile['current_migration']['intent']) {
199
+ $success_msg = __('Find & Replace complete', 'wp-migrate-db-cli');
200
  }
201
 
202
+ \WP_CLI::success($success_msg);
203
+ } elseif (is_wp_error($result)) {
204
+ \WP_CLI::error(Cli::cleanup_message($result->get_error_message()));
205
  }
206
  }
207
  }
class/Common/Compatibility/Compatibility.php CHANGED
@@ -18,7 +18,6 @@ class Compatibility {
18
  protected $default_whitelisted_plugins;
19
 
20
  public function __construct() {
21
-
22
  $this->muplugin_class_dir = plugin_dir_path( __FILE__ );
23
  $this->muplugin_dir = ( defined( 'WPMU_PLUGIN_DIR' ) && defined( 'WPMU_PLUGIN_URL' ) ) ? WPMU_PLUGIN_DIR : trailingslashit( WP_CONTENT_DIR ) . 'mu-plugins';
24
 
@@ -214,6 +213,52 @@ class Compatibility {
214
  return $this->is_wpmdb_ajax_call();
215
  }
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  /**
218
  * @return bool
219
  */
@@ -234,7 +279,11 @@ class Compatibility {
234
  * @return bool
235
  */
236
  public function wpmdbc_is_compatibility_mode_request() {
237
- //Requests that shouldn't be handled by compatibility mode
 
 
 
 
238
  if ( ! $this->wpmdbc_is_wpmdb_ajax_call() || in_array( $_POST['action'], array(
239
  'wpmdb_get_log',
240
  'wpmdb_maybe_collect_data',
18
  protected $default_whitelisted_plugins;
19
 
20
  public function __construct() {
 
21
  $this->muplugin_class_dir = plugin_dir_path( __FILE__ );
22
  $this->muplugin_dir = ( defined( 'WPMU_PLUGIN_DIR' ) && defined( 'WPMU_PLUGIN_URL' ) ) ? WPMU_PLUGIN_DIR : trailingslashit( WP_CONTENT_DIR ) . 'mu-plugins';
23
 
213
  return $this->is_wpmdb_ajax_call();
214
  }
215
 
216
+ /**
217
+ * Checks if the current request is a WPMDB REST API migration request.
218
+ *
219
+ * Uses `$_SERVER` global since we're attempting to grab the current
220
+ * route _before_ `rest_api_init` is fired by WordPress core.
221
+ *
222
+ * @return bool
223
+ */
224
+ public function wpmdbc_is_wpmdb_rest_request() {
225
+ $api_base = 'mdb-api/v1/';
226
+ $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
227
+
228
+ if (false === strpos($request_uri, $api_base)) {
229
+ return false;
230
+ }
231
+
232
+ $current_endpoint = explode($api_base, $request_uri);
233
+ $current_endpoint = end($current_endpoint);
234
+
235
+ $migration_endpoints = apply_filters(
236
+ 'wpmdb_compatibility_mode_api_endpoints',
237
+ [
238
+ 'initiate-migration',
239
+ 'verify-connection',
240
+ 'finalize-migration',
241
+ 'cancel-migration',
242
+ 'mf-initiate-file-migration',
243
+ 'mf-get-queue-items',
244
+ 'mf-transfer-files',
245
+ 'tpf-initiate-file-migration',
246
+ 'tpf-get-queue-items',
247
+ 'tpf-transfer-files',
248
+ 'prepare-upload',
249
+ 'upload-file',
250
+ 'import-file',
251
+ ]
252
+ );
253
+
254
+ // Checks that the current API call is a MDB migration request.
255
+ if (in_array($current_endpoint, $migration_endpoints)) {
256
+ return true;
257
+ }
258
+
259
+ return false;
260
+ }
261
+
262
  /**
263
  * @return bool
264
  */
279
  * @return bool
280
  */
281
  public function wpmdbc_is_compatibility_mode_request() {
282
+ if ($this->wpmdbc_is_wpmdb_rest_request()) {
283
+ return true;
284
+ }
285
+
286
+ // Requests that shouldn't be handled by compatibility mode.
287
  if ( ! $this->wpmdbc_is_wpmdb_ajax_call() || in_array( $_POST['action'], array(
288
  'wpmdb_get_log',
289
  'wpmdb_maybe_collect_data',
class/Common/Compatibility/CompatibilityManager.php CHANGED
@@ -3,7 +3,9 @@
3
  namespace DeliciousBrains\WPMDB\Common\Compatibility;
4
 
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
 
6
  use DeliciousBrains\WPMDB\Common\Http\Http;
 
7
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
8
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
9
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
@@ -67,16 +69,26 @@ class CompatibilityManager {
67
  * @var MigrationStateManager
68
  */
69
  public $migration_state;
70
-
71
- public function __construct(
 
 
 
 
 
 
 
 
72
  Filesystem $filesystem,
73
  Settings $settings,
74
  Notice $notice,
75
  Http $http,
 
76
  TemplateBase $template,
77
  MigrationStateManager $migration_state,
78
  Util $util,
79
- Properties $properties
 
80
  ) {
81
 
82
  $this->filesystem = $filesystem;
@@ -89,24 +101,27 @@ class CompatibilityManager {
89
  $this->migration_state = $migration_state;
90
  $this->util = $util;
91
 
92
-
93
  //Version of the compatibility plugin, to force an update of the MU plugin, increment this value
94
  $this->compatibility_plugin_version = '1.2';
95
 
96
  $this->mu_plugin_dir = $this->props->mu_plugin_dir;
97
  $this->mu_plugin_source = $this->props->mu_plugin_source;
98
  $this->mu_plugin_dest = $this->props->mu_plugin_dest;
99
- }
 
100
 
101
  public function register() {
102
- //Checks the compatibility mode MU plugin version and updates if it's out of date
103
- add_action( 'wp_ajax_wpmdb_plugin_compatibility', array( $this, 'ajax_plugin_compatibility' ) );
104
  add_action( 'admin_init', array( $this, 'muplugin_version_check' ), 1 );
105
- add_action( 'wpmdb_notices', array( $this, 'template_muplugin_update_fail' ) );
106
- //Fired in the register_deactivation_hook() call in both the pro and non-pro plugins
107
  add_action( 'wp_migrate_db_remove_compatibility_plugin', array( $this, 'remove_muplugin_on_deactivation' ) );
108
  }
109
 
 
 
 
 
110
  /**
111
  * Triggered with the `admin_init` hook on the WP Migrate DB Pro dashboard page
112
  *
@@ -153,53 +168,20 @@ class CompatibilityManager {
153
  /**
154
  * Preemptively shows a warning warning on WPMDB pages if the mu-plugins folder isn't writable
155
  */
156
- function template_muplugin_update_fail() {
157
  if ( $this->is_muplugin_update_required() && false === $this->util->is_muplugin_writable() ) {
158
- $notice_links = $this->notices->check_notice( 'muplugin_failed_update_' . $this->compatibility_plugin_version, 'SHOW_ONCE' );
 
 
159
  if ( is_array( $notice_links ) ) {
160
- $this->template->template( 'muplugin-failed-update-warning', 'common', $notice_links );
 
 
 
 
161
  }
162
  }
163
- }
164
-
165
- /**
166
- * Handler for ajax request to turn on or off Compatibility Mode.
167
- */
168
- public function ajax_plugin_compatibility() {
169
- $this->http->check_ajax_referer( 'plugin_compatibility' );
170
- $message = false;
171
-
172
- $key_rules = array(
173
- 'action' => 'key',
174
- 'install' => 'numeric',
175
- );
176
- $state_data = $this->migration_state->set_post_data( $key_rules );
177
- $do_install = ( '1' === trim( $state_data['install'] ) ) ? true : false;
178
- $plugin_toggled = $this->toggle_muplugin( $do_install );
179
-
180
- //If there's an error message, display it
181
- if ( true !== $plugin_toggled ) {
182
- $message = $plugin_toggled;
183
- }
184
-
185
- $this->http->end_ajax( $message );
186
- }
187
-
188
-
189
- /**
190
- *
191
- * Toggles the compatibility plugin based on the $do_install param.
192
- *
193
- * @param $do_install
194
- *
195
- * @return bool|string|void
196
- */
197
- public function toggle_muplugin( $do_install ) {
198
- if ( true === $do_install ) {
199
- return $this->copy_muplugin();
200
- } else {
201
- return $this->remove_muplugin();
202
- }
203
  }
204
 
205
  /**
3
  namespace DeliciousBrains\WPMDB\Common\Compatibility;
4
 
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
6
+ use DeliciousBrains\WPMDB\Common\Http\Helper;
7
  use DeliciousBrains\WPMDB\Common\Http\Http;
8
+ use DeliciousBrains\WPMDB\Common\Http\WPMDBRestAPIServer;
9
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
10
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
11
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
69
  * @var MigrationStateManager
70
  */
71
  public $migration_state;
72
+ /**
73
+ * @var WPMDBRestAPIServer
74
+ */
75
+ private $rest_API_server;
76
+ /**
77
+ * @var Helper
78
+ */
79
+ private $http_helper;
80
+
81
+ public function __construct(
82
  Filesystem $filesystem,
83
  Settings $settings,
84
  Notice $notice,
85
  Http $http,
86
+ Helper $http_helper,
87
  TemplateBase $template,
88
  MigrationStateManager $migration_state,
89
  Util $util,
90
+ Properties $properties,
91
+ WPMDBRestAPIServer $rest_API_server
92
  ) {
93
 
94
  $this->filesystem = $filesystem;
101
  $this->migration_state = $migration_state;
102
  $this->util = $util;
103
 
 
104
  //Version of the compatibility plugin, to force an update of the MU plugin, increment this value
105
  $this->compatibility_plugin_version = '1.2';
106
 
107
  $this->mu_plugin_dir = $this->props->mu_plugin_dir;
108
  $this->mu_plugin_source = $this->props->mu_plugin_source;
109
  $this->mu_plugin_dest = $this->props->mu_plugin_dest;
110
+ $this->http_helper = $http_helper;
111
+ }
112
 
113
  public function register() {
114
+ // Checks the compatibility mode MU plugin version and updates if it's out of date.
 
115
  add_action( 'admin_init', array( $this, 'muplugin_version_check' ), 1 );
116
+
117
+ // Fired in the register_deactivation_hook() call in both the pro and non-pro plugins.
118
  add_action( 'wp_migrate_db_remove_compatibility_plugin', array( $this, 'remove_muplugin_on_deactivation' ) );
119
  }
120
 
121
+ public function addNotices(){
122
+ add_filter('wpmdb_notification_strings', array($this, 'template_muplugin_update_fail'));
123
+ }
124
+
125
  /**
126
  * Triggered with the `admin_init` hook on the WP Migrate DB Pro dashboard page
127
  *
168
  /**
169
  * Preemptively shows a warning warning on WPMDB pages if the mu-plugins folder isn't writable
170
  */
171
+ function template_muplugin_update_fail($notifications) {
172
  if ( $this->is_muplugin_update_required() && false === $this->util->is_muplugin_writable() ) {
173
+ $notice_id = 'muplugin_failed_update_' . $this->compatibility_plugin_version;
174
+ $notice_links = $this->notices->check_notice( $notice_id, 'SHOW_ONCE' );
175
+
176
  if ( is_array( $notice_links ) ) {
177
+ $notifications[$notice_id] = [
178
+ 'message' => $this->template->template_to_string('muplugin-failed-update-warning', 'common', $notice_links),
179
+ 'link' => $notice_links,
180
+ 'id' => $notice_id,
181
+ ];
182
  }
183
  }
184
+ return $notifications;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
 
187
  /**
class/Common/Error/ErrorLog.php CHANGED
@@ -4,282 +4,288 @@ namespace DeliciousBrains\WPMDB\Common\Error;
4
 
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
6
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
7
- use DeliciousBrains\WPMDB\Common\MigrationState\StateDataContainer;
8
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
9
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
10
  use DeliciousBrains\WPMDB\Common\Util\Util;
11
  use DeliciousBrains\WPMDB\Container;
12
-
13
- class ErrorLog {
14
-
15
- /**
16
- * @var
17
- */
18
- public $error_log;
19
- /**
20
- * @var
21
- */
22
- public $state_data;
23
- /**
24
- * @var Properties
25
- */
26
- public $props;
27
- /**
28
- * @var Settings
29
- */
30
- private $settings;
31
- /**
32
- * @var Filesystem
33
- */
34
- private $filesystem;
35
-
36
- /**
37
- * @var $error
38
- */
39
- private $error;
40
- /**
41
- * @var Util
42
- */
43
- private $util;
44
-
45
- public function __construct(
46
- Settings $settings,
47
- Filesystem $filesystem,
48
- Util $util,
49
- Properties $properties
50
- ) {
51
- $this->props = $properties;
52
- $this->settings = $settings->get_settings();
53
- $this->filesystem = $filesystem;
54
- $this->util = $util;
55
- }
56
-
57
- public function get_error_log() {
58
- return $this->error_log;
59
- }
60
-
61
- /**
62
- * Loads the error log into the error log class property.
63
- */
64
- function load_error_log() {
65
- $this->error_log = get_site_option( 'wpmdb_error_log' );
66
-
67
- /*
68
- * The error log was previously stored and retrieved using get_option and update_option respectively.
69
- * Here we update the subsite option to a network wide option if applicable.
70
- */
71
- if ( false === $this->error_log && is_multisite() && is_network_admin() ) {
72
- $this->error_log = get_option( 'wpmdb_error_log' );
73
- if ( false !== $this->error_log ) {
74
- update_site_option( 'wpmdb_error_log', $this->error_log );
75
- delete_option( 'wpmdb_error_log' );
76
- }
77
- }
78
-
79
- return $this->error_log;
80
- }
81
-
82
- function log_error( $wpmdb_error, $additional_error_var = false ) {
83
- $state_data = Container::getInstance()->get('migration_state_manager')->set_post_data();
84
-
85
- $error_header = "********************************************\n****** Log date: " . date( 'Y/m/d H:i:s' ) . " ******\n********************************************\n\n";
86
- $error = $error_header;
87
- if ( isset( $state_data['intent'] ) ) {
88
- $error .= 'Intent: ' . $state_data['intent'] . "\n";
89
- }
90
- if ( isset( $state_data['action'] ) ) {
91
- $error .= 'Action: ' . $state_data['action'] . "\n";
92
- }
93
- if ( isset( $state_data['local'] ) && isset( $state_data['local']['site_url'] ) ) {
94
- $error .= 'Local: ' . $state_data['site_details']['local']['site_url'] . "\n";
95
- }
96
- if ( isset( $state_data['remote'] ) && isset( $state_data['remote']['site_url'] ) ) {
97
- $error .= 'Remote: ' . $state_data['site_details']['remote']['site_url'] . "\n\n";
98
- }
99
- $error .= 'WPMDB Error: ' . $wpmdb_error . "\n\n";
100
-
101
- if ( ! empty( $this->props->attempting_to_connect_to ) ) {
102
- $ip = $this->get_remote_ip( $this->props->attempting_to_connect_to );
103
- $error .= 'Attempted to connect to: ' . $this->props->attempting_to_connect_to . ' (' . ( $ip ? $ip : 'ip lookup failed' ) . ')' . "\n\n";
104
- }
105
-
106
- if ( $additional_error_var !== false ) {
107
-
108
- // don't print the whole response object to the log
109
- if ( is_array( $additional_error_var ) && isset( $additional_error_var['http_response'] ) ) {
110
- if ( isset( $additional_error_var['http_response'] ) && ( $additional_error_var['http_response'] instanceof \WP_HTTP_Requests_Response ) ) {
111
- $response = $additional_error_var['http_response']->get_response_object();
112
- $additional_error_var['url'] = $response->url;
113
- }
114
- unset( $additional_error_var['http_response'] );
115
- }
116
-
117
- $error .= print_r( $additional_error_var, true ) . "\n\n";
118
- }
119
-
120
- $this->load_error_log();
121
-
122
- // Error log length in bytes (default 1Mb)
123
- $max_log_length = apply_filters( 'wpmdb_max_error_log_length', 1000000 );
124
- $max_individual_log_length = apply_filters( 'wpmdb_max_individual_error_log_length', $max_log_length / 2.2 );
125
-
126
- // If error is longer than max individual log length, trim and add notice of doing so
127
- if ( strlen( $error ) > $max_individual_log_length ) {
128
- $length_trimmed = strlen( $error ) - $max_individual_log_length;
129
- $error = substr( $error, 0, $max_individual_log_length );
130
- $error .= "\n[$length_trimmed bytes were truncated from this error]\n\n";
131
- }
132
-
133
- // Trim existing log to accommodate new error if needed
134
- $existing_log_max_length = $max_log_length - strlen( $error );
135
- if ( strlen( $this->error_log ) > $existing_log_max_length ) {
136
- $this->error_log = substr( $this->error_log, - ( $existing_log_max_length ) );
137
-
138
- // Crop at first log header
139
- $first_header_pos = strpos( $this->error_log, substr( $error_header, 0, strpos( $error_header, ' ' ) ) );
140
- if ( $first_header_pos ) {
141
- $this->error_log = substr( $this->error_log, $first_header_pos );
142
- }
143
- }
144
-
145
- if ( isset( $this->error_log ) ) {
146
- $this->error_log .= $error;
147
- } else {
148
- $this->error_log = $error;
149
- }
150
-
151
- update_site_option( 'wpmdb_error_log', $this->error_log );
152
- }
153
-
154
- function get_remote_ip( $url ) {
155
- $parsed_url = Util::parse_url( $url );
156
- if ( ! isset( $parsed_url['host'] ) ) {
157
- return false;
158
- }
159
- // '.' appended to host name to avoid issues with nslookup caching - see documentation of gethostbyname for more info
160
- $host = $parsed_url['host'] . '.';
161
-
162
- $ip = gethostbyname( $host );
163
-
164
- return ( $ip === $host ) ? false : $ip;
165
- }
166
-
167
- /**
168
- * Check for wpmdb-download-log and related nonce
169
- * if found begin diagnostic logging
170
- *
171
- * @return void
172
- */
173
- function http_prepare_download_log() {
174
- if ( isset( $_GET['wpmdb-download-log'] ) && wp_verify_nonce( $_GET['nonce'], 'wpmdb-download-log' ) ) {
175
- ob_start();
176
- $this->output_diagnostic_info();
177
- $this->output_log_file();
178
- $log = ob_get_clean();
179
- $url = Util::parse_url( home_url() );
180
- $host = sanitize_file_name( $url['host'] );
181
- $filename = sprintf( '%s-diagnostic-log-%s.txt', $host, date( 'YmdHis' ) );
182
- header( 'Content-Description: File Transfer' );
183
- header( 'Content-Type: application/octet-stream' );
184
- header( 'Content-Length: ' . strlen( $log ) );
185
- header( 'Content-Disposition: attachment; filename=' . $filename );
186
- echo $log;
187
- exit;
188
- }
189
- }
190
-
191
- /**
192
- * Outputs useful diagnostic info text at the Diagnostic Info & Error Log
193
- * section under the Help tab so the information can be viewed or
194
- * downloaded and shared for debugging.
195
- *
196
- *
197
- * @return void
198
- */
199
- function output_diagnostic_info() {
200
- $diagnostic_info = $this->get_diagnostic_info();
201
-
202
- foreach ( $diagnostic_info as $section => $arr ) {
203
- $key_lengths = array_map( 'strlen', array_keys( $arr ) );
204
- $max_key_length = max( $key_lengths );
205
- foreach ( $arr as $key => $val ) {
206
- if ( 0 === $key ) {
207
- echo $val . "\r\n";
208
- continue;
209
- }
210
- if ( is_array( $val ) ) {
211
- foreach ( $val as $subsection => $subval ) {
212
- echo " - ";
213
- if ( ! preg_match( '/^\d+$/', $subsection ) ) {
214
- echo "$subsection: ";
215
- }
216
- echo "$subval\r\n";
217
- }
218
- continue;
219
- }
220
- if ( ! preg_match( '/^\d+$/', $key ) ) {
221
- $pad_chr = '.';
222
- if ( $max_key_length - strlen( $key ) < 3 ) {
223
- $pad_chr = ' ';
224
- }
225
- echo str_pad( "$key: ", $max_key_length + 2, $pad_chr, STR_PAD_RIGHT );
226
- }
227
- echo " $val\r\n";
228
-
229
- }
230
- echo "\r\n";
231
- }
232
-
233
- return;
234
- }
235
-
236
- /**
237
- * Gets diagnostic information about current site
238
- *
239
- * @return array
240
- */
241
- function get_diagnostic_info() {
242
- global $wpdb;
243
- $diagnostic_info = array(); // group display sections into arrays
244
-
245
- $diagnostic_info['basic-info'] = array(
246
- 'site_url()' => site_url(),
247
- 'home_url()' => home_url(),
248
- );
249
-
250
- $diagnostic_info['db-info'] = array(
251
- 'Database Name' => $wpdb->dbname,
252
- 'Table Prefix' => $wpdb->base_prefix,
253
- );
254
-
255
- $diagnostic_info['wp-version'] = array(
256
- 'WordPress Version' => get_bloginfo( 'version' ),
257
- );
258
-
259
- if ( is_multisite() ) {
260
- $diagnostic_info['multisite-info'] = array(
261
- 'Multisite' => defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ? 'Sub-domain' : 'Sub-directory',
262
- 'Domain Current Site' => defined( 'DOMAIN_CURRENT_SITE' ) ? DOMAIN_CURRENT_SITE : 'Not Defined',
263
- 'Path Current Site' => defined( 'PATH_CURRENT_SITE' ) ? PATH_CURRENT_SITE : 'Not Defined',
264
- 'Site ID Current Site' => defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 'Not Defined',
265
- 'Blog ID Current Site' => defined( 'BLOG_ID_CURRENT_SITE' ) ? BLOG_ID_CURRENT_SITE : 'Not Defined',
266
- );
267
- }
268
-
269
- $mdb_plugins = array();
270
- foreach ( array_reverse( $GLOBALS['wpmdb_meta'] ) as $wpmdb_plugin => $wpmdb_plugin_info ) {
271
- if ( strlen( $wpmdb_plugin ) > strlen( 'wp-migrate-db-pro' ) ) {
272
- $wpmdb_plugin = str_replace( 'wp-migrate-db-pro-', '', $wpmdb_plugin );
273
- }
274
- $wpmdb_plugin = ucwords( str_replace( array( 'wp', 'db', 'cli', '-' ), array(
275
- 'WP',
276
- 'DB',
277
- 'CLI',
278
- ' ',
279
- ), $wpmdb_plugin ) );
280
- $mdb_plugins[ $wpmdb_plugin ] = $wpmdb_plugin_info['version'];
281
- }
282
- $diagnostic_info['mdb-plugins'] = $mdb_plugins;
 
 
 
 
 
 
 
283
 
284
  $diagnostic_info['server-info'] = array(
285
  'Web Server' => ! empty( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '',
@@ -296,124 +302,130 @@ class ErrorLog {
296
  // phpcs:enable
297
  );
298
 
299
- $diagnostic_info['db-server-info'] = array(
300
- 'MySQL' => mysqli_get_server_info( $wpdb->dbh ),
301
- 'ext/mysqli' => empty( $wpdb->use_mysqli ) ? 'no' : 'yes',
302
- 'WP Locale' => get_locale(),
303
- 'DB Charset' => DB_CHARSET,
304
- 'WPMDB_STRIP_INVALID_TEXT' => ( defined( 'WPMDB_STRIP_INVALID_TEXT' ) && WPMDB_STRIP_INVALID_TEXT ) ? 'Yes' : 'No',
305
- );
306
-
307
- $diagnostic_info['debug-settings'] = array(
308
- 'Debug Mode' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No',
309
- 'Debug Log' => ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? 'Yes' : 'No',
310
- 'Debug Display' => ( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY ) ? 'Yes' : 'No',
311
- 'Script Debug' => ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? 'Yes' : 'No',
312
- 'PHP Error Log' => ( function_exists( 'ini_get' ) ) ? ini_get( 'error_log' ) : '',
313
- );
314
-
315
- $server_limits = array(
316
- 'WP Max Upload Size' => size_format( wp_max_upload_size() ),
317
- 'PHP Post Max Size' => size_format( $this->util->get_post_max_size() ),
318
- );
319
-
320
- if ( function_exists( 'ini_get' ) ) {
321
- if ( $suhosin_limit = ini_get( 'suhosin.post.max_value_length' ) ) {
322
- $server_limits['Suhosin Post Max Value Length'] = is_numeric( $suhosin_limit ) ? size_format( $suhosin_limit ) : $suhosin_limit;
323
- }
324
- if ( $suhosin_limit = ini_get( 'suhosin.request.max_value_length' ) ) {
325
- $server_limits['Suhosin Request Max Value Length'] = is_numeric( $suhosin_limit ) ? size_format( $suhosin_limit ) : $suhosin_limit;
326
- }
327
- }
328
- $diagnostic_info['server-limits'] = $server_limits;
329
-
330
- $diagnostic_info['mdb-settings'] = array(
331
- 'WPMDB Bottleneck' => size_format( $this->util->get_bottleneck() ),
332
- 'Compatibility Mode' => ( isset( $GLOBALS['wpmdb_compatibility']['active'] ) ) ? 'Yes' : 'No',
333
- 'Delay Between Requests' => ( $this->settings['delay_between_requests'] > 0 ) ? $this->settings['delay_between_requests'] / 1000 . 's' : 0,
334
- );
335
-
336
- $constants = array(
337
- 'WP_HOME' => ( defined( 'WP_HOME' ) && WP_HOME ) ? WP_HOME : 'Not defined',
338
- 'WP_SITEURL' => ( defined( 'WP_SITEURL' ) && WP_SITEURL ) ? WP_SITEURL : 'Not defined',
339
- 'WP_CONTENT_URL' => ( defined( 'WP_CONTENT_URL' ) && WP_CONTENT_URL ) ? WP_CONTENT_URL : 'Not defined',
340
- 'WP_CONTENT_DIR' => ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR ) ? WP_CONTENT_DIR : 'Not defined',
341
- 'WP_PLUGIN_DIR' => ( defined( 'WP_PLUGIN_DIR' ) && WP_PLUGIN_DIR ) ? WP_PLUGIN_DIR : 'Not defined',
342
- 'WP_PLUGIN_URL' => ( defined( 'WP_PLUGIN_URL' ) && WP_PLUGIN_URL ) ? WP_PLUGIN_URL : 'Not defined',
343
- );
344
-
345
- if ( is_multisite() ) {
346
- $constants['UPLOADS'] = ( defined( 'UPLOADS' ) && UPLOADS ) ? UPLOADS : 'Not defined';
347
- $constants['UPLOADBLOGSDIR'] = ( defined( 'UPLOADBLOGSDIR' ) && UPLOADBLOGSDIR ) ? UPLOADBLOGSDIR : 'Not defined';
348
- }
349
-
350
- $diagnostic_info['constants'] = $constants;
351
-
352
- $diagnostic_info = array_merge( $diagnostic_info, apply_filters( 'wpmdb_diagnostic_info', array(), $diagnostic_info ) );
353
-
354
- $theme_info = wp_get_theme();
355
- $theme_info_log = array(
356
- 'Active Theme Name' => $theme_info->Name,
357
- 'Active Theme Folder' => $theme_info->get_stylesheet_directory(),
358
- );
359
- if ( $theme_info->get( 'Template' ) ) {
360
- $theme_info_log['Parent Theme Folder'] = $theme_info->get( 'Template' );
361
- }
362
- if ( ! $this->filesystem->file_exists( $theme_info->get_stylesheet_directory() ) ) {
363
- $theme_info_log['WARNING'] = 'Active Theme Folder Not Found';
364
- }
365
- $diagnostic_info['theme-info'] = $theme_info_log;
366
-
367
- $active_plugins_log = array( 'Active Plugins' );
368
-
369
- $active_plugins_log[1] = array();
370
- if ( isset( $GLOBALS['wpmdb_compatibility']['active'] ) ) {
371
- $whitelist = array_flip( (array) $this->settings['whitelist_plugins'] );
372
- } else {
373
- $whitelist = array();
374
- }
375
- $active_plugins = (array) get_option( 'active_plugins', array() );
376
- if ( is_multisite() ) {
377
- $network_active_plugins = wp_get_active_network_plugins();
378
- $active_plugins = array_map( array( $this->util, 'remove_wp_plugin_dir' ), $network_active_plugins );
379
- }
380
- foreach ( $active_plugins as $plugin ) {
381
- $active_plugins_log[1][] = $this->util->get_plugin_details( WP_PLUGIN_DIR . '/' . $plugin, isset( $whitelist[ $plugin ] ) ? '*' : '' );
382
- }
383
-
384
- $diagnostic_info['active-plugins'] = $active_plugins_log;
385
-
386
- $mu_plugins = wp_get_mu_plugins();
387
- if ( $mu_plugins ) {
388
- $mu_plugins_log = array( 'Must-Use Plugins' );
389
- $mu_plugins_log[1] = array();
390
- foreach ( $mu_plugins as $mu_plugin ) {
391
- $mu_plugins_log[1][] = $this->util->get_plugin_details( $mu_plugin );
392
- }
393
- $diagnostic_info['mu-plugins'] = $mu_plugins_log;
394
- }
395
-
396
- return $diagnostic_info;
397
- }
398
-
399
- function output_log_file() {
400
- $error_log = $this->load_error_log();
401
- if ( ! empty( $error_log ) ) {
402
- echo $error_log;
403
- }
404
- }
405
-
406
- /**
407
- * @return mixed
408
- */
409
- public function getError() {
410
- return $this->error;
411
- }
412
-
413
- /**
414
- * @param mixed $error
415
- */
416
- public function setError( $error ) {
417
- $this->error = $error;
418
- }
 
 
 
 
 
 
419
  }
4
 
5
  use DeliciousBrains\WPMDB\Common\Filesystem\Filesystem;
6
  use DeliciousBrains\WPMDB\Common\MigrationState\MigrationStateManager;
 
7
  use DeliciousBrains\WPMDB\Common\Properties\Properties;
8
  use DeliciousBrains\WPMDB\Common\Settings\Settings;
9
  use DeliciousBrains\WPMDB\Common\Util\Util;
10
  use DeliciousBrains\WPMDB\Container;
11
+ use DeliciousBrains\WPMDB\WPMDBDI;
12
+
13
+ class ErrorLog
14
+ {
15
+
16
+ /**
17
+ * @var
18
+ */
19
+ public $error_log;
20
+ /**
21
+ * @var
22
+ */
23
+ public $state_data;
24
+ /**
25
+ * @var Properties
26
+ */
27
+ public $props;
28
+ /**
29
+ * @var Settings
30
+ */
31
+ private $settings;
32
+ /**
33
+ * @var Filesystem
34
+ */
35
+ private $filesystem;
36
+
37
+ /**
38
+ * @var $error
39
+ */
40
+ private $error;
41
+ /**
42
+ * @var Util
43
+ */
44
+ private $util;
45
+
46
+ public function __construct(
47
+ Settings $settings,
48
+ Filesystem $filesystem,
49
+ Util $util,
50
+ Properties $properties
51
+ ) {
52
+ $this->props = $properties;
53
+ $this->settings = $settings->get_settings();
54
+ $this->filesystem = $filesystem;
55
+ $this->util = $util;
56
+ }
57
+
58
+ public function get_error_log()
59
+ {
60
+ return $this->error_log;
61
+ }
62
+
63
+ /**
64
+ * Loads the error log into the error log class property.
65
+ */
66
+ function load_error_log()
67
+ {
68
+ $this->error_log = get_site_option('wpmdb_error_log');
69
+
70
+ /*
71
+ * The error log was previously stored and retrieved using get_option and update_option respectively.
72
+ * Here we update the subsite option to a network wide option if applicable.
73
+ */
74
+ if (false === $this->error_log && is_multisite() && is_network_admin()) {
75
+ $this->error_log = get_option('wpmdb_error_log');
76
+ if (false !== $this->error_log) {
77
+ update_site_option('wpmdb_error_log', $this->error_log);
78
+ delete_option('wpmdb_error_log');
79
+ }
80
+ }
81
+
82
+ return $this->error_log;
83
+ }
84
+
85
+ function log_error($wpmdb_error, $additional_error_var = false)
86
+ {
87
+ $state_data = WPMDBDI::getInstance()->get(MigrationStateManager::class)->set_post_data();
88
+
89
+ $error_header = "********************************************\n****** Log date: " . date('Y/m/d H:i:s') . " ******\n********************************************\n\n";
90
+ $error = $error_header;
91
+ if (isset($state_data['intent'])) {
92
+ $error .= 'Intent: ' . $state_data['intent'] . "\n";
93
+ }
94
+ if (isset($state_data['action'])) {
95
+ $error .= 'Action: ' . $state_data['action'] . "\n";
96
+ }
97
+ if (isset($state_data['local']) && isset($state_data['local']['site_url'])) {
98
+ $error .= 'Local: ' . $state_data['site_details']['local']['site_url'] . "\n";
99
+ }
100
+ if (isset($state_data['remote']) && isset($state_data['remote']['site_url'])) {
101
+ $error .= 'Remote: ' . $state_data['site_details']['remote']['site_url'] . "\n\n";
102
+ }
103
+ $error .= 'WPMDB Error: ' . $wpmdb_error . "\n\n";
104
+
105
+ if (!empty($this->props->attempting_to_connect_to)) {
106
+ $ip = $this->get_remote_ip($this->props->attempting_to_connect_to);
107
+ $error .= 'Attempted to connect to: ' . $this->props->attempting_to_connect_to . ' (' . ($ip ? $ip : 'ip lookup failed') . ')' . "\n\n";
108
+ }
109
+
110
+ if ($additional_error_var !== false) {
111
+ // don't print the whole response object to the log
112
+ if (is_array($additional_error_var) && isset($additional_error_var['http_response'])) {
113
+ if (isset($additional_error_var['http_response']) && ($additional_error_var['http_response'] instanceof \WP_HTTP_Requests_Response)) {
114
+ $response = $additional_error_var['http_response']->get_response_object();
115
+ $additional_error_var['url'] = $response->url;
116
+ }
117
+ unset($additional_error_var['http_response']);
118
+ }
119
+
120
+ $error .= print_r($additional_error_var, true) . "\n\n";
121
+ }
122
+
123
+ $this->load_error_log();
124
+
125
+ // Error log length in bytes (default 1Mb)
126
+ $max_log_length = apply_filters('wpmdb_max_error_log_length', 1000000);
127
+ $max_individual_log_length = apply_filters('wpmdb_max_individual_error_log_length', $max_log_length / 2.2);
128
+
129
+ // If error is longer than max individual log length, trim and add notice of doing so
130
+ if (strlen($error) > $max_individual_log_length) {
131
+ $length_trimmed = strlen($error) - $max_individual_log_length;
132
+ $error = substr($error, 0, $max_individual_log_length);
133
+ $error .= "\n[$length_trimmed bytes were truncated from this error]\n\n";
134
+ }
135
+
136
+ // Trim existing log to accommodate new error if needed
137
+ $existing_log_max_length = $max_log_length - strlen($error);
138
+ if (strlen($this->error_log) > $existing_log_max_length) {
139
+ $this->error_log = substr($this->error_log, -($existing_log_max_length));
140
+
141
+ // Crop at first log header
142
+ $first_header_pos = strpos($this->error_log, substr($error_header, 0, strpos($error_header, ' ')));
143
+ if ($first_header_pos) {
144
+ $this->error_log = substr($this->error_log, $first_header_pos);
145
+ }
146
+ }
147
+
148
+ if (isset($this->error_log)) {
149
+ $this->error_log .= $error;
150
+ } else {
151
+ $this->error_log = $error;
152
+ }
153
+
154
+ update_site_option('wpmdb_error_log', $this->error_log);
155
+ }
156
+
157
+ function get_remote_ip($url)
158
+ {
159
+ $parsed_url = Util::parse_url($url);
160
+ if (!isset($parsed_url['host'])) {
161
+ return false;
162
+ }
163
+ // '.' appended to host name to avoid issues with nslookup caching - see documentation of gethostbyname for more info
164
+ $host = $parsed_url['host'] . '.';
165
+
166
+ $ip = gethostbyname($host);
167
+
168
+ return ($ip === $host) ? false : $ip;
169
+ }
170
+
171
+ /**
172
+ * Check for wpmdb-download-log and related nonce
173
+ * if found begin diagnostic logging
174
+ *
175
+ * @return void
176
+ */
177
+ function http_prepare_download_log()
178
+ {
179
+ if (isset($_GET['wpmdb-download-log']) && wp_verify_nonce($_GET['nonce'], 'wpmdb-download-log')) {
180
+ ob_start();
181
+ $this->output_diagnostic_info();
182
+ $this->output_log_file();
183
+ $log = ob_get_clean();
184
+ $url = Util::parse_url(home_url());
185
+ $host = sanitize_file_name($url['host']);
186
+ $filename = sprintf('%s-diagnostic-log-%s.txt', $host, date('YmdHis'));
187
+ header('Content-Description: File Transfer');
188
+ header('Content-Type: application/octet-stream');
189
+ header('Content-Length: ' . strlen($log));
190
+ header('Content-Disposition: attachment; filename=' . $filename);
191
+ echo $log;
192
+ exit;
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Outputs useful diagnostic info text at the Diagnostic Info & Error Log
198
+ * section under the Help tab so the information can be viewed or
199
+ * downloaded and shared for debugging.
200
+ *
201
+ *
202
+ * @return void
203
+ */
204
+ function output_diagnostic_info()
205
+ {
206
+ $diagnostic_info = $this->get_diagnostic_info();
207
+
208
+ foreach ($diagnostic_info as $section => $arr) {
209
+ $key_lengths = array_map('strlen', array_keys($arr));
210
+ $max_key_length = max($key_lengths);
211
+ foreach ($arr as $key => $val) {
212
+ if (0 === $key) {
213
+ echo $val . "\r\n";
214
+ continue;
215
+ }
216
+ if (is_array($val)) {
217
+ foreach ($val as $subsection => $subval) {
218
+ echo " - ";
219
+ if (!preg_match('/^\d+$/', $subsection)) {
220
+ echo "$subsection: ";
221
+ }
222
+ echo "$subval\r\n";
223
+ }
224
+ continue;
225
+ }
226
+ if (!preg_match('/^\d+$/', $key)) {
227
+ $pad_chr = '.';
228
+ if ($max_key_length - strlen($key) < 3) {
229
+ $pad_chr = ' ';
230
+ }
231
+ echo str_pad("$key: ", $max_key_length + 2, $pad_chr, STR_PAD_RIGHT);
232
+ }
233
+ echo " $val\r\n";
234
+ }
235
+ echo "\r\n";
236
+ }
237
+
238
+ return;
239
+ }
240
+
241
+ /**
242
+ * Gets diagnostic information about current site
243
+ *
244
+ * @return array
245
+ */
246
+ function get_diagnostic_info()
247
+ {
248
+ global $wpdb;
249
+ $diagnostic_info = array(); // group display sections into arrays
250
+
251
+ $diagnostic_info['basic-info'] = array(
252
+ 'site_url()' => site_url(),
253
+ 'home_url()' => home_url(),
254
+ );
255
+
256
+ $diagnostic_info['db-info'] = array(
257
+ 'Database Name' => $wpdb->dbname,
258
+ 'Table Prefix' => $wpdb->base_prefix,
259
+ );
260
+
261
+ $diagnostic_info['wp-version'] = array(
262
+ 'WordPress Version' => get_bloginfo('version'),
263
+ );
264
+
265
+ if (is_multisite()) {
266
+ $diagnostic_info['multisite-info'] = array(
267
+ 'Multisite' => defined('SUBDOMAIN_INSTALL') && SUBDOMAIN_INSTALL ? 'Sub-domain' : 'Sub-directory',
268
+ 'Domain Current Site' => defined('DOMAIN_CURRENT_SITE') ? DOMAIN_CURRENT_SITE : 'Not Defined',
269
+ 'Path Current Site' => defined('PATH_CURRENT_SITE') ? PATH_CURRENT_SITE : 'Not Defined',
270
+ 'Site ID Current Site' => defined('SITE_ID_CURRENT_SITE') ? SITE_ID_CURRENT_SITE : 'Not Defined',
271
+ 'Blog ID Current Site' => defined('BLOG_ID_CURRENT_SITE') ? BLOG_ID_CURRENT_SITE : 'Not Defined',
272
+ );
273
+ }
274
+
275
+ $mdb_plugins = array();
276
+ foreach (array_reverse($GLOBALS['wpmdb_meta']) as $wpmdb_plugin => $wpmdb_plugin_info) {
277
+ if (strlen($wpmdb_plugin) > strlen('wp-migrate-db-pro')) {
278
+ $wpmdb_plugin = str_replace('wp-migrate-db-pro-', '', $wpmdb_plugin);
279
+ }
280
+ $wpmdb_plugin = ucwords(str_replace(array('wp', 'db', 'cli', '-'), array(
281
+ 'WP',
282
+ 'DB',
283
+ 'CLI',
284
+ ' ',
285
+ ), $wpmdb_plugin));
286
+ $mdb_plugins[$wpmdb_plugin] = $wpmdb_plugin_info['version'];
287
+ }
288
+ $diagnostic_info['mdb-plugins'] = $mdb_plugins;
289
 
290
  $diagnostic_info['server-info'] = array(
291
  'Web Server' => ! empty( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '',
302
  // phpcs:enable
303
  );
304
 
305
+ $diagnostic_info['db-server-info'] = array(
306
+ 'MySQL' => mysqli_get_server_info($wpdb->dbh),
307
+ 'ext/mysqli' => empty($wpdb->use_mysqli) ? 'no' : 'yes',
308
+ 'WP Locale' => get_locale(),
309
+ 'DB Charset' => DB_CHARSET,
310
+ 'WPMDB_STRIP_INVALID_TEXT' => (defined('WPMDB_STRIP_INVALID_TEXT') && WPMDB_STRIP_INVALID_TEXT) ? 'Yes' : 'No',
311
+ );
312
+
313
+ $diagnostic_info['debug-settings'] = array(
314
+ 'Debug Mode' => (defined('WP_DEBUG') && WP_DEBUG) ? 'Yes' : 'No',
315
+ 'Debug Log' => (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) ? 'Yes' : 'No',
316
+ 'Debug Display' => (defined('WP_DEBUG_DISPLAY') && WP_DEBUG_DISPLAY) ? 'Yes' : 'No',
317
+ 'Script Debug' => (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? 'Yes' : 'No',
318
+ 'PHP Error Log' => (function_exists('ini_get')) ? ini_get('error_log') : '',
319
+ );
320
+
321
+ $server_limits = array(
322
+ 'WP Max Upload Size' => size_format(wp_max_upload_size()),
323
+ 'PHP Post Max Size' => size_format($this->util->get_post_max_size()),
324
+ );
325
+
326
+ if (function_exists('ini_get')) {
327
+ if ($suhosin_limit = ini_get('suhosin.post.max_value_length')) {
328
+ $server_limits['Suhosin Post Max Value Length'] = is_numeric($suhosin_limit) ? size_format($suhosin_limit) : $suhosin_limit;
329
+ }
330
+ if ($suhosin_limit = ini_get('suhosin.request.max_value_length')) {
331
+ $server_limits['Suhosin Request Max Value Length'] = is_numeric($suhosin_limit) ? size_format($suhosin_limit) : $suhosin_limit;
332
+ }
333
+ }
334
+ $diagnostic_info['server-limits'] = $server_limits;
335
+
336
+ $diagnostic_info['mdb-settings'] = array(
337
+ 'WPMDB Bottleneck' => size_format($this->util->get_bottleneck()),
338
+ 'Compatibility Mode' => (isset($GLOBALS['wpmdb_compatibility']['active'])) ? 'Yes' : 'No',
339
+ 'Delay Between Requests' => ($this->settings['delay_between_requests'] > 0) ? $this->settings['delay_between_requests'] . 's' : 0,
340
+ );
341
+
342
+ $constants = array(
343
+ 'WP_HOME' => (defined('WP_HOME') && WP_HOME) ? WP_HOME : 'Not defined',
344
+ 'WP_SITEURL' => (defined('WP_SITEURL') && WP_SITEURL) ? WP_SITEURL : 'Not defined',
345
+ 'WP_CONTENT_URL' => (defined('WP_CONTENT_URL') && WP_CONTENT_URL) ? WP_CONTENT_URL : 'Not defined',
346
+ 'WP_CONTENT_DIR' => (defined('WP_CONTENT_DIR') && WP_CONTENT_DIR) ? WP_CONTENT_DIR : 'Not defined',
347
+ 'WP_PLUGIN_DIR' => (defined('WP_PLUGIN_DIR') && WP_PLUGIN_DIR) ? WP_PLUGIN_DIR : 'Not defined',
348
+ 'WP_PLUGIN_URL' => (defined('WP_PLUGIN_URL') && WP_PLUGIN_URL) ? WP_PLUGIN_URL : 'Not defined',
349
+ );
350
+
351
+ if (is_multisite()) {
352
+ $constants['UPLOADS'] = (defined('UPLOADS') && UPLOADS) ? UPLOADS : 'Not defined';
353
+ $constants['UPLOADBLOGSDIR'] = (defined('UPLOADBLOGSDIR') && UPLOADBLOGSDIR) ? UPLOADBLOGSDIR : 'Not defined';
354
+ }
355
+
356
+ $diagnostic_info['constants'] = $constants;
357
+
358
+ $diagnostic_info = array_merge($diagnostic_info, apply_filters('wpmdb_diagnostic_info', array(), $diagnostic_info));
359
+
360
+ $theme_info = wp_get_theme();
361
+ $theme_info_log = array(
362
+ 'Active Theme Name' => $theme_info->Name,
363
+ 'Active Theme Folder' => $theme_info->get_stylesheet_directory(),
364
+ );
365
+ if ($theme_info->get('Template')) {
366
+ $theme_info_log['Parent Theme Folder'] = $theme_info->get('Template');
367
+ }
368
+ if (!$this->filesystem->file_exists($theme_info->get_stylesheet_directory())) {
369
+ $theme_info_log['WARNING'] = 'Active Theme Folder Not Found';
370
+ }
371
+ $diagnostic_info['theme-info'] = $theme_info_log;
372
+
373
+ $active_plugins_log = array('Active Plugins');
374
+
375
+ $active_plugins_log[1] = array();
376
+ if (isset($GLOBALS['wpmdb_compatibility']['active'])) {
377
+ $whitelist = array_flip((array)$this->settings['whitelist_plugins']);
378
+ } else {
379
+ $whitelist = array();
380
+ }
381
+ $active_plugins = (array)get_option('active_plugins', array());
382
+ if (is_multisite()) {
383
+ $network_active_plugins = wp_get_active_network_plugins();
384
+ $active_plugins = array_map(array($this->util, 'remove_wp_plugin_dir'), $network_active_plugins);
385
+ }
386
+ foreach ($active_plugins as $plugin) {
387
+ if (!file_exists(WP_PLUGIN_DIR . '/' . $plugin)) {
388
+ continue;
389
+ }
390
+ $active_plugins_log[1][] = $this->util->get_plugin_details(WP_PLUGIN_DIR . '/' . $plugin, isset($whitelist[$plugin]) ? '*' : '');
391
+ }
392
+
393
+ $diagnostic_info['active-plugins'] = $active_plugins_log;
394
+
395
+ $mu_plugins = wp_get_mu_plugins();
396
+ if ($mu_plugins) {
397
+ $mu_plugins_log = array('Must-Use Plugins');
398
+ $mu_plugins_log[1] = array();
399
+ foreach ($mu_plugins as $mu_plugin) {
400
+ $mu_plugins_log[1][] = $this->util->get_plugin_details($mu_plugin);
401
+ }
402
+ $diagnostic_info['mu-plugins'] = $mu_plugins_log;
403
+ }
404
+
405
+ return $diagnostic_info;
406
+ }
407
+
408
+ function output_log_file()
409
+ {
410
+ $error_log = $this->load_error_log();
411
+ if (!empty($error_log)) {
412
+ echo $error_log;
413
+ }
414
+ }
415
+
416
+ /**
417
+ * @return mixed
418
+ */
419
+ public function getError()
420
+ {
421
+ return $this->error;
422
+ }
423
+
424
+ /**
425
+ * @param mixed $error
426
+ */
427
+ public function setError($error)
428
+ {
429
+ $this->error = $error;
430
+ }
431
  }
class/Common/Error/HandleRemotePostError.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace DeliciousBrains\WPMDB\Common\Error;
5
+
6
+
7
+ use DeliciousBrains\WPMDB\Common\Http\Http;
8
+ use DeliciousBrains\WPMDB\Common\Util\Util;
9
+ use DeliciousBrains\WPMDB\WPMDBDI;
10
+
11
+ class HandleRemotePostError
12
+ {
13
+
14
+ public static function handle($key, $response)
15
+ {
16
+ $http = WPMDBDI::getInstance()->get(Http::class);
17
+
18
+ // WP_Error is thrown manually by remote_post() to tell us something went wrong
19
+ if (is_wp_error($response)) {
20
+ {
21
+ return $http->end_ajax(
22
+ $response
23
+ );
24
+ }
25
+ }
26
+
27
+ $decoded_response = json_decode($response, true);
28
+
29
+ if (false === $response || !$decoded_response['success']) {
30
+ $http->end_ajax(
31
+ new \WP_Error(
32
+ $key,
33
+ $decoded_response['data']
34
+ )
35
+ );
36
+ }
37
+
38
+ if (isset($decoded_response['data'])) {
39
+ return $decoded_response['data'];
40
+ }
41
+
42
+ // if($decoded_response['success'] === false){
43
+ // return $http->end_ajax(
44
+ //
45
+ // )
46
+ // }
47
+
48
+ return $response;
49
+ }
50
+ }
class/Common/Exceptions/SanitizationFailureException.php CHANGED
@@ -2,7 +2,5 @@
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Exceptions;
4
 
5
- class SanitizationFailureException extends \UnexpectedValueException
6
- {
7
 
8
- }
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Exceptions;
4
 
5
+ class SanitizationFailureException extends \UnexpectedValueException {}
 
6
 
 
class/Common/Filesystem/Filesystem.php CHANGED
@@ -2,11 +2,17 @@
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Filesystem;
4
 
 
 
 
 
5
  use DeliciousBrains\WPMDB\Common\Util\Singleton;
6
  use DeliciousBrains\WPMDB\Common\Util\Util;
7
  use DeliciousBrains\WPMDB\Container;
 
8
 
9
- class Filesystem {
 
10
 
11
  use Singleton;
12
  /**
@@ -34,135 +40,142 @@ class Filesystem {
34
  */
35
  private $container;
36
 
37
- /**
38
- * Pass `true` when instantiating to skip using WP_Filesystem
39
- *
40
- * @param bool $force_no_fs
41
- */
42
- public function __construct() {
43
-
44
- // Set default permissions
45
- if ( defined( 'FS_CHMOD_DIR' ) ) {
46
- $this->chmod_dir = FS_CHMOD_DIR;
47
- } else {
48
- $this->chmod_dir = ( fileperms( ABSPATH ) & 0777 | 0755 );
49
- }
50
-
51
- if ( defined( 'FS_CHMOD_FILE' ) ) {
52
- $this->chmod_file = FS_CHMOD_FILE;
53
- } else {
54
- $this->chmod_file = ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 );
55
- }
56
-
57
- $this->container = Container::getInstance();
58
- }
59
-
60
- public function register() {
61
- add_action( 'tools_page_wp-migrate-db-pro', [ $this, 'check_for_wp_filesystem' ] ); // Single sites
62
- add_action( 'tools_page_wp-migrate-db', [ $this, 'check_for_wp_filesystem' ] );
63
- add_action( 'settings_page_wp-migrate-db-pro', [ $this, 'check_for_wp_filesystem' ] ); // Multisites
64
- add_action( 'settings_page_wp-migrate-db', [ $this, 'check_for_wp_filesystem' ] );
65
-
66
- if ( Util::is_wpmdb_ajax_call() ) {
67
- add_action( 'admin_init', [ $this, 'check_for_wp_filesystem' ] );
68
- }
69
- }
70
-
71
- public function check_for_wp_filesystem() {
72
- if ( function_exists( 'request_filesystem_credentials' ) ) {
73
- if ( ( defined( 'WPMDB_WP_FILESYSTEM' ) && WPMDB_WP_FILESYSTEM ) || ! defined( 'WPMDB_WP_FILESYSTEM' ) ) {
74
- $this->maybe_init_wp_filesystem();
75
- }
76
- }
77
- }
78
-
79
- /**
80
- * Getter for the instantiated WP_Filesystem
81
- *
82
- * @return WP_Filesystem|false
83
- *
84
- * This should be used carefully since $wp_filesystem won't always have a value.
85
- */
86
- public function get_wp_filesystem() {
87
- if ( $this->use_filesystem ) {
88
- return $this->wp_filesystem;
89
- } else {
90
- return false;
91
- }
92
- }
93
-
94
- /**
95
- * Is WP_Filesystem being used?
96
- *
97
- * @return bool
98
- */
99
- public function using_wp_filesystem() {
100
- return $this->use_filesystem;
101
- }
102
-
103
- /**
104
- * Attempts to use the correct path for the FS method being used
105
- *
106
- * @param string $abs_path
107
- *
108
- * @return string
109
- */
110
- public function get_sanitized_path( $abs_path ) {
111
- if ( $this->using_wp_filesystem() ) {
112
- return str_replace( ABSPATH, $this->wp_filesystem->abspath(), $abs_path );
113
- }
114
-
115
- return $abs_path;
116
- }
117
-
118
- /**
119
- * Attempt to initiate WP_Filesystem
120
- *
121
- * If this fails, $use_filesystem is set to false and all methods in this class should use native php fallbacks
122
- * Thwarts `request_filesystem_credentials()` attempt to display a form for obtaining creds from users
123
- *
124
- * TODO: provide notice and input in wp-admin for users when this fails
125
- */
126
- public function maybe_init_wp_filesystem() {
127
- ob_start();
128
- $this->credentials = \request_filesystem_credentials( '', '', false, false, null );
129
- $ob_contents = ob_get_contents();
130
- ob_end_clean();
131
-
132
- if ( wp_filesystem( $this->credentials ) ) {
133
- global $wp_filesystem;
134
- $this->wp_filesystem = $wp_filesystem;
135
- $this->use_filesystem = true;
136
- }
137
- }
138
-
139
- /**
140
- * Create file if not exists then set mtime and atime on file
141
- *
142
- * @param string $abs_path
143
- * @param int $time
144
- * @param int $atime
145
- *
146
- * @return bool
147
- */
148
- public function touch( $abs_path, $time = 0, $atime = 0 ) {
149
- if ( 0 == $time ) {
150
- $time = time();
151
- }
152
- if ( 0 == $atime ) {
153
- $atime = time();
154
- }
 
 
 
 
 
 
 
155
 
156
  // @TODO revisit usage of error supression opearator
157
  $return = @touch( $abs_path, $time, $atime );
158
 
159
- if ( ! $return && $this->use_filesystem ) {
160
- $abs_path = $this->get_sanitized_path( $abs_path );
161
- $return = $this->wp_filesystem->touch( $abs_path, $time, $atime );
162
- }
163
 
164
- return $return;
165
- }
166
 
167
  /**
168
  * file_put_contents with chmod
@@ -177,49 +190,51 @@ class Filesystem {
177
  $return = @file_put_contents( $abs_path, $contents );
178
  $this->chmod( $abs_path );
179
 
180
- if ( ! $return && $this->use_filesystem ) {
181
- $abs_path = $this->get_sanitized_path( $abs_path );
182
- $return = $this->wp_filesystem->put_contents( $abs_path, $contents, $this->chmod_file );
183
- }
184
-
185
- return (bool) $return;
186
- }
187
-
188
- /**
189
- * Does the specified file or dir exist
190
- *
191
- * @param string $abs_path
192
- *
193
- * @return bool
194
- */
195
- public function file_exists( $abs_path ) {
196
- $return = file_exists( $abs_path );
197
-
198
- if ( ! $return && $this->use_filesystem ) {
199
- $abs_path = $this->get_sanitized_path( $abs_path );
200
- $return = $this->wp_filesystem->exists( $abs_path );
201
- }
202
-
203
- return (bool) $return;
204
- }
205
-
206
- /**
207
- * Get a file's size
208
- *
209
- * @param string $abs_path
210
- *
211
- * @return int
212
- */
213
- public function filesize( $abs_path ) {
214
- $return = filesize( $abs_path );
215
-
216
- if ( ! $return && $this->use_filesystem ) {
217
- $abs_path = $this->get_sanitized_path( $abs_path );
218
- $return = $this->wp_filesystem->size( $abs_path );
219
- }
220
-
221
- return $return;
222
- }
 
 
223
 
224
  /**
225
  * Get the contents of a file as a string
@@ -232,13 +247,13 @@ class Filesystem {
232
  // @TODO revisit usage of error supression opearator
233
  $return = @file_get_contents( $abs_path );
234
 
235
- if ( ! $return && $this->use_filesystem ) {
236
- $abs_path = $this->get_sanitized_path( $abs_path );
237
- $return = $this->wp_filesystem->get_contents( $abs_path );
238
- }
239
 
240
- return $return;
241
- }
242
 
243
  /**
244
  * Delete a file
@@ -251,137 +266,143 @@ class Filesystem {
251
  // @TODO revisit usage of error supression opearator
252
  $return = @unlink( $abs_path );
253
 
254
- if ( ! $return && $this->use_filesystem ) {
255
- $abs_path = $this->get_sanitized_path( $abs_path );
256
- $return = $this->wp_filesystem->delete( $abs_path, false, false );
257
- }
258
-
259
- return $return;
260
- }
261
-
262
- /**
263
- * chmod a file
264
- *
265
- * @param string $abs_path
266
- * @param int $perms
267
- *
268
- * @return bool
269
- *
270
- * Leave $perms blank to use $this->chmod_file/DIR or pass value like 0777
271
- */
272
- public function chmod( $abs_path, $perms = null ) {
273
- if ( is_null( $perms ) ) {
274
- $perms = $this->is_file( $abs_path ) ? $this->chmod_file : $this->chmod_dir;
275
- }
 
276
 
277
  $return = chmod( $abs_path, $perms );
278
 
279
- if ( ! $return && $this->use_filesystem ) {
280
- $abs_path = $this->get_sanitized_path( $abs_path );
281
- $return = $this->wp_filesystem->chmod( $abs_path, $perms, false );
282
- }
283
-
284
- return $return;
285
- }
286
-
287
- /**
288
- * Is the specified path a directory?
289
- *
290
- * @param string $abs_path
291
- *
292
- * @return bool
293
- */
294
- public function is_dir( $abs_path ) {
295
- $return = is_dir( $abs_path );
296
-
297
- if ( ! $return && $this->use_filesystem ) {
298
- $abs_path = $this->get_sanitized_path( $abs_path );
299
- $return = $this->wp_filesystem->is_dir( $abs_path );
300
- }
301
-
302
- return $return;
303
- }
304
-
305
- /**
306
- * Is the specified path a file?
307
- *
308
- * @param string $abs_path
309
- *
310
- * @return bool
311
- */
312
- public function is_file( $abs_path ) {
313
- $return = is_file( $abs_path );
314
-
315
- if ( ! $return && $this->use_filesystem ) {
316
- $abs_path = $this->get_sanitized_path( $abs_path );
317
- $return = $this->wp_filesystem->is_file( $abs_path );
318
- }
319
-
320
- return $return;
321
- }
322
-
323
- /**
324
- * Is the specified path readable
325
- *
326
- * @param string $abs_path
327
- *
328
- * @return bool
329
- */
330
- public function is_readable( $abs_path ) {
331
- $return = is_readable( $abs_path );
332
-
333
- if ( ! $return && $this->use_filesystem ) {
334
- $abs_path = $this->get_sanitized_path( $abs_path );
335
- $return = $this->wp_filesystem->is_readable( $abs_path );
336
- }
337
-
338
- return $return;
339
- }
340
-
341
- /**
342
- * Is the specified path writable
343
- *
344
- * @param string $abs_path
345
- *
346
- * @return bool
347
- */
348
- public function is_writable( $abs_path ) {
349
- $return = is_writable( $abs_path );
350
-
351
- if ( ! $return && $this->use_filesystem ) {
352
- $abs_path = $this->get_sanitized_path( $abs_path );
353
- $return = $this->wp_filesystem->is_writable( $abs_path );
354
- }
355
-
356
- return $return;
357
- }
358
-
359
- /**
360
- * Recursive mkdir
361
- *
362
- * @param string $abs_path
363
- * @param int $perms
364
- *
365
- * @return bool
366
- */
367
- public function mkdir( $abs_path, $perms = null ) {
368
- if ( is_null( $perms ) ) {
369
- $perms = $this->chmod_dir;
370
- }
 
 
 
 
 
371
 
372
  if ( $this->is_dir( $abs_path ) ) {
373
  $this->chmod( $abs_path, $perms );
374
 
375
- return true;
376
- }
377
 
378
  $mkdirp = wp_mkdir_p( $abs_path );
379
 
380
  if ( $mkdirp ) {
381
  $this->chmod( $abs_path, $perms );
382
 
383
- return true;
384
- }
385
 
386
  $return = mkdir( $abs_path, $perms, true );
387
 
@@ -389,9 +410,9 @@ class Filesystem {
389
  if ( ! $return && $this->use_filesystem ) {
390
  $abs_path = $this->get_sanitized_path( $abs_path );
391
 
392
- if ( $this->is_dir( $abs_path ) ) {
393
- return true;
394
- }
395
 
396
  $return = $this->wp_filesystem_mkdir( $abs_path, $perms );
397
  }
@@ -429,150 +450,153 @@ class Filesystem {
429
  return $this->is_dir( $abs_path );
430
  }
431
 
432
- /**
433
- * Delete a directory
434
- *
435
- * @param string $abs_path
436
- * @param bool $recursive
437
- *
438
- * @return bool
439
- */
440
- public function rmdir( $abs_path, $recursive = false ) {
441
- if ( ! $this->is_dir( $abs_path ) ) {
442
- return false;
443
- }
444
-
445
- // taken from WP_Filesystem_Direct
446
- if ( ! $recursive ) {
447
- $return = @rmdir( $abs_path );
448
- } else {
449
-
450
- // At this point it's a folder, and we're in recursive mode
451
- $abs_path = trailingslashit( $abs_path );
452
- $filelist = $this->scandir( $abs_path );
453
-
454
- $return = true;
455
- if ( is_array( $filelist ) ) {
456
- foreach ( $filelist as $filename => $fileinfo ) {
457
-
458
- if ( 'd' === $fileinfo['type'] ) {
459
- $return = $this->rmdir( $abs_path . $filename, $recursive );
460
- } else {
461
- $return = $this->unlink( $abs_path . $filename );
462
- }
463
- }
464
- }
465
-
466
- if ( file_exists( $abs_path ) && ! @rmdir( $abs_path ) ) {
467
- $return = false;
468
- }
469
- }
470
-
471
- if ( ! $return && $this->use_filesystem ) {
472
- $abs_path = $this->get_sanitized_path( $abs_path );
473
-
474
- return $this->wp_filesystem->rmdir( $abs_path, $recursive );
475
- }
476
-
477
- return $return;
478
-
479
- }
480
-
481
- /**
482
- * Get a list of files/folders under specified directory
483
- *
484
- * @param $abs_path
485
- *
486
- * @return array|bool
487
- */
488
- public function scandir( $abs_path ) {
489
-
490
- if ( is_link( $abs_path ) ) {
491
- return false;
492
- }
493
-
494
- $dirlist = @scandir( $abs_path );
495
-
496
- if ( false === $dirlist ) {
497
- if ( $this->use_filesystem ) {
498
- $abs_path = $this->get_sanitized_path( $abs_path );
499
-
500
- return $this->wp_filesystem->dirlist( $abs_path, true, false );
501
- }
502
-
503
- return false;
504
- }
505
-
506
- $return = array();
507
-
508
- // normalize return to look somewhat like the return value for WP_Filesystem::dirlist
509
- foreach ( $dirlist as $entry ) {
510
- if ( '.' === $entry || '..' === $entry || is_link( $abs_path . $entry ) ) {
511
- continue;
512
- }
513
-
514
- $return[ $entry ] = $this->get_file_info( $entry, $abs_path );
515
- }
516
-
517
- return $return;
518
- }
519
-
520
- /**
521
- * @param string $entry
522
- * @param string $abs_path
523
- *
524
- * @return array
525
- */
526
- public function get_file_info( $entry, $abs_path ) {
527
- $abs_path = $this->slash_one_direction( $abs_path );
528
- $full_path = realpath( trailingslashit( $abs_path ) . $entry );
529
-
530
- $return = array();
531
- $return['name'] = $entry;
532
- $return['relative_path'] = str_replace( $abs_path, '', $full_path );
533
- $return['wp_content_path'] = str_replace( $this->slash_one_direction( WP_CONTENT_DIR ) . DIRECTORY_SEPARATOR, '', $full_path );
534
- $return['subpath'] = preg_replace( '#^(themes|plugins)#', '', $return['wp_content_path'] );
535
- $return['absolute_path'] = $full_path;
536
- $return['type'] = $this->is_dir( $abs_path . DIRECTORY_SEPARATOR . $entry ) ? 'd' : 'f';
537
- $return['size'] = $this->filesize( $abs_path . DIRECTORY_SEPARATOR . $entry );
538
- $return['filemtime'] = filemtime( $abs_path . DIRECTORY_SEPARATOR . $entry );
539
-
540
- $exploded = explode( DIRECTORY_SEPARATOR, $return['subpath'] );
541
- $return['folder_name'] = isset( $exploded[1] ) ? $exploded[1] : $return['relative_path'];
542
-
543
- return $return;
544
- }
545
-
546
- /**
547
- * List all files in a directory recursively
548
- *
549
- * @param $abs_path
550
- *
551
- * @return array|bool
552
- */
553
- public function scandir_recursive( $abs_path ) {
554
- $dirlist = $this->scandir( $abs_path );
555
-
556
- if ( ! $dirlist ) {
557
- return $dirlist;
558
- }
559
-
560
- foreach ( $dirlist as $key => $entry ) {
561
- if ( 'd' === $entry['type'] ) {
562
- $current_dir = trailingslashit( $entry['name'] );
563
- $current_path = trailingslashit( $abs_path ) . $current_dir;
564
- $contents = $this->scandir_recursive( $current_path );
565
- unset( $dirlist[ $key ] );
566
- foreach ( $contents as $filename => $value ) {
567
- $contents[ $current_dir . $filename ] = $value;
568
- unset( $contents[ $filename ] );
569
- }
570
- $dirlist += $contents;
571
- }
572
- }
573
-
574
- return $dirlist;
575
- }
 
 
 
576
 
577
  /**
578
  * Light wrapper for move_uploaded_file with chmod
@@ -588,35 +612,35 @@ class Filesystem {
588
  public function move_uploaded_file( $file, $destination, $perms = null ) {
589
  $return = move_uploaded_file( $file, $destination );
590
 
591
- if ( $return ) {
592
- $this->chmod( $destination, $perms );
593
- }
594
-
595
- return $return;
596
- }
597
-
598
- /**
599
- * Copy a file
600
- *
601
- * @param string $source_abs_path
602
- * @param string $destination_abs_path
603
- * @param bool $overwrite
604
- * @param mixed $perms
605
- *
606
- * @return bool
607
- *
608
- * Taken from WP_Filesystem_Direct
609
- */
610
- public function copy( $source_abs_path, $destination_abs_path, $overwrite = true, $perms = false ) {
611
-
612
- // error if source file doesn't exist
613
- if ( ! $this->file_exists( $source_abs_path ) ) {
614
- return false;
615
- }
616
-
617
- if ( ! $overwrite && $this->file_exists( $destination_abs_path ) ) {
618
- return false;
619
- }
620
 
621
  // @TODO revisit usage of error supression opearator
622
  $return = @copy( $source_abs_path, $destination_abs_path );
@@ -624,303 +648,409 @@ class Filesystem {
624
  $this->chmod( $destination_abs_path, $perms );
625
  }
626
 
627
- if ( ! $return && $this->use_filesystem ) {
628
- $source_abs_path = $this->get_sanitized_path( $source_abs_path );
629
- $destination_abs_path = $this->get_sanitized_path( $destination_abs_path );
630
- $return = $this->wp_filesystem->copy( $source_abs_path, $destination_abs_path, $overwrite, $perms );
631
- }
632
-
633
- return $return;
634
- }
635
-
636
- /**
637
- * Move a file
638
- *
639
- * @param string $source_abs_path
640
- * @param string $destination_abs_path
641
- * @param bool $overwrite
642
- *
643
- * @return bool
644
- */
645
- public function move( $source_abs_path, $destination_abs_path, $overwrite = true ) {
646
-
647
- // error if source file doesn't exist
648
- if ( ! $this->file_exists( $source_abs_path ) ) {
649
- return false;
650
- }
651
-
652
- // Try using rename first. if that fails (for example, source is read only) try copy.
653
- // Taken in part from WP_Filesystem_Direct
654
- if ( ! $overwrite && $this->file_exists( $destination_abs_path ) ) {
655
- return false;
656
- } elseif ( rename( $source_abs_path, $destination_abs_path ) ) {
657
- return true;
658
- } else {
659
- if ( $this->copy( $source_abs_path, $destination_abs_path, $overwrite ) && $this->file_exists( $destination_abs_path ) ) {
660
- $this->unlink( $source_abs_path );
661
-
662
- return true;
663
- } else {
664
- $return = false;
665
- }
666
- }
667
-
668
- //@TODO clean up temp location if using the rcopy() method
669
-
670
- if ( ! $return && $this->use_filesystem ) {
671
- $source_abs_path = $this->get_sanitized_path( $source_abs_path );
672
- $destination_abs_path = $this->get_sanitized_path( $destination_abs_path );
673
-
674
- $return = $this->wp_filesystem->move( $source_abs_path, $destination_abs_path, $overwrite );
675
- }
676
-
677
- return $return;
678
- }
679
-
680
- /**
681
- *
682
- * Recursively copy files, alternative to rename()
683
- *
684
- * @param $source
685
- * @param $dest
686
- *
687
- * @return bool
688
- */
689
- public function rcopy( $source, $dest ) {
690
-
691
- // @TODO should probably throw on Maintenance Mode if using this as it takes much longer to complete vs. rename()
692
-
693
- $this->rmdir( $dest, true );
694
- $this->mkdir( $dest, 0755 );
695
-
696
- $return = true;
697
-
698
- $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $source, RecursiveDirectoryIterator::SKIP_DOTS ), RecursiveIteratorIterator::SELF_FIRST );
699
-
700
- foreach ( $iterator as $item ) {
701
- if ( $item->isDir() ) {
702
- if ( ! $this->mkdir( $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName() ) ) {
703
- $return = false;
704
- }
705
- } else {
706
- if ( ! $this->copy( $item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName() ) ) {
707
- $return = false;
708
- }
709
- }
710
- }
711
-
712
- return $return;
713
- }
714
-
715
- /**
716
- * Converts file paths that include mixed slashes to use the correct type of slash for the current operating system.
717
- *
718
- * @param $path string
719
- *
720
- * @return string
721
- */
722
- public function slash_one_direction( $path ) {
723
- return str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $path );
724
- }
725
-
726
- function download_file() {
727
- $util = $this->container->get( 'util' );
728
- $table_helper = $this->container->get( 'table_helper' );
729
- // don't need to check for user permissions as our 'add_management_page' already takes care of this
730
- $util->set_time_limit();
731
-
732
- $raw_dump_name = filter_input( INPUT_GET, 'download', FILTER_SANITIZE_STRIPPED );
733
- $dump_name = $table_helper->format_dump_name( $raw_dump_name );
734
-
735
- if ( isset( $_GET['gzip'] ) ) {
736
- $dump_name .= '.gz';
737
- }
738
-
739
- $diskfile = $this->get_upload_info( 'path' ) . DIRECTORY_SEPARATOR . $dump_name;
740
- $filename = basename( $diskfile );
741
- $last_dash = strrpos( $filename, '-' );
742
- $salt = substr( $filename, $last_dash, 6 );
743
- $filename_no_salt = str_replace( $salt, '', $filename );
744
-
745
-
746
- if ( file_exists( $diskfile ) ) {
747
- if ( ! headers_sent() ) {
748
- header( 'Content-Description: File Transfer' );
749
- header( 'Content-Type: application/octet-stream' );
750
- header( 'Content-Length: ' . $this->filesize( $diskfile ) );
751
- header( 'Content-Disposition: attachment; filename=' . $filename_no_salt );
752
- readfile( $diskfile );
753
- $this->unlink( $diskfile );
754
- exit;
755
- } else {
756
- $last_error = error_get_last();
757
- $msg = isset( $last_error['message'] ) ? '<p>Error: ' . $last_error['message'] . '</p>' : '';
758
- wp_die( sprintf( __( '<h3>Output prevented download. </h3> %s', 'wp-migrate-db' ), $msg ) );
759
- }
760
- } else {
761
- wp_die( __( 'Could not find the file to download:', 'wp-migrate-db' ) . '<br>' . esc_html( $diskfile ) );
762
- }
763
- }
764
-
765
- /**
766
- * Determines, sets up, and returns folder information for storing files.
767
- *
768
- * By default, the folder created will be `wp-migrate-db` and will be stored
769
- * inside of the `uploads` folder in WordPress' current `WP_CONTENT_DIR`,
770
- * usually `wp-content/uploads`
771
- *
772
- * To change the folder name of `wp-migrate-db` to something else, you can use
773
- * the `wpmdb_upload_dir_name` filter to change it. e.g.:
774
- *
775
- * function upload_dir_name() {
776
- * return 'database-dumps';
777
- * }
778
- *
779
- * add_filter( 'wpmdb_upload_dir_name', 'upload_dir_name' );
780
- *
781
- * If `WP_CONTENT_DIR` was set to `wp-content` in this example,
782
- * this would change the folder to `wp-content/uploads/database-dumps`.
783
- *
784
- * To change the entire path, for example to store these files outside of
785
- * WordPress' `WP_CONTENT_DIR`, use the `wpmdb_upload_info` filter to do so. e.g.:
786
- *
787
- * function upload_info() {
788
- * // The returned data needs to be in a very specific format, see below for example
789
- * return array(
790
- * 'path' => '/path/to/custom/uploads/directory', // note missing end trailing slash
791
- * 'url' => 'http://yourwebsite.com/custom/uploads/directory' // note missing end trailing slash
792
- * );
793
- * }
794
- *
795
- * add_filter( 'wpmdb_upload_info', 'upload_info' );
796
- *
797
- * This would store files in `/path/to/custom/uploads/directory` with a
798
- * URL to access files via `http://yourwebsite.com/custom/uploads/directory`
799
- *
800
- * @link https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
801
- *
802
- * @param string $type Either `path` or `url`.
803
- *
804
- * @return string The Path or the URL to the folder being used.
805
- */
806
- function get_upload_info( $type = 'path' ) {
807
- //@TODO - Don't grab Properties class here
808
- $props = Container::getInstance()->get( 'properties' );
809
- $upload_info = apply_filters( 'wpmdb_upload_info', array() );
810
-
811
- // No need to create the directory structure since it should already exist.
812
- if ( ! empty( $upload_info ) ) {
813
- return $upload_info[ $type ];
814
- }
815
-
816
- $upload_dir = wp_upload_dir();
817
-
818
- $upload_info['path'] = $upload_dir['basedir'];
819
- $upload_info['url'] = $upload_dir['baseurl'];
820
-
821
- $upload_dir_name = apply_filters( 'wpmdb_upload_dir_name', 'wp-migrate-db' );
822
-
823
- if ( ! file_exists( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $upload_dir_name ) ) {
824
- $url = wp_nonce_url( $props->plugin_base, 'wp-migrate-db-pro-nonce' );
825
-
826
- // Create the directory.
827
-
828
- // TODO: Do not silence errors, use wp_mkdir_p?
829
- if ( false === @mkdir( $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $upload_dir_name, 0755 ) ) {
830
- return $upload_info[ $type ];
831
- }
832
-
833
- // Protect from directory listings by making sure an index file exists.
834
- $filename = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $upload_dir_name . DIRECTORY_SEPARATOR . 'index.php';
835
- // TODO: Do not silence errors, use WP_Filesystem API?
836
- if ( false === @file_put_contents( $filename, "<?php\r\n// Silence is golden\r\n?>" ) ) {
837
- return $upload_info[ $type ];
838
- }
839
- }
840
-
841
- // Protect from directory listings by ensuring this folder does not allow Indexes if using Apache.
842
- $htaccess = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $upload_dir_name . DIRECTORY_SEPARATOR . '.htaccess';
843
- if ( ! file_exists( $htaccess ) ) {
844
- // TODO: Do not silence errors, use WP_Filesystem API?
845
- if ( false === @file_put_contents( $htaccess, "Options -Indexes\r\nDeny from all" ) ) {
846
- return $upload_info[ $type ];
847
- }
848
- }
849
-
850
- $upload_info['path'] .= DIRECTORY_SEPARATOR . $upload_dir_name;
851
- $upload_info['url'] .= '/' . $upload_dir_name;
852
-
853
- return $upload_info[ $type ];
854
- }
855
-
856
-
857
- function open( $filename = '', $mode = 'a', $gzip = false ) {
858
- $form_data_class = $this->container->get( 'form_data' );
859
- $form_data = $form_data_class->getFormData();
860
-
861
- $util = $this->container->get( 'util' );
862
-
863
- if ( '' == $filename ) {
864
- return false;
865
- }
866
-
867
- if ( $util->gzip() && isset( $form_data['gzip_file'] ) && $form_data['gzip_file'] ) {
868
- $fp = gzopen( $filename, $mode );
869
- } else {
870
- $fp = fopen( $filename, $mode );
871
- }
872
-
873
- return $fp;
874
- }
875
-
876
- function close( $fp ) {
877
- $form_data_class = $this->container->get( 'form_data' );
878
- $form_data = $form_data_class->getFormData();
879
- $util = $this->container->get( 'util' );
880
-
881
- if ( $util->gzip() && isset( $form_data['gzip_file'] ) && $form_data['gzip_file'] ) {
882
- gzclose( $fp );
883
- } else {
884
- fclose( $fp );
885
- }
886
- }
887
-
888
- public function format_backup_name( $file_name ) {
889
- $new_name = preg_replace( '/-\w{5}.sql/', '.sql${1}', $file_name );
890
-
891
- return $new_name;
892
- }
893
-
894
- public function get_backups() {
895
- $backup_dir = $this->get_upload_info( 'path' ) . DIRECTORY_SEPARATOR;
896
- $files = $this->scandir( $backup_dir );
897
- $output = [];
898
-
899
- foreach ( $files as $file ) {
900
- if ( ! preg_match( '/(.*)-backup-\d{14}-\w{5}.sql$/', $file['name'] ) ) {
901
- continue;
902
- }
903
-
904
- $file_name_formatted = $this->format_backup_name( $file['name'] );
905
-
906
- // Respects WordPress core options 'timezone_string' or 'gmt_offset'
907
- $modified = get_date_from_gmt( date( 'Y-m-d H:i:s', $file['filemtime'] ), 'M d, Y g:i a' );
908
-
909
- $backup_info = [
910
- 'path' => $file['absolute_path'],
911
- 'modified' => $modified,
912
- 'download_url' => WP_CONTENT_URL . DIRECTORY_SEPARATOR . $file['wp_content_path'],
913
- 'name' => $file_name_formatted,
914
- 'raw_name' => $file['name'],
915
- ];
916
-
917
- $output[] = $backup_info;
918
- }
919
-
920
- if ( empty( $output ) ) {
921
- return false;
922
- }
923
-
924
- return $output;
925
- }
2
 
3
  namespace DeliciousBrains\WPMDB\Common\Filesystem;
4
 
5
+ use DeliciousBrains\WPMDB\Common\FormData\FormData;
6
+ use DeliciousBrains\WPMDB\Common\MigrationPersistence\Persistence;
7
+ use DeliciousBrains\WPMDB\Common\Properties\Properties;
8
+ use DeliciousBrains\WPMDB\Common\Sql\TableHelper;
9
  use DeliciousBrains\WPMDB\Common\Util\Singleton;
10
  use DeliciousBrains\WPMDB\Common\Util\Util;
11
  use DeliciousBrains\WPMDB\Container;
12
+ use DeliciousBrains\WPMDB\WPMDBDI;
13
 
14
+ class Filesystem
15
+ {
16
 
17
  use Singleton;
18
  /**
40
  */
41
  private $container;
42
 
43
+ /**
44
+ * Pass `true` when instantiating to skip using WP_Filesystem
45
+ *
46
+ * @param bool $force_no_fs
47
+ */
48
+ public function __construct()
49
+ {
50
+ // Set default permissions
51
+ if (defined('FS_CHMOD_DIR')) {
52
+ $this->chmod_dir = FS_CHMOD_DIR;
53
+ } else {
54
+ $this->chmod_dir = (fileperms(ABSPATH) & 0777 | 0755);
55
+ }
56
+
57
+ if (defined('FS_CHMOD_FILE')) {
58
+ $this->chmod_file = FS_CHMOD_FILE;
59
+ } else {
60
+ $this->chmod_file = (fileperms(ABSPATH . 'index.php') & 0777 | 0644);
61
+ }
62
+
63
+ $this->container = WPMDBDI::getInstance();
64
+ }
65
+
66
+ public function register()
67
+ {
68
+ add_action('tools_page_wp-migrate-db-pro', [$this, 'check_for_wp_filesystem']); // Single sites
69
+ add_action('tools_page_wp-migrate-db', [$this, 'check_for_wp_filesystem']);
70
+ add_action('settings_page_wp-migrate-db-pro', [$this, 'check_for_wp_filesystem']); // Multisites
71
+ add_action('settings_page_wp-migrate-db', [$this, 'check_for_wp_filesystem']);
72
+
73
+ if (Util::is_wpmdb_ajax_call()) {
74
+ add_action('admin_init', [$this, 'check_for_wp_filesystem']);
75
+ }
76
+ }
77
+
78
+ public function check_for_wp_filesystem()
79
+ {
80
+ if (function_exists('request_filesystem_credentials')) {
81
+ if ((defined('WPMDB_WP_FILESYSTEM') && WPMDB_WP_FILESYSTEM) || !defined('WPMDB_WP_FILESYSTEM')) {
82
+ $this->maybe_init_wp_filesystem();
83
+ }
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Getter for the instantiated WP_Filesystem
89
+ *
90
+ * @return WP_Filesystem|false
91
+ *
92
+ * This should be used carefully since $wp_filesystem won't always have a value.
93
+ */
94
+ public function get_wp_filesystem()
95
+ {
96
+ if ($this->use_filesystem) {
97
+ return $this->wp_filesystem;
98
+ } else {
99
+ return false;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Is WP_Filesystem being used?
105
+ *
106
+ * @return bool
107
+ */
108
+ public function using_wp_filesystem()
109
+ {
110
+ return $this->use_filesystem;
111
+ }
112
+
113
+ /**
114
+ * Attempts to use the correct path for the FS method being used
115
+ *
116
+ * @param string $abs_path
117
+ *
118
+ * @return string
119
+ */
120
+ public function get_sanitized_path($abs_path)
121
+ {
122
+ if ($this->using_wp_filesystem()) {
123
+ return str_replace(ABSPATH, $this->wp_filesystem->abspath(), $abs_path);
124
+ }
125
+
126
+ return $abs_path;
127
+ }
128
+
129
+ /**
130
+ * Attempt to initiate WP_Filesystem
131
+ *
132
+ * If this fails, $use_filesystem is set to false and all methods in this class should use native php fallbacks
133
+ * Thwarts `request_filesystem_credentials()` attempt to display a form for obtaining creds from users
134
+ *
135
+ * TODO: provide notice and input in wp-admin for users when this fails
136
+ */
137
+ public function maybe_init_wp_filesystem()
138
+ {
139
+ ob_start();
140
+ $this->credentials = \request_filesystem_credentials('', '', false, false, null);
141
+ $ob_contents = ob_get_contents();
142
+ ob_end_clean();
143
+
144
+ if (wp_filesystem($this->credentials)) {
145
+ global $wp_filesystem;
146
+ $this->wp_filesystem = $wp_filesystem;
147
+ $this->use_filesystem = true;
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Create file if not exists then set mtime and atime on file
153
+ *
154
+ * @param string $abs_path
155
+ * @param int $time
156
+ * @param int $atime
157
+ *
158
+ * @return bool
159
+ */
160
+ public function touch($abs_path, $time = 0, $atime = 0)
161
+ {
162
+ if (0 == $time) {
163
+ $time = time();
164
+ }
165
+ if (0 == $atime) {
166
+ $atime = time();
167
+ }
168
 
169
  // @TODO revisit usage of error supression opearator
170
  $return = @touch( $abs_path, $time, $atime );
171
 
172
+ if (!$return && $this->use_filesystem) {
173
+ $abs_path = $this->get_sanitized_path($abs_path);
174
+ $return = $this->wp_filesystem->touch($abs_path, $time, $atime);
175
+ }
176
 
177
+ return $return;
178
+ }
179
 
180
  /**
181
  * file_put_contents with chmod
190
  $return = @file_put_contents( $abs_path, $contents );
191
  $this->chmod( $abs_path );
192
 
193
+ if (!$return && $this->use_filesystem) {
194
+ $abs_path = $this->get_sanitized_path($abs_path);
195
+ $return = $this->wp_filesystem->put_contents($abs_path, $contents, $this->chmod_file);
196
+ }
197
+
198
+ return (bool)$return;
199
+ }
200
+
201
+ /**
202
+ * Does the specified file or dir exist
203
+ *
204
+ * @param string $abs_path
205
+ *
206
+ * @return bool
207
+ */
208
+ public function file_exists($abs_path)
209
+ {
210
+ $return = file_exists($abs_path);
211
+
212
+ if (!$return && $this->use_filesystem) {
213
+ $abs_path = $this->get_sanitized_path($abs_path);
214
+ $return = $this->wp_filesystem->exists($abs_path);
215
+ }
216
+
217
+ return (bool)$return;
218
+ }
219
+
220
+ /**
221
+ * Get a file's size
222
+ *
223
+ * @param string $abs_path
224
+ *
225
+ * @return int
226
+ */
227
+ public function filesize($abs_path)
228
+ {
229
+ $return = filesize($abs_path);
230
+
231
+ if (!$return && $this->use_filesystem) {
232
+ $abs_path = $this->get_sanitized_path($abs_path);
233
+ $return = $this->wp_filesystem->size($abs_path);
234
+ }
235
+
236
+ return $return;
237
+ }
238
 
239
  /**
240
  * Get the contents of a file as a string
247
  // @TODO revisit usage of error supression opearator
248
  $return = @file_get_contents( $abs_path );
249
 
250
+ if (!$return && $this->use_filesystem) {
251
+ $abs_path = $this->get_sanitized_path($abs_path);
252
+ $return = $this->wp_filesystem->get_contents($abs_path);
253
+ }
254
 
255
+ return $return;
256
+ }
257
 
258
  /**
259
  * Delete a file
266
  // @TODO revisit usage of error supression opearator
267
  $return = @unlink( $abs_path );
268
 
269
+ if (!$return && $this->use_filesystem) {
270
+ $abs_path = $this->get_sanitized_path($abs_path);
271
+ $return = $this->wp_filesystem->delete($abs_path, false, false);
272
+ }
273
+
274
+ return $return;
275
+ }
276
+
277
+ /**
278
+ * chmod a file
279
+ *
280
+ * @param string $abs_path
281
+ * @param int $perms
282
+ *
283
+ * @return bool
284
+ *
285
+ * Leave $perms blank to use $this->chmod_file/DIR or pass value like 0777
286
+ */
287
+ public function chmod($abs_path, $perms = null)
288
+ {
289
+ if (is_null($perms)) {
290
+ $perms = $this->is_file($abs_path) ? $this->chmod_file : $this->chmod_dir;
291
+ }
292
 
293
  $return = chmod( $abs_path, $perms );
294
 
295
+ if (!$return && $this->use_filesystem) {
296
+ $abs_path = $this->get_sanitized_path($abs_path);
297
+ $return = $this->wp_filesystem->chmod($abs_path, $perms, false);
298
+ }
299
+
300
+ return $return;
301
+ }
302
+
303
+ /**
304
+ * Is the specified path a directory?
305
+ *
306
+ * @param string $abs_path
307
+ *
308
+ * @return bool
309
+ */
310
+ public function is_dir($abs_path)
311
+ {
312
+ $return = is_dir($abs_path);
313
+
314
+ if (!$return && $this->use_filesystem) {
315
+ $abs_path = $this->get_sanitized_path($abs_path);
316
+ $return = $this->wp_filesystem->is_dir($abs_path);
317
+ }
318
+
319
+ return $return;
320
+ }
321
+
322
+ /**
323
+ * Is the specified path a file?
324
+ *
325
+ * @param string $abs_path
326
+ *
327
+ * @return bool
328
+ */
329
+ public function is_file($abs_path)
330
+ {
331
+ $return = is_file($abs_path);
332
+
333
+ if (!$return && $this->use_filesystem) {
334
+ $abs_path = $this->get_sanitized_path($abs_path);
335
+ $return = $this->wp_filesystem->is_file($abs_path);
336
+ }
337
+
338
+ return $return;
339
+ }
340
+
341
+ /**
342
+ * Is the specified path readable
343
+ *
344
+ * @param string $abs_path
345
+ *
346
+ * @return bool
347
+ */
348
+ public function is_readable($abs_path)
349
+ {
350
+ $return = is_readable($abs_path);
351
+
352
+ if (!$return && $this->use_filesystem) {
353
+ $abs_path = $this->get_sanitized_path($abs_path);
354
+ $return = $this->wp_filesystem->is_readable($abs_path);
355
+ }
356
+
357
+ return $return;
358
+ }
359
+
360
+ /**
361
+ * Is the specified path writable
362
+ *
363
+ * @param string $abs_path
364
+ *
365
+ * @return bool
366
+ */
367
+ public function is_writable($abs_path)
368
+ {
369
+ $return = is_writable($abs_path);
370
+
371
+ if (!$return && $this->use_filesystem) {
372
+ $abs_path = $this->get_sanitized_path($abs_path);
373
+ $return = $this->wp_filesystem->is_writable($abs_path);
374
+ }
375
+
376
+ return $return;
377
+ }
378
+
379
+ /**
380
+ * Recursive mkdir
381
+ *
382
+ * @param string $abs_path
383
+ * @param int $perms
384
+ *
385
+ * @return bool
386
+ */
387
+ public function mkdir($abs_path, $perms = null)
388
+ {
389
+ if (is_null($perms)) {
390
+ $perms = $this->chmod_dir;
391
+ }
392
 
393
  if ( $this->is_dir( $abs_path ) ) {
394
  $this->chmod( $abs_path, $perms );
395
 
396
+ return true;
397
+ }
398
 
399
  $mkdirp = wp_mkdir_p( $abs_path );
400
 
401
  if ( $mkdirp ) {
402
  $this->chmod( $abs_path, $perms );
403
 
404
+ return true;
405
+ }
406
 
407
  $return = mkdir( $abs_path, $perms, true );
408
 
410
  if ( ! $return && $this->use_filesystem ) {
411
  $abs_path = $this->get_sanitized_path( $abs_path );
412
 
413
+ if ($this->is_dir($abs_path)) {
414
+ return true;
415
+ }
416
 
417
  $return = $this->wp_filesystem_mkdir( $abs_path, $perms );
418
  }
450
  return $this->is_dir( $abs_path );
451
  }
452
 
453
+ /**
454
+ * Delete a directory
455
+ *
456
+ * @param string $abs_path
457
+ * @param bool $recursive
458
+ *
459
+ * @return bool
460
+ */
461
+ public function rmdir($abs_path, $recursive = false)
462
+ {
463
+ if (!$this->is_dir($abs_path)) {
464
+ return false;
465
+ }
466
+
467
+ // taken from WP_Filesystem_Direct
468
+ if (!$recursive) {
469
+ $return = @rmdir($abs_path);
470
+ } else {
471
+ // At this point it's a folder, and we're in recursive mode
472
+ $abs_path = trailingslashit($abs_path);
473
+ $filelist = $this->scandir($abs_path);
474
+
475
+ $return = true;
476
+ if (is_array($filelist)) {
477
+ foreach ($filelist as $filename => $fileinfo) {
478
+ if ('d' === $fileinfo['type']) {
479
+ $return = $this->rmdir($abs_path . $filename, $recursive);
480
+ } else {
481
+ $return = $this->unlink($abs_path . $filename);
482
+ }
483
+ }
484
+ }
485
+
486
+ if (file_exists($abs_path) && !@rmdir($abs_path)) {
487
+ $return = false;
488
+ }
489
+ }
490
+
491
+ if (!$return && $this->use_filesystem) {
492
+ $abs_path = $this->get_sanitized_path($abs_path);
493
+
494
+ return $this->wp_filesystem->rmdir($abs_path, $recursive);
495
+ }
496
+
497
+ return $return;
498
+ }
499
+
500
+ /**
501
+ * Get a list of files/folders under specified directory
502
+ *
503
+ * @param $abs_path
504
+ *
505
+ * @return array|bool|\WP_error
506
+ */
507
+ public function scandir($abs_path)
508
+ {
509
+ if (is_link($abs_path)) {
510
+ return new \WP_Error('wpmdb_transfers_symlink', sprintf(__('The directory `%s` is a symlink. Symlinked folders cannot be migrated. Please exclude this folder and try again.', 'wp-migrate-db'), $abs_path));
511
+ }
512
+
513
+ $dirlist = @scandir($abs_path);
514
+
515
+ if (false === $dirlist) {
516
+ if ($this->use_filesystem) {
517
+ $abs_path = $this->get_sanitized_path($abs_path);
518
+
519
+ return $this->wp_filesystem->dirlist($abs_path, true, false);
520
+ }
521
+
522
+ return false;
523
+ }
524
+
525
+ $return = array();
526
+
527
+ // normalize return to look somewhat like the return value for WP_Filesystem::dirlist
528
+ foreach ($dirlist as $entry) {
529
+ if ('.' === $entry || '..' === $entry || is_link($abs_path . $entry)) {
530
+ continue;
531
+ }
532
+
533
+ $return[$entry] = $this->get_file_info($entry, $abs_path);
534
+ }
535
+
536
+ return $return;
537
+ }
538
+
539
+ /**
540
+ * @param string $entry
541
+ * @param string $abs_path
542
+ *
543
+ * @return array
544
+ */
545
+ public function get_file_info($entry, $abs_path)
546
+ {
547
+ $abs_path = $this->slash_one_direction($abs_path);
548
+ $full_path = realpath(trailingslashit($abs_path) . $entry);
549
+
550
+ $upload_info = wp_get_upload_dir();
551
+ $uploads_folder = wp_basename($upload_info['basedir']);
552
+
553
+ $return = array();
554
+ $return['name'] = $entry;
555
+ $return['relative_path'] = str_replace($abs_path, '', $full_path);
556
+ $return['wp_content_path'] = str_replace($this->slash_one_direction(WP_CONTENT_DIR) . DIRECTORY_SEPARATOR, '', $full_path);
557
+ $return['subpath'] = preg_replace("#^(themes|plugins|{$uploads_folder})#", '', $return['wp_content_path']);
558
+ $return['absolute_path'] = $full_path;
559
+ $return['type'] = $this->is_dir($abs_path . DIRECTORY_SEPARATOR . $entry) ? 'd' : 'f';
560
+ $return['size'] = $this->filesize($abs_path . DIRECTORY_SEPARATOR . $entry);
561
+ $return['filemtime'] = filemtime($abs_path . DIRECTORY_SEPARATOR . $entry);
562
+
563
+ $exploded = explode(DIRECTORY_SEPARATOR, $return['subpath']);
564
+ $return['folder_name'] = isset($exploded[1]) ? $exploded[1] : $return['relative_path'];
565
+
566
+ return $return;
567
+ }
568
+
569
+ /**
570
+ * List all files in a directory recursively
571
+ *
572
+ * @param $abs_path
573
+ *
574
+ * @return array|bool
575
+ */
576
+ public function scandir_recursive($abs_path)
577
+ {
578
+ $dirlist = $this->scandir($abs_path);
579
+
580
+ if (is_wp_error($dirlist)) {
581
+ return $dirlist;
582
+ }
583
+
584
+ foreach ($dirlist as $key => $entry) {
585
+ if ('d' === $entry['type']) {
586
+ $current_dir = trailingslashit($entry['name']);
587
+ $current_path = trailingslashit($abs_path) . $current_dir;
588
+ $contents = $this->scandir_recursive($current_path);
589
+ unset($dirlist[$key]);
590
+ foreach ($contents as $filename => $value) {
591
+ $contents[$current_dir . $filename] = $value;
592
+ unset($contents[$filename]);
593
+ }
594
+ $dirlist += $contents;
595
+ }
596
+ }
597
+
598
+ return $dirlist;
599
+ }
600
 
601
  /**
602
  * Light wrapper for move_uploaded_file with chmod
612
  public function move_uploaded_file( $file, $destination, $perms = null ) {
613
  $return = move_uploaded_file( $file, $destination );
614
 
615
+ if ($return) {
616
+ $this->chmod($destination, $perms);
617
+ }
618
+
619
+ return $return;
620
+ }
621
+
622
+ /**
623
+ * Copy a file
624
+ *
625
+ * @param string $source_abs_path
626
+ * @param string $destination_abs_path
627
+ * @param bool $overwrite
628
+ * @param mixed $perms
629
+ *
630
+ * @return bool
631
+ *
632
+ * Taken from WP_Filesystem_Direct
633
+ */
634
+ public function copy($source_abs_path, $destination_abs_path, $overwrite = true, $perms = false)
635
+ {
636
+ // error if source file doesn't exist
637
+ if (!$this->file_exists($source_abs_path)) {
638
+ return false;
639
+ }
640
+
641
+ if (!$overwrite && $this->file_exists($destination_abs_path)) {
642
+ return false;
643
+ }
644
 
645
  // @TODO revisit usage of error supression opearator
646
  $return = @copy( $source_abs_path, $destination_abs_path );
648
  $this->chmod( $destination_abs_path, $perms );
649
  }
650
 
651
+ if (!$return && $this->use_filesystem) {
652
+ $source_abs_path = $this->get_sanitized_path($source_abs_path);
653
+ $destination_abs_path = $this->get_sanitized_path($destination_abs_path);
654
+ $return = $this->wp_filesystem->copy($source_abs_path, $destination_abs_path, $overwrite, $perms);
655
+ }
656
+
657
+ return $return;
658
+ }
659
+
660
+ /**
661
+ * Move a file
662
+ *
663
+ * @param string $source_abs_path
664
+ * @param string $destination_abs_path
665
+ * @param bool $overwrite
666
+ *
667
+ * @return bool
668
+ */
669
+ public function move($source_abs_path, $destination_abs_path, $overwrite = true)
670
+ {
671
+ // error if source file doesn't exist
672
+ if (!$this->file_exists($source_abs_path)) {
673
+ return false;
674
+ }
675
+
676
+ // Try using rename first. if that fails (for example, source is read only) try copy.
677
+ // Taken in part from WP_Filesystem_Direct
678
+ if (!$overwrite && $this->file_exists($destination_abs_path)) {
679
+ return false;
680
+ } elseif (rename($source_abs_path, $destination_abs_path)) {
681
+ return true;
682
+ } else {
683
+ if ($this->copy($source_abs_path, $destination_abs_path, $overwrite) && $this->file_exists($destination_abs_path)) {
684
+ $this->unlink($source_abs_path);
685
+
686
+ return true;
687
+ } else {
688
+ $return = false;
689
+ }
690
+ }
691
+
692
+ //@TODO clean up temp location if using the rcopy() method
693
+
694
+ if (!$return && $this->use_filesystem) {
695
+ $source_abs_path = $this->get_sanitized_path($source_abs_path);
696
+ $destination_abs_path = $this->get_sanitized_path($destination_abs_path);
697
+
698
+ $return = $this->wp_filesystem->move($source_abs_path, $destination_abs_path, $overwrite);
699
+ }
700
+
701
+ return $return;
702
+ }
703
+
704
+ /**
705
+ *
706
+ * Recursively copy files, alternative to rename()
707
+ *
708
+ * @param $source
709
+ * @param $dest
710
+ *
711
+ * @return bool
712
+ */
713
+ public function rcopy($source, $dest)
714
+ {
715
+ // @TODO should probably throw on Maintenance Mode if using this as it takes much longer to complete vs. rename()
716
+
717
+ $this->rmdir($dest, true);
718
+ $this->mkdir($dest, 0755);
719
+
720
+ $return = true;
721
+
722
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST);
723
+
724
+ foreach ($iterator as $item) {
725
+ if ($item->isDir()) {
726
+ if (!$this->mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName())) {
727
+ $return = false;
728
+ }
729
+ } else {
730
+ if (!$this->copy($item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName())) {
731
+ $return = false;
732
+ }
733
+ }
734
+ }
735
+
736
+ return $return;
737
+ }
738
+
739
+ /**
740
+ * Converts file paths that include mixed slashes to use the correct type of slash for the current operating system.
741
+ *
742
+ * @param $path string
743
+ *
744
+ * @return string
745
+ */
746
+ public function slash_one_direction($path)
747
+ {
748
+ return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
749
+ }
750
+
751
+ function download_file()
752
+ {
753
+ $util = $this->container->get(Util::class);
754
+ $table_helper = $this->container->get(TableHelper::class);
755
+ // don't need to check for user permissions as our 'add_management_page' already takes care of this
756
+ $util->set_time_limit();
757
+
758
+ $raw_dump_name = filter_input(INPUT_GET, 'download', FILTER_SANITIZE_STRIPPED);
759
+ $dump_name = $table_helper->format_dump_name($raw_dump_name);
760
+
761
+ $diskfile = $this->get_upload_info('path') . DIRECTORY_SEPARATOR . $dump_name;
762
+ $filename = basename($diskfile);
763
+ $last_dash = strrpos($filename, '-');
764
+ $salt = substr($filename, $last_dash, 6);
765
+ $filename_no_salt = str_replace($salt, '', $filename);
766
+