From ee35ffeb1981e7a675eaae8ed0869bd9611dc9e7 Mon Sep 17 00:00:00 2001 From: John Godley Date: Tue, 1 Jan 2019 10:15:17 +0000 Subject: [PATCH] Mark as 3.7 beta 1 --- package.json | 2 +- redirection-version.php | 4 ++-- redirection.js | 4 ++-- redirection.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e97ea960..8e616e99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redirection", - "version": "3.7", + "version": "3.7 beta 1", "description": "Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.", "main": "redirection.php", "sideEffects": true, diff --git a/redirection-version.php b/redirection-version.php index d995c455..b99977e3 100644 --- a/redirection-version.php +++ b/redirection-version.php @@ -1,5 +1,5 @@ 0&&c>u&&(c=u);for(var s=0;s=0?(p=m.substr(0,y),f=m.substr(y+1)):(p=m,f=""),d=decodeURIComponent(p),h=decodeURIComponent(f),r(i,d)?o(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,l){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(i(e),function(i){var l=encodeURIComponent(r(i))+n;return o(e[i])?a(e[i],function(e){return l+encodeURIComponent(r(e))}).join(t):l+encodeURIComponent(r(e[i]))}).join(t):l?encodeURIComponent(r(l))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r*{justify-content:center;align-self:center;margin-left:calc(50% - 30px);margin-top:40px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-modal_content{width:80%;margin-right:10%}}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){var r=n(95);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'@-webkit-keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}@keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}.placeholder-container{width:100%;height:100px;position:relative}.placeholder-loading{content:"";position:absolute;top:16px;right:8px;bottom:16px;left:8px;padding-left:8px;padding-top:8px;background-color:#bbb;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.placeholder-inline{width:100%;height:50px;position:relative}.placeholder-inline .placeholder-loading{top:0;right:0;left:0;bottom:0}.loading-small{width:25px;height:25px}input.current-page{width:60px}.loader-wrapper{position:relative}.loader-textarea{height:100px}.wp-list-table .is-placeholder td{position:relative;height:50px}.wp-list-table .item-loading{opacity:0.3}\n',""])},function(e,t,n){var r=n(97);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".donation .donation-amount{float:left;margin-top:10px}.donation .donation-amount span{font-size:28px;margin-top:4px;vertical-align:bottom}.donation .donation-amount img{width:24px !important;margin-bottom:-5px !important}.donation .donation-amount:after{content:'';display:block;clear:both}.donation input[type=number]{width:60px;margin-left:10px}.donation td,.donation th{padding-bottom:0px;margin-bottom:0px}.donation input[type=submit]{margin-left:10px}\n",""])},function(e,t,n){var r=n(99);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".spinner-container{display:inline-block;position:relative}.css-spinner{position:absolute;left:10px;top:-25px;display:block;width:40px;height:40px;background-color:#333;border-radius:100%;-webkit-animation:sk-scaleout 1.0s infinite ease-in-out;animation:sk-scaleout 1.0s infinite ease-in-out}@-webkit-keyframes sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sk-scaleout{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.spinner-small .css-spinner{width:20px;height:20px;top:-15px;left:5px}\n",""])},function(e,t,n){var r=n(101);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".http-tester input[type=text]{width:80%}.http-tester table{width:95%}.http-tester table th,.http-tester table td{vertical-align:top;padding:5px 5px;overflow:hidden}.http-tester table td{max-width:500px}.http-tester table th{text-align:right;padding-right:10px;width:150px}.http-tester table p{padding-top:0;margin-top:0}.http-tester table code{background-color:transparent;font-size:12px;padding:0}.http-tester ul{list-style-type:disc;margin-left:20px}.http-tester ul li span{margin:-20px}.http-tester ul ul{list-style-type:disc;margin-left:20px}\n",""])},function(e,t,n){var r=n(103);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".plugin-status th{text-align:left;padding:5px;vertical-align:top}.plugin-status td,.plugin-status span{vertical-align:top;padding:5px}.plugin-status .plugin-status-good{background-color:#4ab866;color:white}.plugin-status .plugin-status-problem{background-color:orange;color:white}.plugin-status .plugin-status-error{background-color:#ff3860;color:white}.github{margin-top:8px}.github a{text-decoration:none}.github img{padding-right:10px;margin-bottom:-10px}\n",""])},function(e,t,n){var r=n(105);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.redirection .wp-list-table tbody>th:not(.check-column){vertical-align:top;padding:5px}.redirection .wp-list-table .column-last_count{width:80px;text-align:left}.redirection .wp-list-table .column-date{width:150px}.redirection .wp-list-table .column-last_access{width:150px;text-align:left}.redirection .wp-list-table .column-module,.redirection .wp-list-table .column-total,.redirection .wp-list-table .column-ip{width:110px}.redirection .wp-list-table .column-redirects{width:100px;text-align:left}.redirection .wp-list-table .column-position{width:80px;text-align:left}.redirection .wp-list-table .column-code{width:50px;text-align:left}.redirection .wp-list-table .check-column-red{vertical-align:middle;padding:4px 0 0 3px !important;width:2.2em;margin:0px}.redirection .wp-list-table strike{opacity:0.7}.redirection .form-table th a{color:#444}.edit-groups{width:100%}.edit-groups th{line-height:1.2;vertical-align:top;padding:2px;padding-top:5px !important;padding-left:0px;font-size:13px;font-weight:bold}.edit-groups td{padding:2px}.edit-groups input[type=text]{width:100%}.table-buttons{float:left;padding-top:2px}.table-buttons>button,.table-buttons>form,.table-buttons>div.table-button-item{margin-right:5px !important;display:inline}.table-buttons .redirection-modal_wrapper{display:inline}@media screen and (max-width: 782px){input[type="checkbox"]{height:20px;width:20px}.wp-list-table td.column-primary{padding-left:10px;padding-right:10px}.redirection .wp-list-table td,.redirection .wp-list-table input,.redirection .wp-list-table select,.redirection .wp-list-table th{font-size:1em !important}.redirection .wp-list-table td.column-code,.redirection .wp-list-table th.column-code,.redirection .wp-list-table td.column-url .target,.redirection .wp-list-table td.column-date,.redirection .wp-list-table th.column-date,.redirection .wp-list-table td.column-referrer{display:none !important}table.edit-redirection{padding-right:0}table.edit-redirection th{display:block;font-weight:bold;padding-left:0px !important}table.edit-redirection tbody tr td{flex-wrap:wrap}table.edit-redirection tbody tr td>*{flex:1 0 auto;width:100%}table.edit-redirection input[type="text"],table.edit-redirection select,table.edit-redirection input[type="number"]{width:100%}table.edit-redirection select,table.edit-redirection input[type="number"]{height:30px !important}table.edit-groups select,table.edit-groups input[type="number"]{height:30px !important}}\n',""])},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r&&r;i.global!==i&&i.window!==i&&i.self;var l,u=2147483647,c=36,s=1,p=26,f=38,d=700,h=72,m=128,y="-",b=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-s,O=Math.floor,_=String.fromCharCode;function x(e){throw new RangeError(E[e])}function S(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+S((e=e.replace(v,".")).split("."),t).join(".")}function j(e){for(var t,n,r=[],o=0,a=e.length;o=55296&&t<=56319&&o65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?O(e/d):e>>1,e+=O(e/t);e>w*p>>1;r+=c)e=O(e/w);return O(r+(w+1)*e/(e+f))}function R(e){var t,n,r,o,a,i,l,f,d,b,g,v=[],E=e.length,w=0,_=m,S=h;for((n=e.lastIndexOf(y))<0&&(n=0),r=0;r=128&&x("not-basic"),v.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=E&&x("invalid-input"),((f=(g=e.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||f>O((u-w)/i))&&x("overflow"),w+=f*i,!(f<(d=l<=S?s:l>=S+p?p:l-S));l+=c)i>O(u/(b=c-d))&&x("overflow"),i*=b;S=T(w-a,t=v.length+1,0==a),O(w/t)>u-_&&x("overflow"),_+=O(w/t),w%=t,v.splice(w++,0,_)}return C(v)}function N(e){var t,n,r,o,a,i,l,f,d,b,g,v,E,w,S,k=[];for(v=(e=j(e)).length,t=m,n=0,a=h,i=0;i=t&&gO((u-n)/(E=r+1))&&x("overflow"),n+=(l-t)*E,t=l,i=0;iu&&x("overflow"),g==t){for(f=n,d=c;!(f<(b=d<=a?s:d>=a+p?p:d-a));d+=c)S=f-b,w=c-b,k.push(_(P(b+S%w,0))),f=O(S/w);k.push(_(P(f,0))),a=T(n,E,r==o),n=0,++r}++n,++t}return k.join("")}l={version:"1.4.1",ucs2:{decode:j,encode:C},decode:R,encode:N,toASCII:function(e){return k(e,function(e){return g.test(e)?"xn--"+N(e):e})},toUnicode:function(e){return k(e,function(e){return b.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return l}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(107)(e),n(33))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){var r=n(110);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-poweredby{position:absolute;right:15px;bottom:10px}\n",""])},function(e,t,n){var r=n(112);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-geomap{padding-bottom:10px;width:100%;position:relative}.redirection-geomap .redirection-geomap_full{height:600px}.redirection-geomap iframe{position:absolute;top:0;left:0;width:100%;background-color:#eee;height:450px;max-height:90%}.redirection-geomap table{background-color:#fff;padding:10px;padding-bottom:30px;position:absolute;bottom:0;left:0;height:130px;width:100%}.redirection-geomap table th,.redirection-geomap table td{padding:0}.redirection-geomap table th{font-weight:bold;text-align:left;width:150px}.redirection-geomap table td{text-align:left}.redirection-geomap h2{line-height:1;margin:0;padding-bottom:10px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-geomap iframe{height:255px}.redirection-modal_main .redirection-geomap .redirection-geomap_full{height:400px !important}}.redirection-geomap_small{height:100px;padding-top:20px}\n",""])},function(e,t,n){var r=n(114);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-useragent{box-sizing:border-box;padding-bottom:30px}.redirection-useragent th{width:120px;vertical-align:top;line-height:1;text-align:left;padding-left:10px}.redirection-useragent td{line-height:1.2}.redirection-useragent td,.redirection-useragent h2{text-align:left}.redirection-useragent h2{margin-bottom:0;padding-left:12px;padding-bottom:5px}.redirection-useragent .redirection-useragent_agent{font-size:12px}.redirection-useragent .redirection-useragent_unknown,.redirection-useragent .redirection-useragent_unknown h2{text-align:center;padding:5px}.redirection-useragent table{padding-bottom:15px;padding-top:10px}\n",""])},function(e,t,n){var r=n(116);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".edit-redirection{width:100%;padding-right:15px}.edit-redirection th{width:130px;font-weight:bold;text-align:left}.edit-redirection th.top{vertical-align:top}.edit-redirection tbody tr td{display:flex;padding:0}.edit-redirection tbody tr td>*{flex:1 1 auto;justify-content:flex-start;margin-right:5px}.edit-redirection tbody tr td .edit-redirection-regex,.edit-redirection tbody tr td>select{flex:0 0 auto}.edit-redirection tbody tr td .edit-redirection-position input{width:60px}.edit-redirection tbody tr td .small-flex{flex-grow:0;padding-top:5px}.edit-redirection tbody td.edit-left>*{flex:none}.edit-redirection textarea{width:100%;height:100px}.edit-redirection .edit-redirection_warning{padding-top:5px;padding-bottom:5px;margin-bottom:0;margin-top:10px;text-align:left;word-wrap:break-word;width:100%}.edit-redirection .edit-redirection_warning span{margin-right:4px}.edit-redirection .edit-redirection_warning a{color:black;text-decoration:none}.edit-redirection .edit-redirection_warning a:hover{text-decoration:underline}.redirection-modal_content .edit-redirection_warning{margin-left:0;box-shadow:none}\n",""])},function(e,t,n){var r=n(118);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".dropzone{border:3px dashed #bbb;text-align:center;padding:10px;padding-bottom:15px;margin-bottom:10px;border-radius:4px;color:#666}.dropzone h3{color:#666}.dropzone p{font-size:14px}.dropzone .groups{margin-top:15px;margin-bottom:15px}.dropzone .is-placeholder{width:50%;height:90px;position:relative;margin:0 auto}.dropzone-hover,.dropzone-hover{border-color:#86bfd4}.dropzone-importing{border-color:transparent}\n",""])},function(e,t,n){var r=n(120);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-httpcheck_results{display:flex;padding-bottom:40px}.redirection-httpcheck_results .redirection-httpcheck_info{text-align:left}.redirection-httpcheck table{width:100%}.redirection-httpcheck .redirection-httpcheck_status{width:80px}.redirection-httpcheck .redirection-httpcheck_status .dashicons{font-size:70px;width:70px;height:70px}.redirection-httpcheck .redirection-httpcheck_status .dashicons-yes{color:#4ab866}.redirection-httpcheck .redirection-httpcheck_status .dashicons-no{color:#ff3860}.redirection-httpcheck h2{margin-bottom:0;padding-bottom:5px;text-align:left;padding-left:10px}\n",""])},function(e,t,n){var r=n(122);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".notice-error{margin-top:3em}.notice-error .closer{float:right;padding-top:5px;font-size:18px;cursor:pointer;color:#333}.notice-error textarea{font-family:courier,Monaco,monospace;font-size:12px;background-color:#eee;width:100%}.notice-error span code{background-color:transparent}\n",""])},function(e,t,n){var r=n(124);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-notice{position:fixed;bottom:25px;right:0;font-weight:bold;box-shadow:3px 3px 3px rgba(0,0,0,0.2);border-top:1px solid #eee;cursor:pointer;transition:width 1s ease-in-out}.redirection-notice p{padding-right:20px}.redirection-notice .closer{position:absolute;right:5px;top:10px;font-size:16px;opacity:0.8}.redirection-notice.notice-shrunk{width:20px}.redirection-notice.notice-shrunk p{font-size:16px}.redirection-notice.notice-shrunk .closer{display:none}\n",""])},function(e,t,n){var r=n(126);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".notice-progress{border-left:5px solid #4ab866;padding:10px;cursor:auto;bottom:80px}.notice-progress p{margin-left:50px;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite}.notice-progress .spinner-container{position:absolute;left:0;top:33px}\n",""])},function(e,t,n){var r=n(128);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.subsubsub-container::before,.subsubsub-container::after{content:"";display:table}.subsubsub-container::after{clear:both}\n',""])},function(e,t,n){e.exports={default:n(130),__esModule:!0}},function(e,t,n){n(131),e.exports=n(9).Object.assign},function(e,t,n){var r=n(23);r(r.S+r.F,"Object",{assign:n(133)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(27),o=n(40),a=n(30),i=n(58),l=n(56),u=Object.assign;e.exports=!u||n(25)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=i(e),u=arguments.length,c=1,s=o.f,p=a.f;u>c;)for(var f,d=l(arguments[c++]),h=s?r(d).concat(s(d)):r(d),m=h.length,y=0;m>y;)p.call(d,f=h[y++])&&(n[f]=d[f]);return n}:u},function(e,t,n){var r=n(15),o=n(135),a=n(136);e.exports=function(e){return function(t,n,i){var l,u=r(t),c=o(u.length),s=a(i,c);if(e&&n!=n){for(;c>s;)if((l=u[s++])!=l)return!0}else for(;c>s;s++)if((e||s in u)&&u[s]===n)return e||s||0;return!e&&-1}}},function(e,t,n){var r=n(36),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(36),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){e.exports={default:n(138),__esModule:!0}},function(e,t,n){n(139),n(145),e.exports=n(44).f("iterator")},function(e,t,n){"use strict";var r=n(140)(!0);n(60)(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=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(36),o=n(35);e.exports=function(e){return function(t,n){var a,i,l=String(o(t)),u=r(n),c=l.length;return u<0||u>=c?e?"":void 0:(a=l.charCodeAt(u))<55296||a>56319||u+1===c||(i=l.charCodeAt(u+1))<56320||i>57343?e?l.charAt(u):a:e?l.slice(u,u+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(42),o=n(26),a=n(43),i={};n(11)(i,n(16)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(12),o=n(24),a=n(27);e.exports=n(14)?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),l=i.length,u=0;l>u;)r.f(e,n=i[u++],t[n]);return e}},function(e,t,n){var r=n(7).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(10),o=n(58),a=n(37)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){n(146);for(var r=n(7),o=n(11),a=n(41),i=n(16)("toStringTag"),l="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(","),u=0;u=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,r("keys"),r("values"),r("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(150),__esModule:!0}},function(e,t,n){n(151),n(156),n(157),n(158),e.exports=n(9).Symbol},function(e,t,n){"use strict";var r=n(7),o=n(10),a=n(14),i=n(23),l=n(61),u=n(152).KEY,c=n(25),s=n(38),p=n(43),f=n(29),d=n(16),h=n(44),m=n(45),y=n(153),b=n(154),g=n(24),v=n(13),E=n(15),w=n(34),O=n(26),_=n(42),x=n(155),S=n(63),k=n(12),j=n(27),C=S.f,P=k.f,T=x.f,R=r.Symbol,N=r.JSON,D=N&&N.stringify,A=d("_hidden"),I=d("toPrimitive"),L={}.propertyIsEnumerable,F=s("symbol-registry"),U=s("symbols"),M=s("op-symbols"),z=Object.prototype,B="function"==typeof R,W=r.QObject,G=!W||!W.prototype||!W.prototype.findChild,H=a&&c(function(){return 7!=_(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=C(z,t);r&&delete z[t],P(e,t,n),r&&e!==z&&P(z,t,r)}:P,$=function(e){var t=U[e]=_(R.prototype);return t._k=e,t},V=B&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},q=function(e,t,n){return e===z&&q(M,t,n),g(e),t=w(t,!0),g(n),o(U,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=_(n,{enumerable:O(0,!1)})):(o(e,A)||P(e,A,O(1,{})),e[A][t]=!0),H(e,t,n)):P(e,t,n)},Y=function(e,t){g(e);for(var n,r=y(t=E(t)),o=0,a=r.length;a>o;)q(e,n=r[o++],t[n]);return e},K=function(e){var t=L.call(this,e=w(e,!0));return!(this===z&&o(U,e)&&!o(M,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,A)&&this[A][e])||t)},Q=function(e,t){if(e=E(e),t=w(t,!0),e!==z||!o(U,t)||o(M,t)){var n=C(e,t);return!n||!o(U,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=T(E(e)),r=[],a=0;n.length>a;)o(U,t=n[a++])||t==A||t==u||r.push(t);return r},X=function(e){for(var t,n=e===z,r=T(n?M:E(e)),a=[],i=0;r.length>i;)!o(U,t=r[i++])||n&&!o(z,t)||a.push(U[t]);return a};B||(l((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(M,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),H(this,e,O(1,n))};return a&&G&&H(z,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),S.f=Q,k.f=q,n(62).f=x.f=J,n(30).f=K,n(40).f=X,a&&!n(28)&&l(z,"propertyIsEnumerable",K,!0),h.f=function(e){return $(d(e))}),i(i.G+i.W+i.F*!B,{Symbol:R});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)d(Z[ee++]);for(var te=j(d.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!B,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=R(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),i(i.S+i.F*!B,"Object",{create:function(e,t){return void 0===t?_(e):Y(_(e),t)},defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:X}),N&&i(i.S+i.F*(!B||c(function(){var e=R();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(v(t)||void 0!==e)&&!V(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!V(t))return t}),r[1]=t,D.apply(N,r)}}),R.prototype[I]||n(11)(R.prototype,I,R.prototype.valueOf),p(R,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){var r=n(29)("meta"),o=n(13),a=n(10),i=n(12).f,l=0,u=Object.isExtensible||function(){return!0},c=!n(25)(function(){return u(Object.preventExtensions({}))}),s=function(e){i(e,r,{value:{i:"O"+ ++l,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!u(e))return"F";if(!t)return"E";s(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!u(e))return!0;if(!t)return!1;s(e)}return e[r].w},onFreeze:function(e){return c&&p.NEED&&u(e)&&!a(e,r)&&s(e),e}}},function(e,t,n){var r=n(27),o=n(40),a=n(30);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var i,l=n(e),u=a.f,c=0;l.length>c;)u.call(e,i=l[c++])&&t.push(i);return t}},function(e,t,n){var r=n(57);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(15),o=n(62).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(r(e))}},function(e,t){},function(e,t,n){n(45)("asyncIterator")},function(e,t,n){n(45)("observable")},function(e,t,n){e.exports={default:n(160),__esModule:!0}},function(e,t,n){n(161),e.exports=n(9).Object.setPrototypeOf},function(e,t,n){var r=n(23);r(r.S,"Object",{setPrototypeOf:n(162).set})},function(e,t,n){var r=n(13),o=n(24),a=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(52)(Function.call,n(63).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(164),__esModule:!0}},function(e,t,n){n(165);var r=n(9).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(23);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(167);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-database_error{text-align:left;box-shadow:none;margin-top:1em}.redirection-database_error ul{list-style-type:disc}.redirection-database_error li{margin-left:20px}.redirection-database .redirection-database_spinner{margin:0 auto;width:100px}.redirection-database .redirection-database{clear:both;padding-top:20px}.redirection-database .rc-progress-line{clear:both;display:block;margin-bottom:20px}.redirection-database_wrapper h1,.redirection-database_wrapper>p{text-align:center}.redirection-database_wrapper .redirection-database_progress{background-color:#fff;text-align:center;width:75%;margin:0 auto;margin-top:30px;padding:20px;border:1px solid #ddd;border-radius:3px;box-shadow:3px 3px 3px #ddd}\n",""])},function(e,t,n){var r=n(169);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".wizard-wrapper{width:100%;max-width:700px;margin:0 auto;margin-top:90px;color:#555}.wizard-wrapper h1{text-align:center;font-weight:300;color:#999}.wizard{padding:40px;padding-bottom:30px;background-color:white;border-top:2px solid #ca4a1f;border-bottom:2px solid #ca4a1f}.wizard h2{font-size:2em;font-weight:400;padding-bottom:10px;margin-top:5px;margin-bottom:0}.wizard h3{font-size:1.3em;font-weight:300;padding-top:10px}.wizard ul{list-style-type:disc}.wizard li{margin-left:20px}.wizard .notice{margin-bottom:20px;margin-left:0;box-shadow:none;margin-top:0}.wizard .redirection-database_error h2{padding-top:0;margin-top:0}.wizard-buttons{margin-top:20px}.wizard-option{padding:2px 0}.wizard-option label{font-weight:bold}.wizard-option_disabled{opacity:0.5}.wizard-support{text-align:center;padding-top:10px}.wizard-support a{color:#555}.button.wizard-retry{float:right;margin-top:5px}.api-result{padding:5px;height:30px}.api-result .spinner-container{line-height:1;vertical-align:middle}.api-result .css-spinner{position:relative;top:0;left:0;width:26px;height:26px;margin-right:5px}.api-result .dashicons{vertical-align:middle;margin-right:3px;width:26px;height:26px;font-size:26px;padding:0;padding-right:2px}.api-result .dashicons-no{color:#ff3860}.api-result .dashicons-yes{color:#4ab866}.api-result .api-result_error{font-family:'Courier New', Courier, monospace;font-weight:bold}\n",""])},function(e,t,n){var r=n(171);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.wp-core-ui .button-delete{box-shadow:none;text-shadow:none;background-color:#ff3860;border-color:transparent;color:#fff}.wp-core-ui .button-delete:hover{background-color:#ff3860;border-color:transparent;box-shadow:none;text-shadow:none}.inline-notice{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:1px 12px;margin:5px 0 15px;border-left-color:#ffb900}.inline-notice.inline-general{border-left-color:#46b450}.addTop{margin-top:20px}@media screen and (max-width: 782px){.newsletter form input[type=email]{display:block;width:100%;margin:5px 0px}.import select{width:100%;margin:5px 0px}.plugin-importer button{width:100%}p.search-box input[name="s"]{margin-top:20px}}.module-export{border:1px solid #ddd;padding:5px;font-family:courier,Monaco,monospace;margin-top:15px;width:100%;background-color:white !important}.redirects a.advanced{text-decoration:none}.error{padding-bottom:10px !important}\n',""])},function(e,t,n){"use strict";n.r(t);var r=n(64),o=n.n(r),a={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(a.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a.iterable&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function h(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a.arrayBuffer&&a.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e,t,n,r=f(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=d(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},y.call(g.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})};var O=self.DOMException;try{new O}catch(e){(O=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),O.prototype.constructor=O}function _(e,t){return new Promise(function(n,r){var o=new g(e,t);if(o.signal&&o.signal.aborted)return r(new O("Aborted","AbortError"));var i=new XMLHttpRequest;function l(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;n(new E(o,r))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.onabort=function(){r(new O("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&a.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),o.signal&&(o.signal.addEventListener("abort",l),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",l)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=p,self.Request=g,self.Response=E),!window.Promise&&(window.Promise=o.a),Array.from||(Array.from=function(e){return[].slice.call(e)}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o=0||(o[n]=e[n]);return o}var z=n(46),B=n.n(z),W=n(22),G=n.n(W);n(51);function H(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,i=void 0===a?"connectAdvanced":a,l=n.renderCountProp,u=void 0===l?void 0:l,c=n.shouldHandleStateChanges,s=void 0===c||c,p=n.storeKey,f=void 0===p?"store":p,d=n.withRef,h=void 0!==d&&d,m=n.forwardRef,y=void 0!==m&&m,b=n.context,g=void 0===b?A:b,v=M(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);G()(void 0===u,"renderCountProp is removed. render counting is built into the latest React dev tools profiling extension"),G()(!h,"withRef is removed. To access the wrapped instance, use a ref on the connected component");var E="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like: . You may also pass a {context : MyContext} option to connect";G()("store"===f,"storeKey has been removed and does not do anything. "+E);var w=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),a=U({},v,{getDisplayName:o,methodName:i,renderCountProp:u,shouldHandleStateChanges:s,storeKey:f,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=v.pure,c=x.Component,p=t;l&&(c=x.PureComponent);var d=function(t){function n(n){var r,o,i,u,c,s,d,h,m;return r=t.call(this,n)||this,G()(y?!n.wrapperProps[f]:!n[f],"Passing redux store in props has been removed and does not do anything. "+E),r.selectDerivedProps=function(t,n,r){if(l&&o===n&&i===t)return u;r!==c&&(c=r,s=e(r.dispatch,a)),o=n,i=t;var p=s(t,n);return u===p?u:u=p},r.selectChildElement=function(e,t){return e===d&&t===h||(d=e,h=t,m=S.a.createElement(p,U({},e,{ref:t}))),m},r.renderWrappedComponent=r.renderWrappedComponent.bind(F(F(r))),r}R(n,t);var o=n.prototype;return o.renderWrappedComponent=function(e){G()(e,'Could not find "store" in the context of "'+r+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+r+" in connect options.");var t,n=e.storeState,o=e.store,a=this.props;y&&(a=this.props.wrapperProps,t=this.props.forwardedRef);var i=this.selectDerivedProps(n,a,o);return this.selectChildElement(i,t)},o.render=function(){var e=this.props.context||w;return S.a.createElement(e.Consumer,null,this.renderWrappedComponent)},n}(c);if(d.WrappedComponent=t,d.displayName=r,y){var h=S.a.forwardRef(function(e,t){return S.a.createElement(d,{wrapperProps:e,forwardedRef:t})});return h.displayName=r,h.WrappedComponent=t,B()(h,t)}return B()(d,t)}}var $=Object.prototype.hasOwnProperty;function V(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function q(e,t){if(V(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ie(e,t){return e===t}var le,ue,ce,se,pe,fe,de,he,me,ye,be,ge,ve=(ce=(ue=void 0===le?{}:le).connectHOC,se=void 0===ce?H:ce,pe=ue.mapStateToPropsFactories,fe=void 0===pe?Z:pe,de=ue.mapDispatchToPropsFactories,he=void 0===de?X:de,me=ue.mergePropsFactories,ye=void 0===me?te:me,be=ue.selectorFactory,ge=void 0===be?oe:be,function(e,t,n,r){void 0===r&&(r={});var o=r,a=o.pure,i=void 0===a||a,l=o.areStatesEqual,u=void 0===l?ie:l,c=o.areOwnPropsEqual,s=void 0===c?q:c,p=o.areStatePropsEqual,f=void 0===p?q:p,d=o.areMergedPropsEqual,h=void 0===d?q:d,m=M(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=ae(e,fe,"mapStateToProps"),b=ae(t,he,"mapDispatchToProps"),g=ae(n,ye,"mergeProps");return se(ge,U({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:g,pure:i,areStatesEqual:u,areOwnPropsEqual:s,areStatePropsEqual:f,areMergedPropsEqual:h},m))}),Ee=n(67);function we(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var Oe=we();Oe.withExtraArgument=we;var _e=Oe,xe="SETTING_LOAD_START",Se="SETTING_LOAD_SUCCESS",ke="SETTING_LOAD_FAILED",je="SETTING_LOAD_STATUS",Ce="SETTING_SAVING",Pe="SETTING_SAVED",Te="SETTING_SAVE_FAILED",Re="SETTING_DATABASE_START",Ne="SETTING_DATABASE_FAILED",De="SETTING_DATABASE_SUCCESS",Ae="SETTING_DATABASE_COMPLETE",Ie="SETTING_DATABASE_FINISH",Le="SETTING_DATABASE_SHOW",Fe="SETTING_API_FAILED",Ue="SETTING_API_SUCCESS",Me="SETTING_API_TRY",ze="STATUS_IN_PROGRESS",Be="STATUS_FAILED",We="STATUS_COMPLETE",Ge="STATUS_SAVING";function He(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=at(),i={orderby:r,direction:"desc",page:0,per_page:parseInt(Redirectioni10n.per_page,10),selected:[],filterBy:"",filter:"",groupBy:""},l=void 0===a.sub?"":a.sub;return-1===o.indexOf(l)?i:lt({},i,{orderby:a.orderby&&-1!==e.indexOf(a.orderby)?a.orderby:i.orderby,direction:a.direction&&"asc"===a.direction?"asc":i.direction,page:a.offset&&parseInt(a.offset,10)>0?parseInt(a.offset,10):i.page,per_page:Redirectioni10n.per_page?parseInt(Redirectioni10n.per_page,10):i.per_page,filterBy:a.filterby&&-1!==t.indexOf(a.filterby)?a.filterby:i.filterBy,filter:a.filter?a.filter:i.filter,groupBy:a.groupby&&-1!==n.indexOf(a.groupby)?a.groupby:i.groupBy})},ft=function(e,t){for(var n=Object.assign({},e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=Redirectioni10n.WP_API_root+"redirection/v1/"+e+"/";if(n._wpnonce=Redirectioni10n.WP_API_nonce,n&&Object.keys(n).length>0&&(t=n,n=Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return e[n]=t[n],e},{}),Object.keys(n).length>0)){var o=r+(-1===Redirectioni10n.WP_API_root.indexOf("?")?"?":"&")+nt.a.stringify(n);return-1!==Redirectioni10n.WP_API_root.indexOf("page=redirection.php")?o.replace(/page=(\d+)/,"ppage=$1"):o}return r},wt=function(e){return-1!==e.indexOf("rest_route")||-1!==e.indexOf("/wp-json/")?new Headers({"Content-Type":"application/json; charset=utf-8"}):new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"})},Ot=function(e){return{url:e,headers:wt(e),credentials:"same-origin"}},_t=function(e,t){var n=gt({},t),r={};return t&&t.items&&(r.items=t.items,delete n.items),gt({},Ot(Et(e,n)),{method:"post",body:r.items?JSON.stringify(r):null})},xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gt({},Ot(Et(e,t)),{method:"get"})},St=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=gt({},Ot(Et(e,n)),{method:"post",params:t});return Object.keys(t).length>0&&(r.body=JSON.stringify(t)),r},kt={get:function(){return xt("setting")},update:function(e){return St("setting",e)}},jt={list:function(e){return xt("redirect",e)},update:function(e,t){return St("redirect/"+e,t)},create:function(e){return St("redirect",e)}},Ct={list:function(e){return xt("group",e)},update:function(e,t){return St("group/"+e,t)},create:function(e){return St("group",e)}},Pt={list:function(e){return xt("log",e)},deleteAll:function(e){return _t("log",e)}},Tt={list:function(e){return xt("404",e)},deleteAll:function(e){return _t("404",e)}},Rt={get:function(){return xt("import")},upload:function(e,t){return function(e,t){var n=gt({},Ot(Et(e)),{method:"post"});return n.headers.delete("Content-Type"),n.body=new FormData,n.body.append("file",t),n}("import/file/"+e,t)},pluginList:function(){return xt("import/plugin")},pluginImport:function(e){return St("import/plugin/"+e)}},Nt={file:function(e,t){return xt("export/"+e+"/"+t)}},Dt={status:function(){return xt("plugin")},fix:function(){return St("plugin")},delete:function(){return _t("plugin/delete")},upgradeDatabase:function(e){return St("plugin/database",e?{upgrade:e}:{})},checkApi:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?xt("plugin/test"):St("plugin/test",{test:"ping"});return t.url=t.url.replace(Redirectioni10n.WP_API_root,e),-1!==t.url.indexOf("php?")&&(t.url=t.url.replace("?_","&_")),t}},At={redirect:function(e,t,n){return St("bulk/redirect/"+e,t,n)},group:function(e,t,n){return St("bulk/group/"+e,t,n)},log:function(e,t,n){return St("bulk/log/"+e,t,n)},error:function(e,t,n){return St("bulk/404/"+e,t,n)}},It=function(e){return"https://api.redirect.li/v1/"+e+(-1===e.indexOf("?")?"?":"&")+"ref=redirection"},Lt={getGeo:function(e){return{url:It("ip/"+e+"?locale="+Redirectioni10n.localeSlug.substr(0,2)),method:"get"}}},Ft={get:function(e){return{url:It("useragent/"+encodeURIComponent(e)),method:"get"}}},Ut={get:function(e){return{url:It("http?url="+encodeURIComponent(e)),method:"get"}}},Mt=function(e){return 0===e?"Admin AJAX returned 0":e.message?e.message:"Unknown error "+e},zt=function(e){return e.error_code?e.error_code:e.data&&e.data.error_code?e.data.error_code:0===e?"admin-ajax":e.code?e.code:"unknown"},Bt=function(e){return e.action=function(e){return e.url.replace(Redirectioni10n.WP_API_root,"").replace(/[\?&]_wpnonce=[a-f0-9]*/,"")+" "+e.method.toUpperCase()}(e),fetch(e.url,e).then(function(t){if(!t||!t.status)throw{message:"No data or status object returned in request",code:0};return t.status&&void 0!==t.statusText&&(e.status=t.status,e.statusText=t.statusText),t.headers.get("x-wp-nonce")&&(Redirectioni10n.WP_API_nonce=t.headers.get("x-wp-nonce")),t.text()}).then(function(t){e.raw=t;try{var n=JSON.parse(t.replace(/\ufeff/,""));if(e.status&&200!==e.status)throw{message:Mt(n),code:zt(n),request:e,data:n.data?n.data:null};if(0===n)throw{message:"Failed to get data",code:"json-zero"};return n}catch(t){throw t.request=e,t}})};function Wt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t4&&void 0!==arguments[4]?arguments[4]:{};return function(a,i){var l=i()[r.store],u=l.table,c=l.total,s={items:n?[n]:u.selected,bulk:t};if("delete"===t&&u.page>0&&u.per_page*u.page==c-1&&(u.page-=1),"delete"!==t||confirm(Object(P.translate)("Are you sure you want to delete this item?","Are you sure you want to delete these items?",{count:s.items.length}))){var p=ft(u,s),f=Ht({},{items:s.items.join(",")},o);return Bt(e(t,f,dt(u,r.order))).then(function(e){a(Ht({type:r.saved},e,{saving:s.items}))}).catch(function(e){a({type:r.failed,error:e,saving:s.items})}),a({type:r.saving,table:p,saving:s.items})}}},qt=function(e,t,n,r,o){return Bt(e).then(function(e){o({type:r.saved,item:e.item,items:e.items,total:e.total,saving:[n.id]})}).catch(function(e){o({type:r.failed,error:e,item:n,saving:[n.id]})}),o({type:r.saving,table:t,item:n,saving:[n.id]})},Yt=function(e,t,n){return function(r,o){var a=Gt({},o()[n.store]);return a.page=0,a.orderby="id",a.direction="desc",qt(e(t),a,t,n,r)}},Kt=function(e,t,n,r){return function(o,a){var i=a()[r.store].table;return qt(e(t,n),i,n,r,o)}},Qt=function(e,t){for(var n in e)if(e[n]!==t[n])return!1;return!0},Jt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){return e},i=o.table,l=void 0===i?{}:i,u=o.rows,c=a(ft(l,r)),s=dt(Ht({},l,r),n.order);if(!(Qt(c,l)&&u.length>0&&Qt(r,{})))return Bt(e(s)).then(function(e){t(Ht({type:n.saved},e))}).catch(function(e){t({type:n.failed,error:e})}),t(Ht({table:c,type:n.saving},function(e,t){var n={};for(var r in t)void 0===e[r]&&(n[r]=t[r]);return n}(c,r)))},Xt=function(e,t,n,r,o){var a=o.table,i=dt(Ht({},a,r),n.order);Bt(e(i)).then(function(e){t(Ht({type:n.saved},e))}).catch(function(e){t({type:n.failed,error:e})})},Zt=function(e,t,n){for(var r=e.slice(0),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Me:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,void 0))});case Ue:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,!0))});case Fe:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,t.error.request.status))});case Le:return He({},e,{showDatabase:!0});case Ie:return He({},e,{showDatabase:!1,database:He({},e.database,{status:"ok"})});case Re:return He({},e,{database:He({},e.database,{inProgress:!0,result:"ok",reason:"skip"!==t.arg&&e.database.reason}),showDatabase:"stop"!==t.arg});case De:return He({},e,{database:He({},e.database,t.database)});case Ae:return He({},e,{database:He({},e.database,{inProgress:!1})});case Ne:return He({},e,{database:He({},e.database,{result:Be,reason:t.error})});case xe:return He({},e,{loadStatus:ze});case Se:return He({},e,{loadStatus:We,values:t.values,groups:t.groups,postTypes:t.postTypes,installed:t.installed,canDelete:t.canDelete});case ke:return He({},e,{loadStatus:Be,error:t.error});case Ce:return He({},e,{saveStatus:ze});case Pe:return He({},e,{saveStatus:We,values:t.values,groups:t.groups,installed:t.installed});case Te:return He({},e,{saveStatus:Be,error:t.error});case je:return He({},e,{pluginStatus:t.pluginStatus})}return e},log:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Je:return un({},e,{table:yt(e.table,e.rows,t.onoff)});case Qe:return un({},e,{table:mt(e.table,t.items)});case Xe:return un({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case Ze:return un({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case qe:return un({},e,{table:rn(e,t),status:ze,saving:[],logType:t.logType,requestCount:e.requestCount+1});case Ke:return un({},e,{status:Be,saving:[]});case Ye:return un({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case et:return un({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},error:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case hn:return gn({},e,{table:yt(e.table,e.rows,t.onoff)});case dn:return gn({},e,{table:mt(e.table,t.items)});case mn:return gn({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case yn:return gn({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case sn:return gn({},e,{table:rn(e,t),status:ze,saving:[],requestCount:e.requestCount+1,rows:[]});case fn:return gn({},e,{status:Be,saving:[]});case pn:return gn({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case bn:return gn({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},io:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case wn:return Cn({},e,{exportStatus:ze});case En:return Cn({},e,{exportStatus:We,exportData:t.data});case kn:return Cn({},e,{file:t.file});case Sn:return Cn({},e,{file:!1,lastImport:!1,exportData:!1});case xn:return Cn({},e,{importingStatus:Be,exportStatus:Be,lastImport:!1,file:!1,exportData:!1});case On:return Cn({},e,{importingStatus:ze,lastImport:!1,file:!!t.file&&t.file});case _n:return Cn({},e,{lastImport:t.total,importingStatus:We,file:!1});case jn:return Cn({},e,{importers:t.importers})}return e},group:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Tn:return Un({},e,{table:rn(e,t),status:ze,saving:[]});case Rn:return Un({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case In:return Un({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case Fn:return Un({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case An:return Un({},e,{table:yt(e.table,e.rows,t.onoff)});case Dn:return Un({},e,{table:mt(e.table,t.items)});case Nn:return Un({},e,{status:Be,saving:[]});case Ln:return Un({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},redirect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yn:return Kn({},e,{addTop:t.onoff});case zn:return Kn({},e,{table:rn(e,t),status:ze,saving:[]});case Bn:return Kn({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case $n:return Kn({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case qn:return Kn({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case Hn:return Kn({},e,{table:yt(e.table,e.rows,t.onoff)});case Gn:return Kn({},e,{table:mt(e.table,t.items)});case Wn:return Kn({},e,{status:Be,saving:[]});case Vn:return Kn({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},message:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xn:case Nn:case Vn:case Ln:case Ke:case et:case ke:case Te:case bn:case fn:case Ne:case Wn:var n=tr(e.errors,t.error);return console.error(t.error.message),Zn({},e,{errors:n,inProgress:rr(e)});case Xe:case $n:case Ce:case mn:case In:return Zn({},e,{inProgress:e.inProgress+1});case Ze:case qn:case Pe:case Fn:case yn:return Zn({},e,{notices:nr(e.notices,or[t.type]),inProgress:rr(e)});case Xn:return Zn({},e,{notices:[]});case Jn:return Zn({},e,{errors:[]})}return e},info:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ar:return pr({},e,{status:ze,http:!1});case ir:return pr({},e,{status:We,maps:dr(e.maps,t.map,"ip")});case lr:return pr({},e,{status:We,agents:dr(e.agents,t.agent,"agent")});case ur:return pr({},e,{status:Be,error:t.error});case cr:return pr({},e,{status:We,http:t.http});case sr:return pr({},e,{http:!1})}return e}}),mr=Object(Ee.composeWithDevTools)({name:"Redirection"}),yr=[_e,function(){return function(e){return function(t){switch(t.type){case $n:case In:case zn:case Tn:case qe:case sn:!function(e,t){var n=it(),r={redirect:[[zn,$n],"id"],groups:[[Tn,In],"name"],log:[[qe],"date"],"404s":[[sn],"date"]};if(r[n]&&e===r[n][0].find(function(t){return t===e})){var o=t.orderby,a=t.direction,i=t.page,l=t.per_page,u=t.filter,c=t.filterBy,s=t.groupBy,p={orderby:o,direction:a,offset:i,per_page:l,filter:u,filterBy:c,groupBy:s},f={orderby:r[n][1],direction:"desc",offset:0,filter:"",filterBy:"",per_page:parseInt(Redirectioni10n.per_page,10),groupBy:""};s&&(f.orderby="total"),ot(p,f)}}(t.type,t.table?t.table:t)}return e(t)}}}];function br(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(Y.createStore)(hr,e,mr(Y.applyMiddleware.apply(void 0,yr)))}function gr(){var e=Redirectioni10n&&Redirectioni10n.preload&&Redirectioni10n.preload.pluginStatus?Redirectioni10n.preload.pluginStatus:[];return{loadStatus:ze,saveStatus:!1,error:!1,installed:"",settings:{},postTypes:[],pluginStatus:e,canDelete:!1,showDatabase:!1,apiTest:{},database:Redirectioni10n.database?Redirectioni10n.database:{}}}function vr(){return{rows:[],saving:[],total:0,status:ze,table:pt(["ip","url"],["ip"],[],"date",["log"]),requestCount:0}}function Er(){var e=at(),t="date";return"404s"===e.sub&&e.groupby&&(t="total"),{rows:[],saving:[],total:0,status:ze,table:pt(["ip","url","total"],["ip","url-exact"],["url","ip"],t,["404s"]),requestCount:0}}function wr(){return{rows:[],saving:[],total:0,status:ze,table:pt(["name"],["name","module"],[],"name",["groups"])}}function Or(){return{rows:[],saving:[],total:0,addTop:!1,status:ze,table:pt(["url","position","last_count","id","last_access"],["group"],[],"id",[""])}}var _r=function(){return function(e,t){return t().settings.loadStatus===We?null:(Bt(kt.get()).then(function(t){e({type:Se,values:t.settings,groups:t.groups,postTypes:t.post_types,installed:t.installed,canDelete:t.canDelete})}).catch(function(t){e({type:ke,error:t})}),e({type:xe}))}},xr=function(e){return function(t){return Bt(kt.update(e)).then(function(e){t({type:Pe,values:e.settings,groups:e.groups,installed:e.installed})}).catch(function(e){t({type:Te,error:e})}),t({type:Ce})}},Sr=function(){return function(e){return Bt(Dt.delete()).then(function(e){document.location.href=e.location}).catch(function(t){e({type:Te,error:t})}),e({type:Ce})}},kr=function(){return function(e){return Bt(Dt.status()).then(function(t){e({type:je,pluginStatus:t})}).catch(function(t){e({type:ke,error:t})}),e({type:xe})}},jr=function(){return function(e){return Bt(Dt.fix()).then(function(t){e({type:je,pluginStatus:t})}).catch(function(t){e({type:ke,error:t})}),e({type:xe})}},Cr=function(){return{type:Le}},Pr=function(e){return function(t){return Bt(Dt.upgradeDatabase(e)).then(function(e){t({type:De,database:e})}).catch(function(e){t({type:Ne,error:e})}),t({type:Re,arg:e})}},Tr=function(){return{type:Ie}},Rr=function(e){return function(t){for(var n=function(n){var r=e[n],o=r.id,a=r.url;t({type:Me,id:o,method:"GET"}),t({type:Me,id:o,method:"POST"}),Bt(Dt.checkApi(a)).then(function(){t({type:Ue,id:o,method:"GET"})}).catch(function(e){t({type:Fe,id:o,method:"GET",error:e})}),Bt(Dt.checkApi(a,!0)).then(function(){t({type:Ue,id:o,method:"POST"})}).catch(function(e){t({type:Fe,id:o,method:"POST",error:e})})},r=0;r0?o:0,associated_redirect:i.length>0?a:""})});var a=e.values.modules;return n.state=e.values,n.state.location=a[2]?a[2].location:"",n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Br(e,t)}(t,S.a.Component),n=t,(r=[{key:"getSnapshotBeforeUpdate",value:function(e){return e.values.token!==this.props.values.token&&this.setState({token:this.props.values.token}),e.values.auto_target!==this.props.values.auto_target&&this.setState({auto_target:this.props.values.auto_target}),null}},{key:"renderMonitor",value:function(e){return S.a.createElement(Nr,{title:Object(P.translate)("URL Monitor Changes")+":",url:this.supportLink("options","monitor")},S.a.createElement(Lr,{items:e,name:"monitor_post",value:parseInt(this.state.monitor_post,10),onChange:this.onChange})," ",Object(P.translate)("Save changes to this group"),S.a.createElement("p",null,S.a.createElement("input",{type:"text",className:"regular-text",name:"associated_redirect",onChange:this.onChange,placeholder:Object(P.translate)('For example "/amp"'),value:this.state.associated_redirect})," ",Object(P.translate)("Create associated redirect (added to end of URL)")))}},{key:"renderPostTypes",value:function(){var e=this,t=this.props.postTypes,n=this.state.monitor_types,r=[],o=function(o){var a=t[o],i=!!n.find(function(e){return e===o});r.push(S.a.createElement("p",{key:o},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",name:"monitor_type_"+o,onChange:e.onMonitor,checked:i}),Object(P.translate)("Monitor changes to %(type)s",{args:{type:a.toLowerCase()}}))))};for(var a in t)o(a);return r}},{key:"supportLink",value:function(e,t){return"https://redirection.me/support/"+e+"/?utm_source=redirection&utm_medium=plugin&utm_campaign=support"+(t?"&utm_term="+t+"#"+t:"")}},{key:"render",value:function(){var e=this.props,t=e.groups,n=e.saveStatus,r=e.installed,o=this.state.monitor_types.length>0;return S.a.createElement("form",{onSubmit:this.onSubmit},S.a.createElement(Dr,null,S.a.createElement(Nr,{title:""},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",checked:this.state.support,name:"support",onChange:this.onChange}),S.a.createElement("span",{className:"sub"},Object(P.translate)("I'm a nice person and I have helped support the author of this plugin")))),S.a.createElement(Nr,{title:Object(P.translate)("Redirect Logs")+":",url:this.supportLink("logs")},S.a.createElement(Lr,{items:Hr(),name:"expire_redirect",value:parseInt(this.state.expire_redirect,10),onChange:this.onChange})," ",Object(P.translate)("(time to keep logs for)")),S.a.createElement(Nr,{title:Object(P.translate)("404 Logs")+":",url:this.supportLink("tracking-404-errors")},S.a.createElement(Lr,{items:Hr(),name:"expire_404",value:parseInt(this.state.expire_404,10),onChange:this.onChange})," ",Object(P.translate)("(time to keep logs for)")),S.a.createElement(Nr,{title:Object(P.translate)("IP Logging")+":",url:this.supportLink("options","iplogging")},S.a.createElement(Lr,{items:[{value:0,text:Object(P.translate)("No IP logging")},{value:1,text:Object(P.translate)("Full IP logging")},{value:2,text:Object(P.translate)("Anonymize IP (mask last part)")}],name:"ip_logging",value:parseInt(this.state.ip_logging,10),onChange:this.onChange})," ",Object(P.translate)("(select IP logging level)")," - ",S.a.createElement(Fr,{url:this.supportLink("privacy-gdpr")},Object(P.translate)("GDPR / Privacy information"))),S.a.createElement(Nr,{title:Object(P.translate)("URL Monitor")+":",url:this.supportLink("options","monitor")},this.renderPostTypes()),o&&this.renderMonitor(t),S.a.createElement(Nr,{title:Object(P.translate)("RSS Token")+":",url:this.supportLink("options","rsstoken")},S.a.createElement("input",{className:"regular-text",type:"text",value:this.state.token,name:"token",onChange:this.onChange}),S.a.createElement("br",null),S.a.createElement("span",{className:"sub"},Object(P.translate)("A unique token allowing feed readers access to Redirection log RSS (leave blank to auto-generate)"))),S.a.createElement(Nr,{title:Object(P.translate)("Auto-generate URL")+":",url:this.supportLink("options","autogenerate")},S.a.createElement("input",{className:"regular-text",type:"text",value:this.state.auto_target,name:"auto_target",onChange:this.onChange}),S.a.createElement("br",null),S.a.createElement("span",{className:"sub"},Object(P.translate)("Used to auto-generate a URL if no URL is given. Use the special tags {{code}}$dec${{/code}} or {{code}}$hex${{/code}} to insert a unique ID instead",{components:{code:S.a.createElement("code",null)}}))),S.a.createElement(Nr,{title:Object(P.translate)("Apache Module"),url:this.supportLink("options","apache")},S.a.createElement("label",null,S.a.createElement("p",null,S.a.createElement("input",{type:"text",className:"regular-text",name:"location",value:this.state.location,onChange:this.onChange,placeholder:r})),S.a.createElement("p",{className:"sub"},Object(P.translate)("Enter the full path and filename if you want Redirection to automatically update your {{code}}.htaccess{{/code}}.",{components:{code:S.a.createElement("code",null)}})))),S.a.createElement(Nr,{title:Object(P.translate)("Force HTTPS"),url:this.supportLink("options","force-https")},S.a.createElement("label",null,S.a.createElement("p",null,S.a.createElement("input",{type:"checkbox",name:"https",onChange:this.onChange,checked:this.state.https}),Object(P.translate)("Force a redirect from HTTP to HTTPS. Please ensure your HTTPS is working before enabling"),"  ",Object(P.translate)("(beta)")))),S.a.createElement(Nr,{title:Object(P.translate)("Redirect Cache"),url:this.supportLink("options","cache")},S.a.createElement(Lr,{items:[{value:-1,text:Object(P.translate)("Never cache")},{value:1,text:Object(P.translate)("An hour")},{value:24,text:Object(P.translate)("A day")},{value:168,text:Object(P.translate)("A week")},{value:0,text:Object(P.translate)("Forever")}],name:"redirect_cache",value:parseInt(this.state.redirect_cache,10),onChange:this.onChange}),"  ",S.a.createElement("span",{className:"sub"},Object(P.translate)('How long to cache redirected 301 URLs (via "Expires" HTTP header)'))),S.a.createElement(Nr,{title:Object(P.translate)("REST API"),url:this.supportLink("options","restapi")},S.a.createElement(Lr,{items:$r(),name:"rest_api",value:parseInt(this.state.rest_api,10),onChange:this.onChange}),"  ",S.a.createElement("span",{className:"sub"},Object(P.translate)("How Redirection uses the REST API - don't change unless necessary")))),S.a.createElement("input",{className:"button-primary",type:"submit",name:"update",value:Object(P.translate)("Update"),disabled:n===ze}))}}])&&Mr(n.prototype,r),o&&Mr(n,o),t}();var qr=ve(function(e){var t=e.settings;return{groups:t.groups,values:t.values,saveStatus:t.saveStatus,installed:t.installed,postTypes:t.postTypes}},function(e){return{onSaveSettings:function(t){e(xr(t))}}})(Vr),Yr=n(3),Kr=n.n(Yr);n(91);function Qr(e){return(Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jr(e,t){for(var n=0;n=t[n][0])return t[n][1];return t[t.length-1][1]}},{key:"renderSupported",value:function(){return S.a.createElement("div",null,Object(P.translate)("You've supported this plugin - thank you!"),"  ",S.a.createElement("a",{href:"#",onClick:this.onDonate},Object(P.translate)("I'd like to support some more.")))}},{key:"renderUnsupported",value:function(){for(var e,t,n,r=(n="",(t=16)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),o=20;o<=100;o+=20)r[o]="";return S.a.createElement("div",null,S.a.createElement("label",null,S.a.createElement("p",null,Object(P.translate)("Redirection is free to use - life is wonderful and lovely! It has required a great deal of time and effort to develop and you can help support this development by {{strong}}making a small donation{{/strong}}.",{components:{strong:S.a.createElement("strong",null)}})," ",Object(P.translate)("You get useful software and I get to carry on making it better."))),S.a.createElement("input",{type:"hidden",name:"cmd",value:"_xclick"}),S.a.createElement("input",{type:"hidden",name:"business",value:"admin@urbangiraffe.com"}),S.a.createElement("input",{type:"hidden",name:"item_name",value:"Redirection (WordPress Plugin)"}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_promo_code",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_product_category",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_shipping_method",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_user_address_change",value:""}),S.a.createElement("input",{type:"hidden",name:"no_shipping",value:"1"}),S.a.createElement("input",{type:"hidden",name:"return",value:this.getReturnUrl()}),S.a.createElement("input",{type:"hidden",name:"no_note",value:"1"}),S.a.createElement("input",{type:"hidden",name:"currency_code",value:"USD"}),S.a.createElement("input",{type:"hidden",name:"tax",value:"0"}),S.a.createElement("input",{type:"hidden",name:"lc",value:"US"}),S.a.createElement("input",{type:"hidden",name:"bn",value:"PP-DonationsBF"}),S.a.createElement("div",{className:"donation-amount"},"$",S.a.createElement("input",{type:"number",name:"amount",min:16,value:this.state.amount,onChange:this.onInput,onBlur:this.onBlur}),S.a.createElement("span",null,this.getAmountoji(this.state.amount)),S.a.createElement("input",{type:"submit",className:"button-primary",value:Object(P.translate)("Support 💰")})))}},{key:"render",value:function(){var e=this.state.support;return S.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",className:"donation"},S.a.createElement(Dr,null,S.a.createElement(Nr,{title:Object(P.translate)("Plugin Support")+":"},e?this.renderSupported():this.renderUnsupported())))}}])&&fo(n.prototype,r),o&&fo(n,o),t}();function go(e){return(go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vo(e,t){for(var n=0;n0&&S.a.createElement($o,null))},Yo=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Wo(this,Go(t).call(this,e))).props.onLoadStatus(),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ho(e,t)}(t,S.a.Component),n=t,(r=[{key:"render",value:function(){var e=this.props.pluginStatus;return S.a.createElement("div",null,S.a.createElement("h2",null,Object(P.translate)("Plugin Status")),e.length>0&&S.a.createElement(qo,{status:e}),0===e.length&&S.a.createElement("div",{className:"placeholder-inline"},S.a.createElement("div",{className:"placeholder-loading"})))}}])&&Bo(n.prototype,r),o&&Bo(n,o),t}();var Ko=ve(function(e){return{pluginStatus:e.settings.pluginStatus}},function(e){return{onLoadStatus:function(){e(kr())},onFix:function(){e(jr())}}})(Yo);function Qo(e){return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jo(e,t){for(var n=0;n0&&(p=S.a.createElement(ua,{rows:r,status:i,selected:a.selected,row:n})),S.a.createElement("table",{className:"wp-list-table widefat fixed striped items"},S.a.createElement("thead",null,S.a.createElement(ia,{table:a,isDisabled:c,isSelected:s,headers:t,rows:r,total:o,onSetOrderBy:u,onSetAllSelected:l})),p,S.a.createElement("tfoot",null,S.a.createElement(ia,{table:a,isDisabled:c,isSelected:s,headers:t,rows:r,total:o,onSetOrderBy:u,onSetAllSelected:l})))});function ha(e){return(ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ya(e,t){for(var n=0;n0,onClick:this.onFirst})," ",S.a.createElement(_a,{title:Object(P.translate)("Prev page"),button:"‹",className:"prev-page",enabled:e>0,onClick:this.onPrev}),S.a.createElement("span",{className:"paging-input"},S.a.createElement("label",{htmlFor:"current-page-selector",className:"screen-reader-text"},Object(P.translate)("Current Page"))," ",S.a.createElement("input",{className:"current-page",type:"number",min:"1",max:t,name:"paged",value:this.state.currentPage+1,size:"2","aria-describedby":"table-paging",onBlur:this.onSetPage,onChange:this.onChange}),S.a.createElement("span",{className:"tablenav-paging-text"},Object(P.translate)("of %(page)s",{components:{total:S.a.createElement("span",{className:"total-pages"})},args:{page:Object(P.numberFormat)(t)}})))," ",S.a.createElement(_a,{title:Object(P.translate)("Next page"),button:"›",className:"next-page",enabled:e0&&S.a.createElement(Sa,{per_page:n.per_page,page:n.page,total:t,onChangePage:this.props.onChangePage,inProgress:o===ze}))}}])&&ja(n.prototype,r),o&&ja(n,o),t}();function Na(e){return(Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Da(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Xa(e)},ei=function(e,t){return Xa({orderby:e,direction:t})},ti=function(e){return Xa({page:e})},ni=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Xa({filter:e,filterBy:""===e?"":t,page:0,orderby:""})},ri=function(e,t){return Xa({filterBy:e,filter:t,orderby:"",page:0})},oi=function(e){return{type:Qe,items:e.map(parseInt)}},ai=function(e){return{type:Je,onoff:e}},ii=function(e){return Xa(e)},li=(n(109),function(){return S.a.createElement("div",{className:"redirection-poweredby"},Object(P.translate)("Powered by {{link}}redirect.li{{/link}}",{components:{link:S.a.createElement(Fr,{url:"https://redirect.li"})}}))});n(111);function ui(e){return(ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ci(e,t){for(var n=0;n0},S.a.createElement(Ha,{logType:"log"}),S.a.createElement("button",{className:"button-secondary",onClick:this.handleRSS},"RSS"),S.a.createElement(Ga,{onDelete:this.props.onDeleteAll,table:r}))))}}])&&Di(n.prototype,r),o&&Di(n,o),t}();var Ui=ve(function(e){return{log:e.log}},function(e){return{onLoad:function(t){e(Za(t))},onDeleteAll:function(t,n){e(Qa(t,n))},onSearch:function(t,n){e(ni(t,n))},onChangePage:function(t){e(ti(t))},onTableAction:function(t){e(Ja(t))},onSetAllSelected:function(t){e(ai(t))},onSetOrderBy:function(t,n){e(ei(t,n))}}})(Fi);function Mi(e){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zi(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Xi(e)},el=function(e,t){return Xi({orderby:e,direction:t})},tl=function(e){return Xi({page:e})},nl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Xi({filter:e,filterBy:""===e?"":t,page:0,orderby:""})},rl=function(e,t){return Xi({filter:e,filterBy:t,page:0,orderby:"",groupBy:""})},ol=function(e,t){return Xi({filterBy:e,filter:t,orderby:"",page:0})},al=function(e){return{type:dn,items:e}},il=function(e){return{type:hn,onoff:e}},ll=function(e){return Xi({groupBy:e,page:0,orderby:"total",direction:"desc",filterBy:"",filter:""})},ul=function(e){return Xi(e)},cl=function(e){var t=e.url;if(t){var n=$a.parse(t).hostname;return S.a.createElement(Fr,{url:t},n)}return null};function sl(e){return(sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pl(e,t){for(var n=0;n0&&r.push(Object(P.translate)("The source URL should probably start with a {{code}}/{{/code}}",{components:{code:S.a.createElement("code",null)}})),Ku(t)&&!1===n&&r.push(S.a.createElement(Fr,{url:"https://redirection.me/support/redirect-regular-expressions/"},Object(P.translate)('Remember to enable the "regex" checkbox if this is a regular expression.'))),Ku(t)&&-1===t.indexOf("^")&&-1===t.indexOf("$")&&r.push(Object(P.translate)("To prevent a greedy regular expression you can use a {{code}}^{{/code}} to anchor it to the start of the URL. For example: {{code}}%(example)s{{/code}}",{components:{code:S.a.createElement("code",null)},args:{example:"^"+t}})),"/(.*)"!==t&&"^/(.*)"!==t||r.push(Object(P.translate)("This will redirect everything, including the login pages. Please be sure you want to do this.")),r};n(115);function Ju(e){return(Ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xu(e){for(var t=1;t0?u:p[0].id,action_code:n.getCode()?parseInt(c,10):0,action_data:qu(n.state)};f.id?n.props.onSave(f.id,f):n.props.onCreate(f),n.props.onCancel?n.props.onCancel(e):n.reset(),n.props.childSave&&n.props.childSave()}),rc(nc(nc(n)),"onAdvanced",function(e){e.preventDefault(),n.setState({advanced:!n.state.advanced},n.triggerCallback)}),rc(nc(nc(n)),"onGroup",function(e){n.setState({group_id:parseInt(e.target.value,10)})}),rc(nc(nc(n)),"onChange",function(e){var t=e.target,r="checkbox"===t.type?t.checked:t.value,o=rc({},t.name,r);"action_type"===t.name?t.value===zu?o.action_code=301:t.value===Bu&&(o.action_code=404):"match_type"===t.name&&(o=Xu({},o,n.resetActionData()),t.value===Hu&&(o.action_type=zu)),o.warning=n.getWarning(o),n.setState(o,n.triggerCallback)}),rc(nc(nc(n)),"triggerCallback",function(){n.props.callback&&n.props.callback(n.ref.current.clientHeight)});var a=e.item,i=a.url,l=a.regex,u=a.match_type,c=a.action_type,s=a.action_data,p=a.group_id,f=void 0===p?0:p,d=a.title,h=a.action_code,m=a.position,y=void 0===m?0:m,b=s||{},g=b.logged_in,v=void 0===g?"":g,E=b.logged_out,w=void 0===E?"":E;return n.state={warning:Qu(e.item),url:i,title:d,regex:l,match_type:u,action_type:c,action_code:h,action_data:s,group_id:n.getValidGroup(f),position:y,login:{logged_in:v,logged_out:w},target:s||{},agent:n.getAgentState(s),referrer:n.getReferrerState(s),cookie:n.getHeaderState(s),header:n.getHeaderState(s),custom:n.getCustomState(s),role:n.getRoleState(s),server:n.getServerState(s),ip:n.getIpState(s),page:n.getPageState(s)},n.state.advanced=!n.canShowAdvanced(),n.ref=S.a.createRef(),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tc(e,t)}(t,S.a.Component),n=t,(r=[{key:"getWarning",value:function(e){return Qu(Xu({},this.state,e))}},{key:"getValidGroup",value:function(e){var t=this.props.group.rows,n=this.props.table;if(t.find(function(t){return t.id===e}))return e;if(t.length>0){if("group"===n.filterBy&&parseInt(n.filter,10)>0)return parseInt(n.filter,10);var r=t.find(function(e){return e.default});return r?r.id:t[0].id}return 0}},{key:"reset",value:function(){this.setState(Xu({url:"",regex:!1,match_type:Gu,action_type:zu,action_data:"",title:"",action_code:301,position:0},this.resetActionData()))}},{key:"resetActionData",value:function(){return{login:{logged_in:"",logged_out:""},target:{url:""},agent:{url_from:"",agent:"",regex:!1,url_notfrom:""},referrer:{referrer:"",regex:!1,url_from:"",url_notfrom:""},cookie:{name:"",value:"",regex:!1,url_from:"",url_notfrom:""},header:{name:"",value:"",regex:!1,url_from:"",url_notfrom:""},custom:{filter:"",url_from:"",url_notfrom:""},role:{role:"",url_from:"",url_notfrom:""},server:{server:"",url_from:"",url_notfrom:""},ip:{ip:[],url_from:"",url_notfrom:""},page:{page:"404",url:""}}}},{key:"canShowAdvanced",value:function(){var e=this.state,t=e.match_type,n=e.action_type;return t===Gu&&n===zu}},{key:"getAgentState",value:function(e){var t=e||{},n=t.agent,r=void 0===n?"":n,o=t.regex,a=void 0!==o&&o,i=t.url_from,l=void 0===i?"":i,u=t.url_notfrom;return{agent:r,regex:a,url_from:l,url_notfrom:void 0===u?"":u}}},{key:"getReferrerState",value:function(e){var t=e||{},n=t.referrer,r=void 0===n?"":n,o=t.regex,a=void 0!==o&&o,i=t.url_from,l=void 0===i?"":i,u=t.url_notfrom;return{referrer:r,regex:a,url_from:l,url_notfrom:void 0===u?"":u}}},{key:"getRoleState",value:function(e){var t=e||{},n=t.role,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{role:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getServerState",value:function(e){var t=e||{},n=t.server,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{server:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getIpState",value:function(e){var t=e||{},n=t.ip,r=void 0===n?[]:n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{ip:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getPageState",value:function(e){var t=e||{},n=t.page,r=void 0===n?"404":n,o=t.url;return{page:r,url:void 0===o?"":o}}},{key:"getHeaderState",value:function(e){var t=e||{},n=t.name,r=void 0===n?"":n,o=t.value,a=void 0===o?"":o,i=t.regex,l=void 0!==i&&i,u=t.url_from,c=void 0===u?"":u,s=t.url_notfrom;return{name:r,value:a,regex:l,url_from:c,url_notfrom:void 0===s?"":s}}},{key:"getCustomState",value:function(e){var t=e||{},n=t.filter,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{filter:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getCode",value:function(){return this.state.action_type===Bu?S.a.createElement("select",{name:"action_code",value:this.state.action_code,onChange:this.onChange},[{value:400,name:Object(P.translate)("400 - Bad Request")},{value:401,name:Object(P.translate)("401 - Unauthorized")},{value:403,name:Object(P.translate)("403 - Forbidden")},{value:404,name:Object(P.translate)("404 - Not Found")},{value:410,name:Object(P.translate)("410 - Gone")},{value:418,name:Object(P.translate)("418 - I'm a teapot")}].map(function(e){return S.a.createElement("option",{key:e.value,value:e.value},e.name)})):this.state.action_type===zu||"random"===this.state.action_type?S.a.createElement("select",{name:"action_code",value:this.state.action_code,onChange:this.onChange},[{value:301,name:Object(P.translate)("301 - Moved Permanently")},{value:302,name:Object(P.translate)("302 - Found")},{value:303,name:Object(P.translate)("303 - See Other")},{value:304,name:Object(P.translate)("304 - Not Modified")},{value:307,name:Object(P.translate)("307 - Temporary Redirect")},{value:308,name:Object(P.translate)("308 - Permanent Redirect")}].map(function(e){return S.a.createElement("option",{key:e.value,value:e.value},e.name)})):null}},{key:"getMatchExtra",value:function(){var e=this.state,t=e.match_type,n=e.agent,r=e.referrer,o=e.cookie,a=e.header,i=e.custom,l=e.role,u=e.server,c=e.ip,s=e.page;switch(t){case"agent":return S.a.createElement(ml,{agent:n.agent,regex:n.regex,onChange:this.onSetData,onCustomAgent:this.onCustomAgent});case"referrer":return S.a.createElement(wl,{referrer:r.referrer,regex:r.regex,onChange:this.onSetData});case"cookie":return S.a.createElement(Bl,{name:o.name,value:o.value,regex:o.regex,onChange:this.onSetData});case"header":return S.a.createElement(Cl,{name:a.name,value:a.value,regex:a.regex,onChange:this.onSetData});case"custom":return S.a.createElement(Al,{filter:i.filter,onChange:this.onSetData});case"role":return S.a.createElement(ql,{role:l.role,onChange:this.onSetData});case"server":return S.a.createElement(Zl,{server:u.server,onChange:this.onSetData});case $u:return S.a.createElement(au,{ip:c.ip,onChange:this.onSetData});case"page":return S.a.createElement(pu,{page:s.page,onChange:this.onSetData})}return null}},{key:"getTarget",value:function(){var e=this.state,t=e.match_type,n=e.action_type,r=e.agent,o=e.referrer,a=e.login,i=e.cookie,l=e.target,u=e.header,c=e.custom,s=e.role,p=e.server,f=e.ip,d=e.page;if(!Vu(n))return null;switch(t){case"agent":return S.a.createElement(xu,{url_from:r.url_from,url_notfrom:r.url_notfrom,target:"agent",onChange:this.onSetData});case"referrer":return S.a.createElement(xu,{url_from:o.url_from,url_notfrom:o.url_notfrom,target:"referrer",onChange:this.onSetData});case Hu:return S.a.createElement(bu,{logged_in:a.logged_in,logged_out:a.logged_out,onChange:this.onSetData});case Gu:return S.a.createElement(gu,{url:l.url,target:"target",onChange:this.onSetData});case"cookie":return S.a.createElement(xu,{url_from:i.url_from,url_notfrom:i.url_notfrom,target:"cookie",onChange:this.onSetData});case"header":return S.a.createElement(xu,{url_from:u.url_from,url_notfrom:u.url_notfrom,target:"header",onChange:this.onSetData});case"custom":return S.a.createElement(xu,{url_from:c.url_from,url_notfrom:c.url_notfrom,target:"custom",onChange:this.onSetData});case"role":return S.a.createElement(xu,{url_from:s.url_from,url_notfrom:s.url_notfrom,target:"role",onChange:this.onSetData});case"server":return S.a.createElement(xu,{url_from:p.url_from,url_notfrom:p.url_notfrom,target:"server",onChange:this.onSetData});case $u:return S.a.createElement(xu,{url_from:f.url_from,url_notfrom:f.url_notfrom,target:"ip",onChange:this.onSetData});case"page":return S.a.createElement(gu,{url:d.url,target:"page",onChange:this.onSetData})}return null}},{key:"getTitle",value:function(){var e=this.state.title;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Title")),S.a.createElement("td",null,S.a.createElement("input",{type:"text",name:"title",value:e,onChange:this.onChange,placeholder:Object(P.translate)("Describe the purpose of this redirect (optional)")})))}},{key:"getMatch",value:function(){var e=this.state.match_type;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Match")),S.a.createElement("td",null,S.a.createElement("select",{name:"match_type",value:e,onChange:this.onChange},[{value:Gu,name:Object(P.translate)("URL only")},{value:Hu,name:Object(P.translate)("URL and login status")},{value:"role",name:Object(P.translate)("URL and role/capability")},{value:"referrer",name:Object(P.translate)("URL and referrer")},{value:"agent",name:Object(P.translate)("URL and user agent")},{value:"cookie",name:Object(P.translate)("URL and cookie")},{value:$u,name:Object(P.translate)("URL and IP")},{value:"server",name:Object(P.translate)("URL and server")},{value:"header",name:Object(P.translate)("URL and HTTP header")},{value:"custom",name:Object(P.translate)("URL and custom filter")},{value:"page",name:Object(P.translate)("URL and WordPress page type")}].map(function(e){return S.a.createElement("option",{value:e.value,key:e.value},e.name)}))))}},{key:"getTargetCode",value:function(){var e=this.state,t=e.action_type,n=e.match_type,r=this.getCode();return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("When matched")),S.a.createElement("td",{className:"edit-left"},S.a.createElement("select",{name:"action_type",value:t,onChange:this.onChange},[{value:zu,name:Object(P.translate)("Redirect to URL")},{value:"random",name:Object(P.translate)("Redirect to random post")},{value:"pass",name:Object(P.translate)("Pass-through")},{value:Bu,name:Object(P.translate)("Error (404)")},{value:Wu,name:Object(P.translate)("Do nothing (ignore)")}].filter(function(e){return!(n===Hu&&!Vu(e.value))}).map(function(e){return S.a.createElement("option",{value:e.value,key:e.value},e.name)})),r&&S.a.createElement(S.a.Fragment,null,S.a.createElement("strong",{className:"small-flex"},Object(P.translate)("with HTTP code"))," ",S.a.createElement("span",null,r))))}},{key:"getGroup",value:function(){var e=this.props.group.rows,t=this.state.group_id,n=parseInt(this.state.position,10),r=this.state.advanced;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Group")),S.a.createElement("td",{className:"edit-left"},S.a.createElement(Lr,{name:"group",value:t,items:Su(e),onChange:this.onGroup}),r&&S.a.createElement("span",{className:"edit-redirection-position"},S.a.createElement("strong",null,Object(P.translate)("Position")),S.a.createElement("input",{type:"number",value:n,name:"position",min:"0",size:"3",onChange:this.onChange}))))}},{key:"canSave",value:function(){var e=this.state,t=e.url,n=e.match_type,r=e.target,o=e.action_type,a=e.referrer,i=e.login,l=e.agent,u=e.header,c=e.cookie,s=e.role,p=e.server,f=e.ip,d=e.page;if(""===Redirectioni10n.autoGenerate&&""===t)return!1;if(Vu(o)){if(n===Gu&&""===r)return!1;if("referrer"===n&&""===a.url_from&&""===a.url_notfrom)return!1;if(n===Hu&&""===i.logged_in&&""===i.logged_out)return!1;if("agent"===n&&""===l.url_from&&""===l.url_notfrom)return!1;if("cookie"===n&&""===c.url_from&&""===c.url_notfrom)return!1;if("header"===n&&""===u.url_from&&""===u.url_notfrom)return!1;if("role"===n&&""===s.url_from&&""===s.url_notfrom)return!1;if("server"===n&&""===p.url_from&&""===p.url_notfrom)return!1;if(n===$u&&""===f.url_from&&""===f.url_notfrom)return!1;if("page"===n&&""===d.url)return!1}return!0}},{key:"renderExtra",value:function(){return S.a.createElement(S.a.Fragment,null,this.getTitle(),this.getMatch(),this.getMatchExtra(),this.getTargetCode())}},{key:"renderSingleUrl",value:function(){var e=this.state,t=e.url,n=e.regex,r=this.props.autoFocus,o=void 0!==r&&r;return S.a.createElement(S.a.Fragment,null,S.a.createElement("input",{type:"text",name:"url",value:t,onChange:this.onChange,autoFocus:o,placeholder:Object(P.translate)("The relative URL you want to redirect from")}),S.a.createElement("label",{className:"edit-redirection-regex"},Object(P.translate)("Regex")," ",S.a.createElement("sup",null,S.a.createElement("a",{tabIndex:"-1",target:"_blank",rel:"noopener noreferrer",href:"https://redirection.me/support/redirect-regular-expressions/"},"?"))," ",S.a.createElement("input",{type:"checkbox",name:"regex",checked:n,onChange:this.onChange})))}},{key:"renderMultiUrl",value:function(){var e=this.state.url;return S.a.createElement("textarea",{value:e.join("\n"),readOnly:!0})}},{key:"render",value:function(){var e=this.state,t=e.url,n=e.advanced,r=e.warning,o=this.props,a=o.saveButton,i=void 0===a?Object(P.translate)("Save"):a,l=o.onCancel,u=o.addTop,c=o.onClose;return S.a.createElement("form",{onSubmit:this.onSave,ref:this.ref},S.a.createElement("table",{className:"edit edit-redirection"},S.a.createElement("tbody",null,S.a.createElement("tr",null,S.a.createElement("th",{className:Array.isArray(t)?"top":""},Object(P.translate)("Source URL")),S.a.createElement("td",null,Array.isArray(t)?this.renderMultiUrl():this.renderSingleUrl())),n&&this.renderExtra(),this.getTarget(),this.getGroup(),this.props.children&&this.props.children,S.a.createElement("tr",null,S.a.createElement("th",null),S.a.createElement("td",{className:"edit-left"},S.a.createElement("div",{className:"table-actions"},S.a.createElement("input",{className:"button-primary",type:"submit",name:"save",value:i,disabled:!this.canSave()}),"  ",l&&S.a.createElement("input",{className:"button-secondary",type:"submit",name:"cancel",value:Object(P.translate)("Cancel"),onClick:l}),u&&!l&&S.a.createElement("input",{className:"button-secondary",type:"submit",name:"cancel",value:Object(P.translate)("Close"),onClick:c})," ",this.canShowAdvanced()&&S.a.createElement("a",{href:"#",onClick:this.onAdvanced,className:"advanced",title:Object(P.translate)("Show advanced options")},"⚙")))),r.length>0&&S.a.createElement("tr",null,S.a.createElement("th",null),S.a.createElement("td",{className:"edit-left"},S.a.createElement("div",{className:"edit-redirection_warning notice notice-warning"},r.map(function(e,t){return S.a.createElement("p",{key:t},S.a.createElement("span",{className:"dashicons dashicons-info"}),e)})))))))}}])&&Zu(n.prototype,r),o&&Zu(n,o),t}();var ac=ve(function(e){var t=e.group,n=e.redirect;return{group:t,addTop:n.addTop,table:n.table}},function(e){return{onSave:function(t,n){e(Pu(t,n))},onCreate:function(t){e(Cu(t))},onClose:function(t){t.preventDefault(),e(Uu(!1))}}})(oc);function ic(e){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lc(e,t){for(var n=0;n1&&(o.url=r),S.a.createElement(ro,{onClose:t,width:"700",height:this.state.height},S.a.createElement("div",{className:"add-new"},S.a.createElement(ac,{item:o,saveButton:Object(P.translate)("Add Redirect"),onCancel:t,childSave:this.onDelete,autoFocus:!0,callback:this.setHeight},S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Delete Log Entries")),S.a.createElement("td",{className:"edit-left",style:{padding:"7px 0px"}},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",name:"delete_log",checked:this.state.deleteLog,onChange:this.onDeleteLog}),1===r.length?Object(P.translate)("Delete all logs for this entry"):Object(P.translate)("Delete all logs for these entries")))))))}}])&&Rc(n.prototype,r),o&&Rc(n,o),t}();Ic(Lc,"defaultProps",{transform:null});var Fc=ve(function(e){return{selected:e.error.table.selected}},function(e){return{onDelete:function(t){e(Ki(t))}}})(Lc),Uc={store:"group",saving:In,saved:Fn,failed:Ln,order:"name"},Mc={store:"group",saving:Tn,saved:Rn,failed:Nn,order:"name"},zc=function(e){return Yt(Ct.create,e,Uc)},Bc=function(e,t){return Kt(Ct.update,e,t,Uc)},Wc=function(e,t){return Vt(At.group,e,t,Uc)},Gc=function(e){return function(t,n){return Jt(Ct.list,t,Mc,e,n().group)}},Hc=function(e,t){return Gc({orderby:e,direction:t})},$c=function(e){return Gc({page:e})},Vc=function(e){return Gc({filter:e,filterBy:"",page:0,orderby:""})},qc=function(e,t){return Gc({filterBy:e,filter:t,orderby:"",page:0})},Yc=function(e){return{type:Dn,items:e.map(parseInt)}},Kc=function(e){return{type:An,onoff:e}},Qc=function(e){return Gc(e)},Jc=function(e){return"url"===e?[{name:"cb",check:!0},{name:"url",title:Object(P.translate)("Source URL"),primary:!0,sortable:!1},{name:"total",title:Object(P.translate)("Count"),sortable:!0}]:"ip"===e?[{name:"cb",check:!0},{name:"ipx",title:Object(P.translate)("IP"),primary:!0,sortable:!1},{name:"total",title:Object(P.translate)("Count"),sortable:!0}]:[{name:"cb",check:!0},{name:"date",title:Object(P.translate)("Date")},{name:"url",title:Object(P.translate)("Source URL"),primary:!0},{name:"referrer",title:Object(P.translate)("Referrer / User Agent"),sortable:!1},{name:"ip",title:Object(P.translate)("IP"),sortable:!1}]};function Xc(e){return(Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zc(e,t){for(var n=0;n0},S.a.createElement(Ha,{logType:"404"}),S.a.createElement(Ga,{onDelete:this.props.onDeleteAll,table:o}))))}}])&&Zc(n.prototype,r),o&&Zc(n,o),t}();var as=ve(function(e){return{error:e.error}},function(e){return{onLoad:function(){e(Zi())},onLoadGroups:function(){e(Gc())},onDeleteAll:function(t,n){e(Qi(t,n))},onSearch:function(t,n){e(nl(t,n))},onChangePage:function(t){e(tl(t))},onTableAction:function(t){e(Ji(t,null))},onSetAllSelected:function(t){e(il(t))},onSetOrderBy:function(t,n){e(el(t,n))},onGroup:function(t){e(ll(t))},onSetSelected:function(t){e(al(t))}}})(os),is=n(68),ls=n.n(is),us=("function"==typeof Symbol&&Symbol.iterator,"undefined"==typeof document||!document||!document.createElement||"multiple"in document.createElement("input"));function cs(e,t){return"application/x-moz-file"===e.type||ls()(e,t)}function ss(e){return!e.dataTransfer||Array.prototype.every.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e})}function ps(e){e.preventDefault()}var fs={borderStyle:"solid",backgroundColor:"#eee"},ds={borderStyle:"solid",borderColor:"#6c6",backgroundColor:"#eee"},hs={borderStyle:"solid",borderColor:"#c66",backgroundColor:"#eee"},ms={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5},ys={opacity:.5},bs=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Es=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.renderChildren=function(e,t,n,o){return"function"==typeof e?e(bs({},r.state,{isDragActive:t,isDragAccept:n,isDragReject:o,open:r.open})):e},r.composeHandlers=r.composeHandlers.bind(r),r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.onInputElementClick=r.onInputElementClick.bind(r),r.open=r.open.bind(r),r.setRef=r.setRef.bind(r),r.setRefs=r.setRefs.bind(r),r.isFileDialogActive=!1,r.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,S.a.Component),gs(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",ps,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),null!=this.fileInputEl&&this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",ps),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){e.persist(),this.props.onDragStart&&ss(e)&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),e.persist(),ss(e)&&(Promise.resolve(this.props.getDataTransferItems(e)).then(function(n){e.isPropagationStopped()||t.setState({draggedFiles:n,isDragActive:!0})}),this.props.onDragEnter&&this.props.onDragEnter.call(this,e))}},{key:"onDragOver",value:function(e){e.preventDefault(),e.persist();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&ss(e)&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),e.persist(),this.dragTargets=this.dragTargets.filter(function(n){return n!==e.target&&t.node.contains(n)}),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&ss(e)&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,o=n.onDropAccepted,a=n.onDropRejected,i=n.multiple,l=n.accept,u=n.getDataTransferItems;e.preventDefault(),e.persist(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),ss(e)&&Promise.resolve(u(e)).then(function(n){var u=[],c=[];e.isPropagationStopped()||(n.forEach(function(e){cs(e,l)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?u.push(e):c.push(e)}),!i&&u.length>1&&c.push.apply(c,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&a&&a.call(t,c,e),u.length>0&&o&&o.call(t,u,e)}))})}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick,r=t.disableClick;n&&n.call(this,e),r||e.isDefaultPrevented()||(e.stopPropagation(),!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?this.open():setTimeout(this.open,0))}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick(e)}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout(function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1,"function"==typeof t&&t()))},300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,r=e.activeClassName,o=e.children,a=e.disabled,i=e.disabledClassName,l=e.inputProps,u=e.multiple,c=e.name,s=e.rejectClassName,p=vs(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),f=p.acceptStyle,d=p.activeStyle,h=p.className,m=void 0===h?"":h,y=p.disabledStyle,b=p.rejectStyle,g=p.style,v=vs(p,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),E=this.state,w=E.isDragActive,O=E.draggedFiles,_=O.length,x=u||_<=1,k=_>0&&function(e,t){return e.every(function(e){return cs(e,t)})}(O,this.props.accept),j=_>0&&(!k||!x),C=!(m||g||d||f||b||y);w&&r&&(m+=" "+r),k&&n&&(m+=" "+n),j&&s&&(m+=" "+s),a&&i&&(m+=" "+i),C&&(g=ms,d=fs,f=ds,b=hs,y=ys);var P=bs({position:"relative"},g);d&&w&&(P=bs({},P,d)),f&&k&&(P=bs({},P,f)),b&&j&&(P=bs({},P,b)),y&&a&&(P=bs({},P,y));var T={accept:t,disabled:a,type:"file",style:bs({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},l.style),multiple:us&&u,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};c&&c.length&&(T.name=c);v.acceptedFiles,v.preventDropOnDocument,v.disableClick,v.onDropAccepted,v.onDropRejected,v.onFileDialogCancel,v.maxSize,v.minSize,v.getDataTransferItems;var R=vs(v,["acceptedFiles","preventDropOnDocument","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return S.a.createElement("div",bs({className:m,style:P},R,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":a}),this.renderChildren(o,w,k,j),S.a.createElement("input",bs({},l,T)))}}]),t}(),ws=Es;Es.propTypes={accept:D.a.oneOfType([D.a.string,D.a.arrayOf(D.a.string)]),children:D.a.oneOfType([D.a.node,D.a.func]),disableClick:D.a.bool,disabled:D.a.bool,preventDropOnDocument:D.a.bool,inputProps:D.a.object,multiple:D.a.bool,name:D.a.string,maxSize:D.a.number,minSize:D.a.number,className:D.a.string,activeClassName:D.a.string,acceptClassName:D.a.string,rejectClassName:D.a.string,disabledClassName:D.a.string,style:D.a.object,activeStyle:D.a.object,acceptStyle:D.a.object,rejectStyle:D.a.object,disabledStyle:D.a.object,getDataTransferItems:D.a.func,onClick:D.a.func,onDrop:D.a.func,onDropAccepted:D.a.func,onDropRejected:D.a.func,onDragStart:D.a.func,onDragEnter:D.a.func,onDragOver:D.a.func,onDragLeave:D.a.func,onFileDialogCancel:D.a.func},Es.defaultProps={preventDropOnDocument:!0,disabled:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}};var Os=function(e,t){return function(n){return Bt(Nt.file(e,t)).then(function(e){n({type:En,data:e.data})}).catch(function(e){n({type:xn,error:e})}),n({type:wn})}},_s=function(e){return document.location.href=e,{type:"NOTHING"}},xs=function(e,t){return function(n){return Bt(Rt.upload(t,e)).then(function(e){n({type:_n,total:e.imported})}).catch(function(e){n({type:xn,error:e})}),n({type:On,file:e})}},Ss=function(){return{type:Sn}},ks=function(e){return{type:kn,file:e}},js=function(){return function(e){Bt(Rt.pluginList()).then(function(t){e({type:jn,importers:t.importers})}).catch(function(t){e({type:xn,error:t})})}},Cs=function(e){return function(t){return Bt(Rt.pluginImport(e)).then(function(e){t({type:_n,total:e.imported})}).catch(function(e){t({type:xn,error:e})}),t({type:On})}},Ps=function(e,t){return Redirectioni10n.pluginRoot+"&sub=io&export="+e+"&exporter="+t+"&_wpnonce="+Redirectioni10n.WP_API_nonce},Ts=function(e){var t=e.plugin,n=e.doImport,r=t.name,o=t.total;return S.a.createElement("div",{className:"plugin-importer"},S.a.createElement("p",null,S.a.createElement("strong",null,r)," (",Object(P.translate)("total = ")+o," )"),S.a.createElement("button",{onClick:function(){n(t)},className:"button-secondary"},Object(P.translate)("Import from %s",{args:r})))};n(117);function Rs(e){return(Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ns(e,t){for(var n=0;n0&&t!==ze&&this.props.onAddFile(e[0]),this.setState({hover:!1,group:this.props.group.rows[0].id})}},{key:"onOpen",value:function(){this.dropzone.open()}},{key:"renderGroupSelect",value:function(){var e=this.props.group.rows;return S.a.createElement("div",{className:"groups"},Object(P.translate)("Import to group")," ",S.a.createElement(Lr,{items:Su(e),name:"group",value:this.state.group,onChange:this.handleInput}))}},{key:"renderInitialDrop",value:function(){return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Import a CSV, .htaccess, or JSON file.")),S.a.createElement("p",null,Object(P.translate)("Click 'Add File' or drag and drop here.")),S.a.createElement("button",{type:"button",className:"button-secondary",onClick:this.handleOpen},Object(P.translate)("Add File")))}},{key:"renderDropBeforeUpload",value:function(){var e=this.props.io.file,t="application/json"===e.type;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("File selected")),S.a.createElement("p",null,S.a.createElement("code",null,e.name)),!t&&this.renderGroupSelect(),S.a.createElement("button",{className:"button-primary",onClick:this.handleImport},Object(P.translate)("Upload")),"  ",S.a.createElement("button",{className:"button-secondary",onClick:this.handleCancel},Object(P.translate)("Cancel")))}},{key:"renderUploading",value:function(){var e=this.props.io.file;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Importing")),S.a.createElement("p",null,S.a.createElement("code",null,e.name)),S.a.createElement("div",{className:"is-placeholder"},S.a.createElement("div",{className:"placeholder-loading"})))}},{key:"renderUploaded",value:function(){var e=this.props.io.lastImport;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Finished importing")),S.a.createElement("p",null,Object(P.translate)("Total redirects imported:")," ",e),0===e&&S.a.createElement("p",null,Object(P.translate)("Double-check the file is the correct format!")),S.a.createElement("button",{className:"button-secondary",onClick:this.handleCancel},Object(P.translate)("OK")))}},{key:"renderDropzoneContent",value:function(){var e=this.props.io,t=e.importingStatus,n=e.lastImport,r=e.file;return t===ze?this.renderUploading():t===We&&!1!==n&&!1===r?this.renderUploaded():!1===r?this.renderInitialDrop():this.renderDropBeforeUpload()}},{key:"renderExport",value:function(e){return S.a.createElement("div",null,S.a.createElement("textarea",{className:"module-export",rows:"14",readOnly:!0,value:e}),S.a.createElement("input",{className:"button-secondary",type:"submit",value:Object(P.translate)("Close"),onClick:this.handleCancel}))}},{key:"renderExporting",value:function(){return S.a.createElement("div",{className:"loader-wrapper loader-textarea"},S.a.createElement("div",{className:"placeholder-loading"}))}},{key:"renderImporters",value:function(e){var t=this;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Plugin Importers")),S.a.createElement("p",null,Object(P.translate)("The following redirect plugins were detected on your site and can be imported from.")),e.map(function(e,n){return S.a.createElement(Ts,{plugin:e,key:n,doImport:t.doImport})}))}},{key:"render",value:function(){var e=this.state.hover,t=this.props.io,n=t.importingStatus,r=t.file,o=t.exportData,a=t.exportStatus,i=t.importers,l=Kr()({dropzone:!0,"dropzone-dropped":!1!==r,"dropzone-importing":n===ze,"dropzone-hover":e});return S.a.createElement("div",{className:"import"},S.a.createElement("h2",null,Object(P.translate)("Import")),S.a.createElement(ws,{ref:this.setDropzone,onDrop:this.handleDrop,onDragLeave:this.handleLeave,onDragEnter:this.handleEnter,className:l,disableClick:!0,multiple:!1},this.renderDropzoneContent()),S.a.createElement("p",null,Object(P.translate)("All imports will be appended to the current database.")),S.a.createElement("div",{className:"inline-notice notice-warning"},S.a.createElement("p",null,Object(P.translate)("{{strong}}CSV file format{{/strong}}: {{code}}source URL, target URL{{/code}} - and can be optionally followed with {{code}}regex, http code{{/code}} ({{code}}regex{{/code}} - 0 for no, 1 for yes).",{components:{code:S.a.createElement("code",null),strong:S.a.createElement("strong",null)}}))),S.a.createElement("h2",null,Object(P.translate)("Export")),S.a.createElement("p",null,Object(P.translate)("Export to CSV, Apache .htaccess, Nginx, or Redirection JSON (which contains all redirects and groups).")),S.a.createElement("select",{name:"module",onChange:this.handleInput,value:this.state.module},S.a.createElement("option",{value:"0"},Object(P.translate)("Everything")),S.a.createElement("option",{value:"1"},Object(P.translate)("WordPress redirects")),S.a.createElement("option",{value:"2"},Object(P.translate)("Apache redirects")),S.a.createElement("option",{value:"3"},Object(P.translate)("Nginx redirects"))),S.a.createElement("select",{name:"format",onChange:this.handleInput,value:this.state.format},S.a.createElement("option",{value:"csv"},Object(P.translate)("CSV")),S.a.createElement("option",{value:"apache"},Object(P.translate)("Apache .htaccess")),S.a.createElement("option",{value:"nginx"},Object(P.translate)("Nginx rewrite rules")),S.a.createElement("option",{value:"json"},Object(P.translate)("Redirection JSON")))," ",S.a.createElement("button",{className:"button-primary",onClick:this.handleView},Object(P.translate)("View"))," ",S.a.createElement("button",{className:"button-secondary",onClick:this.handleDownload},Object(P.translate)("Download")),a===ze&&this.renderExporting(),o&&a!==ze&&this.renderExport(o),S.a.createElement("p",null,Object(P.translate)("Log files can be exported from the log pages.")),i.length>0&&this.renderImporters(i))}}])&&Ns(n.prototype,r),o&&Ns(n,o),t}();var Us=ve(function(e){return{group:e.group,io:e.io}},function(e){return{onLoadGroups:function(){e(Gc())},onImport:function(t,n){e(xs(t,n))},onAddFile:function(t){e(ks(t))},onClearFile:function(){e(Ss())},onExport:function(t,n){e(Os(t,n))},onDownloadFile:function(t){e(_s(t))},onLoadImport:function(){e(js())},pluginImport:function(t){e(Cs(t))}}})(Fs);function Ms(e){return(Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zs(e,t){for(var n=0;n0&&window.scrollTo(0,0)}},{key:"dismiss",value:function(){this.props.onClear()}},{key:"getDebug",value:function(e){for(var t=[Redirectioni10n.versions],n=0;n1?e[e.length-1]+" ("+e.length+")":e[0]}},{key:"renderNotice",value:function(e){var t="notice notice-info redirection-notice"+(this.state.shrunk?" redirection-notice_shrunk":"");return S.a.createElement("div",{className:t,onClick:this.onClick},S.a.createElement("div",{className:"closer"},"✔"),S.a.createElement("p",null,this.state.shrunk?S.a.createElement("span",{title:Object(P.translate)("View notice")},"🔔"):this.getNotice(e)))}},{key:"render",value:function(){var e=this.props.notices;return 0===e.length?null:this.renderNotice(e)}}])&&zp(n.prototype,r),o&&zp(n,o),t}();var Vp=ve(function(e){return{notices:e.message.notices}},function(e){return{onClear:function(){e(Rp())}}})($p);n(125);function qp(e){return(qp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yp(e,t){for(var n=0;n1?Object(P.translate)("Saving...")+" ("+e+")":Object(P.translate)("Saving...")}},{key:"renderProgress",value:function(e){return S.a.createElement("div",{className:"notice notice-progress redirection-notice"},S.a.createElement(Ro,null),S.a.createElement("p",null,this.getMessage(e)))}},{key:"render",value:function(){var e=this.props.inProgress;return 0===e?null:this.renderProgress(e)}}])&&Yp(n.prototype,r),o&&Yp(n,o),t}();var Zp=ve(function(e){return{inProgress:e.message.inProgress}},null)(Xp),ef=function(e){var t=e.item,n=e.isCurrent,r=e.onClick,o=Redirectioni10n.pluginRoot+(""===t.value?"":"&sub="+t.value);return S.a.createElement("li",null,S.a.createElement("a",{className:n?"current":"",href:o,onClick:function(e){e.preventDefault(),r(t.value,o)}},t.name))},tf=(n(127),function(e){var t=e.onChangePage,n=it();return S.a.createElement("div",{className:"subsubsub-container"},S.a.createElement("ul",{className:"subsubsub"},[{name:Object(P.translate)("Redirects"),value:""},{name:Object(P.translate)("Groups"),value:"groups"},{name:Object(P.translate)("Log"),value:"log"},{name:Object(P.translate)("404s"),value:"404s"},{name:Object(P.translate)("Import/Export"),value:"io"},{name:Object(P.translate)("Options"),value:"options"},{name:Object(P.translate)("Support"),value:"support"}].map(function(e,r){return S.a.createElement(ef,{key:r,item:e,isCurrent:n===e.value||"redirect"===n&&""===e.value,onClick:t})}).reduce(function(e,t){return[e," | ",t]})))}),nf=n(21),rf=n.n(nf),of=n(32),af=n.n(of),lf=n(18),uf=n.n(lf),cf=n(19),sf=n.n(cf),pf=n(20),ff=n.n(pf),df=function(e){return function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.componentDidUpdate=function(){if(this.path){var e=this.path.style;e.transitionDuration=".3s, .3s, .3s, .06s";var t=Date.now();this.prevTimeStamp&&t-this.prevTimeStamp<100&&(e.transitionDuration="0s, 0s"),this.prevTimeStamp=Date.now()}},t.prototype.render=function(){return e.prototype.render.call(this)},t}(e)},hf={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},mf={className:D.a.string,percent:D.a.oneOfType([D.a.number,D.a.string]),prefixCls:D.a.string,strokeColor:D.a.string,strokeLinecap:D.a.oneOf(["butt","round","square"]),strokeWidth:D.a.oneOfType([D.a.number,D.a.string]),style:D.a.object,trailColor:D.a.string,trailWidth:D.a.oneOfType([D.a.number,D.a.string])},yf=function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.percent,o=t.prefixCls,a=t.strokeColor,i=t.strokeLinecap,l=t.strokeWidth,u=t.style,c=t.trailColor,s=t.trailWidth,p=af()(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth"]);delete p.gapPosition;var f={strokeDasharray:"100px, 100px",strokeDashoffset:100-r+"px",transition:"stroke-dashoffset 0.3s ease 0s, stroke 0.3s linear"},d=l/2,h="M "+("round"===i?d:0)+","+d+"\n L "+("round"===i?100-l/2:100)+","+d,m="0 0 100 "+l;return S.a.createElement("svg",rf()({className:o+"-line "+n,viewBox:m,preserveAspectRatio:"none",style:u},p),S.a.createElement("path",{className:o+"-line-trail",d:h,strokeLinecap:i,stroke:c,strokeWidth:s||l,fillOpacity:"0"}),S.a.createElement("path",{className:o+"-line-path",d:h,strokeLinecap:i,stroke:a,strokeWidth:l,fillOpacity:"0",ref:function(t){e.path=t},style:f}))},t}(x.Component);yf.propTypes=mf,yf.defaultProps=hf;var bf=df(yf),gf=function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.getPathStyles=function(){var e=this.props,t=e.percent,n=e.strokeWidth,r=e.strokeColor,o=e.gapDegree,a=void 0===o?0:o,i=50-n/2,l=0,u=-i,c=0,s=-2*i;switch(e.gapPosition){case"left":l=-i,u=0,c=2*i,s=0;break;case"right":l=i,u=0,c=-2*i,s=0;break;case"bottom":u=i,s=2*i}var p="M 50,50 m "+l+","+u+"\n a "+i+","+i+" 0 1 1 "+c+","+-s+"\n a "+i+","+i+" 0 1 1 "+-c+","+s,f=2*Math.PI*i;return{pathString:p,trailPathStyle:{strokeDasharray:f-a+"px "+f+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},strokePathStyle:{stroke:r,strokeDasharray:t/100*(f-a)+"px "+f+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}},t.prototype.render=function(){var e=this,t=this.props,n=t.prefixCls,r=t.strokeWidth,o=t.trailWidth,a=(t.percent,t.trailColor),i=t.strokeLinecap,l=t.style,u=t.className,c=af()(t,["prefixCls","strokeWidth","trailWidth","percent","trailColor","strokeLinecap","style","className"]),s=this.getPathStyles(),p=s.pathString,f=s.trailPathStyle,d=s.strokePathStyle;return delete c.percent,delete c.gapDegree,delete c.gapPosition,delete c.strokeColor,S.a.createElement("svg",rf()({className:n+"-circle "+u,viewBox:"0 0 100 100",style:l},c),S.a.createElement("path",{className:n+"-circle-trail",d:p,stroke:a,strokeWidth:o||r,fillOpacity:"0",style:f}),S.a.createElement("path",{className:n+"-circle-path",d:p,strokeLinecap:i,strokeWidth:0===this.props.percent?0:r,fillOpacity:"0",ref:function(t){e.path=t},style:d}))},t}(x.Component);gf.propTypes=rf()({},mf,{gapPosition:D.a.oneOf(["top","bottom","left","right"])}),gf.defaultProps=rf()({},hf,{gapPosition:"top"});df(gf);function vf(e){return(vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ef(e,t){for(var n=0;n0}},{key:"getFirstApi",value:function(){for(var e=this.props.apiTest,t=Object.keys(e),n=0;n General page, which is usually an indication of a misconfiguration, and it can cause problems with the REST API. Please review your settings."),S.a.createElement("p",null,S.a.createElement("code",null,t.protocol+"://"+t.host)),S.a.createElement("p",null,S.a.createElement("code",null,n.protocol+"://"+n.host))),S.a.createElement("button",{className:"button wizard-retry",onClick:this.onRetry,disabled:this.apiInProgress()},Object(P.translate)("Retry")),S.a.createElement("h3",null,Object(P.translate)("Checking your REST API")),o.map(function(t){return S.a.createElement(S.a.Fragment,{key:t.value},S.a.createElement(Wf,{item:t,result:e[t.value],method:"GET"}),S.a.createElement(Wf,{item:t,result:e[t.value],method:"POST"}))}),S.a.createElement("div",{className:"wizard-buttons"},S.a.createElement("button",{className:"button-primary button",onClick:this.finishSetup},Object(P.translate)("Finish Setup")),"  ",S.a.createElement("button",{className:"button",onClick:this.prevStep},Object(P.translate)("Go back"))))}},{key:"renderStep3",value:function(){return S.a.createElement(Af,{onFinished:this.afterFinishInstall})}},{key:"getContentForStep",value:function(e){return 3===e?this.renderStep3():2===e?this.renderStep2():1===e?this.renderStep1():this.renderStep0()}},{key:"render",value:function(){var e=this.state.step,t=this.props.result,n=this.getContentForStep(e);return S.a.createElement(S.a.Fragment,null,t===Be&&S.a.createElement(Up,null),S.a.createElement("div",{className:"wizard-wrapper"},0!==e&&3!==e&&S.a.createElement("h1",null,Object(P.translate)("Redirection")),S.a.createElement("div",{className:"wizard"},n)),S.a.createElement("div",{className:"wizard-support"},S.a.createElement(Fr,{url:"https://redirection.me/contact/"},Object(P.translate)("I need some support!"))))}}])&&Lf(n.prototype,r),o&&Lf(n,o),t}();var Hf=ve(function(e){return{result:e.settings.database.result,apiTest:e.settings.apiTest}},function(e){return{onCheckApi:function(t){e(Rr(t))},onSaveSettings:function(t){e(xr(t))}}})(Gf),$f=function(e){var t=e.onShowUpgrade,n=e.showDatabase,r=e.result;return n?S.a.createElement(S.a.Fragment,null,r===Be&&S.a.createElement(Up,null),S.a.createElement("div",{className:"wizard-wrapper"},S.a.createElement("div",{className:"wizard"},S.a.createElement(Af,null)))):S.a.createElement("div",{className:"wrap redirection"},S.a.createElement("h1",{className:"wp-heading-inline"},Object(P.translate)("Update Required")),S.a.createElement("div",{className:"error"},S.a.createElement("h3",null,Object(P.translate)("Redirection database needs updating")),S.a.createElement("p",null,Object(P.translate)("Your current database is version %(current)s, the latest is %(latest)s. Please update to use new features.",{args:{current:Redirectioni10n.database.current,latest:Redirectioni10n.database.next}})),S.a.createElement("p",null,Object(P.translate)("As with any upgrade you should make a backup. You can do this by {{download}}downloading a copy{{/download}} of your Redirection data.",{components:{download:S.a.createElement(Fr,{url:Ps("all","json")})}})),S.a.createElement("p",null,S.a.createElement("input",{className:"button-primary",type:"submit",value:Object(P.translate)("Upgrade Database"),onClick:t}))))};n(170);function Vf(e){return(Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qf(e,t){for(var n=0;n0?document.location.href=t:(n.props.onClear(),history.pushState({},null,t),n.changePage(e),n.setState({page:e,clicked:n.state.clicked+1}))}),Jf(Qf(Qf(n)),"onAdd",function(e){e.preventDefault(),n.props.onAdd()}),Jf(Qf(Qf(n)),"onShowUpgrade",function(e){e.preventDefault(),n.props.onShowUpgrade()}),n.state={page:it(),clicked:0,stack:!1,error:"3.7"!==Redirectioni10n.version,info:!1},window.addEventListener("popstate",n.onPageChanged),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kf(e,t)}(t,S.a.Component),n=t,(r=[{key:"componentDidCatch",value:function(e,t){this.setState({error:!0,stack:e,info:t})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.onPageChanged)}},{key:"changePage",value:function(e){var t=this.props,n=t.onSet404Table,r=t.onSetLogTable,o=t.onSetRedirectTable,a=t.onSetGroupTable;"404s"===e?n(Er().table):"log"===e?r(vr().table):"redirect"===e?o(Or().table):"groups"===e&&a(wr().table)}},{key:"getContent",value:function(e){var t=this.state.clicked;switch(e){case"support":return S.a.createElement(na,null);case"404s":return S.a.createElement(as,{key:t});case"log":return S.a.createElement(Ui,{key:t});case"io":return S.a.createElement(Us,null);case"groups":return S.a.createElement(ip,{key:t});case"options":return S.a.createElement(xo,null)}return S.a.createElement(Pp,{key:t})}},{key:"renderError",value:function(){var e=[Redirectioni10n.versions,"Buster: 3.7 === "+Redirectioni10n.version,"",this.state.stack];return this.state.info&&this.state.info.componentStack&&e.push(this.state.info.componentStack),"3.7"!==Redirectioni10n.version?S.a.createElement("div",{className:"notice notice-error"},S.a.createElement("h2",null,Object(P.translate)("Cached Redirection detected")),S.a.createElement("p",null,Object(P.translate)("Please clear your browser cache and reload this page.")),S.a.createElement("p",null,Object(P.translate)("If you are using a caching system such as Cloudflare then please read this: "),S.a.createElement(Fr,{url:"https://redirection.me/support/problems/cloudflare/?utm_source=redirection&utm_medium=plugin&utm_campaign=support"},Object(P.translate)("clearing your cache."))),S.a.createElement("p",null,S.a.createElement("textarea",{readOnly:!0,rows:e.length+3,cols:"120",value:e.join("\n"),spellCheck:!1}))):S.a.createElement("div",{className:"notice notice-error"},S.a.createElement("h2",null,Object(P.translate)("Something went wrong 🙁")),S.a.createElement("p",null,Object(P.translate)("Redirection is not working. Try clearing your browser cache and reloading this page."),"  ",Object(P.translate)("If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache.")),S.a.createElement("p",null,Object(P.translate)("If that doesn't help, open your browser's error console and create a {{link}}new issue{{/link}} with the details.",{components:{link:S.a.createElement(Fr,{url:"https://github.com/johngodley/redirection/issues"})}})),S.a.createElement("p",null,Object(P.translate)("Please mention {{code}}%s{{/code}}, and explain what you were doing at the time",{components:{code:S.a.createElement("code",null)},args:this.state.page})),S.a.createElement("p",null,S.a.createElement("textarea",{readOnly:!0,rows:e.length+8,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.page,r=this.props,o=r.databaseStatus,a=r.showDatabase,i=r.result,l={redirect:Object(P.translate)("Redirections"),groups:Object(P.translate)("Groups"),io:Object(P.translate)("Import/Export"),log:Object(P.translate)("Logs"),"404s":Object(P.translate)("404 errors"),options:Object(P.translate)("Options"),support:Object(P.translate)("Support")}[n];return t?this.renderError():"need-install"===o||"finish-install"===o?S.a.createElement(Hf,null):"need-update"===o||"finish-update"===o?S.a.createElement($f,{onShowUpgrade:this.props.onShowUpgrade,showDatabase:a,result:i}):S.a.createElement("div",{className:"wrap redirection"},S.a.createElement("h1",{className:"wp-heading-inline"},l),"redirect"===n&&S.a.createElement("a",{href:"#",onClick:this.onAdd,className:"page-title-action"},Object(P.translate)("Add New")),S.a.createElement(tf,{onChangePage:this.onChangePage}),S.a.createElement(Up,null),this.getContent(n),S.a.createElement(Zp,null),S.a.createElement(Vp,null))}}])&&qf(n.prototype,r),o&&qf(n,o),t}();var Zf,ed=ve(function(e){var t=e.message.errors,n=e.settings.showDatabase,r=e.settings.database;return{errors:t,showDatabase:n,databaseStatus:r.status,result:r.result}},function(e){return{onClear:function(){e(Tp())},onAdd:function(){e(Uu(!0))},onSet404Table:function(t){e(ul(t))},onSetLogTable:function(t){e(ii(t))},onSetGroupTable:function(t){e(Qc(t))},onSetRedirectTable:function(t){e(Mu(t))},onShowUpgrade:function(){e(Cr())}}})(Xf),td=function(){return S.a.createElement(L,{store:br({settings:gr(),log:vr(),error:Er(),io:{status:ze,file:!1,lastImport:!1,exportData:!1,importingStatus:!1,exportStatus:!1,importers:[]},group:wr(),redirect:Or(),message:{errors:[],notices:[],inProgress:0,saving:[]},info:{status:We,maps:{},agents:{},http:!1,error:""}})},S.a.createElement(ed,null))};document.querySelector("#react-ui")&&(Zf="react-ui",T.a.setLocale({"":{localeSlug:Redirectioni10n.localeSlug}}),T.a.addTranslations(Redirectioni10n.locale),function(e,t){j.a.render(S.a.createElement(C.AppContainer,null,S.a.createElement(e,null)),document.getElementById(t))}(td,Zf)),window.redirection=Redirectioni10n.version}]); \ No newline at end of file + */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case i:case u:case l:return e;default:switch(e=e&&e.$$typeof){case s:case d:case c:return e;default:return t}}case a:return t}}}function g(e){return b(e)===f}t.typeOf=b,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=c,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Profiler=u,t.Portal=a,t.StrictMode=l,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===u||e===l||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===s||e.$$typeof===d)},t.isAsyncMode=function(e){return g(e)||b(e)===p},t.isConcurrentMode=g,t.isContextConsumer=function(e){return b(e)===s},t.isContextProvider=function(e){return b(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===i},t.isProfiler=function(e){return b(e)===u},t.isPortal=function(e){return b(e)===a},t.isStrictMode=function(e){return b(e)===l}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var l=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var s=0;s=0?(p=m.substr(0,y),f=m.substr(y+1)):(p=m,f=""),d=decodeURIComponent(p),h=decodeURIComponent(f),r(i,d)?o(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,l){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(i(e),function(i){var l=encodeURIComponent(r(i))+n;return o(e[i])?a(e[i],function(e){return l+encodeURIComponent(r(e))}).join(t):l+encodeURIComponent(r(e[i]))}).join(t):l?encodeURIComponent(r(l))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r*{justify-content:center;align-self:center;margin-left:calc(50% - 30px);margin-top:40px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-modal_content{width:80%;margin-right:10%}}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){var r=n(95);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'@-webkit-keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}@keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}.placeholder-container{width:100%;height:100px;position:relative}.placeholder-loading{content:"";position:absolute;top:16px;right:8px;bottom:16px;left:8px;padding-left:8px;padding-top:8px;background-color:#bbb;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.placeholder-inline{width:100%;height:50px;position:relative}.placeholder-inline .placeholder-loading{top:0;right:0;left:0;bottom:0}.loading-small{width:25px;height:25px}input.current-page{width:60px}.loader-wrapper{position:relative}.loader-textarea{height:100px}.wp-list-table .is-placeholder td{position:relative;height:50px}.wp-list-table .item-loading{opacity:0.3}\n',""])},function(e,t,n){var r=n(97);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".donation .donation-amount{float:left;margin-top:10px}.donation .donation-amount span{font-size:28px;margin-top:4px;vertical-align:bottom}.donation .donation-amount img{width:24px !important;margin-bottom:-5px !important}.donation .donation-amount:after{content:'';display:block;clear:both}.donation input[type=number]{width:60px;margin-left:10px}.donation td,.donation th{padding-bottom:0px;margin-bottom:0px}.donation input[type=submit]{margin-left:10px}\n",""])},function(e,t,n){var r=n(99);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".spinner-container{display:inline-block;position:relative}.css-spinner{position:absolute;left:10px;top:-25px;display:block;width:40px;height:40px;background-color:#333;border-radius:100%;-webkit-animation:sk-scaleout 1.0s infinite ease-in-out;animation:sk-scaleout 1.0s infinite ease-in-out}@-webkit-keyframes sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sk-scaleout{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.spinner-small .css-spinner{width:20px;height:20px;top:-15px;left:5px}\n",""])},function(e,t,n){var r=n(101);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".http-tester input[type=text]{width:80%}.http-tester table{width:95%}.http-tester table th,.http-tester table td{vertical-align:top;padding:5px 5px;overflow:hidden}.http-tester table td{max-width:500px}.http-tester table th{text-align:right;padding-right:10px;width:150px}.http-tester table p{padding-top:0;margin-top:0}.http-tester table code{background-color:transparent;font-size:12px;padding:0}.http-tester ul{list-style-type:disc;margin-left:20px}.http-tester ul li span{margin:-20px}.http-tester ul ul{list-style-type:disc;margin-left:20px}\n",""])},function(e,t,n){var r=n(103);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".plugin-status th{text-align:left;padding:5px;vertical-align:top}.plugin-status td,.plugin-status span{vertical-align:top;padding:5px}.plugin-status .plugin-status-good{background-color:#4ab866;color:white}.plugin-status .plugin-status-problem{background-color:orange;color:white}.plugin-status .plugin-status-error{background-color:#ff3860;color:white}.github{margin-top:8px}.github a{text-decoration:none}.github img{padding-right:10px;margin-bottom:-10px}\n",""])},function(e,t,n){var r=n(105);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.redirection .wp-list-table tbody>th:not(.check-column){vertical-align:top;padding:5px}.redirection .wp-list-table .column-last_count{width:80px;text-align:left}.redirection .wp-list-table .column-date{width:150px}.redirection .wp-list-table .column-last_access{width:150px;text-align:left}.redirection .wp-list-table .column-module,.redirection .wp-list-table .column-total,.redirection .wp-list-table .column-ip{width:110px}.redirection .wp-list-table .column-redirects{width:100px;text-align:left}.redirection .wp-list-table .column-position{width:80px;text-align:left}.redirection .wp-list-table .column-code{width:50px;text-align:left}.redirection .wp-list-table .check-column-red{vertical-align:middle;padding:4px 0 0 3px !important;width:2.2em;margin:0px}.redirection .wp-list-table strike{opacity:0.7}.redirection .form-table th a{color:#444}.edit-groups{width:100%}.edit-groups th{line-height:1.2;vertical-align:top;padding:2px;padding-top:5px !important;padding-left:0px;font-size:13px;font-weight:bold}.edit-groups td{padding:2px}.edit-groups input[type=text]{width:100%}.table-buttons{float:left;padding-top:2px}.table-buttons>button,.table-buttons>form,.table-buttons>div.table-button-item{margin-right:5px !important;display:inline}.table-buttons .redirection-modal_wrapper{display:inline}@media screen and (max-width: 782px){input[type="checkbox"]{height:20px;width:20px}.wp-list-table td.column-primary{padding-left:10px;padding-right:10px}.redirection .wp-list-table td,.redirection .wp-list-table input,.redirection .wp-list-table select,.redirection .wp-list-table th{font-size:1em !important}.redirection .wp-list-table td.column-code,.redirection .wp-list-table th.column-code,.redirection .wp-list-table td.column-url .target,.redirection .wp-list-table td.column-date,.redirection .wp-list-table th.column-date,.redirection .wp-list-table td.column-referrer{display:none !important}table.edit-redirection{padding-right:0}table.edit-redirection th{display:block;font-weight:bold;padding-left:0px !important}table.edit-redirection tbody tr td{flex-wrap:wrap}table.edit-redirection tbody tr td>*{flex:1 0 auto;width:100%}table.edit-redirection input[type="text"],table.edit-redirection select,table.edit-redirection input[type="number"]{width:100%}table.edit-redirection select,table.edit-redirection input[type="number"]{height:30px !important}table.edit-groups select,table.edit-groups input[type="number"]{height:30px !important}}\n',""])},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r&&r;i.global!==i&&i.window!==i&&i.self;var l,u=2147483647,c=36,s=1,p=26,f=38,d=700,h=72,m=128,y="-",b=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-s,O=Math.floor,_=String.fromCharCode;function x(e){throw new RangeError(E[e])}function S(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+S((e=e.replace(v,".")).split("."),t).join(".")}function j(e){for(var t,n,r=[],o=0,a=e.length;o=55296&&t<=56319&&o65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?O(e/d):e>>1,e+=O(e/t);e>w*p>>1;r+=c)e=O(e/w);return O(r+(w+1)*e/(e+f))}function R(e){var t,n,r,o,a,i,l,f,d,b,g,v=[],E=e.length,w=0,_=m,S=h;for((n=e.lastIndexOf(y))<0&&(n=0),r=0;r=128&&x("not-basic"),v.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=E&&x("invalid-input"),((f=(g=e.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||f>O((u-w)/i))&&x("overflow"),w+=f*i,!(f<(d=l<=S?s:l>=S+p?p:l-S));l+=c)i>O(u/(b=c-d))&&x("overflow"),i*=b;S=T(w-a,t=v.length+1,0==a),O(w/t)>u-_&&x("overflow"),_+=O(w/t),w%=t,v.splice(w++,0,_)}return C(v)}function N(e){var t,n,r,o,a,i,l,f,d,b,g,v,E,w,S,k=[];for(v=(e=j(e)).length,t=m,n=0,a=h,i=0;i=t&&gO((u-n)/(E=r+1))&&x("overflow"),n+=(l-t)*E,t=l,i=0;iu&&x("overflow"),g==t){for(f=n,d=c;!(f<(b=d<=a?s:d>=a+p?p:d-a));d+=c)S=f-b,w=c-b,k.push(_(P(b+S%w,0))),f=O(S/w);k.push(_(P(f,0))),a=T(n,E,r==o),n=0,++r}++n,++t}return k.join("")}l={version:"1.4.1",ucs2:{decode:j,encode:C},decode:R,encode:N,toASCII:function(e){return k(e,function(e){return g.test(e)?"xn--"+N(e):e})},toUnicode:function(e){return k(e,function(e){return b.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return l}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(107)(e),n(33))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){var r=n(110);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-poweredby{position:absolute;right:15px;bottom:10px}\n",""])},function(e,t,n){var r=n(112);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-geomap{padding-bottom:10px;width:100%;position:relative}.redirection-geomap .redirection-geomap_full{height:600px}.redirection-geomap iframe{position:absolute;top:0;left:0;width:100%;background-color:#eee;height:450px;max-height:90%}.redirection-geomap table{background-color:#fff;padding:10px;padding-bottom:30px;position:absolute;bottom:0;left:0;height:130px;width:100%}.redirection-geomap table th,.redirection-geomap table td{padding:0}.redirection-geomap table th{font-weight:bold;text-align:left;width:150px}.redirection-geomap table td{text-align:left}.redirection-geomap h2{line-height:1;margin:0;padding-bottom:10px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-geomap iframe{height:255px}.redirection-modal_main .redirection-geomap .redirection-geomap_full{height:400px !important}}.redirection-geomap_small{height:100px;padding-top:20px}\n",""])},function(e,t,n){var r=n(114);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-useragent{box-sizing:border-box;padding-bottom:30px}.redirection-useragent th{width:120px;vertical-align:top;line-height:1;text-align:left;padding-left:10px}.redirection-useragent td{line-height:1.2}.redirection-useragent td,.redirection-useragent h2{text-align:left}.redirection-useragent h2{margin-bottom:0;padding-left:12px;padding-bottom:5px}.redirection-useragent .redirection-useragent_agent{font-size:12px}.redirection-useragent .redirection-useragent_unknown,.redirection-useragent .redirection-useragent_unknown h2{text-align:center;padding:5px}.redirection-useragent table{padding-bottom:15px;padding-top:10px}\n",""])},function(e,t,n){var r=n(116);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".edit-redirection{width:100%;padding-right:15px}.edit-redirection th{width:130px;font-weight:bold;text-align:left}.edit-redirection th.top{vertical-align:top}.edit-redirection tbody tr td{display:flex;padding:0}.edit-redirection tbody tr td>*{flex:1 1 auto;justify-content:flex-start;margin-right:5px}.edit-redirection tbody tr td .edit-redirection-regex,.edit-redirection tbody tr td>select{flex:0 0 auto}.edit-redirection tbody tr td .edit-redirection-position input{width:60px}.edit-redirection tbody tr td .small-flex{flex-grow:0;padding-top:5px}.edit-redirection tbody td.edit-left>*{flex:none}.edit-redirection textarea{width:100%;height:100px}.edit-redirection .edit-redirection_warning{padding-top:5px;padding-bottom:5px;margin-bottom:0;margin-top:10px;text-align:left;word-wrap:break-word;width:100%}.edit-redirection .edit-redirection_warning span{margin-right:4px}.edit-redirection .edit-redirection_warning a{color:black;text-decoration:none}.edit-redirection .edit-redirection_warning a:hover{text-decoration:underline}.redirection-modal_content .edit-redirection_warning{margin-left:0;box-shadow:none}\n",""])},function(e,t,n){var r=n(118);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".dropzone{border:3px dashed #bbb;text-align:center;padding:10px;padding-bottom:15px;margin-bottom:10px;border-radius:4px;color:#666}.dropzone h3{color:#666}.dropzone p{font-size:14px}.dropzone .groups{margin-top:15px;margin-bottom:15px}.dropzone .is-placeholder{width:50%;height:90px;position:relative;margin:0 auto}.dropzone-hover,.dropzone-hover{border-color:#86bfd4}.dropzone-importing{border-color:transparent}\n",""])},function(e,t,n){var r=n(120);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-httpcheck_results{display:flex;padding-bottom:40px}.redirection-httpcheck_results .redirection-httpcheck_info{text-align:left}.redirection-httpcheck table{width:100%}.redirection-httpcheck .redirection-httpcheck_status{width:80px}.redirection-httpcheck .redirection-httpcheck_status .dashicons{font-size:70px;width:70px;height:70px}.redirection-httpcheck .redirection-httpcheck_status .dashicons-yes{color:#4ab866}.redirection-httpcheck .redirection-httpcheck_status .dashicons-no{color:#ff3860}.redirection-httpcheck h2{margin-bottom:0;padding-bottom:5px;text-align:left;padding-left:10px}\n",""])},function(e,t,n){var r=n(122);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".notice-error{margin-top:3em}.notice-error .closer{float:right;padding-top:5px;font-size:18px;cursor:pointer;color:#333}.notice-error textarea{font-family:courier,Monaco,monospace;font-size:12px;background-color:#eee;width:100%}.notice-error span code{background-color:transparent}\n",""])},function(e,t,n){var r=n(124);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-notice{position:fixed;bottom:25px;right:0;font-weight:bold;box-shadow:3px 3px 3px rgba(0,0,0,0.2);border-top:1px solid #eee;cursor:pointer;transition:width 1s ease-in-out}.redirection-notice p{padding-right:20px}.redirection-notice .closer{position:absolute;right:5px;top:10px;font-size:16px;opacity:0.8}.redirection-notice.notice-shrunk{width:20px}.redirection-notice.notice-shrunk p{font-size:16px}.redirection-notice.notice-shrunk .closer{display:none}\n",""])},function(e,t,n){var r=n(126);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".notice-progress{border-left:5px solid #4ab866;padding:10px;cursor:auto;bottom:80px}.notice-progress p{margin-left:50px;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite}.notice-progress .spinner-container{position:absolute;left:0;top:33px}\n",""])},function(e,t,n){var r=n(128);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.subsubsub-container::before,.subsubsub-container::after{content:"";display:table}.subsubsub-container::after{clear:both}\n',""])},function(e,t,n){e.exports={default:n(130),__esModule:!0}},function(e,t,n){n(131),e.exports=n(9).Object.assign},function(e,t,n){var r=n(23);r(r.S+r.F,"Object",{assign:n(133)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(27),o=n(40),a=n(30),i=n(58),l=n(56),u=Object.assign;e.exports=!u||n(25)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=i(e),u=arguments.length,c=1,s=o.f,p=a.f;u>c;)for(var f,d=l(arguments[c++]),h=s?r(d).concat(s(d)):r(d),m=h.length,y=0;m>y;)p.call(d,f=h[y++])&&(n[f]=d[f]);return n}:u},function(e,t,n){var r=n(15),o=n(135),a=n(136);e.exports=function(e){return function(t,n,i){var l,u=r(t),c=o(u.length),s=a(i,c);if(e&&n!=n){for(;c>s;)if((l=u[s++])!=l)return!0}else for(;c>s;s++)if((e||s in u)&&u[s]===n)return e||s||0;return!e&&-1}}},function(e,t,n){var r=n(36),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(36),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){e.exports={default:n(138),__esModule:!0}},function(e,t,n){n(139),n(145),e.exports=n(44).f("iterator")},function(e,t,n){"use strict";var r=n(140)(!0);n(60)(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=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(36),o=n(35);e.exports=function(e){return function(t,n){var a,i,l=String(o(t)),u=r(n),c=l.length;return u<0||u>=c?e?"":void 0:(a=l.charCodeAt(u))<55296||a>56319||u+1===c||(i=l.charCodeAt(u+1))<56320||i>57343?e?l.charAt(u):a:e?l.slice(u,u+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(42),o=n(26),a=n(43),i={};n(11)(i,n(16)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(12),o=n(24),a=n(27);e.exports=n(14)?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),l=i.length,u=0;l>u;)r.f(e,n=i[u++],t[n]);return e}},function(e,t,n){var r=n(7).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(10),o=n(58),a=n(37)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){n(146);for(var r=n(7),o=n(11),a=n(41),i=n(16)("toStringTag"),l="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(","),u=0;u=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,r("keys"),r("values"),r("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(150),__esModule:!0}},function(e,t,n){n(151),n(156),n(157),n(158),e.exports=n(9).Symbol},function(e,t,n){"use strict";var r=n(7),o=n(10),a=n(14),i=n(23),l=n(61),u=n(152).KEY,c=n(25),s=n(38),p=n(43),f=n(29),d=n(16),h=n(44),m=n(45),y=n(153),b=n(154),g=n(24),v=n(13),E=n(15),w=n(34),O=n(26),_=n(42),x=n(155),S=n(63),k=n(12),j=n(27),C=S.f,P=k.f,T=x.f,R=r.Symbol,N=r.JSON,D=N&&N.stringify,A=d("_hidden"),I=d("toPrimitive"),L={}.propertyIsEnumerable,F=s("symbol-registry"),U=s("symbols"),M=s("op-symbols"),z=Object.prototype,B="function"==typeof R,W=r.QObject,G=!W||!W.prototype||!W.prototype.findChild,H=a&&c(function(){return 7!=_(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=C(z,t);r&&delete z[t],P(e,t,n),r&&e!==z&&P(z,t,r)}:P,$=function(e){var t=U[e]=_(R.prototype);return t._k=e,t},V=B&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},q=function(e,t,n){return e===z&&q(M,t,n),g(e),t=w(t,!0),g(n),o(U,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=_(n,{enumerable:O(0,!1)})):(o(e,A)||P(e,A,O(1,{})),e[A][t]=!0),H(e,t,n)):P(e,t,n)},Y=function(e,t){g(e);for(var n,r=y(t=E(t)),o=0,a=r.length;a>o;)q(e,n=r[o++],t[n]);return e},K=function(e){var t=L.call(this,e=w(e,!0));return!(this===z&&o(U,e)&&!o(M,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,A)&&this[A][e])||t)},Q=function(e,t){if(e=E(e),t=w(t,!0),e!==z||!o(U,t)||o(M,t)){var n=C(e,t);return!n||!o(U,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=T(E(e)),r=[],a=0;n.length>a;)o(U,t=n[a++])||t==A||t==u||r.push(t);return r},X=function(e){for(var t,n=e===z,r=T(n?M:E(e)),a=[],i=0;r.length>i;)!o(U,t=r[i++])||n&&!o(z,t)||a.push(U[t]);return a};B||(l((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(M,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),H(this,e,O(1,n))};return a&&G&&H(z,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),S.f=Q,k.f=q,n(62).f=x.f=J,n(30).f=K,n(40).f=X,a&&!n(28)&&l(z,"propertyIsEnumerable",K,!0),h.f=function(e){return $(d(e))}),i(i.G+i.W+i.F*!B,{Symbol:R});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)d(Z[ee++]);for(var te=j(d.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!B,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=R(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),i(i.S+i.F*!B,"Object",{create:function(e,t){return void 0===t?_(e):Y(_(e),t)},defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:X}),N&&i(i.S+i.F*(!B||c(function(){var e=R();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(v(t)||void 0!==e)&&!V(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!V(t))return t}),r[1]=t,D.apply(N,r)}}),R.prototype[I]||n(11)(R.prototype,I,R.prototype.valueOf),p(R,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){var r=n(29)("meta"),o=n(13),a=n(10),i=n(12).f,l=0,u=Object.isExtensible||function(){return!0},c=!n(25)(function(){return u(Object.preventExtensions({}))}),s=function(e){i(e,r,{value:{i:"O"+ ++l,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!u(e))return"F";if(!t)return"E";s(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!u(e))return!0;if(!t)return!1;s(e)}return e[r].w},onFreeze:function(e){return c&&p.NEED&&u(e)&&!a(e,r)&&s(e),e}}},function(e,t,n){var r=n(27),o=n(40),a=n(30);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var i,l=n(e),u=a.f,c=0;l.length>c;)u.call(e,i=l[c++])&&t.push(i);return t}},function(e,t,n){var r=n(57);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(15),o=n(62).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(r(e))}},function(e,t){},function(e,t,n){n(45)("asyncIterator")},function(e,t,n){n(45)("observable")},function(e,t,n){e.exports={default:n(160),__esModule:!0}},function(e,t,n){n(161),e.exports=n(9).Object.setPrototypeOf},function(e,t,n){var r=n(23);r(r.S,"Object",{setPrototypeOf:n(162).set})},function(e,t,n){var r=n(13),o=n(24),a=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(52)(Function.call,n(63).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(164),__esModule:!0}},function(e,t,n){n(165);var r=n(9).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(23);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(167);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".redirection-database_error{text-align:left;box-shadow:none;margin-top:1em}.redirection-database_error ul{list-style-type:disc}.redirection-database_error li{margin-left:20px}.redirection-database .redirection-database_spinner{margin:0 auto;width:100px}.redirection-database .redirection-database{clear:both;padding-top:20px}.redirection-database .rc-progress-line{clear:both;display:block;margin-bottom:20px}.redirection-database_wrapper h1,.redirection-database_wrapper>p{text-align:center}.redirection-database_wrapper .redirection-database_progress{background-color:#fff;text-align:center;width:75%;margin:0 auto;margin-top:30px;padding:20px;border:1px solid #ddd;border-radius:3px;box-shadow:3px 3px 3px #ddd}\n",""])},function(e,t,n){var r=n(169);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".wizard-wrapper{width:100%;max-width:700px;margin:0 auto;margin-top:90px;color:#555}.wizard-wrapper h1{text-align:center;font-weight:300;color:#999}.wizard{padding:40px;padding-bottom:30px;background-color:white;border-top:2px solid #ca4a1f;border-bottom:2px solid #ca4a1f}.wizard h2{font-size:2em;font-weight:400;padding-bottom:10px;margin-top:5px;margin-bottom:0}.wizard h3{font-size:1.3em;font-weight:300;padding-top:10px}.wizard ul{list-style-type:disc}.wizard li{margin-left:20px}.wizard .notice{margin-bottom:20px;margin-left:0;box-shadow:none;margin-top:0}.wizard .redirection-database_error h2{padding-top:0;margin-top:0}.wizard-buttons{margin-top:20px}.wizard-option{padding:2px 0}.wizard-option label{font-weight:bold}.wizard-option_disabled{opacity:0.5}.wizard-support{text-align:center;padding-top:10px}.wizard-support a{color:#555}.button.wizard-retry{float:right;margin-top:5px}.api-result{padding:5px;height:30px}.api-result .spinner-container{line-height:1;vertical-align:middle}.api-result .css-spinner{position:relative;top:0;left:0;width:26px;height:26px;margin-right:5px}.api-result .dashicons{vertical-align:middle;margin-right:3px;width:26px;height:26px;font-size:26px;padding:0;padding-right:2px}.api-result .dashicons-no{color:#ff3860}.api-result .dashicons-yes{color:#4ab866}.api-result .api-result_error{font-family:'Courier New', Courier, monospace;font-weight:bold}\n",""])},function(e,t,n){var r=n(171);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(5)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,'.wp-core-ui .button-delete{box-shadow:none;text-shadow:none;background-color:#ff3860;border-color:transparent;color:#fff}.wp-core-ui .button-delete:hover{background-color:#ff3860;border-color:transparent;box-shadow:none;text-shadow:none}.inline-notice{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:1px 12px;margin:5px 0 15px;border-left-color:#ffb900}.inline-notice.inline-general{border-left-color:#46b450}.addTop{margin-top:20px}@media screen and (max-width: 782px){.newsletter form input[type=email]{display:block;width:100%;margin:5px 0px}.import select{width:100%;margin:5px 0px}.plugin-importer button{width:100%}p.search-box input[name="s"]{margin-top:20px}}.module-export{border:1px solid #ddd;padding:5px;font-family:courier,Monaco,monospace;margin-top:15px;width:100%;background-color:white !important}.redirects a.advanced{text-decoration:none}.error{padding-bottom:10px !important}\n',""])},function(e,t,n){"use strict";n.r(t);var r=n(64),o=n.n(r),a={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(a.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a.iterable&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function h(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a.arrayBuffer&&a.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e,t,n,r=f(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=d(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},y.call(g.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})};var O=self.DOMException;try{new O}catch(e){(O=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),O.prototype.constructor=O}function _(e,t){return new Promise(function(n,r){var o=new g(e,t);if(o.signal&&o.signal.aborted)return r(new O("Aborted","AbortError"));var i=new XMLHttpRequest;function l(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;n(new E(o,r))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.onabort=function(){r(new O("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&a.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),o.signal&&(o.signal.addEventListener("abort",l),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",l)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=p,self.Request=g,self.Response=E),!window.Promise&&(window.Promise=o.a),Array.from||(Array.from=function(e){return[].slice.call(e)}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o=0||(o[n]=e[n]);return o}var z=n(46),B=n.n(z),W=n(22),G=n.n(W);n(51);function H(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,i=void 0===a?"connectAdvanced":a,l=n.renderCountProp,u=void 0===l?void 0:l,c=n.shouldHandleStateChanges,s=void 0===c||c,p=n.storeKey,f=void 0===p?"store":p,d=n.withRef,h=void 0!==d&&d,m=n.forwardRef,y=void 0!==m&&m,b=n.context,g=void 0===b?A:b,v=M(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);G()(void 0===u,"renderCountProp is removed. render counting is built into the latest React dev tools profiling extension"),G()(!h,"withRef is removed. To access the wrapped instance, use a ref on the connected component");var E="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like: . You may also pass a {context : MyContext} option to connect";G()("store"===f,"storeKey has been removed and does not do anything. "+E);var w=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),a=U({},v,{getDisplayName:o,methodName:i,renderCountProp:u,shouldHandleStateChanges:s,storeKey:f,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=v.pure,c=x.Component,p=t;l&&(c=x.PureComponent);var d=function(t){function n(n){var r,o,i,u,c,s,d,h,m;return r=t.call(this,n)||this,G()(y?!n.wrapperProps[f]:!n[f],"Passing redux store in props has been removed and does not do anything. "+E),r.selectDerivedProps=function(t,n,r){if(l&&o===n&&i===t)return u;r!==c&&(c=r,s=e(r.dispatch,a)),o=n,i=t;var p=s(t,n);return u===p?u:u=p},r.selectChildElement=function(e,t){return e===d&&t===h||(d=e,h=t,m=S.a.createElement(p,U({},e,{ref:t}))),m},r.renderWrappedComponent=r.renderWrappedComponent.bind(F(F(r))),r}R(n,t);var o=n.prototype;return o.renderWrappedComponent=function(e){G()(e,'Could not find "store" in the context of "'+r+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+r+" in connect options.");var t,n=e.storeState,o=e.store,a=this.props;y&&(a=this.props.wrapperProps,t=this.props.forwardedRef);var i=this.selectDerivedProps(n,a,o);return this.selectChildElement(i,t)},o.render=function(){var e=this.props.context||w;return S.a.createElement(e.Consumer,null,this.renderWrappedComponent)},n}(c);if(d.WrappedComponent=t,d.displayName=r,y){var h=S.a.forwardRef(function(e,t){return S.a.createElement(d,{wrapperProps:e,forwardedRef:t})});return h.displayName=r,h.WrappedComponent=t,B()(h,t)}return B()(d,t)}}var $=Object.prototype.hasOwnProperty;function V(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function q(e,t){if(V(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ie(e,t){return e===t}var le,ue,ce,se,pe,fe,de,he,me,ye,be,ge,ve=(ce=(ue=void 0===le?{}:le).connectHOC,se=void 0===ce?H:ce,pe=ue.mapStateToPropsFactories,fe=void 0===pe?Z:pe,de=ue.mapDispatchToPropsFactories,he=void 0===de?X:de,me=ue.mergePropsFactories,ye=void 0===me?te:me,be=ue.selectorFactory,ge=void 0===be?oe:be,function(e,t,n,r){void 0===r&&(r={});var o=r,a=o.pure,i=void 0===a||a,l=o.areStatesEqual,u=void 0===l?ie:l,c=o.areOwnPropsEqual,s=void 0===c?q:c,p=o.areStatePropsEqual,f=void 0===p?q:p,d=o.areMergedPropsEqual,h=void 0===d?q:d,m=M(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=ae(e,fe,"mapStateToProps"),b=ae(t,he,"mapDispatchToProps"),g=ae(n,ye,"mergeProps");return se(ge,U({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:g,pure:i,areStatesEqual:u,areOwnPropsEqual:s,areStatePropsEqual:f,areMergedPropsEqual:h},m))}),Ee=n(67);function we(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var Oe=we();Oe.withExtraArgument=we;var _e=Oe,xe="SETTING_LOAD_START",Se="SETTING_LOAD_SUCCESS",ke="SETTING_LOAD_FAILED",je="SETTING_LOAD_STATUS",Ce="SETTING_SAVING",Pe="SETTING_SAVED",Te="SETTING_SAVE_FAILED",Re="SETTING_DATABASE_START",Ne="SETTING_DATABASE_FAILED",De="SETTING_DATABASE_SUCCESS",Ae="SETTING_DATABASE_COMPLETE",Ie="SETTING_DATABASE_FINISH",Le="SETTING_DATABASE_SHOW",Fe="SETTING_API_FAILED",Ue="SETTING_API_SUCCESS",Me="SETTING_API_TRY",ze="STATUS_IN_PROGRESS",Be="STATUS_FAILED",We="STATUS_COMPLETE",Ge="STATUS_SAVING";function He(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=at(),i={orderby:r,direction:"desc",page:0,per_page:parseInt(Redirectioni10n.per_page,10),selected:[],filterBy:"",filter:"",groupBy:""},l=void 0===a.sub?"":a.sub;return-1===o.indexOf(l)?i:lt({},i,{orderby:a.orderby&&-1!==e.indexOf(a.orderby)?a.orderby:i.orderby,direction:a.direction&&"asc"===a.direction?"asc":i.direction,page:a.offset&&parseInt(a.offset,10)>0?parseInt(a.offset,10):i.page,per_page:Redirectioni10n.per_page?parseInt(Redirectioni10n.per_page,10):i.per_page,filterBy:a.filterby&&-1!==t.indexOf(a.filterby)?a.filterby:i.filterBy,filter:a.filter?a.filter:i.filter,groupBy:a.groupby&&-1!==n.indexOf(a.groupby)?a.groupby:i.groupBy})},ft=function(e,t){for(var n=Object.assign({},e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=Redirectioni10n.WP_API_root+"redirection/v1/"+e+"/";if(n._wpnonce=Redirectioni10n.WP_API_nonce,n&&Object.keys(n).length>0&&(t=n,n=Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return e[n]=t[n],e},{}),Object.keys(n).length>0)){var o=r+(-1===Redirectioni10n.WP_API_root.indexOf("?")?"?":"&")+nt.a.stringify(n);return-1!==Redirectioni10n.WP_API_root.indexOf("page=redirection.php")?o.replace(/page=(\d+)/,"ppage=$1"):o}return r},wt=function(e){return-1!==e.indexOf("rest_route")||-1!==e.indexOf("/wp-json/")?new Headers({"Content-Type":"application/json; charset=utf-8"}):new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"})},Ot=function(e){return{url:e,headers:wt(e),credentials:"same-origin"}},_t=function(e,t){var n=gt({},t),r={};return t&&t.items&&(r.items=t.items,delete n.items),gt({},Ot(Et(e,n)),{method:"post",body:r.items?JSON.stringify(r):null})},xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gt({},Ot(Et(e,t)),{method:"get"})},St=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=gt({},Ot(Et(e,n)),{method:"post",params:t});return Object.keys(t).length>0&&(r.body=JSON.stringify(t)),r},kt={get:function(){return xt("setting")},update:function(e){return St("setting",e)}},jt={list:function(e){return xt("redirect",e)},update:function(e,t){return St("redirect/"+e,t)},create:function(e){return St("redirect",e)}},Ct={list:function(e){return xt("group",e)},update:function(e,t){return St("group/"+e,t)},create:function(e){return St("group",e)}},Pt={list:function(e){return xt("log",e)},deleteAll:function(e){return _t("log",e)}},Tt={list:function(e){return xt("404",e)},deleteAll:function(e){return _t("404",e)}},Rt={get:function(){return xt("import")},upload:function(e,t){return function(e,t){var n=gt({},Ot(Et(e)),{method:"post"});return n.headers.delete("Content-Type"),n.body=new FormData,n.body.append("file",t),n}("import/file/"+e,t)},pluginList:function(){return xt("import/plugin")},pluginImport:function(e){return St("import/plugin/"+e)}},Nt={file:function(e,t){return xt("export/"+e+"/"+t)}},Dt={status:function(){return xt("plugin")},fix:function(){return St("plugin")},delete:function(){return _t("plugin/delete")},upgradeDatabase:function(e){return St("plugin/database",e?{upgrade:e}:{})},checkApi:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?xt("plugin/test"):St("plugin/test",{test:"ping"});return t.url=t.url.replace(Redirectioni10n.WP_API_root,e),-1!==t.url.indexOf("php?")&&(t.url=t.url.replace("?_","&_")),t}},At={redirect:function(e,t,n){return St("bulk/redirect/"+e,t,n)},group:function(e,t,n){return St("bulk/group/"+e,t,n)},log:function(e,t,n){return St("bulk/log/"+e,t,n)},error:function(e,t,n){return St("bulk/404/"+e,t,n)}},It=function(e){return"https://api.redirect.li/v1/"+e+(-1===e.indexOf("?")?"?":"&")+"ref=redirection"},Lt={getGeo:function(e){return{url:It("ip/"+e+"?locale="+Redirectioni10n.localeSlug.substr(0,2)),method:"get"}}},Ft={get:function(e){return{url:It("useragent/"+encodeURIComponent(e)),method:"get"}}},Ut={get:function(e){return{url:It("http?url="+encodeURIComponent(e)),method:"get"}}},Mt=function(e){return 0===e?"Admin AJAX returned 0":e.message?e.message:"Unknown error "+e},zt=function(e){return e.error_code?e.error_code:e.data&&e.data.error_code?e.data.error_code:0===e?"admin-ajax":e.code?e.code:"unknown"},Bt=function(e){return e.action=function(e){return e.url.replace(Redirectioni10n.WP_API_root,"").replace(/[\?&]_wpnonce=[a-f0-9]*/,"")+" "+e.method.toUpperCase()}(e),fetch(e.url,e).then(function(t){if(!t||!t.status)throw{message:"No data or status object returned in request",code:0};return t.status&&void 0!==t.statusText&&(e.status=t.status,e.statusText=t.statusText),t.headers.get("x-wp-nonce")&&(Redirectioni10n.WP_API_nonce=t.headers.get("x-wp-nonce")),t.text()}).then(function(t){e.raw=t;try{var n=JSON.parse(t.replace(/\ufeff/,""));if(e.status&&200!==e.status)throw{message:Mt(n),code:zt(n),request:e,data:n.data?n.data:null};if(0===n)throw{message:"Failed to get data",code:"json-zero"};return n}catch(t){throw t.request=e,t}})};function Wt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t4&&void 0!==arguments[4]?arguments[4]:{};return function(a,i){var l=i()[r.store],u=l.table,c=l.total,s={items:n?[n]:u.selected,bulk:t};if("delete"===t&&u.page>0&&u.per_page*u.page==c-1&&(u.page-=1),"delete"!==t||confirm(Object(P.translate)("Are you sure you want to delete this item?","Are you sure you want to delete these items?",{count:s.items.length}))){var p=ft(u,s),f=Ht({},{items:s.items.join(",")},o);return Bt(e(t,f,dt(u,r.order))).then(function(e){a(Ht({type:r.saved},e,{saving:s.items}))}).catch(function(e){a({type:r.failed,error:e,saving:s.items})}),a({type:r.saving,table:p,saving:s.items})}}},qt=function(e,t,n,r,o){return Bt(e).then(function(e){o({type:r.saved,item:e.item,items:e.items,total:e.total,saving:[n.id]})}).catch(function(e){o({type:r.failed,error:e,item:n,saving:[n.id]})}),o({type:r.saving,table:t,item:n,saving:[n.id]})},Yt=function(e,t,n){return function(r,o){var a=Gt({},o()[n.store]);return a.page=0,a.orderby="id",a.direction="desc",qt(e(t),a,t,n,r)}},Kt=function(e,t,n,r){return function(o,a){var i=a()[r.store].table;return qt(e(t,n),i,n,r,o)}},Qt=function(e,t){for(var n in e)if(e[n]!==t[n])return!1;return!0},Jt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){return e},i=o.table,l=void 0===i?{}:i,u=o.rows,c=a(ft(l,r)),s=dt(Ht({},l,r),n.order);if(!(Qt(c,l)&&u.length>0&&Qt(r,{})))return Bt(e(s)).then(function(e){t(Ht({type:n.saved},e))}).catch(function(e){t({type:n.failed,error:e})}),t(Ht({table:c,type:n.saving},function(e,t){var n={};for(var r in t)void 0===e[r]&&(n[r]=t[r]);return n}(c,r)))},Xt=function(e,t,n,r,o){var a=o.table,i=dt(Ht({},a,r),n.order);Bt(e(i)).then(function(e){t(Ht({type:n.saved},e))}).catch(function(e){t({type:n.failed,error:e})})},Zt=function(e,t,n){for(var r=e.slice(0),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Me:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,void 0))});case Ue:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,!0))});case Fe:return He({},e,{apiTest:He({},e.apiTest,Ve(e.apiTest,t.id,t.method,t.error.request.status))});case Le:return He({},e,{showDatabase:!0});case Ie:return He({},e,{showDatabase:!1,database:He({},e.database,{status:"ok"})});case Re:return He({},e,{database:He({},e.database,{inProgress:!0,result:"ok",reason:"skip"!==t.arg&&e.database.reason}),showDatabase:"stop"!==t.arg});case De:return He({},e,{database:He({},e.database,t.database)});case Ae:return He({},e,{database:He({},e.database,{inProgress:!1})});case Ne:return He({},e,{database:He({},e.database,{result:Be,reason:t.error})});case xe:return He({},e,{loadStatus:ze});case Se:return He({},e,{loadStatus:We,values:t.values,groups:t.groups,postTypes:t.postTypes,installed:t.installed,canDelete:t.canDelete});case ke:return He({},e,{loadStatus:Be,error:t.error});case Ce:return He({},e,{saveStatus:ze});case Pe:return He({},e,{saveStatus:We,values:t.values,groups:t.groups,installed:t.installed});case Te:return He({},e,{saveStatus:Be,error:t.error});case je:return He({},e,{pluginStatus:t.pluginStatus})}return e},log:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Je:return un({},e,{table:yt(e.table,e.rows,t.onoff)});case Qe:return un({},e,{table:mt(e.table,t.items)});case Xe:return un({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case Ze:return un({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case qe:return un({},e,{table:rn(e,t),status:ze,saving:[],logType:t.logType,requestCount:e.requestCount+1});case Ke:return un({},e,{status:Be,saving:[]});case Ye:return un({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case et:return un({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},error:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case hn:return gn({},e,{table:yt(e.table,e.rows,t.onoff)});case dn:return gn({},e,{table:mt(e.table,t.items)});case mn:return gn({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case yn:return gn({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case sn:return gn({},e,{table:rn(e,t),status:ze,saving:[],requestCount:e.requestCount+1,rows:[]});case fn:return gn({},e,{status:Be,saving:[]});case pn:return gn({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case bn:return gn({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},io:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case wn:return Cn({},e,{exportStatus:ze});case En:return Cn({},e,{exportStatus:We,exportData:t.data});case kn:return Cn({},e,{file:t.file});case Sn:return Cn({},e,{file:!1,lastImport:!1,exportData:!1});case xn:return Cn({},e,{importingStatus:Be,exportStatus:Be,lastImport:!1,file:!1,exportData:!1});case On:return Cn({},e,{importingStatus:ze,lastImport:!1,file:!!t.file&&t.file});case _n:return Cn({},e,{lastImport:t.total,importingStatus:We,file:!1});case jn:return Cn({},e,{importers:t.importers})}return e},group:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Tn:return Un({},e,{table:rn(e,t),status:ze,saving:[]});case Rn:return Un({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case In:return Un({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case Fn:return Un({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case An:return Un({},e,{table:yt(e.table,e.rows,t.onoff)});case Dn:return Un({},e,{table:mt(e.table,t.items)});case Nn:return Un({},e,{status:Be,saving:[]});case Ln:return Un({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},redirect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yn:return Kn({},e,{addTop:t.onoff});case zn:return Kn({},e,{table:rn(e,t),status:ze,saving:[]});case Bn:return Kn({},e,{rows:nn(e,t),status:We,total:on(e,t),table:ht(e.table)});case $n:return Kn({},e,{table:ht(rn(e,t)),saving:an(e,t),rows:en(e,t)});case qn:return Kn({},e,{rows:nn(e,t),total:on(e,t),saving:ln(e,t)});case Hn:return Kn({},e,{table:yt(e.table,e.rows,t.onoff)});case Gn:return Kn({},e,{table:mt(e.table,t.items)});case Wn:return Kn({},e,{status:Be,saving:[]});case Vn:return Kn({},e,{saving:ln(e,t),rows:tn(e,t)})}return e},message:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xn:case Nn:case Vn:case Ln:case Ke:case et:case ke:case Te:case bn:case fn:case Ne:case Wn:var n=tr(e.errors,t.error);return console.error(t.error.message),Zn({},e,{errors:n,inProgress:rr(e)});case Xe:case $n:case Ce:case mn:case In:return Zn({},e,{inProgress:e.inProgress+1});case Ze:case qn:case Pe:case Fn:case yn:return Zn({},e,{notices:nr(e.notices,or[t.type]),inProgress:rr(e)});case Xn:return Zn({},e,{notices:[]});case Jn:return Zn({},e,{errors:[]})}return e},info:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ar:return pr({},e,{status:ze,http:!1});case ir:return pr({},e,{status:We,maps:dr(e.maps,t.map,"ip")});case lr:return pr({},e,{status:We,agents:dr(e.agents,t.agent,"agent")});case ur:return pr({},e,{status:Be,error:t.error});case cr:return pr({},e,{status:We,http:t.http});case sr:return pr({},e,{http:!1})}return e}}),mr=Object(Ee.composeWithDevTools)({name:"Redirection"}),yr=[_e,function(){return function(e){return function(t){switch(t.type){case $n:case In:case zn:case Tn:case qe:case sn:!function(e,t){var n=it(),r={redirect:[[zn,$n],"id"],groups:[[Tn,In],"name"],log:[[qe],"date"],"404s":[[sn],"date"]};if(r[n]&&e===r[n][0].find(function(t){return t===e})){var o=t.orderby,a=t.direction,i=t.page,l=t.per_page,u=t.filter,c=t.filterBy,s=t.groupBy,p={orderby:o,direction:a,offset:i,per_page:l,filter:u,filterBy:c,groupBy:s},f={orderby:r[n][1],direction:"desc",offset:0,filter:"",filterBy:"",per_page:parseInt(Redirectioni10n.per_page,10),groupBy:""};s&&(f.orderby="total"),ot(p,f)}}(t.type,t.table?t.table:t)}return e(t)}}}];function br(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(Y.createStore)(hr,e,mr(Y.applyMiddleware.apply(void 0,yr)))}function gr(){var e=Redirectioni10n&&Redirectioni10n.preload&&Redirectioni10n.preload.pluginStatus?Redirectioni10n.preload.pluginStatus:[];return{loadStatus:ze,saveStatus:!1,error:!1,installed:"",settings:{},postTypes:[],pluginStatus:e,canDelete:!1,showDatabase:!1,apiTest:{},database:Redirectioni10n.database?Redirectioni10n.database:{}}}function vr(){return{rows:[],saving:[],total:0,status:ze,table:pt(["ip","url"],["ip"],[],"date",["log"]),requestCount:0}}function Er(){var e=at(),t="date";return"404s"===e.sub&&e.groupby&&(t="total"),{rows:[],saving:[],total:0,status:ze,table:pt(["ip","url","total"],["ip","url-exact"],["url","ip"],t,["404s"]),requestCount:0}}function wr(){return{rows:[],saving:[],total:0,status:ze,table:pt(["name"],["name","module"],[],"name",["groups"])}}function Or(){return{rows:[],saving:[],total:0,addTop:!1,status:ze,table:pt(["url","position","last_count","id","last_access"],["group"],[],"id",[""])}}var _r=function(){return function(e,t){return t().settings.loadStatus===We?null:(Bt(kt.get()).then(function(t){e({type:Se,values:t.settings,groups:t.groups,postTypes:t.post_types,installed:t.installed,canDelete:t.canDelete})}).catch(function(t){e({type:ke,error:t})}),e({type:xe}))}},xr=function(e){return function(t){return Bt(kt.update(e)).then(function(e){t({type:Pe,values:e.settings,groups:e.groups,installed:e.installed})}).catch(function(e){t({type:Te,error:e})}),t({type:Ce})}},Sr=function(){return function(e){return Bt(Dt.delete()).then(function(e){document.location.href=e.location}).catch(function(t){e({type:Te,error:t})}),e({type:Ce})}},kr=function(){return function(e){return Bt(Dt.status()).then(function(t){e({type:je,pluginStatus:t})}).catch(function(t){e({type:ke,error:t})}),e({type:xe})}},jr=function(){return function(e){return Bt(Dt.fix()).then(function(t){e({type:je,pluginStatus:t})}).catch(function(t){e({type:ke,error:t})}),e({type:xe})}},Cr=function(){return{type:Le}},Pr=function(e){return function(t){return Bt(Dt.upgradeDatabase(e)).then(function(e){t({type:De,database:e})}).catch(function(e){t({type:Ne,error:e})}),t({type:Re,arg:e})}},Tr=function(){return{type:Ie}},Rr=function(e){return function(t){for(var n=function(n){var r=e[n],o=r.id,a=r.url;t({type:Me,id:o,method:"GET"}),t({type:Me,id:o,method:"POST"}),Bt(Dt.checkApi(a)).then(function(){t({type:Ue,id:o,method:"GET"})}).catch(function(e){t({type:Fe,id:o,method:"GET",error:e})}),Bt(Dt.checkApi(a,!0)).then(function(){t({type:Ue,id:o,method:"POST"})}).catch(function(e){t({type:Fe,id:o,method:"POST",error:e})})},r=0;r0?o:0,associated_redirect:i.length>0?a:""})});var a=e.values.modules;return n.state=e.values,n.state.location=a[2]?a[2].location:"",n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Br(e,t)}(t,S.a.Component),n=t,(r=[{key:"getSnapshotBeforeUpdate",value:function(e){return e.values.token!==this.props.values.token&&this.setState({token:this.props.values.token}),e.values.auto_target!==this.props.values.auto_target&&this.setState({auto_target:this.props.values.auto_target}),null}},{key:"renderMonitor",value:function(e){return S.a.createElement(Nr,{title:Object(P.translate)("URL Monitor Changes")+":",url:this.supportLink("options","monitor")},S.a.createElement(Lr,{items:e,name:"monitor_post",value:parseInt(this.state.monitor_post,10),onChange:this.onChange})," ",Object(P.translate)("Save changes to this group"),S.a.createElement("p",null,S.a.createElement("input",{type:"text",className:"regular-text",name:"associated_redirect",onChange:this.onChange,placeholder:Object(P.translate)('For example "/amp"'),value:this.state.associated_redirect})," ",Object(P.translate)("Create associated redirect (added to end of URL)")))}},{key:"renderPostTypes",value:function(){var e=this,t=this.props.postTypes,n=this.state.monitor_types,r=[],o=function(o){var a=t[o],i=!!n.find(function(e){return e===o});r.push(S.a.createElement("p",{key:o},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",name:"monitor_type_"+o,onChange:e.onMonitor,checked:i}),Object(P.translate)("Monitor changes to %(type)s",{args:{type:a.toLowerCase()}}))))};for(var a in t)o(a);return r}},{key:"supportLink",value:function(e,t){return"https://redirection.me/support/"+e+"/?utm_source=redirection&utm_medium=plugin&utm_campaign=support"+(t?"&utm_term="+t+"#"+t:"")}},{key:"render",value:function(){var e=this.props,t=e.groups,n=e.saveStatus,r=e.installed,o=this.state.monitor_types.length>0;return S.a.createElement("form",{onSubmit:this.onSubmit},S.a.createElement(Dr,null,S.a.createElement(Nr,{title:""},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",checked:this.state.support,name:"support",onChange:this.onChange}),S.a.createElement("span",{className:"sub"},Object(P.translate)("I'm a nice person and I have helped support the author of this plugin")))),S.a.createElement(Nr,{title:Object(P.translate)("Redirect Logs")+":",url:this.supportLink("logs")},S.a.createElement(Lr,{items:Hr(),name:"expire_redirect",value:parseInt(this.state.expire_redirect,10),onChange:this.onChange})," ",Object(P.translate)("(time to keep logs for)")),S.a.createElement(Nr,{title:Object(P.translate)("404 Logs")+":",url:this.supportLink("tracking-404-errors")},S.a.createElement(Lr,{items:Hr(),name:"expire_404",value:parseInt(this.state.expire_404,10),onChange:this.onChange})," ",Object(P.translate)("(time to keep logs for)")),S.a.createElement(Nr,{title:Object(P.translate)("IP Logging")+":",url:this.supportLink("options","iplogging")},S.a.createElement(Lr,{items:[{value:0,text:Object(P.translate)("No IP logging")},{value:1,text:Object(P.translate)("Full IP logging")},{value:2,text:Object(P.translate)("Anonymize IP (mask last part)")}],name:"ip_logging",value:parseInt(this.state.ip_logging,10),onChange:this.onChange})," ",Object(P.translate)("(select IP logging level)")," - ",S.a.createElement(Fr,{url:this.supportLink("privacy-gdpr")},Object(P.translate)("GDPR / Privacy information"))),S.a.createElement(Nr,{title:Object(P.translate)("URL Monitor")+":",url:this.supportLink("options","monitor")},this.renderPostTypes()),o&&this.renderMonitor(t),S.a.createElement(Nr,{title:Object(P.translate)("RSS Token")+":",url:this.supportLink("options","rsstoken")},S.a.createElement("input",{className:"regular-text",type:"text",value:this.state.token,name:"token",onChange:this.onChange}),S.a.createElement("br",null),S.a.createElement("span",{className:"sub"},Object(P.translate)("A unique token allowing feed readers access to Redirection log RSS (leave blank to auto-generate)"))),S.a.createElement(Nr,{title:Object(P.translate)("Auto-generate URL")+":",url:this.supportLink("options","autogenerate")},S.a.createElement("input",{className:"regular-text",type:"text",value:this.state.auto_target,name:"auto_target",onChange:this.onChange}),S.a.createElement("br",null),S.a.createElement("span",{className:"sub"},Object(P.translate)("Used to auto-generate a URL if no URL is given. Use the special tags {{code}}$dec${{/code}} or {{code}}$hex${{/code}} to insert a unique ID instead",{components:{code:S.a.createElement("code",null)}}))),S.a.createElement(Nr,{title:Object(P.translate)("Apache Module"),url:this.supportLink("options","apache")},S.a.createElement("label",null,S.a.createElement("p",null,S.a.createElement("input",{type:"text",className:"regular-text",name:"location",value:this.state.location,onChange:this.onChange,placeholder:r})),S.a.createElement("p",{className:"sub"},Object(P.translate)("Enter the full path and filename if you want Redirection to automatically update your {{code}}.htaccess{{/code}}.",{components:{code:S.a.createElement("code",null)}})))),S.a.createElement(Nr,{title:Object(P.translate)("Force HTTPS"),url:this.supportLink("options","force-https")},S.a.createElement("label",null,S.a.createElement("p",null,S.a.createElement("input",{type:"checkbox",name:"https",onChange:this.onChange,checked:this.state.https}),Object(P.translate)("Force a redirect from HTTP to HTTPS. Please ensure your HTTPS is working before enabling"),"  ",Object(P.translate)("(beta)")))),S.a.createElement(Nr,{title:Object(P.translate)("Redirect Cache"),url:this.supportLink("options","cache")},S.a.createElement(Lr,{items:[{value:-1,text:Object(P.translate)("Never cache")},{value:1,text:Object(P.translate)("An hour")},{value:24,text:Object(P.translate)("A day")},{value:168,text:Object(P.translate)("A week")},{value:0,text:Object(P.translate)("Forever")}],name:"redirect_cache",value:parseInt(this.state.redirect_cache,10),onChange:this.onChange}),"  ",S.a.createElement("span",{className:"sub"},Object(P.translate)('How long to cache redirected 301 URLs (via "Expires" HTTP header)'))),S.a.createElement(Nr,{title:Object(P.translate)("REST API"),url:this.supportLink("options","restapi")},S.a.createElement(Lr,{items:$r(),name:"rest_api",value:parseInt(this.state.rest_api,10),onChange:this.onChange}),"  ",S.a.createElement("span",{className:"sub"},Object(P.translate)("How Redirection uses the REST API - don't change unless necessary")))),S.a.createElement("input",{className:"button-primary",type:"submit",name:"update",value:Object(P.translate)("Update"),disabled:n===ze}))}}])&&Mr(n.prototype,r),o&&Mr(n,o),t}();var qr=ve(function(e){var t=e.settings;return{groups:t.groups,values:t.values,saveStatus:t.saveStatus,installed:t.installed,postTypes:t.postTypes}},function(e){return{onSaveSettings:function(t){e(xr(t))}}})(Vr),Yr=n(3),Kr=n.n(Yr);n(91);function Qr(e){return(Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jr(e,t){for(var n=0;n=t[n][0])return t[n][1];return t[t.length-1][1]}},{key:"renderSupported",value:function(){return S.a.createElement("div",null,Object(P.translate)("You've supported this plugin - thank you!"),"  ",S.a.createElement("a",{href:"#",onClick:this.onDonate},Object(P.translate)("I'd like to support some more.")))}},{key:"renderUnsupported",value:function(){for(var e,t,n,r=(n="",(t=16)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),o=20;o<=100;o+=20)r[o]="";return S.a.createElement("div",null,S.a.createElement("label",null,S.a.createElement("p",null,Object(P.translate)("Redirection is free to use - life is wonderful and lovely! It has required a great deal of time and effort to develop and you can help support this development by {{strong}}making a small donation{{/strong}}.",{components:{strong:S.a.createElement("strong",null)}})," ",Object(P.translate)("You get useful software and I get to carry on making it better."))),S.a.createElement("input",{type:"hidden",name:"cmd",value:"_xclick"}),S.a.createElement("input",{type:"hidden",name:"business",value:"admin@urbangiraffe.com"}),S.a.createElement("input",{type:"hidden",name:"item_name",value:"Redirection (WordPress Plugin)"}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_promo_code",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_product_category",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_shipping_method",value:""}),S.a.createElement("input",{type:"hidden",name:"buyer_credit_user_address_change",value:""}),S.a.createElement("input",{type:"hidden",name:"no_shipping",value:"1"}),S.a.createElement("input",{type:"hidden",name:"return",value:this.getReturnUrl()}),S.a.createElement("input",{type:"hidden",name:"no_note",value:"1"}),S.a.createElement("input",{type:"hidden",name:"currency_code",value:"USD"}),S.a.createElement("input",{type:"hidden",name:"tax",value:"0"}),S.a.createElement("input",{type:"hidden",name:"lc",value:"US"}),S.a.createElement("input",{type:"hidden",name:"bn",value:"PP-DonationsBF"}),S.a.createElement("div",{className:"donation-amount"},"$",S.a.createElement("input",{type:"number",name:"amount",min:16,value:this.state.amount,onChange:this.onInput,onBlur:this.onBlur}),S.a.createElement("span",null,this.getAmountoji(this.state.amount)),S.a.createElement("input",{type:"submit",className:"button-primary",value:Object(P.translate)("Support 💰")})))}},{key:"render",value:function(){var e=this.state.support;return S.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",className:"donation"},S.a.createElement(Dr,null,S.a.createElement(Nr,{title:Object(P.translate)("Plugin Support")+":"},e?this.renderSupported():this.renderUnsupported())))}}])&&fo(n.prototype,r),o&&fo(n,o),t}();function go(e){return(go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vo(e,t){for(var n=0;n0&&S.a.createElement($o,null))},Yo=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Wo(this,Go(t).call(this,e))).props.onLoadStatus(),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ho(e,t)}(t,S.a.Component),n=t,(r=[{key:"render",value:function(){var e=this.props.pluginStatus;return S.a.createElement("div",null,S.a.createElement("h2",null,Object(P.translate)("Plugin Status")),e.length>0&&S.a.createElement(qo,{status:e}),0===e.length&&S.a.createElement("div",{className:"placeholder-inline"},S.a.createElement("div",{className:"placeholder-loading"})))}}])&&Bo(n.prototype,r),o&&Bo(n,o),t}();var Ko=ve(function(e){return{pluginStatus:e.settings.pluginStatus}},function(e){return{onLoadStatus:function(){e(kr())},onFix:function(){e(jr())}}})(Yo);function Qo(e){return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jo(e,t){for(var n=0;n0&&(p=S.a.createElement(ua,{rows:r,status:i,selected:a.selected,row:n})),S.a.createElement("table",{className:"wp-list-table widefat fixed striped items"},S.a.createElement("thead",null,S.a.createElement(ia,{table:a,isDisabled:c,isSelected:s,headers:t,rows:r,total:o,onSetOrderBy:u,onSetAllSelected:l})),p,S.a.createElement("tfoot",null,S.a.createElement(ia,{table:a,isDisabled:c,isSelected:s,headers:t,rows:r,total:o,onSetOrderBy:u,onSetAllSelected:l})))});function ha(e){return(ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ya(e,t){for(var n=0;n0,onClick:this.onFirst})," ",S.a.createElement(_a,{title:Object(P.translate)("Prev page"),button:"‹",className:"prev-page",enabled:e>0,onClick:this.onPrev}),S.a.createElement("span",{className:"paging-input"},S.a.createElement("label",{htmlFor:"current-page-selector",className:"screen-reader-text"},Object(P.translate)("Current Page"))," ",S.a.createElement("input",{className:"current-page",type:"number",min:"1",max:t,name:"paged",value:this.state.currentPage+1,size:"2","aria-describedby":"table-paging",onBlur:this.onSetPage,onChange:this.onChange}),S.a.createElement("span",{className:"tablenav-paging-text"},Object(P.translate)("of %(page)s",{components:{total:S.a.createElement("span",{className:"total-pages"})},args:{page:Object(P.numberFormat)(t)}})))," ",S.a.createElement(_a,{title:Object(P.translate)("Next page"),button:"›",className:"next-page",enabled:e0&&S.a.createElement(Sa,{per_page:n.per_page,page:n.page,total:t,onChangePage:this.props.onChangePage,inProgress:o===ze}))}}])&&ja(n.prototype,r),o&&ja(n,o),t}();function Na(e){return(Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Da(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Xa(e)},ei=function(e,t){return Xa({orderby:e,direction:t})},ti=function(e){return Xa({page:e})},ni=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Xa({filter:e,filterBy:""===e?"":t,page:0,orderby:""})},ri=function(e,t){return Xa({filterBy:e,filter:t,orderby:"",page:0})},oi=function(e){return{type:Qe,items:e.map(parseInt)}},ai=function(e){return{type:Je,onoff:e}},ii=function(e){return Xa(e)},li=(n(109),function(){return S.a.createElement("div",{className:"redirection-poweredby"},Object(P.translate)("Powered by {{link}}redirect.li{{/link}}",{components:{link:S.a.createElement(Fr,{url:"https://redirect.li"})}}))});n(111);function ui(e){return(ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ci(e,t){for(var n=0;n0},S.a.createElement(Ha,{logType:"log"}),S.a.createElement("button",{className:"button-secondary",onClick:this.handleRSS},"RSS"),S.a.createElement(Ga,{onDelete:this.props.onDeleteAll,table:r}))))}}])&&Di(n.prototype,r),o&&Di(n,o),t}();var Ui=ve(function(e){return{log:e.log}},function(e){return{onLoad:function(t){e(Za(t))},onDeleteAll:function(t,n){e(Qa(t,n))},onSearch:function(t,n){e(ni(t,n))},onChangePage:function(t){e(ti(t))},onTableAction:function(t){e(Ja(t))},onSetAllSelected:function(t){e(ai(t))},onSetOrderBy:function(t,n){e(ei(t,n))}}})(Fi);function Mi(e){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zi(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Xi(e)},el=function(e,t){return Xi({orderby:e,direction:t})},tl=function(e){return Xi({page:e})},nl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Xi({filter:e,filterBy:""===e?"":t,page:0,orderby:""})},rl=function(e,t){return Xi({filter:e,filterBy:t,page:0,orderby:"",groupBy:""})},ol=function(e,t){return Xi({filterBy:e,filter:t,orderby:"",page:0})},al=function(e){return{type:dn,items:e}},il=function(e){return{type:hn,onoff:e}},ll=function(e){return Xi({groupBy:e,page:0,orderby:"total",direction:"desc",filterBy:"",filter:""})},ul=function(e){return Xi(e)},cl=function(e){var t=e.url;if(t){var n=$a.parse(t).hostname;return S.a.createElement(Fr,{url:t},n)}return null};function sl(e){return(sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pl(e,t){for(var n=0;n0&&r.push(Object(P.translate)("The source URL should probably start with a {{code}}/{{/code}}",{components:{code:S.a.createElement("code",null)}})),Ku(t)&&!1===n&&r.push(S.a.createElement(Fr,{url:"https://redirection.me/support/redirect-regular-expressions/"},Object(P.translate)('Remember to enable the "regex" checkbox if this is a regular expression.'))),Ku(t)&&-1===t.indexOf("^")&&-1===t.indexOf("$")&&r.push(Object(P.translate)("To prevent a greedy regular expression you can use a {{code}}^{{/code}} to anchor it to the start of the URL. For example: {{code}}%(example)s{{/code}}",{components:{code:S.a.createElement("code",null)},args:{example:"^"+t}})),"/(.*)"!==t&&"^/(.*)"!==t||r.push(Object(P.translate)("This will redirect everything, including the login pages. Please be sure you want to do this.")),r};n(115);function Ju(e){return(Ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xu(e){for(var t=1;t0?u:p[0].id,action_code:n.getCode()?parseInt(c,10):0,action_data:qu(n.state)};f.id?n.props.onSave(f.id,f):n.props.onCreate(f),n.props.onCancel?n.props.onCancel(e):n.reset(),n.props.childSave&&n.props.childSave()}),rc(nc(nc(n)),"onAdvanced",function(e){e.preventDefault(),n.setState({advanced:!n.state.advanced},n.triggerCallback)}),rc(nc(nc(n)),"onGroup",function(e){n.setState({group_id:parseInt(e.target.value,10)})}),rc(nc(nc(n)),"onChange",function(e){var t=e.target,r="checkbox"===t.type?t.checked:t.value,o=rc({},t.name,r);"action_type"===t.name?t.value===zu?o.action_code=301:t.value===Bu&&(o.action_code=404):"match_type"===t.name&&(o=Xu({},o,n.resetActionData()),t.value===Hu&&(o.action_type=zu)),o.warning=n.getWarning(o),n.setState(o,n.triggerCallback)}),rc(nc(nc(n)),"triggerCallback",function(){n.props.callback&&n.props.callback(n.ref.current.clientHeight)});var a=e.item,i=a.url,l=a.regex,u=a.match_type,c=a.action_type,s=a.action_data,p=a.group_id,f=void 0===p?0:p,d=a.title,h=a.action_code,m=a.position,y=void 0===m?0:m,b=s||{},g=b.logged_in,v=void 0===g?"":g,E=b.logged_out,w=void 0===E?"":E;return n.state={warning:Qu(e.item),url:i,title:d,regex:l,match_type:u,action_type:c,action_code:h,action_data:s,group_id:n.getValidGroup(f),position:y,login:{logged_in:v,logged_out:w},target:s||{},agent:n.getAgentState(s),referrer:n.getReferrerState(s),cookie:n.getHeaderState(s),header:n.getHeaderState(s),custom:n.getCustomState(s),role:n.getRoleState(s),server:n.getServerState(s),ip:n.getIpState(s),page:n.getPageState(s)},n.state.advanced=!n.canShowAdvanced(),n.ref=S.a.createRef(),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tc(e,t)}(t,S.a.Component),n=t,(r=[{key:"getWarning",value:function(e){return Qu(Xu({},this.state,e))}},{key:"getValidGroup",value:function(e){var t=this.props.group.rows,n=this.props.table;if(t.find(function(t){return t.id===e}))return e;if(t.length>0){if("group"===n.filterBy&&parseInt(n.filter,10)>0)return parseInt(n.filter,10);var r=t.find(function(e){return e.default});return r?r.id:t[0].id}return 0}},{key:"reset",value:function(){this.setState(Xu({url:"",regex:!1,match_type:Gu,action_type:zu,action_data:"",title:"",action_code:301,position:0},this.resetActionData()))}},{key:"resetActionData",value:function(){return{login:{logged_in:"",logged_out:""},target:{url:""},agent:{url_from:"",agent:"",regex:!1,url_notfrom:""},referrer:{referrer:"",regex:!1,url_from:"",url_notfrom:""},cookie:{name:"",value:"",regex:!1,url_from:"",url_notfrom:""},header:{name:"",value:"",regex:!1,url_from:"",url_notfrom:""},custom:{filter:"",url_from:"",url_notfrom:""},role:{role:"",url_from:"",url_notfrom:""},server:{server:"",url_from:"",url_notfrom:""},ip:{ip:[],url_from:"",url_notfrom:""},page:{page:"404",url:""}}}},{key:"canShowAdvanced",value:function(){var e=this.state,t=e.match_type,n=e.action_type;return t===Gu&&n===zu}},{key:"getAgentState",value:function(e){var t=e||{},n=t.agent,r=void 0===n?"":n,o=t.regex,a=void 0!==o&&o,i=t.url_from,l=void 0===i?"":i,u=t.url_notfrom;return{agent:r,regex:a,url_from:l,url_notfrom:void 0===u?"":u}}},{key:"getReferrerState",value:function(e){var t=e||{},n=t.referrer,r=void 0===n?"":n,o=t.regex,a=void 0!==o&&o,i=t.url_from,l=void 0===i?"":i,u=t.url_notfrom;return{referrer:r,regex:a,url_from:l,url_notfrom:void 0===u?"":u}}},{key:"getRoleState",value:function(e){var t=e||{},n=t.role,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{role:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getServerState",value:function(e){var t=e||{},n=t.server,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{server:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getIpState",value:function(e){var t=e||{},n=t.ip,r=void 0===n?[]:n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{ip:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getPageState",value:function(e){var t=e||{},n=t.page,r=void 0===n?"404":n,o=t.url;return{page:r,url:void 0===o?"":o}}},{key:"getHeaderState",value:function(e){var t=e||{},n=t.name,r=void 0===n?"":n,o=t.value,a=void 0===o?"":o,i=t.regex,l=void 0!==i&&i,u=t.url_from,c=void 0===u?"":u,s=t.url_notfrom;return{name:r,value:a,regex:l,url_from:c,url_notfrom:void 0===s?"":s}}},{key:"getCustomState",value:function(e){var t=e||{},n=t.filter,r=void 0===n?"":n,o=t.url_from,a=void 0===o?"":o,i=t.url_notfrom;return{filter:r,url_from:a,url_notfrom:void 0===i?"":i}}},{key:"getCode",value:function(){return this.state.action_type===Bu?S.a.createElement("select",{name:"action_code",value:this.state.action_code,onChange:this.onChange},[{value:400,name:Object(P.translate)("400 - Bad Request")},{value:401,name:Object(P.translate)("401 - Unauthorized")},{value:403,name:Object(P.translate)("403 - Forbidden")},{value:404,name:Object(P.translate)("404 - Not Found")},{value:410,name:Object(P.translate)("410 - Gone")},{value:418,name:Object(P.translate)("418 - I'm a teapot")}].map(function(e){return S.a.createElement("option",{key:e.value,value:e.value},e.name)})):this.state.action_type===zu||"random"===this.state.action_type?S.a.createElement("select",{name:"action_code",value:this.state.action_code,onChange:this.onChange},[{value:301,name:Object(P.translate)("301 - Moved Permanently")},{value:302,name:Object(P.translate)("302 - Found")},{value:303,name:Object(P.translate)("303 - See Other")},{value:304,name:Object(P.translate)("304 - Not Modified")},{value:307,name:Object(P.translate)("307 - Temporary Redirect")},{value:308,name:Object(P.translate)("308 - Permanent Redirect")}].map(function(e){return S.a.createElement("option",{key:e.value,value:e.value},e.name)})):null}},{key:"getMatchExtra",value:function(){var e=this.state,t=e.match_type,n=e.agent,r=e.referrer,o=e.cookie,a=e.header,i=e.custom,l=e.role,u=e.server,c=e.ip,s=e.page;switch(t){case"agent":return S.a.createElement(ml,{agent:n.agent,regex:n.regex,onChange:this.onSetData,onCustomAgent:this.onCustomAgent});case"referrer":return S.a.createElement(wl,{referrer:r.referrer,regex:r.regex,onChange:this.onSetData});case"cookie":return S.a.createElement(Bl,{name:o.name,value:o.value,regex:o.regex,onChange:this.onSetData});case"header":return S.a.createElement(Cl,{name:a.name,value:a.value,regex:a.regex,onChange:this.onSetData});case"custom":return S.a.createElement(Al,{filter:i.filter,onChange:this.onSetData});case"role":return S.a.createElement(ql,{role:l.role,onChange:this.onSetData});case"server":return S.a.createElement(Zl,{server:u.server,onChange:this.onSetData});case $u:return S.a.createElement(au,{ip:c.ip,onChange:this.onSetData});case"page":return S.a.createElement(pu,{page:s.page,onChange:this.onSetData})}return null}},{key:"getTarget",value:function(){var e=this.state,t=e.match_type,n=e.action_type,r=e.agent,o=e.referrer,a=e.login,i=e.cookie,l=e.target,u=e.header,c=e.custom,s=e.role,p=e.server,f=e.ip,d=e.page;if(!Vu(n))return null;switch(t){case"agent":return S.a.createElement(xu,{url_from:r.url_from,url_notfrom:r.url_notfrom,target:"agent",onChange:this.onSetData});case"referrer":return S.a.createElement(xu,{url_from:o.url_from,url_notfrom:o.url_notfrom,target:"referrer",onChange:this.onSetData});case Hu:return S.a.createElement(bu,{logged_in:a.logged_in,logged_out:a.logged_out,onChange:this.onSetData});case Gu:return S.a.createElement(gu,{url:l.url,target:"target",onChange:this.onSetData});case"cookie":return S.a.createElement(xu,{url_from:i.url_from,url_notfrom:i.url_notfrom,target:"cookie",onChange:this.onSetData});case"header":return S.a.createElement(xu,{url_from:u.url_from,url_notfrom:u.url_notfrom,target:"header",onChange:this.onSetData});case"custom":return S.a.createElement(xu,{url_from:c.url_from,url_notfrom:c.url_notfrom,target:"custom",onChange:this.onSetData});case"role":return S.a.createElement(xu,{url_from:s.url_from,url_notfrom:s.url_notfrom,target:"role",onChange:this.onSetData});case"server":return S.a.createElement(xu,{url_from:p.url_from,url_notfrom:p.url_notfrom,target:"server",onChange:this.onSetData});case $u:return S.a.createElement(xu,{url_from:f.url_from,url_notfrom:f.url_notfrom,target:"ip",onChange:this.onSetData});case"page":return S.a.createElement(gu,{url:d.url,target:"page",onChange:this.onSetData})}return null}},{key:"getTitle",value:function(){var e=this.state.title;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Title")),S.a.createElement("td",null,S.a.createElement("input",{type:"text",name:"title",value:e,onChange:this.onChange,placeholder:Object(P.translate)("Describe the purpose of this redirect (optional)")})))}},{key:"getMatch",value:function(){var e=this.state.match_type;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Match")),S.a.createElement("td",null,S.a.createElement("select",{name:"match_type",value:e,onChange:this.onChange},[{value:Gu,name:Object(P.translate)("URL only")},{value:Hu,name:Object(P.translate)("URL and login status")},{value:"role",name:Object(P.translate)("URL and role/capability")},{value:"referrer",name:Object(P.translate)("URL and referrer")},{value:"agent",name:Object(P.translate)("URL and user agent")},{value:"cookie",name:Object(P.translate)("URL and cookie")},{value:$u,name:Object(P.translate)("URL and IP")},{value:"server",name:Object(P.translate)("URL and server")},{value:"header",name:Object(P.translate)("URL and HTTP header")},{value:"custom",name:Object(P.translate)("URL and custom filter")},{value:"page",name:Object(P.translate)("URL and WordPress page type")}].map(function(e){return S.a.createElement("option",{value:e.value,key:e.value},e.name)}))))}},{key:"getTargetCode",value:function(){var e=this.state,t=e.action_type,n=e.match_type,r=this.getCode();return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("When matched")),S.a.createElement("td",{className:"edit-left"},S.a.createElement("select",{name:"action_type",value:t,onChange:this.onChange},[{value:zu,name:Object(P.translate)("Redirect to URL")},{value:"random",name:Object(P.translate)("Redirect to random post")},{value:"pass",name:Object(P.translate)("Pass-through")},{value:Bu,name:Object(P.translate)("Error (404)")},{value:Wu,name:Object(P.translate)("Do nothing (ignore)")}].filter(function(e){return!(n===Hu&&!Vu(e.value))}).map(function(e){return S.a.createElement("option",{value:e.value,key:e.value},e.name)})),r&&S.a.createElement(S.a.Fragment,null,S.a.createElement("strong",{className:"small-flex"},Object(P.translate)("with HTTP code"))," ",S.a.createElement("span",null,r))))}},{key:"getGroup",value:function(){var e=this.props.group.rows,t=this.state.group_id,n=parseInt(this.state.position,10),r=this.state.advanced;return S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Group")),S.a.createElement("td",{className:"edit-left"},S.a.createElement(Lr,{name:"group",value:t,items:Su(e),onChange:this.onGroup}),r&&S.a.createElement("span",{className:"edit-redirection-position"},S.a.createElement("strong",null,Object(P.translate)("Position")),S.a.createElement("input",{type:"number",value:n,name:"position",min:"0",size:"3",onChange:this.onChange}))))}},{key:"canSave",value:function(){var e=this.state,t=e.url,n=e.match_type,r=e.target,o=e.action_type,a=e.referrer,i=e.login,l=e.agent,u=e.header,c=e.cookie,s=e.role,p=e.server,f=e.ip,d=e.page;if(""===Redirectioni10n.autoGenerate&&""===t)return!1;if(Vu(o)){if(n===Gu&&""===r)return!1;if("referrer"===n&&""===a.url_from&&""===a.url_notfrom)return!1;if(n===Hu&&""===i.logged_in&&""===i.logged_out)return!1;if("agent"===n&&""===l.url_from&&""===l.url_notfrom)return!1;if("cookie"===n&&""===c.url_from&&""===c.url_notfrom)return!1;if("header"===n&&""===u.url_from&&""===u.url_notfrom)return!1;if("role"===n&&""===s.url_from&&""===s.url_notfrom)return!1;if("server"===n&&""===p.url_from&&""===p.url_notfrom)return!1;if(n===$u&&""===f.url_from&&""===f.url_notfrom)return!1;if("page"===n&&""===d.url)return!1}return!0}},{key:"renderExtra",value:function(){return S.a.createElement(S.a.Fragment,null,this.getTitle(),this.getMatch(),this.getMatchExtra(),this.getTargetCode())}},{key:"renderSingleUrl",value:function(){var e=this.state,t=e.url,n=e.regex,r=this.props.autoFocus,o=void 0!==r&&r;return S.a.createElement(S.a.Fragment,null,S.a.createElement("input",{type:"text",name:"url",value:t,onChange:this.onChange,autoFocus:o,placeholder:Object(P.translate)("The relative URL you want to redirect from")}),S.a.createElement("label",{className:"edit-redirection-regex"},Object(P.translate)("Regex")," ",S.a.createElement("sup",null,S.a.createElement("a",{tabIndex:"-1",target:"_blank",rel:"noopener noreferrer",href:"https://redirection.me/support/redirect-regular-expressions/"},"?"))," ",S.a.createElement("input",{type:"checkbox",name:"regex",checked:n,onChange:this.onChange})))}},{key:"renderMultiUrl",value:function(){var e=this.state.url;return S.a.createElement("textarea",{value:e.join("\n"),readOnly:!0})}},{key:"render",value:function(){var e=this.state,t=e.url,n=e.advanced,r=e.warning,o=this.props,a=o.saveButton,i=void 0===a?Object(P.translate)("Save"):a,l=o.onCancel,u=o.addTop,c=o.onClose;return S.a.createElement("form",{onSubmit:this.onSave,ref:this.ref},S.a.createElement("table",{className:"edit edit-redirection"},S.a.createElement("tbody",null,S.a.createElement("tr",null,S.a.createElement("th",{className:Array.isArray(t)?"top":""},Object(P.translate)("Source URL")),S.a.createElement("td",null,Array.isArray(t)?this.renderMultiUrl():this.renderSingleUrl())),n&&this.renderExtra(),this.getTarget(),this.getGroup(),this.props.children&&this.props.children,S.a.createElement("tr",null,S.a.createElement("th",null),S.a.createElement("td",{className:"edit-left"},S.a.createElement("div",{className:"table-actions"},S.a.createElement("input",{className:"button-primary",type:"submit",name:"save",value:i,disabled:!this.canSave()}),"  ",l&&S.a.createElement("input",{className:"button-secondary",type:"submit",name:"cancel",value:Object(P.translate)("Cancel"),onClick:l}),u&&!l&&S.a.createElement("input",{className:"button-secondary",type:"submit",name:"cancel",value:Object(P.translate)("Close"),onClick:c})," ",this.canShowAdvanced()&&S.a.createElement("a",{href:"#",onClick:this.onAdvanced,className:"advanced",title:Object(P.translate)("Show advanced options")},"⚙")))),r.length>0&&S.a.createElement("tr",null,S.a.createElement("th",null),S.a.createElement("td",{className:"edit-left"},S.a.createElement("div",{className:"edit-redirection_warning notice notice-warning"},r.map(function(e,t){return S.a.createElement("p",{key:t},S.a.createElement("span",{className:"dashicons dashicons-info"}),e)})))))))}}])&&Zu(n.prototype,r),o&&Zu(n,o),t}();var ac=ve(function(e){var t=e.group,n=e.redirect;return{group:t,addTop:n.addTop,table:n.table}},function(e){return{onSave:function(t,n){e(Pu(t,n))},onCreate:function(t){e(Cu(t))},onClose:function(t){t.preventDefault(),e(Uu(!1))}}})(oc);function ic(e){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lc(e,t){for(var n=0;n1&&(o.url=r),S.a.createElement(ro,{onClose:t,width:"700",height:this.state.height},S.a.createElement("div",{className:"add-new"},S.a.createElement(ac,{item:o,saveButton:Object(P.translate)("Add Redirect"),onCancel:t,childSave:this.onDelete,autoFocus:!0,callback:this.setHeight},S.a.createElement("tr",null,S.a.createElement("th",null,Object(P.translate)("Delete Log Entries")),S.a.createElement("td",{className:"edit-left",style:{padding:"7px 0px"}},S.a.createElement("label",null,S.a.createElement("input",{type:"checkbox",name:"delete_log",checked:this.state.deleteLog,onChange:this.onDeleteLog}),1===r.length?Object(P.translate)("Delete all logs for this entry"):Object(P.translate)("Delete all logs for these entries")))))))}}])&&Rc(n.prototype,r),o&&Rc(n,o),t}();Ic(Lc,"defaultProps",{transform:null});var Fc=ve(function(e){return{selected:e.error.table.selected}},function(e){return{onDelete:function(t){e(Ki(t))}}})(Lc),Uc={store:"group",saving:In,saved:Fn,failed:Ln,order:"name"},Mc={store:"group",saving:Tn,saved:Rn,failed:Nn,order:"name"},zc=function(e){return Yt(Ct.create,e,Uc)},Bc=function(e,t){return Kt(Ct.update,e,t,Uc)},Wc=function(e,t){return Vt(At.group,e,t,Uc)},Gc=function(e){return function(t,n){return Jt(Ct.list,t,Mc,e,n().group)}},Hc=function(e,t){return Gc({orderby:e,direction:t})},$c=function(e){return Gc({page:e})},Vc=function(e){return Gc({filter:e,filterBy:"",page:0,orderby:""})},qc=function(e,t){return Gc({filterBy:e,filter:t,orderby:"",page:0})},Yc=function(e){return{type:Dn,items:e.map(parseInt)}},Kc=function(e){return{type:An,onoff:e}},Qc=function(e){return Gc(e)},Jc=function(e){return"url"===e?[{name:"cb",check:!0},{name:"url",title:Object(P.translate)("Source URL"),primary:!0,sortable:!1},{name:"total",title:Object(P.translate)("Count"),sortable:!0}]:"ip"===e?[{name:"cb",check:!0},{name:"ipx",title:Object(P.translate)("IP"),primary:!0,sortable:!1},{name:"total",title:Object(P.translate)("Count"),sortable:!0}]:[{name:"cb",check:!0},{name:"date",title:Object(P.translate)("Date")},{name:"url",title:Object(P.translate)("Source URL"),primary:!0},{name:"referrer",title:Object(P.translate)("Referrer / User Agent"),sortable:!1},{name:"ip",title:Object(P.translate)("IP"),sortable:!1}]};function Xc(e){return(Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zc(e,t){for(var n=0;n0},S.a.createElement(Ha,{logType:"404"}),S.a.createElement(Ga,{onDelete:this.props.onDeleteAll,table:o}))))}}])&&Zc(n.prototype,r),o&&Zc(n,o),t}();var as=ve(function(e){return{error:e.error}},function(e){return{onLoad:function(){e(Zi())},onLoadGroups:function(){e(Gc())},onDeleteAll:function(t,n){e(Qi(t,n))},onSearch:function(t,n){e(nl(t,n))},onChangePage:function(t){e(tl(t))},onTableAction:function(t){e(Ji(t,null))},onSetAllSelected:function(t){e(il(t))},onSetOrderBy:function(t,n){e(el(t,n))},onGroup:function(t){e(ll(t))},onSetSelected:function(t){e(al(t))}}})(os),is=n(68),ls=n.n(is),us=("function"==typeof Symbol&&Symbol.iterator,"undefined"==typeof document||!document||!document.createElement||"multiple"in document.createElement("input"));function cs(e,t){return"application/x-moz-file"===e.type||ls()(e,t)}function ss(e){return!e.dataTransfer||Array.prototype.every.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e})}function ps(e){e.preventDefault()}var fs={borderStyle:"solid",backgroundColor:"#eee"},ds={borderStyle:"solid",borderColor:"#6c6",backgroundColor:"#eee"},hs={borderStyle:"solid",borderColor:"#c66",backgroundColor:"#eee"},ms={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5},ys={opacity:.5},bs=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Es=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.renderChildren=function(e,t,n,o){return"function"==typeof e?e(bs({},r.state,{isDragActive:t,isDragAccept:n,isDragReject:o,open:r.open})):e},r.composeHandlers=r.composeHandlers.bind(r),r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.onInputElementClick=r.onInputElementClick.bind(r),r.open=r.open.bind(r),r.setRef=r.setRef.bind(r),r.setRefs=r.setRefs.bind(r),r.isFileDialogActive=!1,r.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,S.a.Component),gs(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",ps,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),null!=this.fileInputEl&&this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",ps),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){e.persist(),this.props.onDragStart&&ss(e)&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),e.persist(),ss(e)&&(Promise.resolve(this.props.getDataTransferItems(e)).then(function(n){e.isPropagationStopped()||t.setState({draggedFiles:n,isDragActive:!0})}),this.props.onDragEnter&&this.props.onDragEnter.call(this,e))}},{key:"onDragOver",value:function(e){e.preventDefault(),e.persist();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&ss(e)&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),e.persist(),this.dragTargets=this.dragTargets.filter(function(n){return n!==e.target&&t.node.contains(n)}),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&ss(e)&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,o=n.onDropAccepted,a=n.onDropRejected,i=n.multiple,l=n.accept,u=n.getDataTransferItems;e.preventDefault(),e.persist(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),ss(e)&&Promise.resolve(u(e)).then(function(n){var u=[],c=[];e.isPropagationStopped()||(n.forEach(function(e){cs(e,l)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?u.push(e):c.push(e)}),!i&&u.length>1&&c.push.apply(c,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&a&&a.call(t,c,e),u.length>0&&o&&o.call(t,u,e)}))})}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick,r=t.disableClick;n&&n.call(this,e),r||e.isDefaultPrevented()||(e.stopPropagation(),!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?this.open():setTimeout(this.open,0))}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick(e)}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout(function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1,"function"==typeof t&&t()))},300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,r=e.activeClassName,o=e.children,a=e.disabled,i=e.disabledClassName,l=e.inputProps,u=e.multiple,c=e.name,s=e.rejectClassName,p=vs(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),f=p.acceptStyle,d=p.activeStyle,h=p.className,m=void 0===h?"":h,y=p.disabledStyle,b=p.rejectStyle,g=p.style,v=vs(p,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),E=this.state,w=E.isDragActive,O=E.draggedFiles,_=O.length,x=u||_<=1,k=_>0&&function(e,t){return e.every(function(e){return cs(e,t)})}(O,this.props.accept),j=_>0&&(!k||!x),C=!(m||g||d||f||b||y);w&&r&&(m+=" "+r),k&&n&&(m+=" "+n),j&&s&&(m+=" "+s),a&&i&&(m+=" "+i),C&&(g=ms,d=fs,f=ds,b=hs,y=ys);var P=bs({position:"relative"},g);d&&w&&(P=bs({},P,d)),f&&k&&(P=bs({},P,f)),b&&j&&(P=bs({},P,b)),y&&a&&(P=bs({},P,y));var T={accept:t,disabled:a,type:"file",style:bs({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},l.style),multiple:us&&u,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};c&&c.length&&(T.name=c);v.acceptedFiles,v.preventDropOnDocument,v.disableClick,v.onDropAccepted,v.onDropRejected,v.onFileDialogCancel,v.maxSize,v.minSize,v.getDataTransferItems;var R=vs(v,["acceptedFiles","preventDropOnDocument","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return S.a.createElement("div",bs({className:m,style:P},R,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":a}),this.renderChildren(o,w,k,j),S.a.createElement("input",bs({},l,T)))}}]),t}(),ws=Es;Es.propTypes={accept:D.a.oneOfType([D.a.string,D.a.arrayOf(D.a.string)]),children:D.a.oneOfType([D.a.node,D.a.func]),disableClick:D.a.bool,disabled:D.a.bool,preventDropOnDocument:D.a.bool,inputProps:D.a.object,multiple:D.a.bool,name:D.a.string,maxSize:D.a.number,minSize:D.a.number,className:D.a.string,activeClassName:D.a.string,acceptClassName:D.a.string,rejectClassName:D.a.string,disabledClassName:D.a.string,style:D.a.object,activeStyle:D.a.object,acceptStyle:D.a.object,rejectStyle:D.a.object,disabledStyle:D.a.object,getDataTransferItems:D.a.func,onClick:D.a.func,onDrop:D.a.func,onDropAccepted:D.a.func,onDropRejected:D.a.func,onDragStart:D.a.func,onDragEnter:D.a.func,onDragOver:D.a.func,onDragLeave:D.a.func,onFileDialogCancel:D.a.func},Es.defaultProps={preventDropOnDocument:!0,disabled:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}};var Os=function(e,t){return function(n){return Bt(Nt.file(e,t)).then(function(e){n({type:En,data:e.data})}).catch(function(e){n({type:xn,error:e})}),n({type:wn})}},_s=function(e){return document.location.href=e,{type:"NOTHING"}},xs=function(e,t){return function(n){return Bt(Rt.upload(t,e)).then(function(e){n({type:_n,total:e.imported})}).catch(function(e){n({type:xn,error:e})}),n({type:On,file:e})}},Ss=function(){return{type:Sn}},ks=function(e){return{type:kn,file:e}},js=function(){return function(e){Bt(Rt.pluginList()).then(function(t){e({type:jn,importers:t.importers})}).catch(function(t){e({type:xn,error:t})})}},Cs=function(e){return function(t){return Bt(Rt.pluginImport(e)).then(function(e){t({type:_n,total:e.imported})}).catch(function(e){t({type:xn,error:e})}),t({type:On})}},Ps=function(e,t){return Redirectioni10n.pluginRoot+"&sub=io&export="+e+"&exporter="+t+"&_wpnonce="+Redirectioni10n.WP_API_nonce},Ts=function(e){var t=e.plugin,n=e.doImport,r=t.name,o=t.total;return S.a.createElement("div",{className:"plugin-importer"},S.a.createElement("p",null,S.a.createElement("strong",null,r)," (",Object(P.translate)("total = ")+o," )"),S.a.createElement("button",{onClick:function(){n(t)},className:"button-secondary"},Object(P.translate)("Import from %s",{args:r})))};n(117);function Rs(e){return(Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ns(e,t){for(var n=0;n0&&t!==ze&&this.props.onAddFile(e[0]),this.setState({hover:!1,group:this.props.group.rows[0].id})}},{key:"onOpen",value:function(){this.dropzone.open()}},{key:"renderGroupSelect",value:function(){var e=this.props.group.rows;return S.a.createElement("div",{className:"groups"},Object(P.translate)("Import to group")," ",S.a.createElement(Lr,{items:Su(e),name:"group",value:this.state.group,onChange:this.handleInput}))}},{key:"renderInitialDrop",value:function(){return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Import a CSV, .htaccess, or JSON file.")),S.a.createElement("p",null,Object(P.translate)("Click 'Add File' or drag and drop here.")),S.a.createElement("button",{type:"button",className:"button-secondary",onClick:this.handleOpen},Object(P.translate)("Add File")))}},{key:"renderDropBeforeUpload",value:function(){var e=this.props.io.file,t="application/json"===e.type;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("File selected")),S.a.createElement("p",null,S.a.createElement("code",null,e.name)),!t&&this.renderGroupSelect(),S.a.createElement("button",{className:"button-primary",onClick:this.handleImport},Object(P.translate)("Upload")),"  ",S.a.createElement("button",{className:"button-secondary",onClick:this.handleCancel},Object(P.translate)("Cancel")))}},{key:"renderUploading",value:function(){var e=this.props.io.file;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Importing")),S.a.createElement("p",null,S.a.createElement("code",null,e.name)),S.a.createElement("div",{className:"is-placeholder"},S.a.createElement("div",{className:"placeholder-loading"})))}},{key:"renderUploaded",value:function(){var e=this.props.io.lastImport;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Finished importing")),S.a.createElement("p",null,Object(P.translate)("Total redirects imported:")," ",e),0===e&&S.a.createElement("p",null,Object(P.translate)("Double-check the file is the correct format!")),S.a.createElement("button",{className:"button-secondary",onClick:this.handleCancel},Object(P.translate)("OK")))}},{key:"renderDropzoneContent",value:function(){var e=this.props.io,t=e.importingStatus,n=e.lastImport,r=e.file;return t===ze?this.renderUploading():t===We&&!1!==n&&!1===r?this.renderUploaded():!1===r?this.renderInitialDrop():this.renderDropBeforeUpload()}},{key:"renderExport",value:function(e){return S.a.createElement("div",null,S.a.createElement("textarea",{className:"module-export",rows:"14",readOnly:!0,value:e}),S.a.createElement("input",{className:"button-secondary",type:"submit",value:Object(P.translate)("Close"),onClick:this.handleCancel}))}},{key:"renderExporting",value:function(){return S.a.createElement("div",{className:"loader-wrapper loader-textarea"},S.a.createElement("div",{className:"placeholder-loading"}))}},{key:"renderImporters",value:function(e){var t=this;return S.a.createElement("div",null,S.a.createElement("h3",null,Object(P.translate)("Plugin Importers")),S.a.createElement("p",null,Object(P.translate)("The following redirect plugins were detected on your site and can be imported from.")),e.map(function(e,n){return S.a.createElement(Ts,{plugin:e,key:n,doImport:t.doImport})}))}},{key:"render",value:function(){var e=this.state.hover,t=this.props.io,n=t.importingStatus,r=t.file,o=t.exportData,a=t.exportStatus,i=t.importers,l=Kr()({dropzone:!0,"dropzone-dropped":!1!==r,"dropzone-importing":n===ze,"dropzone-hover":e});return S.a.createElement("div",{className:"import"},S.a.createElement("h2",null,Object(P.translate)("Import")),S.a.createElement(ws,{ref:this.setDropzone,onDrop:this.handleDrop,onDragLeave:this.handleLeave,onDragEnter:this.handleEnter,className:l,disableClick:!0,multiple:!1},this.renderDropzoneContent()),S.a.createElement("p",null,Object(P.translate)("All imports will be appended to the current database.")),S.a.createElement("div",{className:"inline-notice notice-warning"},S.a.createElement("p",null,Object(P.translate)("{{strong}}CSV file format{{/strong}}: {{code}}source URL, target URL{{/code}} - and can be optionally followed with {{code}}regex, http code{{/code}} ({{code}}regex{{/code}} - 0 for no, 1 for yes).",{components:{code:S.a.createElement("code",null),strong:S.a.createElement("strong",null)}}))),S.a.createElement("h2",null,Object(P.translate)("Export")),S.a.createElement("p",null,Object(P.translate)("Export to CSV, Apache .htaccess, Nginx, or Redirection JSON (which contains all redirects and groups).")),S.a.createElement("select",{name:"module",onChange:this.handleInput,value:this.state.module},S.a.createElement("option",{value:"0"},Object(P.translate)("Everything")),S.a.createElement("option",{value:"1"},Object(P.translate)("WordPress redirects")),S.a.createElement("option",{value:"2"},Object(P.translate)("Apache redirects")),S.a.createElement("option",{value:"3"},Object(P.translate)("Nginx redirects"))),S.a.createElement("select",{name:"format",onChange:this.handleInput,value:this.state.format},S.a.createElement("option",{value:"csv"},Object(P.translate)("CSV")),S.a.createElement("option",{value:"apache"},Object(P.translate)("Apache .htaccess")),S.a.createElement("option",{value:"nginx"},Object(P.translate)("Nginx rewrite rules")),S.a.createElement("option",{value:"json"},Object(P.translate)("Redirection JSON")))," ",S.a.createElement("button",{className:"button-primary",onClick:this.handleView},Object(P.translate)("View"))," ",S.a.createElement("button",{className:"button-secondary",onClick:this.handleDownload},Object(P.translate)("Download")),a===ze&&this.renderExporting(),o&&a!==ze&&this.renderExport(o),S.a.createElement("p",null,Object(P.translate)("Log files can be exported from the log pages.")),i.length>0&&this.renderImporters(i))}}])&&Ns(n.prototype,r),o&&Ns(n,o),t}();var Us=ve(function(e){return{group:e.group,io:e.io}},function(e){return{onLoadGroups:function(){e(Gc())},onImport:function(t,n){e(xs(t,n))},onAddFile:function(t){e(ks(t))},onClearFile:function(){e(Ss())},onExport:function(t,n){e(Os(t,n))},onDownloadFile:function(t){e(_s(t))},onLoadImport:function(){e(js())},pluginImport:function(t){e(Cs(t))}}})(Fs);function Ms(e){return(Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zs(e,t){for(var n=0;n0&&window.scrollTo(0,0)}},{key:"dismiss",value:function(){this.props.onClear()}},{key:"getDebug",value:function(e){for(var t=[Redirectioni10n.versions],n=0;n1?e[e.length-1]+" ("+e.length+")":e[0]}},{key:"renderNotice",value:function(e){var t="notice notice-info redirection-notice"+(this.state.shrunk?" redirection-notice_shrunk":"");return S.a.createElement("div",{className:t,onClick:this.onClick},S.a.createElement("div",{className:"closer"},"✔"),S.a.createElement("p",null,this.state.shrunk?S.a.createElement("span",{title:Object(P.translate)("View notice")},"🔔"):this.getNotice(e)))}},{key:"render",value:function(){var e=this.props.notices;return 0===e.length?null:this.renderNotice(e)}}])&&zp(n.prototype,r),o&&zp(n,o),t}();var Vp=ve(function(e){return{notices:e.message.notices}},function(e){return{onClear:function(){e(Rp())}}})($p);n(125);function qp(e){return(qp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yp(e,t){for(var n=0;n1?Object(P.translate)("Saving...")+" ("+e+")":Object(P.translate)("Saving...")}},{key:"renderProgress",value:function(e){return S.a.createElement("div",{className:"notice notice-progress redirection-notice"},S.a.createElement(Ro,null),S.a.createElement("p",null,this.getMessage(e)))}},{key:"render",value:function(){var e=this.props.inProgress;return 0===e?null:this.renderProgress(e)}}])&&Yp(n.prototype,r),o&&Yp(n,o),t}();var Zp=ve(function(e){return{inProgress:e.message.inProgress}},null)(Xp),ef=function(e){var t=e.item,n=e.isCurrent,r=e.onClick,o=Redirectioni10n.pluginRoot+(""===t.value?"":"&sub="+t.value);return S.a.createElement("li",null,S.a.createElement("a",{className:n?"current":"",href:o,onClick:function(e){e.preventDefault(),r(t.value,o)}},t.name))},tf=(n(127),function(e){var t=e.onChangePage,n=it();return S.a.createElement("div",{className:"subsubsub-container"},S.a.createElement("ul",{className:"subsubsub"},[{name:Object(P.translate)("Redirects"),value:""},{name:Object(P.translate)("Groups"),value:"groups"},{name:Object(P.translate)("Log"),value:"log"},{name:Object(P.translate)("404s"),value:"404s"},{name:Object(P.translate)("Import/Export"),value:"io"},{name:Object(P.translate)("Options"),value:"options"},{name:Object(P.translate)("Support"),value:"support"}].map(function(e,r){return S.a.createElement(ef,{key:r,item:e,isCurrent:n===e.value||"redirect"===n&&""===e.value,onClick:t})}).reduce(function(e,t){return[e," | ",t]})))}),nf=n(21),rf=n.n(nf),of=n(32),af=n.n(of),lf=n(18),uf=n.n(lf),cf=n(19),sf=n.n(cf),pf=n(20),ff=n.n(pf),df=function(e){return function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.componentDidUpdate=function(){if(this.path){var e=this.path.style;e.transitionDuration=".3s, .3s, .3s, .06s";var t=Date.now();this.prevTimeStamp&&t-this.prevTimeStamp<100&&(e.transitionDuration="0s, 0s"),this.prevTimeStamp=Date.now()}},t.prototype.render=function(){return e.prototype.render.call(this)},t}(e)},hf={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},mf={className:D.a.string,percent:D.a.oneOfType([D.a.number,D.a.string]),prefixCls:D.a.string,strokeColor:D.a.string,strokeLinecap:D.a.oneOf(["butt","round","square"]),strokeWidth:D.a.oneOfType([D.a.number,D.a.string]),style:D.a.object,trailColor:D.a.string,trailWidth:D.a.oneOfType([D.a.number,D.a.string])},yf=function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.percent,o=t.prefixCls,a=t.strokeColor,i=t.strokeLinecap,l=t.strokeWidth,u=t.style,c=t.trailColor,s=t.trailWidth,p=af()(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth"]);delete p.gapPosition;var f={strokeDasharray:"100px, 100px",strokeDashoffset:100-r+"px",transition:"stroke-dashoffset 0.3s ease 0s, stroke 0.3s linear"},d=l/2,h="M "+("round"===i?d:0)+","+d+"\n L "+("round"===i?100-l/2:100)+","+d,m="0 0 100 "+l;return S.a.createElement("svg",rf()({className:o+"-line "+n,viewBox:m,preserveAspectRatio:"none",style:u},p),S.a.createElement("path",{className:o+"-line-trail",d:h,strokeLinecap:i,stroke:c,strokeWidth:s||l,fillOpacity:"0"}),S.a.createElement("path",{className:o+"-line-path",d:h,strokeLinecap:i,stroke:a,strokeWidth:l,fillOpacity:"0",ref:function(t){e.path=t},style:f}))},t}(x.Component);yf.propTypes=mf,yf.defaultProps=hf;var bf=df(yf),gf=function(e){function t(){return uf()(this,t),sf()(this,e.apply(this,arguments))}return ff()(t,e),t.prototype.getPathStyles=function(){var e=this.props,t=e.percent,n=e.strokeWidth,r=e.strokeColor,o=e.gapDegree,a=void 0===o?0:o,i=50-n/2,l=0,u=-i,c=0,s=-2*i;switch(e.gapPosition){case"left":l=-i,u=0,c=2*i,s=0;break;case"right":l=i,u=0,c=-2*i,s=0;break;case"bottom":u=i,s=2*i}var p="M 50,50 m "+l+","+u+"\n a "+i+","+i+" 0 1 1 "+c+","+-s+"\n a "+i+","+i+" 0 1 1 "+-c+","+s,f=2*Math.PI*i;return{pathString:p,trailPathStyle:{strokeDasharray:f-a+"px "+f+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},strokePathStyle:{stroke:r,strokeDasharray:t/100*(f-a)+"px "+f+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}},t.prototype.render=function(){var e=this,t=this.props,n=t.prefixCls,r=t.strokeWidth,o=t.trailWidth,a=(t.percent,t.trailColor),i=t.strokeLinecap,l=t.style,u=t.className,c=af()(t,["prefixCls","strokeWidth","trailWidth","percent","trailColor","strokeLinecap","style","className"]),s=this.getPathStyles(),p=s.pathString,f=s.trailPathStyle,d=s.strokePathStyle;return delete c.percent,delete c.gapDegree,delete c.gapPosition,delete c.strokeColor,S.a.createElement("svg",rf()({className:n+"-circle "+u,viewBox:"0 0 100 100",style:l},c),S.a.createElement("path",{className:n+"-circle-trail",d:p,stroke:a,strokeWidth:o||r,fillOpacity:"0",style:f}),S.a.createElement("path",{className:n+"-circle-path",d:p,strokeLinecap:i,strokeWidth:0===this.props.percent?0:r,fillOpacity:"0",ref:function(t){e.path=t},style:d}))},t}(x.Component);gf.propTypes=rf()({},mf,{gapPosition:D.a.oneOf(["top","bottom","left","right"])}),gf.defaultProps=rf()({},hf,{gapPosition:"top"});df(gf);function vf(e){return(vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ef(e,t){for(var n=0;n0}},{key:"getFirstApi",value:function(){for(var e=this.props.apiTest,t=Object.keys(e),n=0;n General page, which is usually an indication of a misconfiguration, and it can cause problems with the REST API. Please review your settings."),S.a.createElement("p",null,S.a.createElement("code",null,t.protocol+"://"+t.host)),S.a.createElement("p",null,S.a.createElement("code",null,n.protocol+"://"+n.host))),S.a.createElement("button",{className:"button wizard-retry",onClick:this.onRetry,disabled:this.apiInProgress()},Object(P.translate)("Retry")),S.a.createElement("h3",null,Object(P.translate)("Checking your REST API")),o.map(function(t){return S.a.createElement(S.a.Fragment,{key:t.value},S.a.createElement(Wf,{item:t,result:e[t.value],method:"GET"}),S.a.createElement(Wf,{item:t,result:e[t.value],method:"POST"}))}),S.a.createElement("div",{className:"wizard-buttons"},S.a.createElement("button",{className:"button-primary button",onClick:this.finishSetup},Object(P.translate)("Finish Setup")),"  ",S.a.createElement("button",{className:"button",onClick:this.prevStep},Object(P.translate)("Go back"))))}},{key:"renderStep3",value:function(){return S.a.createElement(Af,{onFinished:this.afterFinishInstall})}},{key:"getContentForStep",value:function(e){return 3===e?this.renderStep3():2===e?this.renderStep2():1===e?this.renderStep1():this.renderStep0()}},{key:"render",value:function(){var e=this.state.step,t=this.props.result,n=this.getContentForStep(e);return S.a.createElement(S.a.Fragment,null,t===Be&&S.a.createElement(Up,null),S.a.createElement("div",{className:"wizard-wrapper"},0!==e&&3!==e&&S.a.createElement("h1",null,Object(P.translate)("Redirection")),S.a.createElement("div",{className:"wizard"},n)),S.a.createElement("div",{className:"wizard-support"},S.a.createElement(Fr,{url:"https://redirection.me/contact/"},Object(P.translate)("I need some support!"))))}}])&&Lf(n.prototype,r),o&&Lf(n,o),t}();var Hf=ve(function(e){return{result:e.settings.database.result,apiTest:e.settings.apiTest}},function(e){return{onCheckApi:function(t){e(Rr(t))},onSaveSettings:function(t){e(xr(t))}}})(Gf),$f=function(e){var t=e.onShowUpgrade,n=e.showDatabase,r=e.result;return n?S.a.createElement(S.a.Fragment,null,r===Be&&S.a.createElement(Up,null),S.a.createElement("div",{className:"wizard-wrapper"},S.a.createElement("div",{className:"wizard"},S.a.createElement(Af,null)))):S.a.createElement("div",{className:"wrap redirection"},S.a.createElement("h1",{className:"wp-heading-inline"},Object(P.translate)("Update Required")),S.a.createElement("div",{className:"error"},S.a.createElement("h3",null,Object(P.translate)("Redirection database needs updating")),S.a.createElement("p",null,Object(P.translate)("Your current database is version %(current)s, the latest is %(latest)s. Please update to use new features.",{args:{current:Redirectioni10n.database.current,latest:Redirectioni10n.database.next}})),S.a.createElement("p",null,Object(P.translate)("As with any upgrade you should make a backup. You can do this by {{download}}downloading a copy{{/download}} of your Redirection data.",{components:{download:S.a.createElement(Fr,{url:Ps("all","json")})}})),S.a.createElement("p",null,S.a.createElement("input",{className:"button-primary",type:"submit",value:Object(P.translate)("Upgrade Database"),onClick:t}))))};n(170);function Vf(e){return(Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qf(e,t){for(var n=0;n0?document.location.href=t:(n.props.onClear(),history.pushState({},null,t),n.changePage(e),n.setState({page:e,clicked:n.state.clicked+1}))}),Jf(Qf(Qf(n)),"onAdd",function(e){e.preventDefault(),n.props.onAdd()}),Jf(Qf(Qf(n)),"onShowUpgrade",function(e){e.preventDefault(),n.props.onShowUpgrade()}),n.state={page:it(),clicked:0,stack:!1,error:"3.7 beta 1"!==Redirectioni10n.version,info:!1},window.addEventListener("popstate",n.onPageChanged),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kf(e,t)}(t,S.a.Component),n=t,(r=[{key:"componentDidCatch",value:function(e,t){this.setState({error:!0,stack:e,info:t})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.onPageChanged)}},{key:"changePage",value:function(e){var t=this.props,n=t.onSet404Table,r=t.onSetLogTable,o=t.onSetRedirectTable,a=t.onSetGroupTable;"404s"===e?n(Er().table):"log"===e?r(vr().table):"redirect"===e?o(Or().table):"groups"===e&&a(wr().table)}},{key:"getContent",value:function(e){var t=this.state.clicked;switch(e){case"support":return S.a.createElement(na,null);case"404s":return S.a.createElement(as,{key:t});case"log":return S.a.createElement(Ui,{key:t});case"io":return S.a.createElement(Us,null);case"groups":return S.a.createElement(ip,{key:t});case"options":return S.a.createElement(xo,null)}return S.a.createElement(Pp,{key:t})}},{key:"renderError",value:function(){var e=[Redirectioni10n.versions,"Buster: 3.7 beta 1 === "+Redirectioni10n.version,"",this.state.stack];return this.state.info&&this.state.info.componentStack&&e.push(this.state.info.componentStack),"3.7 beta 1"!==Redirectioni10n.version?S.a.createElement("div",{className:"notice notice-error"},S.a.createElement("h2",null,Object(P.translate)("Cached Redirection detected")),S.a.createElement("p",null,Object(P.translate)("Please clear your browser cache and reload this page.")),S.a.createElement("p",null,Object(P.translate)("If you are using a caching system such as Cloudflare then please read this: "),S.a.createElement(Fr,{url:"https://redirection.me/support/problems/cloudflare/?utm_source=redirection&utm_medium=plugin&utm_campaign=support"},Object(P.translate)("clearing your cache."))),S.a.createElement("p",null,S.a.createElement("textarea",{readOnly:!0,rows:e.length+3,cols:"120",value:e.join("\n"),spellCheck:!1}))):S.a.createElement("div",{className:"notice notice-error"},S.a.createElement("h2",null,Object(P.translate)("Something went wrong 🙁")),S.a.createElement("p",null,Object(P.translate)("Redirection is not working. Try clearing your browser cache and reloading this page."),"  ",Object(P.translate)("If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache.")),S.a.createElement("p",null,Object(P.translate)("If that doesn't help, open your browser's error console and create a {{link}}new issue{{/link}} with the details.",{components:{link:S.a.createElement(Fr,{url:"https://github.com/johngodley/redirection/issues"})}})),S.a.createElement("p",null,Object(P.translate)("Please mention {{code}}%s{{/code}}, and explain what you were doing at the time",{components:{code:S.a.createElement("code",null)},args:this.state.page})),S.a.createElement("p",null,S.a.createElement("textarea",{readOnly:!0,rows:e.length+8,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.page,r=this.props,o=r.databaseStatus,a=r.showDatabase,i=r.result,l={redirect:Object(P.translate)("Redirections"),groups:Object(P.translate)("Groups"),io:Object(P.translate)("Import/Export"),log:Object(P.translate)("Logs"),"404s":Object(P.translate)("404 errors"),options:Object(P.translate)("Options"),support:Object(P.translate)("Support")}[n];return t?this.renderError():"need-install"===o||"finish-install"===o?S.a.createElement(Hf,null):"need-update"===o||"finish-update"===o?S.a.createElement($f,{onShowUpgrade:this.props.onShowUpgrade,showDatabase:a,result:i}):S.a.createElement("div",{className:"wrap redirection"},S.a.createElement("h1",{className:"wp-heading-inline"},l),"redirect"===n&&S.a.createElement("a",{href:"#",onClick:this.onAdd,className:"page-title-action"},Object(P.translate)("Add New")),S.a.createElement(tf,{onChangePage:this.onChangePage}),S.a.createElement(Up,null),this.getContent(n),S.a.createElement(Zp,null),S.a.createElement(Vp,null))}}])&&qf(n.prototype,r),o&&qf(n,o),t}();var Zf,ed=ve(function(e){var t=e.message.errors,n=e.settings.showDatabase,r=e.settings.database;return{errors:t,showDatabase:n,databaseStatus:r.status,result:r.result}},function(e){return{onClear:function(){e(Tp())},onAdd:function(){e(Uu(!0))},onSet404Table:function(t){e(ul(t))},onSetLogTable:function(t){e(ii(t))},onSetGroupTable:function(t){e(Qc(t))},onSetRedirectTable:function(t){e(Mu(t))},onShowUpgrade:function(){e(Cr())}}})(Xf),td=function(){return S.a.createElement(L,{store:br({settings:gr(),log:vr(),error:Er(),io:{status:ze,file:!1,lastImport:!1,exportData:!1,importingStatus:!1,exportStatus:!1,importers:[]},group:wr(),redirect:Or(),message:{errors:[],notices:[],inProgress:0,saving:[]},info:{status:We,maps:{},agents:{},http:!1,error:""}})},S.a.createElement(ed,null))};document.querySelector("#react-ui")&&(Zf="react-ui",T.a.setLocale({"":{localeSlug:Redirectioni10n.localeSlug}}),T.a.addTranslations(Redirectioni10n.locale),function(e,t){j.a.render(S.a.createElement(C.AppContainer,null,S.a.createElement(e,null)),document.getElementById(t))}(td,Zf)),window.redirection=Redirectioni10n.version}]); \ No newline at end of file diff --git a/redirection.php b/redirection.php index c5650653..9bc0acd0 100644 --- a/redirection.php +++ b/redirection.php @@ -3,7 +3,7 @@ Plugin Name: Redirection Plugin URI: https://redirection.me/ Description: Manage all your 301 redirects and monitor 404 errors -Version: 3.7 +Version: 3.7-beta-1 Author: John Godley Author URI: https://johngodley.com Text Domain: redirection