diff --git a/readme.txt b/readme.txt index e88ce3b..e1ec685 100644 --- a/readme.txt +++ b/readme.txt @@ -83,6 +83,7 @@ Full documentation can be found on the [Search Regex](http://searchregex.com/) s = 2.0.1 - 10th May 2010 = - Comment title now takes you to comment page - Improve regex performance when data has large gaps +- Use correct contact address = 2.0 - 9th May 2020 = - Release version 2.0, a ground-up rewrite diff --git a/search-regex-version.php b/search-regex-version.php index 3b5a324..cf88097 100644 --- a/search-regex-version.php +++ b/search-regex-version.php @@ -1,5 +1,5 @@ 0?b+y:""}},function(e,t,n){"use strict";var r=n(9),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t){if(a(e)){for(var n=[],r=0;r0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,s=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(l=i.exec(a))&&f=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&l!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[])[s]=o:i[c]=o:i={0:o}}o=i}return o}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var f="string"==typeof e?function(e,t){var n,s={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=f.split(t.delimiter,p),h=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(y=a(y)?[y]:y),o.call(s,g)?s[g]=r.combine(s[g],y):s[g]=y}return s}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(f),h=0;hdiv{display:flex;align-items:center}.redirect-badge.redirect-badge__click{cursor:pointer;border:1px solid transparent}.redirect-badge.redirect-badge__click:hover{border:1px solid black}.redirect-badge span{background-color:transparent;border:none;width:15px;text-align:center;padding:0;margin-left:4px;font-size:20px;vertical-align:middle;margin-top:-5px;margin-right:-3px}.redirect-badge span:hover{color:white;background-color:#333}.redirect-badge:not(:last-child){margin-right:5px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(55);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-multioption .redirect-popover__content{padding:10px 10px;white-space:nowrap;box-sizing:border-box}.redirect-multioption .redirect-popover__content h4{margin-top:5px}.redirect-multioption .redirect-popover__content h5{margin-top:3px;margin-bottom:6px;text-transform:uppercase;color:#999}.redirect-multioption .redirect-popover__content p{margin:2px 0 0.8em !important}.redirect-multioption .redirect-popover__content p:first-child{margin-top:0}.redirect-multioption .redirect-popover__content p:last-child{margin-bottom:0 !important}.redirect-multioption .redirect-popover__content label{display:inline-block;width:100%}.button.redirect-multioption__button,.redirect-multioption__button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;box-shadow:none;height:30px;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;border-color:#7e8993;color:#32373c}.button.redirect-multioption__button svg,.redirect-multioption__button svg{margin-left:5px;margin-right:-4px;display:inline-block;fill:#888;border-left:1px solid #ddd;padding-left:5px}.button.redirect-multioption__button h5,.redirect-multioption__button h5{padding:0;margin:0;margin-right:10px;font-size:13px;font-weight:normal}.button.redirect-multioption__button .redirect-badge,.redirect-multioption__button .redirect-badge{line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions .button.redirect-multioption__button{height:28px}.actions .redirect-multioption__button .redirect-badge{margin-top:-1px}.redirect-multioption__button.redirect-multioption__button_enabled{background-color:#fff}.redirect-multioption__button.redirect-multioption__button_enabled svg{transform:rotate(180deg);border-right:1px solid #ddd;border-left:1px solid transparent;padding-right:4px;padding-left:0}.redirect-multioption__group{margin-bottom:20px}.redirect-multioption__group:last-child{margin-bottom:10px}.branch-4-9 .redirect-dropdownbutton .button,.branch-4-9 .button.redirect-multioption__button,.branch-5-0 .redirect-dropdownbutton .button,.branch-5-0 .button.redirect-multioption__button,.branch-5-1 .redirect-dropdownbutton .button,.branch-5-1 .button.redirect-multioption__button,.branch-5-2 .redirect-dropdownbutton .button,.branch-5-2 .button.redirect-multioption__button{border-color:#ddd}.branch-4-9 input[type="search"],.branch-5-0 input[type="search"],.branch-5-1 input[type="search"],.branch-5-2 input[type="search"]{height:30px}.branch-4-9 .redirect-multioption__button .redirect-badge,.branch-4-9 .redirect-multioption,.branch-4-9 .actions .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption,.branch-5-0 .actions .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption,.branch-5-1 .actions .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption,.branch-5-2 .actions .redirect-multioption__button .redirect-badge{margin-top:1px !important}.actions .redirect-popover__content{margin-top:-1px}.redirect-multioption{padding:0 10px}.redirect-multioption p{white-space:nowrap}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(57);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-replace__input{display:flex;width:100%;align-items:flex-start}.searchregex-replace__input input[type="text"]{width:100%}.searchregex-replace__input select{margin-left:10px}.searchregex-replace__input textarea{width:100%;margin-left:1px;margin-right:1px;padding:4px 8px}.redirect-popover__content .searchregex-replace__action{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-left:10px}.redirect-popover__content .searchregex-replace__action p{color:#999;margin:0}.searchregex-replace__modal{padding:13px 10px;width:450px}.searchregex-replace__modal input[type="text"]{width:75%}.searchregex-replace__modal select{width:25%}.searchregex-replace__modal p.searchregex-replace__actions{text-align:right;margin-bottom:0}.searchregex-replace__modal p.searchregex-replace__actions input{margin-left:10px}.searchregex-replace__modal textarea{width:75%}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(59);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=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%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.spinner-small .css-spinner{width:20px;height:20px;top:-15px;left:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__replaced,.searchregex-result__highlight{background-color:yellow;font-weight:bold;padding:1px;cursor:pointer}.searchregex-result__replaced{background-color:orange;display:inline}.searchregex-result__deleted{background-color:red;color:white}.searchregex-match{display:flex;align-items:flex-start;justify-content:flex-start;line-height:2}.searchregex-match .searchregex-match__column{margin-right:10px;background-color:#ddd;padding:0 5px;border-radius:3px;margin-bottom:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(63);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,"body.redirection-modal_shown{overflow:hidden}.redirection-modal_wrapper{width:100%}.redirection-modal_backdrop{width:100%;height:100%;position:fixed;top:0;left:0;z-index:10000;background-color:rgba(255,255,255,0.4)}.redirection-modal_main{position:fixed;top:0;left:0;height:100%;width:100%;z-index:10000;align-items:center;flex-grow:1;display:flex;flex-direction:row;justify-content:center}.redirection-modal_main .redirect-click-outside{min-height:100px;max-width:90%;max-height:90%;min-width:60%}.redirection-modal_main .redirection-modal_content{position:relative;background:#fff;opacity:1;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,0.2);transition:height 0.05s ease;min-height:100px;max-width:90%;max-height:90%;min-width:60%;margin:0 auto}.redirection-modal_main .redirection-modal_content h1{margin:0 !important;color:#333 !important}.redirection-modal_main .redirection-modal_close button{position:absolute;top:0;right:0;padding-top:10px;padding-right:10px;border:none;background-color:#fff;border-radius:2px;cursor:pointer;z-index:10001}.redirection-modal_wrapper.redirection-modal_wrapper-padless .redirection-modal_content{padding:20px}.redirection-modal_wrapper-padding .redirection-modal_content{padding:10px}.redirection-modal_error h2{text-align:center}.redirection-modal_loading{display:flex;height:100px}.redirection-modal_loading>*{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",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(65);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-editor{padding:5px}.searchregex-editor textarea{width:100%;min-height:150px;margin-bottom:10px}.searchregex-editor h2{margin-top:0}.searchregex-editor .searchregex-editor__actions{display:flex;justify-content:space-between}.searchregex-editor button.button-primary{margin-right:10px}.searchregex-editor .css-spinner{margin-left:-50px;height:24px;width:24px;margin-top:12px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(67);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__more{font-style:italic}.searchregex-result__updating{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-result__updating .css-spinner{width:24px;height:24px;margin-top:10px}.searchregex-result h2{margin:0;padding:0;margin-bottom:10px;font-weight:normal;font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".tablenav-pages{display:flex;justify-content:space-between;align-items:center;padding:10px}.pagination-links{display:flex;align-items:center}.pagination-links .button{margin:0 2px}.pagination-links .paging-input{margin:0 4px}.pagination-links .tablenav-paging-text{margin:0 5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(71);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__table{width:100px}.searchregex-result__row{width:50px}.searchregex-result__matches{width:70px}.searchregex-result__column{width:100px}.searchregex-result__action{width:200px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-replaceall{margin-top:50px}.searchregex-replaceall__progress{position:relative}.searchregex-replaceall__status{position:absolute;top:0;left:0;width:100%;text-align:center;font-size:18px;font-weight:bold;margin-top:20px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-loading{opacity:0.8;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-search table{table-layout:fixed;width:100%}.searchregex-search th{text-align:left;width:80px;vertical-align:top;padding-top:5px}.searchregex-search td{width:100%}.searchregex-search .inline-error{margin-top:20px}.searchregex-search__search td{display:flex;justify-content:flex-start;align-items:flex-start}.searchregex-search__search input[type="text"]{width:100%}.searchregex-search__search .redirect-popover__toggle,.searchregex-search__search select{margin-left:10px}.searchregex-search__replace,.searchregex-search__search,.searchregex-search__source{width:100%;margin-bottom:10px}.searchregex-search__replace>label,.searchregex-search__search>label,.searchregex-search__source>label{font-weight:bold;width:60px}.searchregex-search__replace .redirect-popover__toggle button,.searchregex-search__search .redirect-popover__toggle button,.searchregex-search__source .redirect-popover__toggle button{min-width:150px;margin-right:2px}.searchregex-search__replace select,.searchregex-search__search select,.searchregex-search__source select{min-width:150px;margin-right:0}.searchregex-search__source select{margin-right:10px}.searchregex-search__source td{display:flex;align-items:center}.searchregex-search__source__description{margin-left:5px}.searchregex-search__action{margin-top:10px}.searchregex-search__action input.button{margin-right:10px}.searchregex-search__action .css-spinner{width:28px;height:28px;margin-top:10px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".api-result-retry{float:right;clear:both}.api-result-log{background-color:#ddd;padding:5px 10px;color:#111;margin:10px 0;position:relative}.api-result-log .api-result-method_fail{color:white;background-color:#ff3860;padding:3px 5px;margin-right:5px}.api-result-log .api-result-method_pass{color:white;background-color:#4ab866;padding:3px 5px;width:150px;margin-right:5px}.api-result-log .dashicons{vertical-align:middle;width:26px;height:26px;font-size:26px;padding:0}.api-result-log .dashicons-no{color:#ff3860}.api-result-log .dashicons-yes{color:#4ab866}.api-result-log pre{background-color:#ccc;padding:10px 15px}.api-result-log pre{font-family:'Courier New', Courier, monospace}.api-result-log code{background-color:transparent}.api-result-log h4{margin:0;margin-top:5px;font-size:14px}.api-result-log_details{display:flex}.api-result-log_details>div{width:95%}.api-result-log_details a{color:#111}.api-result-log_details a:hover{font-weight:bold}.api-result-log_details pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.api-result-hide{position:absolute;bottom:25px;right:5%}.api-result-select{position:absolute;right:10px;top:15px}.api-result-select span{background-color:#777;color:white;padding:5px 10px;margin-left:10px}.api-result-header{display:flex;align-items:center}.api-result-header .api-result-progress{margin:0 15px}.api-result-header .css-spinner{width:18px;height:18px;top:-14px}.api-result-header .api-result-status{text-align:center;top:0;left:0;padding:5px 10px;background-color:#ddd;font-weight:bold}.api-result-header .api-result-status_good{background-color:#4ab866;color:white}.api-result-header .api-result-status_problem{background-color:#f0b849}.api-result-header .api-result-status_failed{background-color:#ff3860;color:white}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".red-error{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;border-left-color:#dc3232;margin:5px 0 15px;margin-top:2em}.red-error .closer{float:right;padding-top:5px;font-size:18px;cursor:pointer;color:#333}.red-error textarea{font-family:courier,Monaco,monospace;font-size:12px;background-color:#eee;width:100%}.red-error span code{background-color:transparent}.red-error h3{font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=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",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.subsubsub-container::before,.subsubsub-container::after{content:"";display:table}.subsubsub-container::after{clear:both}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=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:5px 12px;margin:5px 0 15px;border-left-color:#ffb900}.inline-notice.inline-general{border-left-color:#46b450}.inline-error{border-color:red}.addTop{margin-top:20px}@media screen and (max-width: 782px){.newsletter form input[type="email"]{display:block;width:100%;margin:5px 0}.import select{width:100%;margin:5px 0}.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}.redirect-edit .table-actions{margin-left:1px;margin-top:2px;display:flex;align-items:center;justify-content:flex-start}.redirect-edit .table-actions .redirection-edit_advanced{text-decoration:none;font-size:16px}.redirect-edit .table-actions .redirection-edit_advanced svg{padding-top:2px}.error{padding-bottom:10px !important}.notice{display:block !important}.database-switch{float:right}.database-switch a{color:#444;text-decoration:none}.database-switch a:hover{text-decoration:underline}\n',""]),e.exports=t},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n.n(r),a="URLSearchParams"in self,i="Symbol"in self&&"iterator"in Symbol,l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),u="FormData"in self,c="ArrayBuffer"in self;if(c)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function p(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 d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?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 g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function b(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:l&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&l&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=v(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&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l&&(this.blob=function(){var e=g(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?g(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,n,r=g(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=y(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 _(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 S(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 m(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},w.call(x.prototype),w.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];S.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})};var k=self.DOMException;try{new k}catch(e){(k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function P(e,t){return new Promise((function(n,r){var o=new x(e,t);if(o.signal&&o.signal.aborted)return r(new k("Aborted","AbortError"));var a=new XMLHttpRequest;function i(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new m,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 a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new S(o,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new k("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&l&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",i),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",i)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}P.polyfill=!0,self.fetch||(self.fetch=P,self.Headers=m,self.Request=x,self.Response=S),!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 $=n(11),V=n.n($),q=n(10),Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?T.useLayoutEffect:T.useEffect,G=[],K=[null,null];function Y(e,t){var n=e[1];return[t.payload,n+1]}function X(e,t,n){Q((function(){return e.apply(void 0,t)}),n)}function J(e,t,n,r,o,a,i){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,i())}function Z(e,t,n,r,o,a,i,l,u,c){if(e){var s=!1,f=null,p=function(){if(!s){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,f=e}n||(f=null),e===a.current?i.current||u():(a.current=e,l.current=e,i.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(s=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var ee=function(){return[null,0]};function te(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,f=n.storeKey,p=void 0===f?"store":f,d=(n.withRef,n.forwardRef),h=void 0!==d&&d,m=n.context,g=void 0===m?L:m,y=B(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),b=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),a=W({},y,{getDisplayName:o,methodName:i,renderCountProp:u,shouldHandleStateChanges:s,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=y.pure;var c=l?T.useMemo:function(e){return e()};function f(n){var r=Object(T.useMemo)((function(){var e=n.forwardedRef,t=B(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],i=r[1],l=r[2],u=Object(T.useMemo)((function(){return o&&o.Consumer&&Object(q.isContextConsumer)(j.a.createElement(o.Consumer,null))?o:b}),[o,b]),f=Object(T.useContext)(u),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(f)&&Boolean(f.store);var d=p?n.store:f.store,h=Object(T.useMemo)((function(){return function(t){return e(t.dispatch,a)}(d)}),[d]),m=Object(T.useMemo)((function(){if(!s)return K;var e=new U(d,p?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,p,f]),g=m[0],y=m[1],v=Object(T.useMemo)((function(){return p?f:W({},f,{subscription:g})}),[p,f,g]),w=Object(T.useReducer)(Y,G,ee),E=w[0][0],x=w[1];if(E&&E.error)throw E.error;var _=Object(T.useRef)(),S=Object(T.useRef)(l),O=Object(T.useRef)(),k=Object(T.useRef)(!1),P=c((function(){return O.current&&l===S.current?O.current:h(d.getState(),l)}),[d,E,l]);X(J,[S,_,k,l,P,O,y]),X(Z,[s,d,g,h,S,_,k,O,y,x],[d,g,h]);var C=Object(T.useMemo)((function(){return j.a.createElement(t,W({},P,{ref:i}))}),[i,t,P]);return Object(T.useMemo)((function(){return s?j.a.createElement(u.Provider,{value:v},C):C}),[u,C,v])}var d=l?j.a.memo(f):f;if(d.WrappedComponent=t,d.displayName=r,h){var m=j.a.forwardRef((function(e,t){return j.a.createElement(d,W({},e,{forwardedRef:t}))}));return m.displayName=r,m.WrappedComponent=t,V()(m,t)}return V()(d,t)}}function ne(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function re(e,t){if(ne(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 ge(e,t){return e===t}function ye(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?te:n,o=t.mapStateToPropsFactories,a=void 0===o?ce:o,i=t.mapDispatchToPropsFactories,l=void 0===i?ue:i,u=t.mergePropsFactories,c=void 0===u?fe:u,s=t.selectorFactory,f=void 0===s?he:s;return function(e,t,n,o){void 0===o&&(o={});var i=o,u=i.pure,s=void 0===u||u,p=i.areStatesEqual,d=void 0===p?ge:p,h=i.areOwnPropsEqual,m=void 0===h?re:h,g=i.areStatePropsEqual,y=void 0===g?re:g,b=i.areMergedPropsEqual,v=void 0===b?re:b,w=B(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=me(e,a,"mapStateToProps"),x=me(t,l,"mapDispatchToProps"),_=me(n,c,"mergeProps");return r(f,W({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:x,initMergeProps:_,pure:s,areStatesEqual:d,areOwnPropsEqual:m,areStatePropsEqual:y,areMergedPropsEqual:v},w))}}var be=ye();var ve;ve=C.unstable_batchedUpdates,F=ve;var we=n(19);function Ee(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 xe=Ee();xe.withExtraArgument=Ee;var _e=xe,Se="STATUS_IN_PROGRESS",Oe="STATUS_COMPLETE";function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t=e.perPage}(t,i,e.searchDirection)?Oe:e.status;return Ne(Ne({},e),{},{status:l,results:i,requestCount:e.requestCount+1,progress:(n=e.progress,r=t.progress,o=e.searchDirection,a=0===e.requestCount,Ne(Ne({},n),{},{current:r.current,next:"forward"===o||a?r.next:n.next,previous:"backward"===o||a?r.previous:n.previous,rows:(n.rows?n.rows:0)+r.rows})),totals:Ne(Ne({},e.totals),t.totals),canCancel:l!==Oe,showLoading:l!==Oe})}(e,t):function(e,t){return Ne(Ne({},e),{},{status:Oe,results:t.results,progress:t.progress,totals:t.totals?Ne(Ne({},e.totals),t.totals):e.totals,canCancel:!1,showLoading:!1})}(e,t)}var De=function(){return Ne(Ne({},Le()),{},{results:[],totals:[],progress:{}})},Le=function(){return{requestCount:0,searchedPhrase:"",replaceCount:0,phraseCount:0,status:Oe,replacing:[],replaceAll:!1,row:null,canCancel:!1,showLoading:!1}};function Fe(e,t){var n=t.results.rows+e.replaceCount,r=t.totals.matched_rows?t.totals.matched_rows:t.totals.rows?t.totals.rows:e.totals.rows;return!1===t.progress.next||n>=r||e.totals.matched_rows>0&&n>=e.totals.matched_rows}var Me=function(e){return e.status===Oe||null===e.status};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETTING_API_TRY":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"loading"}))});case"SETTING_API_SUCCESS":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"ok"}))});case"SETTING_API_FAILED":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"fail",error:t.error}))});case"SETTING_LOAD_START":return Pe(Pe({},e),{},{loadStatus:Se});case"SETTING_LOAD_SUCCESS":return Pe(Pe({},e),{},{loadStatus:Oe,values:t.values});case"SETTING_LOAD_FAILED":return Pe(Pe({},e),{},{loadStatus:"STATUS_FAILED",error:t.error});case"SETTING_SAVING":return Pe(Pe({},e),{},{saveStatus:Se,warning:!1});case"SETTING_SAVED":return Pe(Pe({},e),{},{saveStatus:Oe,values:t.values,warning:!!t.warning&&t.warning});case"SETTING_SAVE_FAILED":return Pe(Pe({},e),{},{saveStatus:"STATUS_FAILED",error:t.error});case"SETTING_LOAD_STATUS":return Pe(Pe({},e),{},{pluginStatus:t.pluginStatus})}return e},search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SEARCH_VALUES":return Ne(Ne({},e),{},{search:Ne(Ne({},e.search),t.searchValue),results:void 0!==t.searchValue.replacement?e.results:[],status:void 0!==t.searchValue.replacement?e.status:null});case"SEARCH_CANCEL":return t.clearAll?Ne(Ne({},e),De()):Ne(Ne({},e),Le());case"SEARCH_START_FRESH":return Ne(Ne({},e),{},{requestCount:0,status:Se,totals:0===t.page?[]:e.totals,progress:0===t.page?[]:e.progress,results:[],searchDirection:t.searchDirection,searchedPhrase:t.replacement,showLoading:!0});case"SEARCH_START_MORE":return Me(e)?e:Ne(Ne({},e),{},{canCancel:!0,showLoading:!0});case"SEARCH_COMPLETE":return Me(e)?e:Ie(e,t);case"SEARCH_REPLACE_COMPLETE":return Me(e)?e:Ne(Ne({},Ie(Ne(Ne({},e),{},{results:[]}),t)),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId}))});case"SEARCH_REPLACE_ALL":return Ne(Ne(Ne({},e),De()),{},{replaceAll:!0,status:Se,canCancel:!0});case"SEARCH_REPLACE_ALL_COMPLETE":return Me(e)?e:Ne(Ne({},e),{},{replaceCount:t.results.rows+e.replaceCount,phraseCount:t.results.phrases+e.phraseCount,requestCount:!1===t.progress.next?0:e.requestCount+1,progress:t.progress,totals:Ne(Ne({},e.totals),t.totals),status:Fe(e,t)?Oe:Se});case"SEARCH_SAVE_ROW_COMPLETE":return Ne(Ne({},e),{},{status:Oe,replacing:e.replacing.filter((function(e){return e!==t.rowId})),results:e.results.map((function(e){return e.row_id===t.result.row_id?t.result:e})),rawData:null});case"SEARCH_LOAD_ROW_COMPLETE":return Ne(Ne({},e),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe,rawData:t.row});case"SEARCH_REPLACE_ROW":return Ne(Ne({},e),{},{replacing:e.replacing.concat(t.rowId),status:Se,rawData:null});case Ce:return Ne(Ne(Ne({},e),Le()),{},{status:"STATUS_FAILED"});case"SEARCH_DELETE_COMPLETE":return Ne(Ne({},e),{},{results:e.results.filter((function(e){return e.row_id!==t.rowId})),replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe})}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 Ce:case"SETTING_LOAD_FAILED":case"SETTING_SAVE_FAILED":var n=We(e.errors,t.error);return console.error(t.error.message),Ue(Ue({},e),{},{errors:n,inProgress:$e(e)});case"SEARCH_REPLACE_ROW":case"SETTING_SAVING":return Ue(Ue({},e),{},{inProgress:e.inProgress+1});case"SEARCH_REPLACE_COMPLETE":case"SEARCH_DELETE_COMPLETE":case"SEARCH_SAVE_ROW_COMPLETE":case"SETTING_SAVED":return Ue(Ue({},e),{},{notices:Be(e.notices,Ve[t.type]),inProgress:$e(e)});case"MESSAGE_CLEAR_NOTICES":return Ue(Ue({},e),{},{notices:[]});case"MESSAGE_CLEAR_ERRORS":return Ue(Ue({},e),{},{errors:[]})}return e}}),Qe=n(8),Ge=n.n(Qe),Ke=["search","options","support"];function Ye(e,t){var n=function(e,t,n){var r=Xe(n);for(var o in e)e[o]&&t[o]!==e[o]?r[o.toLowerCase()]=e[o]:t[o]===e[o]&&delete r[o.toLowerCase()];return"?"+Qe.stringify(r)}(e,t);document.location.search!==n&&history.pushState({},null,n)}function Xe(e){return Qe.parse(e?e.slice(1):document.location.search.slice(1))}function Je(e){var t=Xe(e);return-1!==Ke.indexOf(t.sub)?t.sub:"search"}var Ze=Object(we.composeWithDevTools)({name:"Search Regex"}),et=[_e,function(){return function(e){return function(t){switch(t.type){case"SEARCH_START_FRESH":!function(e){Ye({searchPhrase:e.searchPhrase,searchFlags:e.searchFlags,source:e.source,sourceFlags:e.sourceFlags,perPage:e.perPage},{searchPhrase:"",searchFlags:[],source:[],sourceFlags:[],perPage:25,sub:"search"})}(t)}return e(t)}}}];function tt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(oe.createStore)(qe,e,Ze(oe.applyMiddleware.apply(void 0,et)));return t}function nt(){var e=SearchRegexi10n&&SearchRegexi10n.preload&&SearchRegexi10n.preload.pluginStatus?SearchRegexi10n.preload.pluginStatus:[];return{loadStatus:Se,saveStatus:!1,error:!1,pluginStatus:e,apiTest:{},database:SearchRegexi10n.database?SearchRegexi10n.database:{},values:SearchRegexi10n.settings?SearchRegexi10n.settings:{},api:SearchRegexi10n.api?SearchRegexi10n.api:[],warning:!1}}var rt=function(){return[{value:"regex",label:Object(N.translate)("Regular Expression")},{value:"case",label:Object(N.translate)("Ignore Case")}]},ot=function(){return[{value:25,label:Object(N.translate)("25 per page ")},{value:50,label:Object(N.translate)("50 per page ")},{value:100,label:Object(N.translate)("100 per page")},{value:250,label:Object(N.translate)("250 per page")},{value:500,label:Object(N.translate)("500 per page")}]};function at(e,t,n){return t.find((function(t){return t.value===e||t.name===e}))?e:n}function it(e,t){return e.filter((function(e){return at(e,t,!1)}))}function lt(e,t,n){return t[e[0]]?n.filter((function(n){return void 0!==t[e[0]][n]})):[]}function ut(e){for(var t={},n=0;n0?e.source[0]:[],t.map((function(e){return at(n,e.sources)})).filter((function(e){return e})));return{searchPhrase:r,searchFlags:ut(it(o,rt())),source:u,sourceFlags:ut(lt(u,SearchRegexi10n.preload.source_flags,a)),replacement:i,perPage:at(parseInt(l,10),ot(),25)}}function st(e){return(st="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 ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=mt()+"search-regex/v1/"+e+"/";if(t._wpnonce=gt(),t&&Object.keys(t).length>0&&(t=ht(t),Object.keys(t).length>0)){var r=n+(-1===mt().indexOf("?")?"?":"&")+Ge.a.stringify(t);return r}return n},bt=function(){return new Headers({Accept:"application/json, */*;q=0.1"})},vt=function(){return new Headers({"Content-Type":"application/json; charset=utf-8"})},wt=function(e){return{url:e,credentials:"same-origin"}},Et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return pt(pt({headers:bt()},wt(yt(e,t))),{},{method:"get"})},xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=pt(pt({headers:vt()},wt(yt(e,n))),{},{method:"post",params:t});return r.body="{}",Object.keys(t).length>0&&(r.body=JSON.stringify(t)),r},_t={get:function(){return Et("setting")},update:function(e){return xt("setting",e)}},St={get:function(e){return Et("search",e)},replace:function(e){return xt("replace",e)}},Ot={deleteRow:function(e,t){return xt("source/".concat(e,"/").concat(t,"/delete"))},loadRow:function(e,t){return Et("source/".concat(e,"/").concat(t))},saveRow:function(e,t,n){return xt("source/".concat(e,"/").concat(t),n)}},kt={checkApi:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?xt("plugin/test",{test:"ping"}):Et("plugin/test");return n.url=n.url.replace(mt(),e).replace(/[\?&]_wpnonce=[a-f0-9]*/,""),n.url+=(-1===n.url.indexOf("?")?"?":"&")+"_wpnonce="+gt(),n}},Pt=function(e){return 0===e?"Admin AJAX returned 0":e.message?e.message:(console.error(e),"Unknown error "+("object"===st(e)?Object.keys(e):e))},Tt=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"},jt=function(e){return e.action=function(e){return e.url.replace(mt(),"").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};var n;return t.status&&void 0!==t.statusText&&(e.status=t.status,e.statusText=t.statusText),t.headers.get("x-wp-nonce")&&(n=t.headers.get("x-wp-nonce"),SearchRegexi10n.api.WP_API_nonce=n),t.text()})).then((function(t){e.raw=t;try{var n=JSON.parse(t.replace(/\ufeff/,""));if(e.status&&200!==e.status)throw{message:Pt(n),code:Tt(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.code=t.code||t.name,t}}))},Ct=(n(42),function(e){var t=e.title,n=e.url,r=void 0!==n&&n;return j.a.createElement("tr",null,j.a.createElement("th",null,!r&&t,r&&j.a.createElement("a",{href:r,target:"_blank"},t)),j.a.createElement("td",null,e.children))}),Rt=function(e){return j.a.createElement("table",{className:"form-table"},j.a.createElement("tbody",null,e.children))};function Nt(e){return(Nt="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)}var At=function e(t){var n=t.value,r=t.label;return"object"===Nt(n)?j.a.createElement("optgroup",{label:r},n.map((function(t,n){return j.a.createElement(e,{label:t.label,value:t.value,key:n})}))):j.a.createElement("option",{value:n},r)},It=function(e){var t=e.items,n=e.value,r=e.name,o=e.onChange,a=e.isEnabled,i=void 0===a||a;return j.a.createElement("select",{name:r,value:n,onChange:o,disabled:!i},t.map((function(e,t){return j.a.createElement(At,{value:e.value,label:e.label,key:t})})))};function Dt(e){return(Dt="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 Lt(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 j.a.createElement("div",null,Object(N.translate)("You've supported this plugin - thank you!"),"  ",j.a.createElement("a",{href:"#",onClick:this.onDonate},Object(N.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 j.a.createElement("div",null,j.a.createElement("label",null,j.a.createElement("p",null,Object(N.translate)("Search Regex 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:j.a.createElement("strong",null)}})," ",Object(N.translate)("You get useful software and I get to carry on making it better."))),j.a.createElement("input",{type:"hidden",name:"cmd",value:"_xclick"}),j.a.createElement("input",{type:"hidden",name:"business",value:"admin@urbangiraffe.com"}),j.a.createElement("input",{type:"hidden",name:"item_name",value:"Search Regex (WordPress Plugin)"}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_promo_code",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_product_category",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_shipping_method",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_user_address_change",value:""}),j.a.createElement("input",{type:"hidden",name:"no_shipping",value:"1"}),j.a.createElement("input",{type:"hidden",name:"return",value:this.getReturnUrl()}),j.a.createElement("input",{type:"hidden",name:"no_note",value:"1"}),j.a.createElement("input",{type:"hidden",name:"currency_code",value:"USD"}),j.a.createElement("input",{type:"hidden",name:"tax",value:"0"}),j.a.createElement("input",{type:"hidden",name:"lc",value:"US"}),j.a.createElement("input",{type:"hidden",name:"bn",value:"PP-DonationsBF"}),j.a.createElement("div",{className:"donation-amount"},"$",j.a.createElement("input",{type:"number",name:"amount",min:16,value:this.state.amount,onChange:this.onInput,onBlur:this.onBlur}),j.a.createElement("span",null,this.getAmountoji(this.state.amount)),j.a.createElement("input",{type:"submit",className:"button-primary",value:Object(N.translate)("Support 💰")})))}},{key:"render",value:function(){var e=this.state.support;return j.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",className:"donation"},j.a.createElement(Rt,null,j.a.createElement(Ct,{title:Object(N.translate)("Plugin Support")+":"},e?this.renderSupported():this.renderUnsupported())))}}])&&Gt(t.prototype,n),r&&Gt(t,r),a}(j.a.Component);function tn(e){return(tn="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 nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o?a.slice(0,3).map((function(t){var o=r.find((function(e){return e.value===t}));return o&&n[t]?j.a.createElement(Tn,{key:t,onCancel:function(n){return e.removeFilter(t,n)}},o.label):null})).concat([a.length>3?j.a.createElement("span",{key:"end"},"..."):null]):null}},{key:"shouldShowTitle",value:function(){var e=this.props,t=e.selected;return!1===e.hideTitle||0===Object.keys(t).filter((function(e){return t[e]})).length}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,r=t.selected,o=t.onApply,a=t.title,i=t.isEnabled,l=t.multiple,u=t.className,c=this.getBadges();return j.a.createElement(kn,{renderToggle:function(t,n){return j.a.createElement("button",{className:gn()("button","action","redirect-multioption__button",i?null:"redirect-multioption__disabled",t?"redirect-multioption__button_enabled":null),onClick:n,disabled:!i,type:"button"},e.shouldShowTitle()&&j.a.createElement("h5",null,a),c,j.a.createElement("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false"},j.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})))},matchToggle:c&&Object.keys(r),align:"right",renderContent:function(){return j.a.createElement("div",{className:gn()("redirect-multioption",u)},n.map((function(e){return j.a.createElement(Bn,{label:e.label,value:e.value,options:e.options,multiple:e.multiple||l||!1,selected:r,key:e.label,onApply:o})})))}})}}])&&Gn(t.prototype,n),r&&Gn(t,r),a}(j.a.Component);er(tr,"defaultProps",{badges:!1,hideTitle:!1,isEnabled:!0});var nr=tr;n(56);function rr(){return(rr=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"forward";return function(r,o){var a=cr(cr({},fr(e,o().search.sources)),{},{page:t,searchDirection:n});return jt(St.get(a)).then((function(e){r(cr(cr({type:"SEARCH_COMPLETE"},e),{},{perPage:a.perPage}))})).catch((function(e){r({type:Ce,error:e})})),r(cr({type:"SEARCH_START_FRESH"},a))}},dr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(o,a){var i=a().search.search,l=cr(cr({},fr(i,a().search.sources)),{},{rowId:t,replacePhrase:e});return n&&(l.columnId=n),r&&(l.posId=r),jt(St.replace(l)).then((function(e){o(cr(cr({type:"SEARCH_REPLACE_COMPLETE"},e),{},{perPage:i.perPage,rowId:t}))})).catch((function(e){o({type:Ce,error:e})})),o({type:"SEARCH_REPLACE_ROW",rowId:t})}};var hr=function(e){return e.map((function(e){var t=e.name;return{label:e.label,value:t}}))};var mr=be((function(e){var t=e.search;return{search:t.search,sources:t.sources,sourceFlagOptions:t.sourceFlags,replaceAll:t.replaceAll}}),(function(e){return{onSetSearch:function(t){e(function(e){return{type:"SEARCH_VALUES",searchValue:e}}(t))}}}))((function(e){var t,n=e.search,r=e.onSetSearch,o=e.sources,a=e.sourceFlagOptions,i=e.replaceAll,l=n.searchPhrase,u=n.searchFlags,c=n.sourceFlags,s=n.source,f=n.perPage,p=o.map((function(e){var t=e.sources;return{label:e.label,value:hr(t)}})),d=a[s[0]]?(t=a[s[0]],Object.keys(t).map((function(e){return{value:e,label:t[e]}}))):null,h=status===Se||i,m=function(e,t){if(0===t.length)return null;for(var n=0;n0&&j.a.createElement(nr,{options:d,selected:c,onApply:function(e){return r({sourceFlags:e})},title:Object(N.translate)("Source Options"),isEnabled:!h,badges:!0,hideTitle:!0}),m&&j.a.createElement("span",{className:"searchregex-search__source__description"},m.description))),j.a.createElement("tr",null,j.a.createElement("th",null,Object(N.translate)("Results")),j.a.createElement("td",null,j.a.createElement(It,{name:"perPage",items:ot(),value:f,onChange:function(e){return r({perPage:parseInt(e.target.value,10)})},isEnabled:!h})))))}));var gr=be((function(e){return{isLoading:e.status===Se}}),(function(e){return{onDelete:function(t,n){e(function(e,t){return function(n){return jt(Ot.deleteRow(e,t)).then((function(e){n({type:"SEARCH_DELETE_COMPLETE",rowId:t})})).catch((function(e){n({type:Ce,error:e})})),n({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n))},onSave:function(t,n){e(dr(t,n))}}}))((function(e){for(var t=e.setReplacement,n=e.actions,r=e.isLoading,o=e.onSave,a=e.result,i=e.onDelete,l=e.onEditor,u=e.description,c=function(e,n){n(),t(""),o(e,a.row_id)},s=[j.a.createElement(kn,{key:"replace",renderToggle:function(e,t){return j.a.createElement("a",{href:"#",onClick:function(e){return function(e,t){e.preventDefault(),r||t()}(e,t)}},Object(N.translate)("Replace"))},onHide:function(){return t("")},hasArrow:!0,disabled:r,align:"right",renderContent:function(e){return j.a.createElement(lr,{className:"searchregex-replace__modal",canReplace:!0,setReplace:function(e){return t(e)},autoFocus:!0,onSave:function(t){return c(t,e)},onCancel:function(){return function(e){e(),t("")}(e)},placeholder:Object(N.translate)("Replacement for all matches in this row"),description:u})}})],f={edit:Object(N.translate)("Edit")},p=Object.keys(n),d=0;d