Site Reviews - Version 5.5.2

Version Description

(2021-01-29) =

  • Fixed browser support for star-ratings.js
Download this release

Release Info

Developer geminilabs
Plugin Icon 128x128 Site Reviews
Version 5.5.2
Comparing to
See all releases

Code changes from version 5.5.1 to 5.5.2

assets/scripts/site-reviews-admin.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
- !function(){var t={8:function(t){function i(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(t){return typeof t}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}t.exports=i},9367:function(t,i){var e,n,s;n=[t,i],void 0===(s="function"==typeof(e=function(t,i){"use strict";var e,n,s="function"==typeof Map?new Map:(e=[],n=[],{has:function(t){return e.indexOf(t)>-1},get:function(t){return n[e.indexOf(t)]},set:function(t,i){-1===e.indexOf(t)&&(e.push(t),n.push(i))},delete:function(t){var i=e.indexOf(t);i>-1&&(e.splice(i,1),n.splice(i,1))}}),r=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){r=function(t){var i=document.createEvent("Event");return i.initEvent(t,!0,!1),i}}function a(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!s.has(t)){var i=null,e=null,n=null,a=function(){t.clientWidth!==e&&d()},o=function(i){window.removeEventListener("resize",a,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",o,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(i).forEach((function(e){t.style[e]=i[e]})),s.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",o,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",s.set(t,{destroy:o,update:d}),c()}function c(){var e=window.getComputedStyle(t,null);"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),i="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(i)&&(i=0),d()}function u(i){var e=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=e,t.style.overflowY=i}function l(t){for(var i=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&i.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return i}function h(){if(0!==t.scrollHeight){var n=l(t),s=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+i+"px",e=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function d(){h();var i=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),s="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(s<i?"hidden"===e.overflowY&&(u("scroll"),h(),s="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(u("hidden"),h(),s="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),n!==s){n=s;var a=r("autosize:resized");try{t.dispatchEvent(a)}catch(t){}}}}function o(t){var i=s.get(t);i&&i.destroy()}function c(t){var i=s.get(t);i&&i.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(t){return t}).destroy=function(t){return t},u.update=function(t){return t}):((u=function(t,i){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return a(t,i)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],o),t},u.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t}),i.default=u,t.exports=i.default})?e.apply(i,n):e)||(t.exports=s)},5433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},8325:function(t,i,e){var n=function(t){var i=/\blang(?:uage)?-([\w-]+)\b/i,e=0,n={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(i){return i instanceof s?new s(i.type,t(i.content),i.alias):Array.isArray(i)?i.map(t):i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function t(i,e){var s,r;switch(e=e||{},n.util.type(i)){case"Object":if(r=n.util.objId(i),e[r])return e[r];for(var a in s={},e[r]=s,i)i.hasOwnProperty(a)&&(s[a]=t(i[a],e));return s;case"Array":return r=n.util.objId(i),e[r]?e[r]:(s=[],e[r]=s,i.forEach((function(i,n){s[n]=t(i,e)})),s);default:return i}},getLanguage:function(t){for(;t&&!i.test(t.className);)t=t.parentElement;return t?(t.className.match(i)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(n.stack)||[])[1];if(t){var i=document.getElementsByTagName("script");for(var e in i)if(i[e].src==t)return i[e]}return null}},isActive:function(t,i,e){for(var n="no-"+i;t;){var s=t.classList;if(s.contains(i))return!0;if(s.contains(n))return!1;t=t.parentElement}return!!e}},languages:{extend:function(t,i){var e=n.util.clone(n.languages[t]);for(var s in i)e[s]=i[s];return e},insertBefore:function(t,i,e,s){var r=(s=s||n.languages)[t],a={};for(var o in r)if(r.hasOwnProperty(o)){if(o==i)for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);e.hasOwnProperty(o)||(a[o]=r[o])}var u=s[t];return s[t]=a,n.languages.DFS(n.languages,(function(i,e){e===u&&i!=t&&(this[i]=a)})),a},DFS:function t(i,e,s,r){r=r||{};var a=n.util.objId;for(var o in i)if(i.hasOwnProperty(o)){e.call(i,o,i[o],s||o);var c=i[o],u=n.util.type(c);"Object"!==u||r[a(c)]?"Array"!==u||r[a(c)]||(r[a(c)]=!0,t(c,e,o,r)):(r[a(c)]=!0,t(c,e,null,r))}}},plugins:{},highlightAll:function(t,i){n.highlightAllUnder(document,t,i)},highlightAllUnder:function(t,i,e){var s={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),n.hooks.run("before-all-elements-highlight",s);for(var r,a=0;r=s.elements[a++];)n.highlightElement(r,!0===i,s.callback)},highlightElement:function(e,s,r){var a=n.util.getLanguage(e),o=n.languages[a];e.className=e.className.replace(i,"").replace(/\s+/g," ")+" language-"+a;var c=e.parentElement;c&&"pre"===c.nodeName.toLowerCase()&&(c.className=c.className.replace(i,"").replace(/\s+/g," ")+" language-"+a);var u={element:e,language:a,grammar:o,code:e.textContent};function l(t){u.highlightedCode=t,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,n.hooks.run("after-highlight",u),n.hooks.run("complete",u),r&&r.call(u.element)}if(n.hooks.run("before-sanity-check",u),!u.code)return n.hooks.run("complete",u),void(r&&r.call(u.element));if(n.hooks.run("before-highlight",u),u.grammar)if(s&&t.Worker){var h=new Worker(n.filename);h.onmessage=function(t){l(t.data)},h.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(n.highlight(u.code,u.grammar,u.language));else l(n.util.encode(u.code))},highlight:function(t,i,e){var r={code:t,grammar:i,language:e};return n.hooks.run("before-tokenize",r),r.tokens=n.tokenize(r.code,r.grammar),n.hooks.run("after-tokenize",r),s.stringify(n.util.encode(r.tokens),r.language)},tokenize:function(t,i){var e=i.rest;if(e){for(var n in e)i[n]=e[n];delete i.rest}var s=new o;return c(s,s.head,t),a(t,s,i,s.head,0),function(t){var i=[],e=t.head.next;for(;e!==t.tail;)i.push(e.value),e=e.next;return i}(s)},hooks:{all:{},add:function(t,i){var e=n.hooks.all;e[t]=e[t]||[],e[t].push(i)},run:function(t,i){var e=n.hooks.all[t];if(e&&e.length)for(var s,r=0;s=e[r++];)s(i)}},Token:s};function s(t,i,e,n){this.type=t,this.content=i,this.alias=e,this.length=0|(n||"").length}function r(t,i,e,n){t.lastIndex=i;var s=t.exec(e);if(s&&n&&s[1]){var r=s[1].length;s.index+=r,s[0]=s[0].slice(r)}return s}function a(t,i,e,o,l,h){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var f=e[d];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(h&&h.cause==d+","+p)return;var g=f[p],y=g.inside,v=!!g.lookbehind,m=!!g.greedy,b=g.alias;if(m&&!g.pattern.global){var w=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,w+"g")}for(var _=g.pattern||g,k=o.next,j=l;k!==i.tail&&!(h&&j>=h.reach);j+=k.value.length,k=k.next){var x=k.value;if(i.length>t.length)return;if(!(x instanceof s)){var S,Q=1;if(m){if(!(S=r(_,j,t,v)))break;var F=S.index,z=S.index+S[0].length,A=j;for(A+=k.value.length;F>=A;)A+=(k=k.next).value.length;if(j=A-=k.value.length,k.value instanceof s)continue;for(var $=k;$!==i.tail&&(A<z||"string"==typeof $.value);$=$.next)Q++,A+=$.value.length;Q--,x=t.slice(j,A),S.index-=j}else if(!(S=r(_,0,x,v)))continue;F=S.index;var P=S[0],R=x.slice(0,F),L=x.slice(F+P.length),C=j+x.length;h&&C>h.reach&&(h.reach=C);var E=k.prev;R&&(E=c(i,E,R),j+=R.length),u(i,E,Q),k=c(i,E,new s(d,y?n.tokenize(P,y):P,b,P)),L&&c(i,k,L),Q>1&&a(t,i,e,k.prev,j,{cause:d+","+p,reach:C})}}}}}function o(){var t={value:null,prev:null,next:null},i={value:null,prev:t,next:null};t.next=i,this.head=t,this.tail=i,this.length=0}function c(t,i,e){var n=i.next,s={value:e,prev:i,next:n};return i.next=s,n.prev=s,t.length++,s}function u(t,i,e){for(var n=i.next,s=0;s<e&&n!==t.tail;s++)n=n.next;i.next=n,n.prev=i,t.length-=s}if(t.Prism=n,s.stringify=function t(i,e){if("string"==typeof i)return i;if(Array.isArray(i)){var s="";return i.forEach((function(i){s+=t(i,e)})),s}var r={type:i.type,content:t(i.content,e),tag:"span",classes:["token",i.type],attributes:{},language:e},a=i.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(r.classes,a):r.classes.push(a)),n.hooks.run("wrap",r);var o="";for(var c in r.attributes)o+=" "+c+'="'+(r.attributes[c]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+o+">"+r.content+"</"+r.tag+">"},!t.document)return t.addEventListener?(n.disableWorkerMessageHandler||t.addEventListener("message",(function(i){var e=JSON.parse(i.data),s=e.language,r=e.code,a=e.immediateClose;t.postMessage(n.highlight(r,n.languages[s],s)),a&&t.close()}),!1),n):n;var l=n.util.currentScript();function h(){n.manual||n.highlightAll()}if(l&&(n.filename=l.src,l.hasAttribute("data-manual")&&(n.manual=!0)),!n.manual){var d=document.readyState;"loading"===d||"interactive"===d&&l&&l.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return n}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=n),void 0!==e.g&&(e.g.Prism=n)},5251:function(){!function(t){var i=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+i.source+")*(?=\\s*\\{)"),string:{pattern:i,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:t.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},e.tag))}(Prism)},9980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},6854:function(){!function(t){function i(t,i){return"___"+t.toUpperCase()+i+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,n,s,r){if(e.language===n){var a=e.tokenStack=[];e.code=e.code.replace(s,(function(t){if("function"==typeof r&&!r(t))return t;for(var s,o=a.length;-1!==e.code.indexOf(s=i(n,o));)++o;return a[o]=t,s})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,n){if(e.language===n&&e.tokenStack){e.grammar=t.languages[n];var s=0,r=Object.keys(e.tokenStack);!function a(o){for(var c=0;c<o.length&&!(s>=r.length);c++){var u=o[c];if("string"==typeof u||u.content&&"string"==typeof u.content){var l=r[s],h=e.tokenStack[l],d="string"==typeof u?u:u.content,f=i(n,l),p=d.indexOf(f);if(p>-1){++s;var g=d.substring(0,p),y=new t.Token(n,t.tokenize(h,e.grammar),"language-"+n,h),v=d.substring(p+f.length),m=[];g&&m.push.apply(m,a([g])),m.push(y),v&&m.push.apply(m,a([v])),"string"==typeof u?o.splice.apply(o,[c,1].concat(m)):u.content=m}}else u.content&&a(u.content)}return o}(e.tokens)}}}})}(Prism)},4335:function(){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,i){var e={};e["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[i]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};n["language-"+i]={pattern:/[\s\S]+/,inside:Prism.languages[i]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",s)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},9945:function(){!function(t){var i=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],n=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,r=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:i,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:n,operator:s,punctuation:r};var a={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:t.languages.php},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];t.languages.insertBefore("php","variable",{string:o}),t.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:i,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,number:n,operator:s,punctuation:r}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(i){if(/<\?/.test(i.code)){t.languages["markup-templating"].buildPlaceholders(i,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(i){t.languages["markup-templating"].tokenizePlaceholders(i,"php")}))}(Prism)},8759:function(){!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t="line-numbers",i=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(i,e){if("PRE"===i.tagName&&i.classList.contains(t)){var n=i.querySelector(".line-numbers-rows");if(n){var s=parseInt(i.getAttribute("data-start"),10)||1,r=s+(n.children.length-1);e<s&&(e=s),e>r&&(e=r);var a=e-s;return n.children[a]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},n=function(t){return t?window.getComputedStyle?getComputedStyle(t):t.currentStyle||null:null},s=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var n=e.element,s=n.parentNode;if(s&&/pre/i.test(s.nodeName)&&!n.querySelector(".line-numbers-rows")&&Prism.util.isActive(n,t)){n.classList.remove(t),s.classList.add(t);var a,o=e.code.match(i),c=o?o.length+1:1,u=new Array(c+1).join("<span></span>");(a=document.createElement("span")).setAttribute("aria-hidden","true"),a.className="line-numbers-rows",a.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),e.element.appendChild(a),r([s]),Prism.hooks.run("line-numbers",e)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function r(t){if(0!=(t=t.filter((function(t){var i=n(t)["white-space"];return"pre-wrap"===i||"pre-line"===i}))).length){var e=t.map((function(t){var e=t.querySelector("code"),n=t.querySelector(".line-numbers-rows");if(e&&n){var s=t.querySelector(".line-numbers-sizer"),r=e.textContent.split(i);s||((s=document.createElement("span")).className="line-numbers-sizer",e.appendChild(s)),s.innerHTML="0",s.style.display="block";var a=s.getBoundingClientRect().height;return s.innerHTML="",{element:t,lines:r,lineHeights:[],oneLinerHeight:a,sizer:s}}})).filter(Boolean);e.forEach((function(t){var i=t.sizer,e=t.lines,n=t.lineHeights,s=t.oneLinerHeight;n[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var r=i.appendChild(document.createElement("span"));r.style.display="block",r.textContent=t}else n[e]=s}))})),e.forEach((function(t){for(var i=t.sizer,e=t.lineHeights,n=0,s=0;s<e.length;s++)void 0===e[s]&&(e[s]=i.children[n++].getBoundingClientRect().height)})),e.forEach((function(t){var i=t.sizer,e=t.element.querySelector(".line-numbers-rows");i.style.display="none",i.innerHTML="",t.lineHeights.forEach((function(t,i){e.children[i].style.height=t+"px"}))}))}}}()}},i={};function e(n){if(i[n])return i[n].exports;var s=i[n]={exports:{}};return t[n].call(s.exports,s,s.exports,e),s.exports}e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,{a:i}),i},e.d=function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,i,e){return t[i]=e,t},encode:function(t){switch(jQuery('[name="'+t.name+'"]',this.form).attr("type")){case"checkbox":return"on"===t.value||t.value;default:return t.value}},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var i=0,e=t.length;i<e;i++)this.addPair(t[i]);return this.data},makeObject:function(t,i){for(var e,n=t.match(this.patterns.key);void 0!==(e=n.pop());)if(this.patterns.push.test(e)){var s=this.incrementPush(t.replace(/\[\]$/,""));i=this.build([],s,i)}else this.patterns.fixed.test(e)?i=this.build([],e,i):this.patterns.named.test(e)&&(i=this.build({},e,i));return i}};var i=t,n=function(t,i,e){this.event=i||null,this.form=e||null,this.notice=null,this.request=t||{}};n.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var e={action:GLSR.action,_ajax_request:!0};if(this.form){var n=new i(this.form);n[GLSR.nameprefix]&&(this.request=n[GLSR.nameprefix])}return this.l(t),e[GLSR.nameprefix]=this.request,e},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,i){jQuery.post(GLSR.ajaxurl,this.u(i)).done((function(e){"function"==typeof t&&t(e.data,e.success),i&&i.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var i=jQuery(this.event.currentTarget);i.is(":disabled")||(i.prop("disabled",!0),this.i(t,i))}};var s=n,r=e(9367),a=e.n(r),o=e(8),c=e.n(o),u=function(){"object"===c()(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){jQuery(this).wpColorPicker(jQuery(this).data("colorpicker")||{})}))},l=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.h())};l.prototype={p:function(t){var i=t.getAttribute("data-depends");if(i)try{return JSON.parse(i)}catch(t){return}},h:function(){for(var t=this.el.elements,i=0;i<t.length;i++)~["INPUT","SELECT"].indexOf(t[i].nodeName)&&t[i].addEventListener("change",this.v.bind(this))},m:function(t,i){var e=!1;i=[].concat(i);var n=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(n,function(t){var n=~this._(i).indexOf(this.k(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&n&&(e=!0):n&&(e=!0)}.bind(this)),e},k:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},_:function(t){return t.map(this.k)},v:function(t){this.depends.forEach(function(i){var e=this.p(i);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var n=!0;e.forEach(function(t){this.m(t.name,t.value)||(n=!1)}.bind(this)),this.j(i,n)}}.bind(this))},j:function(t,i){var e=t.closest(".glsr-setting-field");e&&e.classList[i?"remove":"add"]("hidden")}};var h=l,d=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.S.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.F.bind(this))};d.prototype={F:function(t){var i=jQuery(t.currentTarget);this.A(i.parent().find("img"),i.val())},S:function(t){var i=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(i)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.A(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!i),GLSR.stars.rebuild()},A:function(t,i){if(t){var e=new Image;e.src=i,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var f=d,p=function(){this.h()};p.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},h:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.$.bind(this))},$:function(t){var i={};i[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,i)}};var g=p,y=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.P.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.R.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.L.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.C.bind(this))};y.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},P:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},R:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},L:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var i={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(i).post(this.T.bind(this))},C:function(t){t.preventDefault(),this.target=t.currentTarget;var i={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id")};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(i).post(this.O.bind(this))},T:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},O:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var v=y,m=function(){jQuery.each(GLSR.pointers,function(t,i){this.h(i)}.bind(this))};m.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},h:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.D.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var b=m,w=e(8325),k=e.n(w),j=(e(5433),e(4335),e(9980),e(6854),e(9945),e(5251),e(8759),function(t,i){this.el=jQuery(t),this.options=i,this.searchTerm=null,this.h()});j.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},h:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.I())},I:function(){this.options.searchEl.on("input",_.debounce(this.q.bind(this),500)),this.options.searchEl.on("keyup",this.M.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.N.bind(this)),jQuery(document).on("keydown",this.Z.bind(this))},W:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},H:function(){this.W(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},V:function(t){var i=this.options.entriesEl.children("tr").eq(t),e=this;i.find("td").css({backgroundColor:"#faafaa"}),i.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.B(),e.K()}))},U:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},X:function(){this.options.entriesEl.on("click","a.delete",this.Y.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,i){i.placeholder.height(i.helper[0].scrollHeight)},sort:function(t,i){var e=t.pageY-jQuery(this).offsetParent().offset().top-i.helper.outerHeight(!0)/2;i.helper.css({top:e+"px"})}})},tt:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},N:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.H()},Z:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.H(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var i=this.options.resultsEl.find("."+this.options.selectedClass);i&&i.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.tt(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.tt(1))}},Y:function(t){t.preventDefault(),this.V(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.H()},q:function(t){if(this.W(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.U(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.it();this.el.addClass("is-active");var i={};i[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,i).done(function(t){this.el.removeClass("is-active"),this.U(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},M:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.q(t),t.preventDefault())},et:function(t){t.preventDefault();var i=jQuery(t.currentTarget).closest(".glsr-multibox-entry");i.find("a").css({color:"#c00"}),i.fadeOut("fast",(function(){i.remove()}))},B:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(i){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),n=e.attr("name").replace(/\[\d+\]/i,"["+i+"]");e.attr("name",n),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.H(),this.options.results={},this.options.searchEl.val("")},K:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var x=j,S=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.h()};S.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},h:function(){var t=this;[].forEach.call(t.tabs,function(i,e){i.addEventListener("click",t.$.bind(t)),i.addEventListener("touchend",t.$.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var i=jQuery(this).data("expand");localStorage.setItem("glsr-expand",i),t.nt(jQuery(i))})),jQuery(window).on("load",(function(){t.nt(jQuery(localStorage.getItem("glsr-expand")))}))},$:function(t){t.preventDefault(),this.st(t.currentTarget)},nt:function(t){if(t.length){var i=t.parent().parent();i.removeClass("collapsed"),this.rt(i),i.removeClass("collapsed"),t.parent().removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){t.parent()[0].scrollIntoView({behavior:"smooth",block:"center"}),localStorage.removeItem("glsr-expand")}),10)}},rt:function(t){var i=t.hasClass("collapsed")?"remove":"add";t[i+"Class"]("collapsed").find(".glsr-card.postbox")[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i)},st:function(t){if(t.classList.contains("nav-tab-active")){var i=jQuery(t.getAttribute("href"));this.rt(i)}}};var Q=S,F=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var i={_action:"mce-shortcode",shortcode:this.current};new s(i).post(this.at.bind(this))}};var i=document.querySelectorAll(t);i.length&&i.forEach(function(t){var i=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");i&&e.length&&this.h(t,i,e)}.bind(this))};F.prototype={ot:{},ct:[],h:function(t,i,e){document.addEventListener("click",this.ut.bind(this,t,i)),i.addEventListener("click",this.lt.bind(this,t,i)),e.forEach(function(e){e.addEventListener("click",this.ht.bind(this,t,i))}.bind(this))},dt:function(){tinymce.execCommand("GLSR_Shortcode")},ft:function(){jQuery("#scTemp").length?this.dt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.dt()}.bind(this),200))},D:function(t,i){jQuery(i).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},gt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.ot={},this.ct=[]},at:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.gt();var i=this.yt(t);t.ok.constructor===Array&&(i.buttons[0].text=t.ok[0],i.buttons[0].onclick="close",delete i.buttons[1]),this.editor.windowManager.open(i)}},vt:function(t){for(var i in this.ot=t,this.ct=[],t)t.hasOwnProperty(i)&&(this.bt(i),this.wt(i),this._t(i));this.ot.hide=this.ct.join(",")},bt:function(t){"display"!==t||jQuery.isNumeric(this.ot[t])||(this.ot[t]="")},wt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var i=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(i)&&(this.ot[t]&&this.ct.push(i),delete this.ot[t])}},_t:function(t){"id"===t&&(this.ot[t]=(+new Date).toString(36))},ut:function(t,i,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,i)},lt:function(t,i,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,i):this.kt(t,i)},ht:function(t,i,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.dt():this.ft(),setTimeout(function(){this.D(t,i)}.bind(this),100))},kt:function(t,i){jQuery(i).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},jt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.xt.bind(this),text:t.ok},{onclick:"close",text:t.close}]},yt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.jt(t),onsubmit:this.St.bind(this,t),onclose:this.gt.bind(this)}},St:function(t,i){var e="";for(var n in this.vt(i.data),this.ot)this.ot.hasOwnProperty(n)&&""!==this.ot[n]&&(e+=" "+n+'="'+this.ot[n]+'"');window.send_to_editor("["+t.shortcode+e+"]")},xt:function(){var t=this.editor.windowManager.getWindows()[0];this.Qt(t)&&t.submit()},Qt:function(t){var i,e=!0,n=GLSR.shortcodes[this.current];for(var s in n)if(n.hasOwnProperty(s)&&void 0!==(i=t.find("#"+s)[0])&&""===i.state.data.value){e=!1,alert(n[s]);break}return e}};var z=F;const A={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,stars:null,tooltip:"Select a Rating"},$=(t,i,e)=>{t.classList[i?"add":"remove"](e)},P=t=>{const i=document.createElement("span");t=t||{};for(let e in t)i.setAttribute(e,t[e]);return i},R=(t,i,e)=>{const n=P(e);return t.parentNode.insertBefore(n,i?t.nextSibling:t),n},L=(...t)=>{const i={};return t.forEach((e=>{Object.keys(e||{}).forEach((n=>{if(void 0===t[0][n])return;const s=e[n];"Object"!==C(s)||"Object"!==C(i[n])?i[n]=s:i[n]=L(i[n],s)}))})),i},C=t=>({}.toString.call(t).slice(8,-1));var E="undefined"!=typeof window?window:{screen:{},navigator:{}},G=E.matchMedia||function(){return{matches:!1}},T=!1,O={get passive(){return T=!0}},D=function(){};E.addEventListener&&E.addEventListener("p",D,O),E.removeEventListener&&E.removeEventListener("p",D,!1);var I=T,q="ontouchstart"in E,M=q||"TouchEvent"in E&&G("(any-pointer: coarse)").matches,N=(E.navigator.maxTouchPoints,E.navigator.userAgent||""),Z=G("(pointer: coarse)").matches&&/iPad|Macintosh/.test(N)&&Math.min(E.screen.width||0,E.screen.height||0)>=768;G("(pointer: coarse)").matches||G("(pointer: fine)").matches,G("(any-pointer: fine)").matches||G("(any-hover: hover)").matches;class W{constructor(t,i){var e,n,s;this.direction=window.getComputedStyle(t,null).getPropertyValue("direction"),this.el=t,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=(t=>{const i=[];return[].forEach.call(t.options,(t=>{const e=parseInt(t.value,10)||0;e>0&&i.push({index:t.index,text:t.text,value:e})})),i.sort(((t,i)=>t.value-i.value))})(t),this.widgetEl=null,e=this.values.length,n=1,s=this.props.maxStars,/^\d+$/.test(e)&&n<=e&&e<=s?this.build():this.destroy()}build(){this.destroy(),this.buildWidget(),this.changeIndexTo(this.indexSelected=this.selected(),!0),this.handleEvents("add")}buildWidget(){const t=R(this.el,!1,{class:this.props.classNames.base});t.appendChild(this.el),t.classList.add(this.props.classNames.base+"--"+this.direction);const i=R(this.el,!0,{class:this.props.classNames.base+"--stars"});this.values.forEach(((t,e)=>{const n=P({"data-index":e,"data-value":t.value});"function"==typeof this.props.stars&&this.props.stars.call(this,n,t,e),[].forEach.call(n.children,(t=>t.style.pointerEvents="none")),i.innerHTML+=n.outerHTML})),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}changeIndexTo(t,i){if(this.indexActive!==t||i){if(this.widgetEl.childNodes.forEach(((i,e)=>{$(i,e<=t,this.props.classNames.active),$(i,e===this.indexSelected,this.props.classNames.selected)})),"function"!=typeof this.props.stars&&(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){const i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}destroy(){this.indexActive=null,this.indexSelected=this.selected();const t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.handleEvents("remove"),t.parentNode.replaceChild(this.el,t))}eventListener(t,i,e,n){e.forEach((e=>t[i+"EventListener"](e,this.events[e],n||!1)))}handleEvents(t){const i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!!I&&{passive:!1}))}indexFromEvent(t){const i=t.touches?.[0]||t.changedTouches?.[0]||t,e=document.elementFromPoint(i.clientX,i.clientY);return parseInt(e.dataset.index||-1,10)}onChange(){this.changeIndexTo(this.selected(),!0)}onKeyDown(t){const i=t.key.slice(5);if(!~["Left","Right"].indexOf(i))return;let e="Left"===i?-1:1;"rtl"===this.direction&&(e*=-1);const n=this.values.length-1,s=Math.min(Math.max(this.selected()+e,-1),n);this.selectValue(s)}onPointerDown(t){t.preventDefault(),this.el.focus();let i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i)}onPointerLeave(t){t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((()=>this.changeIndexTo(this.indexSelected)))}onPointerMove(t){t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((()=>this.changeIndexTo(this.indexFromEvent(t)))),this.ticking=!0)}onReset(){const t=this.el.querySelector("[selected]")?.index;this.selectValue(this.values.findIndex((i=>i.index===t)))}selected(){return this.values.findIndex((t=>t.value===+this.el.value))}selectValue(t){this.el.value=this.values[t]?.value||"",this.indexSelected=this.selected(),this.el.dispatchEvent(new Event("change"))}}var H=class{constructor(t,i){this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(t,i)}buildWidgets(t,i){this.queryElements(t).forEach((t=>{const e=L(A,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.parentNode.classList.contains(e.classNames.base)||this.widgets.push(new W(t,e))}))}destroy(){this.widgets.forEach((t=>t.destroy()))}queryElements(t){return"HTMLSelectElement"===C(t)?[t]:"NodeList"===C(t)?[].slice.call(t):"String"===C(t)?[].slice.call(document.querySelectorAll(t)):[]}rebuild(){this.widgets.forEach((t=>t.build()))}},V=function(t){var i=document.querySelectorAll(t);i.length&&i.forEach(function(t){t.addEventListener("click",this.$)}.bind(this))};V.prototype={$:function(t){var i=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==i&&null!==e){var n={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:i[1],status:e[1]};new s(n,t).post((function(i){if(i.class){var e=jQuery(t.target);e.closest("tr").removeClass("status-pending status-publish").addClass(i.class),e.closest("td.column-title").find("strong").html(i.link),i.counts&&(e.closest(".wrap").find("ul.subsubsub").html(i.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+i.pending).find(".unapproved-count").html(i.pending))}}))}}};var B=V,K=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.Ft.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};K.prototype={At:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.$t(!1)},Ft:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.$t(!0),this.Pt())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},Pt:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Rt.bind(this))},Rt:function(t){var i={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Lt.bind(this,t):this.Rt.bind(this);this.Ct(t.message),this.Et(t.percent),setTimeout((function(){new s(i).post(e)}),1500)},Lt:function(t){var i=0;try{i=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:i+1,service:this.service,stage:"reviews"};this.Ct(t.message),t.percent_synced&&t.percent_synced>=100?this.At(t):new s(e).post(this.Lt.bind(this))},Ct:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Et:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},$t:function(t){if(!0===t&&(this.Ct(this.progressbar.data("active-text")),this.Et(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.$t.bind(this))}};var U=K,J=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.referrerEl=document.querySelector("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.referrerEl&&this.tabs&&this.views&&this.h()};J.prototype={defaults:{tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},h:function(){var t=this;jQuery(window).on("hashchange",t.Gt.bind(t)),jQuery(t.options.tabSelector).on("click",t.$.bind(t)),jQuery(t.options.viewSubsubsub).on("click",t.$.bind(t)),jQuery(t.options.tabSelector).each((function(i){(location.hash?this.getAttribute("href").slice(1)===location.hash.slice(5).split("_")[0]:0===i)&&(t.Tt(this),t.Ot(t.Dt()))}))},It:function(t){return t?"add":"remove"},$:function(t){var i=t.currentTarget,e=i.getAttribute("href");e.startsWith("#")&&(location.hash=this.qt(e.slice(1)),i.blur(),t.preventDefault())},Gt:function(){for(var t=this.Dt().split("_")[0],i=0;i<this.views.length;i++)if(t===this.views[i].id){this.Tt(this.tabs[i]),this.Ot(this.Dt());break}},qt:function(t){return"tab-"+t},Dt:function(){return location.hash?location.hash.split("#tab-")[1]:""},Ot:function(t){if(t){var i=this.referrerEl.value.split("#")[0],e=this.qt(t);this.referrerEl.value=i+"#"+e}},Tt:function(t){[].forEach.call(this.tabs,function(i,e){var n=this.It(i===t);"add"===n&&(this.active.value=this.views[e].id,this.Mt(e)),i.classList[n]("nav-tab-active")}.bind(this))},Mt:function(t){[].forEach.call(this.views,function(i,e){var n=this.It(e!==t);i.classList[n]("ui-tabs-hide"),this.Nt()}.bind(this))},Nt:function(){var t=this,i=0;[].forEach.call(this.subsubsub,(function(e,n){e.classList.remove("current"),e.getAttribute("href").slice(1)===t.Dt()&&(i=n)})),this.subsubsub[i]&&this.subsubsub[i].classList.add("current"),[].forEach.call(this.sections,(function(e,n){var s=t.It(n!==i);e.classList[s]("ui-tabs-hide")}))}};var X=J,Y=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Zt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Zt(t)}.bind(this)))};Y.prototype={Zt:function(t){var i=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=i+"px"}};var tt=Y,it=function(){jQuery("form").on("click","#clear-console",this.Wt,this.$.bind(this)),jQuery("form").on("click","#fetch-console",this.Wt,this.$.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.$.bind(this));var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Ht.bind(this,t)),jQuery(document).on("keyup",this.Vt.bind(this,t)))};it.prototype={Wt:function(t,i){i&&jQuery("#log-file").val(t.console)},$:function(t){new s({},t,t.currentTarget.closest("form")).post((function(i,e){"function"==typeof t.data&&t.data(i,e),jQuery("html, body").animate({scrollTop:0},500),jQuery("#glsr-notices").on("click","a",(function(){localStorage.setItem("glsr-expand",jQuery(this).data("expand"))})),jQuery('.glsr-notice[data-notice="'+jQuery(t.currentTarget).data("remove-notice")+'"]').remove()}))},Ht:function(t,i){GLSR.keys.ALT!==i.keyCode||i.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Vt:function(t,i){GLSR.keys.ALT===i.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))}};var et=it;GLSR.autosize=a(),GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},jQuery((function(t){k().highlightAll(),GLSR.notices=new g,GLSR.shortcode=new z(".glsr-mce"),GLSR.stars=new H("select.glsr-star-rating",{tooltip:!1}),u(),new h("form.glsr-form"),new f,new v,new b,new x("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.et.bind(this))},onResultClick:function(i){var e=t(i.currentTarget),n=wp.template("glsr-assigned-posts"),s={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(n){var r=t(n(s));r.find(".glsr-remove-button").on("click",this.et.bind(this)),this.el.find(".glsr-selected-entries").append(r),this.it()}this.options.searchEl.focus()}}),new x("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.et.bind(this))},onResultClick:function(i){var e=t(i.currentTarget),n=wp.template("glsr-assigned-users"),s={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(n){var r=t(n(s));r.find(".glsr-remove-button").on("click",this.et.bind(this)),this.el.find(".glsr-selected-entries").append(r),this.it()}this.options.searchEl.focus()}}),new x("#glsr-search-translations",{action:"search-translations",onInit:function(){this.X()},onResultClick:function(i){var e=t(i.currentTarget),n=e.data("entry"),s=wp.template("glsr-string-"+(n.p1?"plural":"single"));n.index=this.options.entriesEl.children().length,n.prefix=this.options.resultsEl.data("prefix"),s&&(this.options.entriesEl.append(s(n)),this.options.exclude.push({id:n.id}),this.options.results=this.options.results.filter((function(t,i){return i!==e.get(0)}))),this.K()}}),new B("a.glsr-toggle-status"),new Q,new X,new tt,new et,new U;var i=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(i),t("select[data-glsr-track]").on("change",i),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var i=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[i+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var i=t(this).parent(),e=i.closest(".glsr-nav-view"),n=i.hasClass("closed")?"remove":"add";i[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n),n=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[n+"Class"]("collapsed")}))}))}()}();
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
+ !function(){var t={4575:function(t){t.exports=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}},3913:function(t){function i(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}t.exports=function(t,n,e){return n&&i(t.prototype,n),e&&i(t,e),t}},8:function(t){function i(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(t){return typeof t}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(n)}t.exports=i},9367:function(t,i){var n,e,s;e=[t,i],void 0===(s="function"==typeof(n=function(t,i){"use strict";var n,e,s="function"==typeof Map?new Map:(n=[],e=[],{has:function(t){return n.indexOf(t)>-1},get:function(t){return e[n.indexOf(t)]},set:function(t,i){-1===n.indexOf(t)&&(n.push(t),e.push(i))},delete:function(t){var i=n.indexOf(t);i>-1&&(n.splice(i,1),e.splice(i,1))}}),r=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){r=function(t){var i=document.createEvent("Event");return i.initEvent(t,!0,!1),i}}function a(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!s.has(t)){var i=null,n=null,e=null,a=function(){t.clientWidth!==n&&d()},o=function(i){window.removeEventListener("resize",a,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",o,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(i).forEach((function(n){t.style[n]=i[n]})),s.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",o,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",s.set(t,{destroy:o,update:d}),u()}function u(){var n=window.getComputedStyle(t,null);"vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),i="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(i)&&(i=0),d()}function c(i){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=i}function l(t){for(var i=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&i.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return i}function h(){if(0!==t.scrollHeight){var e=l(t),s=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+i+"px",n=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function d(){h();var i=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),s="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(s<i?"hidden"===n.overflowY&&(c("scroll"),h(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),h(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),e!==s){e=s;var a=r("autosize:resized");try{t.dispatchEvent(a)}catch(t){}}}}function o(t){var i=s.get(t);i&&i.destroy()}function u(t){var i=s.get(t);i&&i.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(t){return t}).destroy=function(t){return t},c.update=function(t){return t}):((c=function(t,i){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return a(t,i)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],o),t},c.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],u),t}),i.default=c,t.exports=i.default})?n.apply(i,e):n)||(t.exports=s)},5433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},8325:function(t,i,n){var e=function(t){var i=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(i){return i instanceof s?new s(i.type,t(i.content),i.alias):Array.isArray(i)?i.map(t):i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++n}),t.__id},clone:function t(i,n){var s,r;switch(n=n||{},e.util.type(i)){case"Object":if(r=e.util.objId(i),n[r])return n[r];for(var a in s={},n[r]=s,i)i.hasOwnProperty(a)&&(s[a]=t(i[a],n));return s;case"Array":return r=e.util.objId(i),n[r]?n[r]:(s=[],n[r]=s,i.forEach((function(i,e){s[e]=t(i,n)})),s);default:return i}},getLanguage:function(t){for(;t&&!i.test(t.className);)t=t.parentElement;return t?(t.className.match(i)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(e.stack)||[])[1];if(t){var i=document.getElementsByTagName("script");for(var n in i)if(i[n].src==t)return i[n]}return null}},isActive:function(t,i,n){for(var e="no-"+i;t;){var s=t.classList;if(s.contains(i))return!0;if(s.contains(e))return!1;t=t.parentElement}return!!n}},languages:{extend:function(t,i){var n=e.util.clone(e.languages[t]);for(var s in i)n[s]=i[s];return n},insertBefore:function(t,i,n,s){var r=(s=s||e.languages)[t],a={};for(var o in r)if(r.hasOwnProperty(o)){if(o==i)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(o)||(a[o]=r[o])}var c=s[t];return s[t]=a,e.languages.DFS(e.languages,(function(i,n){n===c&&i!=t&&(this[i]=a)})),a},DFS:function t(i,n,s,r){r=r||{};var a=e.util.objId;for(var o in i)if(i.hasOwnProperty(o)){n.call(i,o,i[o],s||o);var u=i[o],c=e.util.type(u);"Object"!==c||r[a(u)]?"Array"!==c||r[a(u)]||(r[a(u)]=!0,t(u,n,o,r)):(r[a(u)]=!0,t(u,n,null,r))}}},plugins:{},highlightAll:function(t,i){e.highlightAllUnder(document,t,i)},highlightAllUnder:function(t,i,n){var s={callback:n,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};e.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),e.hooks.run("before-all-elements-highlight",s);for(var r,a=0;r=s.elements[a++];)e.highlightElement(r,!0===i,s.callback)},highlightElement:function(n,s,r){var a=e.util.getLanguage(n),o=e.languages[a];n.className=n.className.replace(i,"").replace(/\s+/g," ")+" language-"+a;var u=n.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(i,"").replace(/\s+/g," ")+" language-"+a);var c={element:n,language:a,grammar:o,code:n.textContent};function l(t){c.highlightedCode=t,e.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,e.hooks.run("after-highlight",c),e.hooks.run("complete",c),r&&r.call(c.element)}if(e.hooks.run("before-sanity-check",c),!c.code)return e.hooks.run("complete",c),void(r&&r.call(c.element));if(e.hooks.run("before-highlight",c),c.grammar)if(s&&t.Worker){var h=new Worker(e.filename);h.onmessage=function(t){l(t.data)},h.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(e.highlight(c.code,c.grammar,c.language));else l(e.util.encode(c.code))},highlight:function(t,i,n){var r={code:t,grammar:i,language:n};return e.hooks.run("before-tokenize",r),r.tokens=e.tokenize(r.code,r.grammar),e.hooks.run("after-tokenize",r),s.stringify(e.util.encode(r.tokens),r.language)},tokenize:function(t,i){var n=i.rest;if(n){for(var e in n)i[e]=n[e];delete i.rest}var s=new o;return u(s,s.head,t),a(t,s,i,s.head,0),function(t){var i=[],n=t.head.next;for(;n!==t.tail;)i.push(n.value),n=n.next;return i}(s)},hooks:{all:{},add:function(t,i){var n=e.hooks.all;n[t]=n[t]||[],n[t].push(i)},run:function(t,i){var n=e.hooks.all[t];if(n&&n.length)for(var s,r=0;s=n[r++];)s(i)}},Token:s};function s(t,i,n,e){this.type=t,this.content=i,this.alias=n,this.length=0|(e||"").length}function r(t,i,n,e){t.lastIndex=i;var s=t.exec(n);if(s&&e&&s[1]){var r=s[1].length;s.index+=r,s[0]=s[0].slice(r)}return s}function a(t,i,n,o,l,h){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var f=n[d];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(h&&h.cause==d+","+p)return;var v=f[p],y=v.inside,g=!!v.lookbehind,m=!!v.greedy,b=v.alias;if(m&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var _=v.pattern||v,k=o.next,j=l;k!==i.tail&&!(h&&j>=h.reach);j+=k.value.length,k=k.next){var x=k.value;if(i.length>t.length)return;if(!(x instanceof s)){var S,Q=1;if(m){if(!(S=r(_,j,t,g)))break;var F=S.index,z=S.index+S[0].length,A=j;for(A+=k.value.length;F>=A;)A+=(k=k.next).value.length;if(j=A-=k.value.length,k.value instanceof s)continue;for(var $=k;$!==i.tail&&(A<z||"string"==typeof $.value);$=$.next)Q++,A+=$.value.length;Q--,x=t.slice(j,A),S.index-=j}else if(!(S=r(_,0,x,g)))continue;F=S.index;var P=S[0],R=x.slice(0,F),L=x.slice(F+P.length),C=j+x.length;h&&C>h.reach&&(h.reach=C);var E=k.prev;R&&(E=u(i,E,R),j+=R.length),c(i,E,Q),k=u(i,E,new s(d,y?e.tokenize(P,y):P,b,P)),L&&u(i,k,L),Q>1&&a(t,i,n,k.prev,j,{cause:d+","+p,reach:C})}}}}}function o(){var t={value:null,prev:null,next:null},i={value:null,prev:t,next:null};t.next=i,this.head=t,this.tail=i,this.length=0}function u(t,i,n){var e=i.next,s={value:n,prev:i,next:e};return i.next=s,e.prev=s,t.length++,s}function c(t,i,n){for(var e=i.next,s=0;s<n&&e!==t.tail;s++)e=e.next;i.next=e,e.prev=i,t.length-=s}if(t.Prism=e,s.stringify=function t(i,n){if("string"==typeof i)return i;if(Array.isArray(i)){var s="";return i.forEach((function(i){s+=t(i,n)})),s}var r={type:i.type,content:t(i.content,n),tag:"span",classes:["token",i.type],attributes:{},language:n},a=i.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(r.classes,a):r.classes.push(a)),e.hooks.run("wrap",r);var o="";for(var u in r.attributes)o+=" "+u+'="'+(r.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+o+">"+r.content+"</"+r.tag+">"},!t.document)return t.addEventListener?(e.disableWorkerMessageHandler||t.addEventListener("message",(function(i){var n=JSON.parse(i.data),s=n.language,r=n.code,a=n.immediateClose;t.postMessage(e.highlight(r,e.languages[s],s)),a&&t.close()}),!1),e):e;var l=e.util.currentScript();function h(){e.manual||e.highlightAll()}if(l&&(e.filename=l.src,l.hasAttribute("data-manual")&&(e.manual=!0)),!e.manual){var d=document.readyState;"loading"===d||"interactive"===d&&l&&l.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return e}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=e),void 0!==n.g&&(n.g.Prism=e)},5251:function(){!function(t){var i=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+i.source+")*(?=\\s*\\{)"),string:{pattern:i,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:t.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},n.tag))}(Prism)},9980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},6854:function(){!function(t){function i(t,i){return"___"+t.toUpperCase()+i+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,e,s,r){if(n.language===e){var a=n.tokenStack=[];n.code=n.code.replace(s,(function(t){if("function"==typeof r&&!r(t))return t;for(var s,o=a.length;-1!==n.code.indexOf(s=i(e,o));)++o;return a[o]=t,s})),n.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(n,e){if(n.language===e&&n.tokenStack){n.grammar=t.languages[e];var s=0,r=Object.keys(n.tokenStack);!function a(o){for(var u=0;u<o.length&&!(s>=r.length);u++){var c=o[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=r[s],h=n.tokenStack[l],d="string"==typeof c?c:c.content,f=i(e,l),p=d.indexOf(f);if(p>-1){++s;var v=d.substring(0,p),y=new t.Token(e,t.tokenize(h,n.grammar),"language-"+e,h),g=d.substring(p+f.length),m=[];v&&m.push.apply(m,a([v])),m.push(y),g&&m.push.apply(m,a([g])),"string"==typeof c?o.splice.apply(o,[u,1].concat(m)):c.content=m}}else c.content&&a(c.content)}return o}(n.tokens)}}}})}(Prism)},4335:function(){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,i){var n={};n["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[i]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var e={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};e["language-"+i]={pattern:/[\s\S]+/,inside:Prism.languages[i]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:e},Prism.languages.insertBefore("markup","cdata",s)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},9945:function(){!function(t){var i=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],e=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,r=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:i,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:e,operator:s,punctuation:r};var a={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:t.languages.php},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];t.languages.insertBefore("php","variable",{string:o}),t.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:i,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:e,operator:s,punctuation:r}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(i){if(/<\?/.test(i.code)){t.languages["markup-templating"].buildPlaceholders(i,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(i){t.languages["markup-templating"].tokenizePlaceholders(i,"php")}))}(Prism)},8759:function(){!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t="line-numbers",i=/\n(?!$)/g,n=Prism.plugins.lineNumbers={getLine:function(i,n){if("PRE"===i.tagName&&i.classList.contains(t)){var e=i.querySelector(".line-numbers-rows");if(e){var s=parseInt(i.getAttribute("data-start"),10)||1,r=s+(e.children.length-1);n<s&&(n=s),n>r&&(n=r);var a=n-s;return e.children[a]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},e=function(t){return t?window.getComputedStyle?getComputedStyle(t):t.currentStyle||null:null},s=void 0;window.addEventListener("resize",(function(){n.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(n){if(n.code){var e=n.element,s=e.parentNode;if(s&&/pre/i.test(s.nodeName)&&!e.querySelector(".line-numbers-rows")&&Prism.util.isActive(e,t)){e.classList.remove(t),s.classList.add(t);var a,o=n.code.match(i),u=o?o.length+1:1,c=new Array(u+1).join("<span></span>");(a=document.createElement("span")).setAttribute("aria-hidden","true"),a.className="line-numbers-rows",a.innerHTML=c,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),n.element.appendChild(a),r([s]),Prism.hooks.run("line-numbers",n)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function r(t){if(0!=(t=t.filter((function(t){var i=e(t)["white-space"];return"pre-wrap"===i||"pre-line"===i}))).length){var n=t.map((function(t){var n=t.querySelector("code"),e=t.querySelector(".line-numbers-rows");if(n&&e){var s=t.querySelector(".line-numbers-sizer"),r=n.textContent.split(i);s||((s=document.createElement("span")).className="line-numbers-sizer",n.appendChild(s)),s.innerHTML="0",s.style.display="block";var a=s.getBoundingClientRect().height;return s.innerHTML="",{element:t,lines:r,lineHeights:[],oneLinerHeight:a,sizer:s}}})).filter(Boolean);n.forEach((function(t){var i=t.sizer,n=t.lines,e=t.lineHeights,s=t.oneLinerHeight;e[n.length-1]=void 0,n.forEach((function(t,n){if(t&&t.length>1){var r=i.appendChild(document.createElement("span"));r.style.display="block",r.textContent=t}else e[n]=s}))})),n.forEach((function(t){for(var i=t.sizer,n=t.lineHeights,e=0,s=0;s<n.length;s++)void 0===n[s]&&(n[s]=i.children[e++].getBoundingClientRect().height)})),n.forEach((function(t){var i=t.sizer,n=t.element.querySelector(".line-numbers-rows");i.style.display="none",i.innerHTML="",t.lineHeights.forEach((function(t,i){n.children[i].style.height=t+"px"}))}))}}}()}},i={};function n(e){if(i[e])return i[e].exports;var s=i[e]={exports:{}};return t[e].call(s.exports,s,s.exports,n),s.exports}n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,{a:i}),i},n.d=function(t,i){for(var e in i)n.o(i,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,i,n){return t[i]=n,t},encode:function(t){switch(jQuery('[name="'+t.name+'"]',this.form).attr("type")){case"checkbox":return"on"===t.value||t.value;default:return t.value}},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var i=0,n=t.length;i<n;i++)this.addPair(t[i]);return this.data},makeObject:function(t,i){for(var n,e=t.match(this.patterns.key);void 0!==(n=e.pop());)if(this.patterns.push.test(n)){var s=this.incrementPush(t.replace(/\[\]$/,""));i=this.build([],s,i)}else this.patterns.fixed.test(n)?i=this.build([],n,i):this.patterns.named.test(n)&&(i=this.build({},n,i));return i}};var i=t,e=function(t,i,n){this.event=i||null,this.form=n||null,this.notice=null,this.request=t||{}};e.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var n={action:GLSR.action,_ajax_request:!0};if(this.form){var e=new i(this.form);e[GLSR.nameprefix]&&(this.request=e[GLSR.nameprefix])}return this.l(t),n[GLSR.nameprefix]=this.request,n},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,i){jQuery.post(GLSR.ajaxurl,this.u(i)).done((function(n){"function"==typeof t&&t(n.data,n.success),i&&i.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var i=jQuery(this.event.currentTarget);i.is(":disabled")||(i.prop("disabled",!0),this.i(t,i))}};var s=e,r=n(9367),a=n.n(r),o=n(8),u=n.n(o),c=function(){"object"===u()(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){jQuery(this).wpColorPicker(jQuery(this).data("colorpicker")||{})}))},l=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.h())};l.prototype={p:function(t){var i=t.getAttribute("data-depends");if(i)try{return JSON.parse(i)}catch(t){return}},h:function(){for(var t=this.el.elements,i=0;i<t.length;i++)~["INPUT","SELECT"].indexOf(t[i].nodeName)&&t[i].addEventListener("change",this.v.bind(this))},m:function(t,i){var n=!1;i=[].concat(i);var e=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(e,function(t){var e=~this._(i).indexOf(this.k(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&e&&(n=!0):e&&(n=!0)}.bind(this)),n},k:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},_:function(t){return t.map(this.k)},v:function(t){this.depends.forEach(function(i){var n=this.p(i);if(n&&~n.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var e=!0;n.forEach(function(t){this.m(t.name,t.value)||(e=!1)}.bind(this)),this.j(i,e)}}.bind(this))},j:function(t,i){var n=t.closest(".glsr-setting-field");n&&n.classList[i?"remove":"add"]("hidden")}};var h=l,d=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.S.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.F.bind(this))};d.prototype={F:function(t){var i=jQuery(t.currentTarget);this.A(i.parent().find("img"),i.val())},S:function(t){var i=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,n){if(i)jQuery(n).data("value",n.value);else{if(n.value=jQuery(n).data("value"),"url"!==n.type)return;this.A(jQuery(n).parent().find("img"),n.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!i),GLSR.stars.rebuild()},A:function(t,i){if(t){var n=new Image;n.src=i,n.onerror=function(){t.attr("src",t.data("fallback"))},n.onload=function(){t.attr("src",n.src)}}}};var f=d,p=function(){this.h()};p.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},h:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.$.bind(this))},$:function(t){var i={};i[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,i)}};var v=p,y=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.P.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.R.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.L.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.C.bind(this))};y.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},P:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},R:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},L:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var i={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(i).post(this.T.bind(this))},C:function(t){t.preventDefault(),this.target=t.currentTarget;var i={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id")};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(i).post(this.O.bind(this))},T:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},O:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var g=y,m=function(){jQuery.each(GLSR.pointers,function(t,i){this.h(i)}.bind(this))};m.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},h:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.D.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var b=m,w=n(8325),k=n.n(w),j=(n(5433),n(4335),n(9980),n(6854),n(9945),n(5251),n(8759),function(t,i){this.el=jQuery(t),this.options=i,this.searchTerm=null,this.h()});j.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},h:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.I())},I:function(){this.options.searchEl.on("input",_.debounce(this.q.bind(this),500)),this.options.searchEl.on("keyup",this.M.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.N.bind(this)),jQuery(document).on("keydown",this.Z.bind(this))},W:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},H:function(){this.W(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},V:function(t){var i=this.options.entriesEl.children("tr").eq(t),n=this;i.find("td").css({backgroundColor:"#faafaa"}),i.fadeOut(350,(function(){jQuery(this).remove(),n.options.results={},n.B(),n.K()}))},U:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},X:function(){this.options.entriesEl.on("click","a.delete",this.Y.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,i){i.placeholder.height(i.helper[0].scrollHeight)},sort:function(t,i){var n=t.pageY-jQuery(this).offsetParent().offset().top-i.helper.outerHeight(!0)/2;i.helper.css({top:n+"px"})}})},tt:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},N:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.H()},Z:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.H(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var i=this.options.resultsEl.find("."+this.options.selectedClass);i&&i.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.tt(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.tt(1))}},Y:function(t){t.preventDefault(),this.V(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.H()},q:function(t){if(this.W(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.U(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.it();this.el.addClass("is-active");var i={};i[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,i).done(function(t){this.el.removeClass("is-active"),this.U(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},M:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.q(t),t.preventDefault())},nt:function(t){t.preventDefault();var i=jQuery(t.currentTarget).closest(".glsr-multibox-entry");i.find("a").css({color:"#c00"}),i.fadeOut("fast",(function(){i.remove()}))},B:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(i){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var n=jQuery(this),e=n.attr("name").replace(/\[\d+\]/i,"["+i+"]");n.attr("name",e),n.is("[data-id]")&&t.options.exclude.push({id:n.val()})}))}))},it:function(){this.H(),this.options.results={},this.options.searchEl.val("")},K:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var x=j,S=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.h()};S.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},h:function(){var t=this;[].forEach.call(t.tabs,function(i,n){i.addEventListener("click",t.$.bind(t)),i.addEventListener("touchend",t.$.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var i=jQuery(this).data("expand");localStorage.setItem("glsr-expand",i),t.et(jQuery(i))})),jQuery(window).on("load",(function(){t.et(jQuery(localStorage.getItem("glsr-expand")))}))},$:function(t){t.preventDefault(),this.st(t.currentTarget)},et:function(t){if(t.length){var i=t.parent().parent();i.removeClass("collapsed"),this.rt(i),i.removeClass("collapsed"),t.parent().removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){t.parent()[0].scrollIntoView({behavior:"smooth",block:"center"}),localStorage.removeItem("glsr-expand")}),10)}},rt:function(t){var i=t.hasClass("collapsed")?"remove":"add";t[i+"Class"]("collapsed").find(".glsr-card.postbox")[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i)},st:function(t){if(t.classList.contains("nav-tab-active")){var i=jQuery(t.getAttribute("href"));this.rt(i)}}};var Q=S,F=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var i={_action:"mce-shortcode",shortcode:this.current};new s(i).post(this.at.bind(this))}};var i=document.querySelectorAll(t);i.length&&i.forEach(function(t){var i=t.querySelector("button"),n=t.querySelectorAll(".mce-menu-item");i&&n.length&&this.h(t,i,n)}.bind(this))};F.prototype={ot:{},ut:[],h:function(t,i,n){document.addEventListener("click",this.ct.bind(this,t,i)),i.addEventListener("click",this.lt.bind(this,t,i)),n.forEach(function(n){n.addEventListener("click",this.ht.bind(this,t,i))}.bind(this))},dt:function(){tinymce.execCommand("GLSR_Shortcode")},ft:function(){jQuery("#scTemp").length?this.dt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.dt()}.bind(this),200))},D:function(t,i){jQuery(i).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},vt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.ot={},this.ut=[]},at:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.vt();var i=this.yt(t);t.ok.constructor===Array&&(i.buttons[0].text=t.ok[0],i.buttons[0].onclick="close",delete i.buttons[1]),this.editor.windowManager.open(i)}},gt:function(t){for(var i in this.ot=t,this.ut=[],t)t.hasOwnProperty(i)&&(this.bt(i),this.wt(i),this._t(i));this.ot.hide=this.ut.join(",")},bt:function(t){"display"!==t||jQuery.isNumeric(this.ot[t])||(this.ot[t]="")},wt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var i=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(i)&&(this.ot[t]&&this.ut.push(i),delete this.ot[t])}},_t:function(t){"id"===t&&(this.ot[t]=(+new Date).toString(36))},ct:function(t,i,n){jQuery(n.target).closest(jQuery(t)).length||this.D(t,i)},lt:function(t,i,n){n.preventDefault(),n.currentTarget.classList.contains("active")?this.D(t,i):this.kt(t,i)},ht:function(t,i,n){n.preventDefault(),this.current=n.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.dt():this.ft(),setTimeout(function(){this.D(t,i)}.bind(this),100))},kt:function(t,i){jQuery(i).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},jt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.xt.bind(this),text:t.ok},{onclick:"close",text:t.close}]},yt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.jt(t),onsubmit:this.St.bind(this,t),onclose:this.vt.bind(this)}},St:function(t,i){var n="";for(var e in this.gt(i.data),this.ot)this.ot.hasOwnProperty(e)&&""!==this.ot[e]&&(n+=" "+e+'="'+this.ot[e]+'"');window.send_to_editor("["+t.shortcode+n+"]")},xt:function(){var t=this.editor.windowManager.getWindows()[0];this.Qt(t)&&t.submit()},Qt:function(t){var i,n=!0,e=GLSR.shortcodes[this.current];for(var s in e)if(e.hasOwnProperty(s)&&void 0!==(i=t.find("#"+s)[0])&&""===i.state.data.value){n=!1,alert(e[s]);break}return n}};var z=F,A=n(4575),$=n.n(A),P=n(3913),R=n.n(P),L={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,stars:null,tooltip:"Select a Rating"},C=function(t,i,n){t.classList[i?"add":"remove"](n)},E=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},G=function(t,i,n){var e=E(n);return t.parentNode.insertBefore(e,i?t.nextSibling:t),e},T=function t(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var s={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(e){if(void 0!==n[0][e]){var r=i[e];"Object"!==O(r)||"Object"!==O(s[e])?s[e]=r:s[e]=t(s[e],r)}}))})),s},O=function(t){return{}.toString.call(t).slice(8,-1)},D="undefined"!=typeof window?window:{screen:{},navigator:{}},I=D.matchMedia||function(){return{matches:!1}},q=!1,M={get passive(){return q=!0}},N=function(){};D.addEventListener&&D.addEventListener("p",N,M),D.removeEventListener&&D.removeEventListener("p",N,!1);var Z=q,W="ontouchstart"in D,H=W||"TouchEvent"in D&&I("(any-pointer: coarse)").matches,V=(D.navigator.maxTouchPoints,D.navigator.userAgent||""),B=I("(pointer: coarse)").matches&&/iPad|Macintosh/.test(V)&&Math.min(D.screen.width||0,D.screen.height||0)>=768,K=(I("(pointer: coarse)").matches||I("(pointer: fine)").matches,I("(any-pointer: fine)").matches||I("(any-hover: hover)").matches,function(){function t(i,n){var e,s,r;$()(this,t),this.direction=window.getComputedStyle(i,null).getPropertyValue("direction"),this.el=i,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=n,this.tick=null,this.ticking=!1,this.values=function(t){var i=[];return[].forEach.call(t.options,(function(t){var n=parseInt(t.value,10)||0;n>0&&i.push({index:t.index,text:t.text,value:n})})),i.sort((function(t,i){return t.value-i.value}))}(i),this.widgetEl=null,e=this.values.length,s=1,r=this.props.maxStars,/^\d+$/.test(e)&&s<=e&&e<=r?this.build():this.destroy()}return R()(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.changeIndexTo(this.indexSelected=this.selected(),!0),this.handleEvents("add")}},{key:"buildWidget",value:function(){var t=this,i=G(this.el,!1,{class:this.props.classNames.base});i.appendChild(this.el),i.classList.add(this.props.classNames.base+"--"+this.direction);var n=G(this.el,!0,{class:this.props.classNames.base+"--stars"});this.values.forEach((function(i,e){var s=E({"data-index":e,"data-value":i.value});"function"==typeof t.props.stars&&t.props.stars.call(t,s,i,e),[].forEach.call(s.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=s.outerHTML})),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if(this.widgetEl.childNodes.forEach((function(i,e){C(i,e<=t,n.props.classNames.active),C(i,e===n.indexSelected,n.props.classNames.selected)})),"function"!=typeof this.props.stars&&(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var e=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",e)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.handleEvents("remove"),t.parentNode.replaceChild(this.el,t))}},{key:"eventListener",value:function(t,i,n,e){var s=this;n.forEach((function(n){return t[i+"EventListener"](n,s.events[n],e||!1)}))}},{key:"handleEvents",value:function(t){var i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!!Z&&{passive:!1}))}},{key:"indexFromEvent",value:function(t){var i,n,e=(null===(i=t.touches)||void 0===i?void 0:i[0])||(null===(n=t.changedTouches)||void 0===n?void 0:n[0])||t,s=document.elementFromPoint(e.clientX,e.clientY);return parseInt(s.dataset.index||-1,10)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var i=t.key.slice(5);if(~["Left","Right"].indexOf(i)){var n="Left"===i?-1:1;"rtl"===this.direction&&(n*=-1);var e=this.values.length-1,s=Math.min(Math.max(this.selected()+n,-1),e);this.selectValue(s)}}},{key:"onPointerDown",value:function(t){t.preventDefault(),this.el.focus();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i)}},{key:"onPointerLeave",value:function(t){var i=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return i.changeIndexTo(i.indexSelected)}))}},{key:"onPointerMove",value:function(t){var i=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return i.changeIndexTo(i.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,i=null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.index;this.selectValue(this.values.findIndex((function(t){return t.index===i})))}},{key:"selected",value:function(){var t=this;return this.values.findIndex((function(i){return i.value===+t.el.value}))}},{key:"selectValue",value:function(t){var i;this.el.value=(null===(i=this.values[t])||void 0===i?void 0:i.value)||"",this.indexSelected=this.selected(),this.el.dispatchEvent(new Event("change"))}}]),t}()),U=function(){function t(i,n){$()(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(i,n)}return R()(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var e=T(L,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.parentNode.classList.contains(e.classNames.base)||n.widgets.push(new K(t,e))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===O(t)?[t]:"NodeList"===O(t)?[].slice.call(t):"String"===O(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}}]),t}(),J=function(t){var i=document.querySelectorAll(t);i.length&&i.forEach(function(t){t.addEventListener("click",this.$)}.bind(this))};J.prototype={$:function(t){var i=t.currentTarget.href.match(/post=([0-9]+)/),n=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==i&&null!==n){var e={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:i[1],status:n[1]};new s(e,t).post((function(i){if(i.class){var n=jQuery(t.target);n.closest("tr").removeClass("status-pending status-publish").addClass(i.class),n.closest("td.column-title").find("strong").html(i.link),i.counts&&(n.closest(".wrap").find("ul.subsubsub").html(i.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+i.pending).find(".unapproved-count").html(i.pending))}}))}}};var X=J,Y=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.Ft.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};Y.prototype={At:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.$t(!1)},Ft:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.$t(!0),this.Pt())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},Pt:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Rt.bind(this))},Rt:function(t){var i={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},n=t.finished?this.Lt.bind(this,t):this.Rt.bind(this);this.Ct(t.message),this.Et(t.percent),setTimeout((function(){new s(i).post(n)}),1500)},Lt:function(t){var i=0;try{i=t.meta.pagination.current_page}catch(t){}var n={_action:"sync-reviews",page:i+1,service:this.service,stage:"reviews"};this.Ct(t.message),t.percent_synced&&t.percent_synced>=100?this.At(t):new s(n).post(this.Lt.bind(this))},Ct:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Et:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},$t:function(t){if(!0===t&&(this.Ct(this.progressbar.data("active-text")),this.Et(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.$t.bind(this))}};var tt=Y,it=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.referrerEl=document.querySelector("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.referrerEl&&this.tabs&&this.views&&this.h()};it.prototype={defaults:{tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},h:function(){var t=this;jQuery(window).on("hashchange",t.Gt.bind(t)),jQuery(t.options.tabSelector).on("click",t.$.bind(t)),jQuery(t.options.viewSubsubsub).on("click",t.$.bind(t)),jQuery(t.options.tabSelector).each((function(i){(location.hash?this.getAttribute("href").slice(1)===location.hash.slice(5).split("_")[0]:0===i)&&(t.Tt(this),t.Ot(t.Dt()))}))},It:function(t){return t?"add":"remove"},$:function(t){var i=t.currentTarget,n=i.getAttribute("href");n.startsWith("#")&&(location.hash=this.qt(n.slice(1)),i.blur(),t.preventDefault())},Gt:function(){for(var t=this.Dt().split("_")[0],i=0;i<this.views.length;i++)if(t===this.views[i].id){this.Tt(this.tabs[i]),this.Ot(this.Dt());break}},qt:function(t){return"tab-"+t},Dt:function(){return location.hash?location.hash.split("#tab-")[1]:""},Ot:function(t){if(t){var i=this.referrerEl.value.split("#")[0],n=this.qt(t);this.referrerEl.value=i+"#"+n}},Tt:function(t){[].forEach.call(this.tabs,function(i,n){var e=this.It(i===t);"add"===e&&(this.active.value=this.views[n].id,this.Mt(n)),i.classList[e]("nav-tab-active")}.bind(this))},Mt:function(t){[].forEach.call(this.views,function(i,n){var e=this.It(n!==t);i.classList[e]("ui-tabs-hide"),this.Nt()}.bind(this))},Nt:function(){var t=this,i=0;[].forEach.call(this.subsubsub,(function(n,e){n.classList.remove("current"),n.getAttribute("href").slice(1)===t.Dt()&&(i=e)})),this.subsubsub[i]&&this.subsubsub[i].classList.add("current"),[].forEach.call(this.sections,(function(n,e){var s=t.It(e!==i);n.classList[s]("ui-tabs-hide")}))}};var nt=it,et=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Zt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Zt(t)}.bind(this)))};et.prototype={Zt:function(t){var i=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=i+"px"}};var st=et,rt=function(){jQuery("form").on("click","#clear-console",this.Wt,this.$.bind(this)),jQuery("form").on("click","#fetch-console",this.Wt,this.$.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.$.bind(this));var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Ht.bind(this,t)),jQuery(document).on("keyup",this.Vt.bind(this,t)))};rt.prototype={Wt:function(t,i){i&&jQuery("#log-file").val(t.console)},$:function(t){new s({},t,t.currentTarget.closest("form")).post((function(i,n){"function"==typeof t.data&&t.data(i,n),jQuery("html, body").animate({scrollTop:0},500),jQuery("#glsr-notices").on("click","a",(function(){localStorage.setItem("glsr-expand",jQuery(this).data("expand"))})),jQuery('.glsr-notice[data-notice="'+jQuery(t.currentTarget).data("remove-notice")+'"]').remove()}))},Ht:function(t,i){GLSR.keys.ALT!==i.keyCode||i.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Vt:function(t,i){GLSR.keys.ALT===i.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))}};var at=rt;GLSR.autosize=a(),GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},jQuery((function(t){k().highlightAll(),GLSR.notices=new v,GLSR.shortcode=new z(".glsr-mce"),GLSR.stars=new U("select.glsr-star-rating",{tooltip:!1}),c(),new h("form.glsr-form"),new f,new g,new b,new x("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.nt.bind(this))},onResultClick:function(i){var n=t(i.currentTarget),e=wp.template("glsr-assigned-posts"),s={id:n.data("id"),name:"post_ids[]",url:n.data("url"),title:n.text()};if(e){var r=t(e(s));r.find(".glsr-remove-button").on("click",this.nt.bind(this)),this.el.find(".glsr-selected-entries").append(r),this.it()}this.options.searchEl.focus()}}),new x("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.nt.bind(this))},onResultClick:function(i){var n=t(i.currentTarget),e=wp.template("glsr-assigned-users"),s={id:n.data("id"),name:"user_ids[]",url:n.data("url"),title:n.text()};if(e){var r=t(e(s));r.find(".glsr-remove-button").on("click",this.nt.bind(this)),this.el.find(".glsr-selected-entries").append(r),this.it()}this.options.searchEl.focus()}}),new x("#glsr-search-translations",{action:"search-translations",onInit:function(){this.X()},onResultClick:function(i){var n=t(i.currentTarget),e=n.data("entry"),s=wp.template("glsr-string-"+(e.p1?"plural":"single"));e.index=this.options.entriesEl.children().length,e.prefix=this.options.resultsEl.data("prefix"),s&&(this.options.entriesEl.append(s(e)),this.options.exclude.push({id:e.id}),this.options.results=this.options.results.filter((function(t,i){return i!==n.get(0)}))),this.K()}}),new X("a.glsr-toggle-status"),new Q,new nt,new st,new at,new tt;var i=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(i),t("select[data-glsr-track]").on("change",i),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var i=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[i+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var i=t(this).parent(),n=i.closest(".glsr-nav-view"),e=i.hasClass("closed")?"remove":"add";i[e+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==e),e=n.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",n[e+"Class"]("collapsed")}))}))}()}();
assets/scripts/site-reviews.js CHANGED
@@ -1,2 +1 @@
1
- /*! For license information please see site-reviews.js.LICENSE.txt */
2
- !function(){var t={8:function(t){function i(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(t){return typeof t}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(n)}t.exports=i},253:function(t,i,n){"use strict";var s=n(8),e=n.n(s),h=function(){};h.prototype={get:function(t,i,n){this.t(i),this.xhr.open("GET",t,!0),this.xhr.responseType="text",this.i(n),this.xhr.send()},h:function(t){return"json"===this.xhr.responseType||!0===this.xhr.json?t({message:this.xhr.statusText},!1):"text"===this.xhr.responseType?t(this.xhr.statusText):void 0},u:function(t){if(0===this.xhr.status||this.xhr.status>=200&&this.xhr.status<300||304===this.xhr.status){if("json"===this.xhr.responseType)return t(this.xhr.response.data,this.xhr.response.success);if("text"===this.xhr.responseType)return t(this.xhr.responseText);if(!0===this.xhr.json){var i=JSON.parse(this.xhr.response);return t(i.data,i.success)}}else this.h(t)},isFileSupported:function(){var t=document.createElement("INPUT");return t.type="file","files"in t},isFormDataSupported:function(){return!!window.FormData},isUploadSupported:function(){var t=new XMLHttpRequest;return!!(t&&"upload"in t&&"onprogress"in t.upload)},post:function(t,i,n){this.t(i),this.xhr.open("POST",GLSR.ajaxurl,!0),this.xhr.responseType="json",this.xhr.json=!0,this.i(n),this.xhr.send(this.l(t))},t:function(t){this.xhr=new XMLHttpRequest,this.xhr.onload=this.u.bind(this,t),this.xhr.onerror=this.h.bind(this,t)},v:function(t,i,n){return"object"!==e()(i)||i instanceof Date||i instanceof File?t.append(n,i||""):Object.keys(i).forEach(function(s){i.hasOwnProperty(s)&&(t=this.v(t,i[s],n?n[s]:s))}.bind(this)),t},l:function(t){var i=new FormData,n=Object.prototype.toString.call(t);return"[object FormData]"===n&&(i=t),"[object HTMLFormElement]"===n&&(i=new FormData(t)),"[object Object]"===n&&Object.keys(t).forEach((function(n){i.append(n,t[n])})),i.append("action",GLSR.action),i.append("_ajax_request",!0),i},i:function(t){for(var i in(t=t||{})["X-Requested-With"]="XMLHttpRequest",t)t.hasOwnProperty(i)&&this.xhr.setRequestHeader(i,t[i])}};var o=h,r=function(t){this.p(t||document)};r.prototype={config:{hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},g:function(t){var i=document.createElement("span"),n=document.createElement("a");n.setAttribute("href","#"),n.setAttribute("data-text",t.getAttribute("data-show-less")),n.innerHTML=t.getAttribute("data-show-more"),n.addEventListener("click",this.S.bind(this)),i.setAttribute("class",this.config.readMoreClass),i.appendChild(n),t.parentNode.insertBefore(i,t.nextSibling)},S:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,s=i.getAttribute("data-text");n.classList.toggle(this.config.hiddenClass),n.classList.toggle(this.config.visibleClass),i.setAttribute("data-text",i.innerText),i.innerText=s},p:function(t){for(var i=t.querySelectorAll(this.config.hiddenTextSelector),n=0;n<i.length;n++)this.g(i[n])}};var a=r,u=function(t){this.Form=t,this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl=t.form.querySelector(".glsr-recaptcha-holder"),this.observer=new MutationObserver(function(t){var i=t.pop();i.target&&"visible"!==i.target.style.visibility&&(this.observer.disconnect(),setTimeout(function(){this.is_submitting||this.Form._()}.bind(this),250))}.bind(this))};u.prototype={L:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},R:function(){if(-1!==this.id)return this.counter=0,this.F(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.G.call(this.Form,this.counter)}.bind(this),1e3)},F:function(t){var i=window.___grecaptcha_cfg.clients[t];for(var n in i)if(i.hasOwnProperty(n)&&"[object String]"===Object.prototype.toString.call(i[n])){var s=document.querySelector("iframe[name=c-"+i[n]+"]");if(s){this.observer.observe(s.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},T:function(){this.Form.form.onsubmit=null,this.L(),this.j()},j:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this.j();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.G.bind(this.Form,this.counter),"expired-callback":this.O.bind(this),isolated:!0},!0)}.bind(this),250)},O:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},G:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.M(),void this.form.submit();this.G(t)}};var c=u;const f={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,stars:null,tooltip:"Select a Rating"},l=(t,i,n)=>{t.classList[i?"add":"remove"](n)},d=t=>{const i=document.createElement("span");t=t||{};for(let n in t)i.setAttribute(n,t[n]);return i},v=(t,i,n)=>/^\d+$/.test(t)&&i<=t&&t<=n,m=(t,i,n)=>{const s=d(n);return t.parentNode.insertBefore(s,i?t.nextSibling:t),s},p=(...t)=>{const i={};return t.forEach((n=>{Object.keys(n||{}).forEach((s=>{if(void 0===t[0][s])return;const e=n[s];"Object"!==w(e)||"Object"!==w(i[s])?i[s]=e:i[s]=p(i[s],e)}))})),i},w=t=>({}.toString.call(t).slice(8,-1)),b=t=>{const i=[];return[].forEach.call(t.options,(t=>{const n=parseInt(t.value,10)||0;n>0&&i.push({index:t.index,text:t.text,value:n})})),i.sort(((t,i)=>t.value-i.value))};var g="undefined"!=typeof window?window:{screen:{},navigator:{}},S=g.matchMedia||function(){return{matches:!1}},_=!1,L={get passive(){return _=!0}},R=function(){};g.addEventListener&&g.addEventListener("p",R,L),g.removeEventListener&&g.removeEventListener("p",R,!1);var y=_,x="ontouchstart"in g,E="TouchEvent"in g,F=x||E&&S("(any-pointer: coarse)").matches,G=(g.navigator.maxTouchPoints,g.navigator.userAgent||""),T=S("(pointer: coarse)").matches&&/iPad|Macintosh/.test(G)&&Math.min(g.screen.width||0,g.screen.height||0)>=768;S("(pointer: coarse)").matches||S("(pointer: fine)").matches,S("(any-pointer: fine)").matches||S("(any-hover: hover)").matches;class j{constructor(t,i){this.direction=window.getComputedStyle(t,null).getPropertyValue("direction"),this.el=t,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=b(t),this.widgetEl=null,v(this.values.length,1,this.props.maxStars)?this.build():this.destroy()}build(){this.destroy(),this.buildWidget(),this.changeIndexTo(this.indexSelected=this.selected(),!0),this.handleEvents("add")}buildWidget(){const t=m(this.el,!1,{class:this.props.classNames.base});t.appendChild(this.el),t.classList.add(this.props.classNames.base+"--"+this.direction);const i=m(this.el,!0,{class:this.props.classNames.base+"--stars"});this.values.forEach(((t,n)=>{const s=d({"data-index":n,"data-value":t.value});"function"==typeof this.props.stars&&this.props.stars.call(this,s,t,n),[].forEach.call(s.children,(t=>t.style.pointerEvents="none")),i.innerHTML+=s.outerHTML})),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}changeIndexTo(t,i){if(this.indexActive!==t||i){if(this.widgetEl.childNodes.forEach(((i,n)=>{l(i,n<=t,this.props.classNames.active),l(i,n===this.indexSelected,this.props.classNames.selected)})),"function"!=typeof this.props.stars&&(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){const i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}destroy(){this.indexActive=null,this.indexSelected=this.selected();const t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.handleEvents("remove"),t.parentNode.replaceChild(this.el,t))}eventListener(t,i,n,s){n.forEach((n=>t[i+"EventListener"](n,this.events[n],s||!1)))}handleEvents(t){const i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!!y&&{passive:!1}))}indexFromEvent(t){const i=t.touches?.[0]||t.changedTouches?.[0]||t,n=document.elementFromPoint(i.clientX,i.clientY);return parseInt(n.dataset.index||-1,10)}onChange(){this.changeIndexTo(this.selected(),!0)}onKeyDown(t){const i=t.key.slice(5);if(!~["Left","Right"].indexOf(i))return;let n="Left"===i?-1:1;"rtl"===this.direction&&(n*=-1);const s=this.values.length-1,e=Math.min(Math.max(this.selected()+n,-1),s);this.selectValue(e)}onPointerDown(t){t.preventDefault(),this.el.focus();let i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i)}onPointerLeave(t){t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((()=>this.changeIndexTo(this.indexSelected)))}onPointerMove(t){t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((()=>this.changeIndexTo(this.indexFromEvent(t)))),this.ticking=!0)}onReset(){const t=this.el.querySelector("[selected]")?.index;this.selectValue(this.values.findIndex((i=>i.index===t)))}selected(){return this.values.findIndex((t=>t.value===+this.el.value))}selectValue(t){this.el.value=this.values[t]?.value||"",this.indexSelected=this.selected(),this.el.dispatchEvent(new Event("change"))}}class O{constructor(t,i){this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(t,i)}buildWidgets(t,i){this.queryElements(t).forEach((t=>{const n=p(f,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.parentNode.classList.contains(n.classNames.base)||this.widgets.push(new j(t,n))}))}destroy(){this.widgets.forEach((t=>t.destroy()))}queryElements(t){return"HTMLSelectElement"===w(t)?[t]:"NodeList"===w(t)?[].slice.call(t):"String"===w(t)?[].slice.call(document.querySelectorAll(t)):[]}rebuild(){this.widgets.forEach((t=>t.build()))}}var M=O,k=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},C=function(t){return"."+t.trim().split(" ").join(".")},D=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},q={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?D(this)<=parseInt(i):parseFloat(t)<=parseFloat(i))}},maxlength:{fn:function(t,i){return!t||t.length<=parseInt(i)}},min:{fn:function(t,i){return!t||("checkbox"===this.type?D(this)>=parseInt(i):parseFloat(t)>=parseFloat(i))}},minlength:{fn:function(t,i){return!t||t.length>=parseInt(i)}},number:{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2},required:{fn:function(t){return"radio"===this.type||"checkbox"===this.type?D(this):void 0!==t&&""!==t},priority:99,halt:!0}},I=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.init()};I.prototype={k:["required","max","maxlength","min","minlength","pattern"],C:"input:not([type^=hidden]):not([type^=submit]), select, textarea, [data-glsr-validate]",destroy:function(){for(this.O();this.fields.length;){var t=this.fields.shift();this.D(t.input),delete t.input.validation}},init:function(){var t=this;[].forEach.call(this.form.querySelectorAll(this.C),(function(i){t.fields.find((function(t){return t.input.name===i.name}))||"none"!==i.closest(C(t.config.field)).style.display&&t.fields.push(t.q(i))}))},I:function(t){t.addEventListener(this.N(t),this.H.bind(this,t))},A:function(t,i,n){[].forEach.call(t,function(t){var s=t.name.replace("data-","");~this.k.indexOf(s)?this.P(i,n,s,t.value):"type"===t.name&&this.P(i,n,t.value)}.bind(this))},P:function(t,i,n,s){if(q[n]&&(q[n].name=n,t.push(q[n]),s)){var e=s.split(",");e.unshift(null),i[n]=e}},D:function(t){t.removeEventListener(this.N(t),this.H.bind(this,t))},O:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(C(this.config.field));k(this.fields[t].input,this.config.input_error,!1),k(this.fields[t].input,this.config.input_valid,!1),k(i,this.config.field_error,!1),k(i,this.config.field_valid,!1)}},N:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},q:function(t){var i={},n=[];return null!==t.offsetParent&&(this.A(t.attributes,n,i),this.V(n),this.I(t)),t.validation={form:this.form,input:t,params:i,validators:n}},W:function(t,i){var n=t.input.closest(C(this.config.field));if(k(t.input,this.config.input_error,i),k(t.input,this.config.input_valid,!i),n){k(n,this.config.field_error,i),k(n,this.config.field_valid,!i);var s=n.querySelector(C(this.config.field_message));s.innerHTML=i?t.errors.join("<br>"):"",s.style.display=i?"":"none"}},B:function(t,i){t.hasOwnProperty("validation")&&this.q(t),t.validation.errors=i},V:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},H:function(t){var i=!0,n=this.fields;for(var s in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(s)){var e=n[s];this.J(e)?this.W(e,!1):(i=!1,this.W(e,!0))}return i},J:function(t){var i=[],n=!0;for(var s in t.validators)if(t.validators.hasOwnProperty(s)){var e=t.validators[s],h=t.params[e.name]?t.params[e.name]:[];if(h[0]=t.input.value,!e.fn.apply(t.input,h)){n=!1;var o=this.strings[e.name];if(i.push(o.replace(/(\%s)/g,h[1])),!0===e.halt)break}}return t.errors=i,n}};var N=I,H=function(t,i){this.button=i,this.config=GLSR.validationconfig,this.events={submit:this.U.bind(this)},this.form=t,this.isActive=!1,this.recaptcha=new c(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new N(t)};H.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.Y()},destroyRecaptcha:function(){this.recaptcha.L()},destroyStarRatings:function(){this.stars&&(this.stars.destroy(),delete this.stars)},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit)},initRecaptcha:function(){this.recaptcha.T()},initStarRatings:function(){this.destroyStarRatings(),this.stars=new M(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},M:function(){this.button.setAttribute("disabled","")},_:function(){this.button.removeAttribute("disabled")},$:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.O(),n&&(this.recaptcha.O(),this.form.reset()),this.K(t.errors),this.Z(t.message,n),this._(),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.R()},X:function(){var t=!0;return[].forEach.call(this.form.elements,(function(i){"file"===i.type&&(t=GLSR.ajax.isFileSupported()&&GLSR.ajax.isUploadSupported())})),t&&!this.form.classList.contains("no-ajax")},U:function(t){if(!this.validation.H())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.Y(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.G())},Y:function(){k(this.form,this.config.form_error,!1),this.Z("",null),this.validation.O()},K:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,s=this.form.querySelector('[name="'+n+'"]');s&&(this.validation.B(s,t[i]),this.validation.W(s.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(C(this.config.form_message));null!==n&&(k(this.form,this.config.form_error,!1===i),k(n,this.config.form_message_failed,!1===i),k(n,this.config.form_message_success,!0===i),n.innerHTML=t)},G:function(t){GLSR.ajax.isFormDataSupported()?(this.M(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.$.bind(this))):this.Z(this.strings.unsupported,!1)}};var A=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var s=0;s<i.length;s++)(n=i[s].querySelector("[type=submit]"))&&((t=new H(i[s],n)).init(),GLSR.forms.push(t))},P=A,V=function(t,i){this.paginationEl=t,this.reviewsEl=i,this.tt()};V.prototype={config:{hideClass:"glsr-hide",linkSelector:"a.page-numbers",scrollTime:468},it:function(){var t=document.getElementById(this.paginationEl.dataset.id);return t||this.reviewsEl},$:function(t,i,n){n?(this.paginationEl.innerHTML=i.pagination,this.reviewsEl.innerHTML=i.reviews,this.nt(this.reviewsEl),this.paginationEl.classList.remove(this.config.hideClass),this.reviewsEl.classList.remove(this.config.hideClass),this.tt(),GLSR.urlparameter&&window.history.pushState(null,"",t),new a(this.reviewsEl),document.dispatchEvent(new CustomEvent("site-reviews/after/pagination",{detail:i}))):window.location=t},tt:function(){for(var t=this.paginationEl.querySelectorAll(this.config.linkSelector),i=0;i<t.length;i++)t[i].addEventListener("click",this.S.bind(this))},S:function(t){var i=this.it();if(i){for(var n={},s=0,e=Object.keys(i.dataset);s<e.length;s++){var h=e[s],o=i.dataset[h];try{o=JSON.parse(o)}catch(t){}n[GLSR.nameprefix+"[atts]["+h+"]"]=o}n[GLSR.nameprefix+"[_action]"]="fetch-paged-reviews",n[GLSR.nameprefix+"[page]"]=t.currentTarget.dataset.page||"",n[GLSR.nameprefix+"[url]"]=t.currentTarget.href||"",this.paginationEl.classList.add(this.config.hideClass),this.reviewsEl.classList.add(this.config.hideClass),t.preventDefault(),GLSR.ajax.post(n,this.$.bind(this,t.currentTarget.href))}},nt:function(t,i){var n;i=i||16;for(var s=0;s<GLSR.ajaxpagination.length;s++)(n=document.querySelector(GLSR.ajaxpagination[s]))&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(i+=n.clientHeight);var e=t.getBoundingClientRect().top-i;e>0||this.st({endY:e,offset:window.pageYOffset,startTime:window.performance.now(),startY:t.scrollTop})},st:function(t){var i=(window.performance.now()-t.startTime)/this.config.scrollTime;i=i>1?1:i;var n=.5*(1-Math.cos(Math.PI*i)),s=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+s),s!==t.endY&&window.requestAnimationFrame(this.st.bind(this,t))}};var W=function(){this.navs=[];var t=document.querySelectorAll(".glsr-ajax-pagination");t.length&&t.forEach(function(t){var i=t.closest(".glsr[data-id="+t.dataset.id);if(i){var n=i.querySelector(".glsr-reviews");n&&this.navs.push(new V(t,n))}}.bind(this))},B=W;window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new o,window.GLSR.forms=[],document.addEventListener("DOMContentLoaded",(function(){for(var t=document.querySelectorAll(".glsr"),i=0;i<t.length;i++){var n=window.getComputedStyle(t[i],null).getPropertyValue("direction");t[i].classList.add("glsr-"+n)}window.GLSR.Forms=P,new P,new B,new a}))},113:function(){},4030:function(){},6966:function(){},83:function(){},7649:function(){},3408:function(){},529:function(){},2275:function(){},2872:function(){},8865:function(){},4835:function(){},6786:function(){},1045:function(){},3622:function(){},2688:function(){},8340:function(){},3961:function(){},853:function(){},1273:function(){},5651:function(){},7730:function(){},3382:function(){},4747:function(){},4605:function(){},3963:function(){},5406:function(){},6829:function(){},6273:function(){},4518:function(){},6963:function(){}},i={};function n(s){if(i[s])return i[s].exports;var e=i[s]={exports:{}};return t[s](e,e.exports,n),e.exports}n.m=t,n.x=function(){},n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,{a:i}),i},n.d=function(t,i){for(var s in i)n.o(i,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0},i=[[253],[5406],[6829],[6273],[4518],[6963],[113],[4030],[6966],[83],[7649],[3408],[529],[2275],[2872],[8865],[4835],[6786],[1045],[3622],[2688],[8340],[3961],[853],[1273],[5651],[7730],[3382],[4747],[4605],[3963]],s=function(){},e=function(e,h){for(var o,r,a=h[0],u=h[1],c=h[2],f=h[3],l=0,d=[];l<a.length;l++)r=a[l],n.o(t,r)&&t[r]&&d.push(t[r][0]),t[r]=0;for(o in u)n.o(u,o)&&(n.m[o]=u[o]);for(c&&c(n),e&&e(h);d.length;)d.shift()();return f&&i.push.apply(i,f),s()},h=self.webpackChunk=self.webpackChunk||[];function o(){for(var s,e=0;e<i.length;e++){for(var h=i[e],o=!0,r=1;r<h.length;r++){var a=h[r];0!==t[a]&&(o=!1)}o&&(i.splice(e--,1),s=n(n.s=h[0]))}return 0===i.length&&(n.x(),n.x=function(){}),s}h.forEach(e.bind(null,0)),h.push=e.bind(null,h.push.bind(h));var r=n.x;n.x=function(){return n.x=r||function(){},(s=o)()}}(),n.x()}();
1
+ !function(){var t={4575:function(t){t.exports=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}},3913:function(t){function i(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}t.exports=function(t,n,s){return n&&i(t.prototype,n),s&&i(t,s),t}},8:function(t){function i(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(t){return typeof t}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(n)}t.exports=i},4923:function(t,i,n){"use strict";var s=n(8),e=n.n(s),o=function(){};o.prototype={get:function(t,i,n){this.t(i),this.xhr.open("GET",t,!0),this.xhr.responseType="text",this.i(n),this.xhr.send()},h:function(t){return"json"===this.xhr.responseType||!0===this.xhr.json?t({message:this.xhr.statusText},!1):"text"===this.xhr.responseType?t(this.xhr.statusText):void 0},u:function(t){if(0===this.xhr.status||this.xhr.status>=200&&this.xhr.status<300||304===this.xhr.status){if("json"===this.xhr.responseType)return t(this.xhr.response.data,this.xhr.response.success);if("text"===this.xhr.responseType)return t(this.xhr.responseText);if(!0===this.xhr.json){var i=JSON.parse(this.xhr.response);return t(i.data,i.success)}}else this.h(t)},isFileSupported:function(){var t=document.createElement("INPUT");return t.type="file","files"in t},isFormDataSupported:function(){return!!window.FormData},isUploadSupported:function(){var t=new XMLHttpRequest;return!!(t&&"upload"in t&&"onprogress"in t.upload)},post:function(t,i,n){this.t(i),this.xhr.open("POST",GLSR.ajaxurl,!0),this.xhr.responseType="json",this.xhr.json=!0,this.i(n),this.xhr.send(this.l(t))},t:function(t){this.xhr=new XMLHttpRequest,this.xhr.onload=this.u.bind(this,t),this.xhr.onerror=this.h.bind(this,t)},v:function(t,i,n){return"object"!==e()(i)||i instanceof Date||i instanceof File?t.append(n,i||""):Object.keys(i).forEach(function(s){i.hasOwnProperty(s)&&(t=this.v(t,i[s],n?n[s]:s))}.bind(this)),t},l:function(t){var i=new FormData,n=Object.prototype.toString.call(t);return"[object FormData]"===n&&(i=t),"[object HTMLFormElement]"===n&&(i=new FormData(t)),"[object Object]"===n&&Object.keys(t).forEach((function(n){i.append(n,t[n])})),i.append("action",GLSR.action),i.append("_ajax_request",!0),i},i:function(t){for(var i in(t=t||{})["X-Requested-With"]="XMLHttpRequest",t)t.hasOwnProperty(i)&&this.xhr.setRequestHeader(i,t[i])}};var r=o,h=function(t){this.p(t||document)};h.prototype={config:{hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},g:function(t){var i=document.createElement("span"),n=document.createElement("a");n.setAttribute("href","#"),n.setAttribute("data-text",t.getAttribute("data-show-less")),n.innerHTML=t.getAttribute("data-show-more"),n.addEventListener("click",this.S.bind(this)),i.setAttribute("class",this.config.readMoreClass),i.appendChild(n),t.parentNode.insertBefore(i,t.nextSibling)},S:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,s=i.getAttribute("data-text");n.classList.toggle(this.config.hiddenClass),n.classList.toggle(this.config.visibleClass),i.setAttribute("data-text",i.innerText),i.innerText=s},p:function(t){for(var i=t.querySelectorAll(this.config.hiddenTextSelector),n=0;n<i.length;n++)this.g(i[n])}};var u=h,a=function(t){this.Form=t,this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl=t.form.querySelector(".glsr-recaptcha-holder"),this.observer=new MutationObserver(function(t){var i=t.pop();i.target&&"visible"!==i.target.style.visibility&&(this.observer.disconnect(),setTimeout(function(){this.is_submitting||this.Form._()}.bind(this),250))}.bind(this))};a.prototype={L:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},R:function(){if(-1!==this.id)return this.counter=0,this.k(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.F.call(this.Form,this.counter)}.bind(this),1e3)},k:function(t){var i=window.___grecaptcha_cfg.clients[t];for(var n in i)if(i.hasOwnProperty(n)&&"[object String]"===Object.prototype.toString.call(i[n])){var s=document.querySelector("iframe[name=c-"+i[n]+"]");if(s){this.observer.observe(s.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},G:function(){this.Form.form.onsubmit=null,this.L(),this.T()},T:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this.T();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.F.bind(this.Form,this.counter),"expired-callback":this.j.bind(this),isolated:!0},!0)}.bind(this),250)},j:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},F:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.O(),void this.form.submit();this.F(t)}};var c=a,f=n(4575),l=n.n(f),v=n(3913),d=n.n(v),m={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,stars:null,tooltip:"Select a Rating"},p=function(t,i,n){t.classList[i?"add":"remove"](n)},w=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},b=function(t,i,n){return/^\d+$/.test(t)&&i<=t&&t<=n},y=function(t,i,n){var s=w(n);return t.parentNode.insertBefore(s,i?t.nextSibling:t),s},g=function t(){for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];var e={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(s){if(void 0!==n[0][s]){var o=i[s];"Object"!==S(o)||"Object"!==S(e[s])?e[s]=o:e[s]=t(e[s],o)}}))})),e},S=function(t){return{}.toString.call(t).slice(8,-1)},_=function(t){var i=[];return[].forEach.call(t.options,(function(t){var n=parseInt(t.value,10)||0;n>0&&i.push({index:t.index,text:t.text,value:n})})),i.sort((function(t,i){return t.value-i.value}))},L="undefined"!=typeof window?window:{screen:{},navigator:{}},R=L.matchMedia||function(){return{matches:!1}},k=!1,E={get passive(){return k=!0}},x=function(){};L.addEventListener&&L.addEventListener("p",x,E),L.removeEventListener&&L.removeEventListener("p",x,!1);var F=k,G="ontouchstart"in L,T="TouchEvent"in L,j=G||T&&R("(any-pointer: coarse)").matches,O=(L.navigator.maxTouchPoints,L.navigator.userAgent||""),M=R("(pointer: coarse)").matches&&/iPad|Macintosh/.test(O)&&Math.min(L.screen.width||0,L.screen.height||0)>=768,C=(R("(pointer: coarse)").matches||R("(pointer: fine)").matches,R("(any-pointer: fine)").matches||R("(any-hover: hover)").matches,function(){function t(i,n){l()(this,t),this.direction=window.getComputedStyle(i,null).getPropertyValue("direction"),this.el=i,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=n,this.tick=null,this.ticking=!1,this.values=_(i),this.widgetEl=null,b(this.values.length,1,this.props.maxStars)?this.build():this.destroy()}return d()(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.changeIndexTo(this.indexSelected=this.selected(),!0),this.handleEvents("add")}},{key:"buildWidget",value:function(){var t=this,i=y(this.el,!1,{class:this.props.classNames.base});i.appendChild(this.el),i.classList.add(this.props.classNames.base+"--"+this.direction);var n=y(this.el,!0,{class:this.props.classNames.base+"--stars"});this.values.forEach((function(i,s){var e=w({"data-index":s,"data-value":i.value});"function"==typeof t.props.stars&&t.props.stars.call(t,e,i,s),[].forEach.call(e.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=e.outerHTML})),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if(this.widgetEl.childNodes.forEach((function(i,s){p(i,s<=t,n.props.classNames.active),p(i,s===n.indexSelected,n.props.classNames.selected)})),"function"!=typeof this.props.stars&&(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var s=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",s)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.handleEvents("remove"),t.parentNode.replaceChild(this.el,t))}},{key:"eventListener",value:function(t,i,n,s){var e=this;n.forEach((function(n){return t[i+"EventListener"](n,e.events[n],s||!1)}))}},{key:"handleEvents",value:function(t){var i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!!F&&{passive:!1}))}},{key:"indexFromEvent",value:function(t){var i,n,s=(null===(i=t.touches)||void 0===i?void 0:i[0])||(null===(n=t.changedTouches)||void 0===n?void 0:n[0])||t,e=document.elementFromPoint(s.clientX,s.clientY);return parseInt(e.dataset.index||-1,10)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var i=t.key.slice(5);if(~["Left","Right"].indexOf(i)){var n="Left"===i?-1:1;"rtl"===this.direction&&(n*=-1);var s=this.values.length-1,e=Math.min(Math.max(this.selected()+n,-1),s);this.selectValue(e)}}},{key:"onPointerDown",value:function(t){t.preventDefault(),this.el.focus();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i)}},{key:"onPointerLeave",value:function(t){var i=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return i.changeIndexTo(i.indexSelected)}))}},{key:"onPointerMove",value:function(t){var i=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return i.changeIndexTo(i.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,i=null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.index;this.selectValue(this.values.findIndex((function(t){return t.index===i})))}},{key:"selected",value:function(){var t=this;return this.values.findIndex((function(i){return i.value===+t.el.value}))}},{key:"selectValue",value:function(t){var i;this.el.value=(null===(i=this.values[t])||void 0===i?void 0:i.value)||"",this.indexSelected=this.selected(),this.el.dispatchEvent(new Event("change"))}}]),t}()),D=function(){function t(i,n){l()(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(i,n)}return d()(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var s=g(m,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.parentNode.classList.contains(s.classNames.base)||n.widgets.push(new C(t,s))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===S(t)?[t]:"NodeList"===S(t)?[].slice.call(t):"String"===S(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}}]),t}(),q=D,I=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},N=function(t){return"."+t.trim().split(" ").join(".")},A=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},H={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?A(this)<=parseInt(i):parseFloat(t)<=parseFloat(i))}},maxlength:{fn:function(t,i){return!t||t.length<=parseInt(i)}},min:{fn:function(t,i){return!t||("checkbox"===this.type?A(this)>=parseInt(i):parseFloat(t)>=parseFloat(i))}},minlength:{fn:function(t,i){return!t||t.length>=parseInt(i)}},number:{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2},required:{fn:function(t){return"radio"===this.type||"checkbox"===this.type?A(this):void 0!==t&&""!==t},priority:99,halt:!0}},P=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.init()};P.prototype={M:["required","max","maxlength","min","minlength","pattern"],C:"input:not([type^=hidden]):not([type^=submit]), select, textarea, [data-glsr-validate]",destroy:function(){for(this.j();this.fields.length;){var t=this.fields.shift();this.D(t.input),delete t.input.validation}},init:function(){var t=this;[].forEach.call(this.form.querySelectorAll(this.C),(function(i){t.fields.find((function(t){return t.input.name===i.name}))||"none"!==i.closest(N(t.config.field)).style.display&&t.fields.push(t.q(i))}))},I:function(t){t.addEventListener(this.N(t),this.A.bind(this,t))},H:function(t,i,n){[].forEach.call(t,function(t){var s=t.name.replace("data-","");~this.M.indexOf(s)?this.P(i,n,s,t.value):"type"===t.name&&this.P(i,n,t.value)}.bind(this))},P:function(t,i,n,s){if(H[n]&&(H[n].name=n,t.push(H[n]),s)){var e=s.split(",");e.unshift(null),i[n]=e}},D:function(t){t.removeEventListener(this.N(t),this.A.bind(this,t))},j:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(N(this.config.field));I(this.fields[t].input,this.config.input_error,!1),I(this.fields[t].input,this.config.input_valid,!1),I(i,this.config.field_error,!1),I(i,this.config.field_valid,!1)}},N:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},q:function(t){var i={},n=[];return null!==t.offsetParent&&(this.H(t.attributes,n,i),this.V(n),this.I(t)),t.validation={form:this.form,input:t,params:i,validators:n}},W:function(t,i){var n=t.input.closest(N(this.config.field));if(I(t.input,this.config.input_error,i),I(t.input,this.config.input_valid,!i),n){I(n,this.config.field_error,i),I(n,this.config.field_valid,!i);var s=n.querySelector(N(this.config.field_message));s.innerHTML=i?t.errors.join("<br>"):"",s.style.display=i?"":"none"}},B:function(t,i){t.hasOwnProperty("validation")&&this.q(t),t.validation.errors=i},V:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},A:function(t){var i=!0,n=this.fields;for(var s in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(s)){var e=n[s];this.J(e)?this.W(e,!1):(i=!1,this.W(e,!0))}return i},J:function(t){var i=[],n=!0;for(var s in t.validators)if(t.validators.hasOwnProperty(s)){var e=t.validators[s],o=t.params[e.name]?t.params[e.name]:[];if(o[0]=t.input.value,!e.fn.apply(t.input,o)){n=!1;var r=this.strings[e.name];if(i.push(r.replace(/(\%s)/g,o[1])),!0===e.halt)break}}return t.errors=i,n}};var V=P,W=function(t,i){this.button=i,this.config=GLSR.validationconfig,this.events={submit:this.U.bind(this)},this.form=t,this.isActive=!1,this.recaptcha=new c(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new V(t)};W.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.Y()},destroyRecaptcha:function(){this.recaptcha.L()},destroyStarRatings:function(){this.stars&&(this.stars.destroy(),delete this.stars)},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit)},initRecaptcha:function(){this.recaptcha.G()},initStarRatings:function(){this.destroyStarRatings(),this.stars=new q(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},O:function(){this.button.setAttribute("disabled","")},_:function(){this.button.removeAttribute("disabled")},$:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.j(),n&&(this.recaptcha.j(),this.form.reset()),this.K(t.errors),this.Z(t.message,n),this._(),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.R()},X:function(){var t=!0;return[].forEach.call(this.form.elements,(function(i){"file"===i.type&&(t=GLSR.ajax.isFileSupported()&&GLSR.ajax.isUploadSupported())})),t&&!this.form.classList.contains("no-ajax")},U:function(t){if(!this.validation.A())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.Y(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.F())},Y:function(){I(this.form,this.config.form_error,!1),this.Z("",null),this.validation.j()},K:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,s=this.form.querySelector('[name="'+n+'"]');s&&(this.validation.B(s,t[i]),this.validation.W(s.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(N(this.config.form_message));null!==n&&(I(this.form,this.config.form_error,!1===i),I(n,this.config.form_message_failed,!1===i),I(n,this.config.form_message_success,!0===i),n.innerHTML=t)},F:function(t){GLSR.ajax.isFormDataSupported()?(this.O(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.$.bind(this))):this.Z(this.strings.unsupported,!1)}};var B=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var s=0;s<i.length;s++)(n=i[s].querySelector("[type=submit]"))&&((t=new W(i[s],n)).init(),GLSR.forms.push(t))},J=B,U=function(t,i){this.paginationEl=t,this.reviewsEl=i,this.tt()};U.prototype={config:{hideClass:"glsr-hide",linkSelector:"a.page-numbers",scrollTime:468},it:function(){var t=document.getElementById(this.paginationEl.dataset.id);return t||this.reviewsEl},$:function(t,i,n){n?(this.paginationEl.innerHTML=i.pagination,this.reviewsEl.innerHTML=i.reviews,this.nt(this.reviewsEl),this.paginationEl.classList.remove(this.config.hideClass),this.reviewsEl.classList.remove(this.config.hideClass),this.tt(),GLSR.urlparameter&&window.history.pushState(null,"",t),new u(this.reviewsEl),document.dispatchEvent(new CustomEvent("site-reviews/after/pagination",{detail:i}))):window.location=t},tt:function(){for(var t=this.paginationEl.querySelectorAll(this.config.linkSelector),i=0;i<t.length;i++)t[i].addEventListener("click",this.S.bind(this))},S:function(t){var i=this.it();if(i){for(var n={},s=0,e=Object.keys(i.dataset);s<e.length;s++){var o=e[s],r=i.dataset[o];try{r=JSON.parse(r)}catch(t){}n[GLSR.nameprefix+"[atts]["+o+"]"]=r}n[GLSR.nameprefix+"[_action]"]="fetch-paged-reviews",n[GLSR.nameprefix+"[page]"]=t.currentTarget.dataset.page||"",n[GLSR.nameprefix+"[url]"]=t.currentTarget.href||"",this.paginationEl.classList.add(this.config.hideClass),this.reviewsEl.classList.add(this.config.hideClass),t.preventDefault(),GLSR.ajax.post(n,this.$.bind(this,t.currentTarget.href))}},nt:function(t,i){var n;i=i||16;for(var s=0;s<GLSR.ajaxpagination.length;s++)(n=document.querySelector(GLSR.ajaxpagination[s]))&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(i+=n.clientHeight);var e=t.getBoundingClientRect().top-i;e>0||this.st({endY:e,offset:window.pageYOffset,startTime:window.performance.now(),startY:t.scrollTop})},st:function(t){var i=(window.performance.now()-t.startTime)/this.config.scrollTime;i=i>1?1:i;var n=.5*(1-Math.cos(Math.PI*i)),s=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+s),s!==t.endY&&window.requestAnimationFrame(this.st.bind(this,t))}};var X=function(){this.navs=[];var t=document.querySelectorAll(".glsr-ajax-pagination");t.length&&t.forEach(function(t){var i=t.closest(".glsr[data-id="+t.dataset.id);if(i){var n=i.querySelector(".glsr-reviews");n&&this.navs.push(new U(t,n))}}.bind(this))},Y=X;window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new r,window.GLSR.forms=[],document.addEventListener("DOMContentLoaded",(function(){for(var t=document.querySelectorAll(".glsr"),i=0;i<t.length;i++){var n=window.getComputedStyle(t[i],null).getPropertyValue("direction");t[i].classList.add("glsr-"+n)}window.GLSR.Forms=J,new J,new Y,new u}))},113:function(){},4030:function(){},6966:function(){},83:function(){},7649:function(){},3408:function(){},529:function(){},2275:function(){},2872:function(){},8865:function(){},4835:function(){},6786:function(){},1045:function(){},3622:function(){},2688:function(){},8340:function(){},3961:function(){},853:function(){},1273:function(){},5651:function(){},7730:function(){},3382:function(){},4747:function(){},4605:function(){},3963:function(){},5406:function(){},6829:function(){},6273:function(){},4518:function(){},6963:function(){}},i={};function n(s){if(i[s])return i[s].exports;var e=i[s]={exports:{}};return t[s](e,e.exports,n),e.exports}n.m=t,n.x=function(){},n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,{a:i}),i},n.d=function(t,i){for(var s in i)n.o(i,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0},i=[[4923],[5406],[6829],[6273],[4518],[6963],[113],[4030],[6966],[83],[7649],[3408],[529],[2275],[2872],[8865],[4835],[6786],[1045],[3622],[2688],[8340],[3961],[853],[1273],[5651],[7730],[3382],[4747],[4605],[3963]],s=function(){},e=function(e,o){for(var r,h,u=o[0],a=o[1],c=o[2],f=o[3],l=0,v=[];l<u.length;l++)h=u[l],n.o(t,h)&&t[h]&&v.push(t[h][0]),t[h]=0;for(r in a)n.o(a,r)&&(n.m[r]=a[r]);for(c&&c(n),e&&e(o);v.length;)v.shift()();return f&&i.push.apply(i,f),s()},o=self.webpackChunk=self.webpackChunk||[];function r(){for(var s,e=0;e<i.length;e++){for(var o=i[e],r=!0,h=1;h<o.length;h++){var u=o[h];0!==t[u]&&(r=!1)}r&&(i.splice(e--,1),s=n(n.s=o[0]))}return 0===i.length&&(n.x(),n.x=function(){}),s}o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o));var h=n.x;n.x=function(){return n.x=h||function(){},(s=r)()}}(),n.x()}();
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, business reviews, product reviews, stars,
5
  Tested up to: 5.6
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.5.1
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -131,6 +131,10 @@ All documentation can be found in the "Help" page of the plugin. If your questio
131
 
132
  ## Changelog
133
 
 
 
 
 
134
  = 5.5.1 (2021-01-26) =
135
 
136
  - Added the missing "What's New" sections
5
  Tested up to: 5.6
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.5.2
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
131
 
132
  ## Changelog
133
 
134
+ = 5.5.2 (2021-01-29) =
135
+
136
+ - Fixed browser support for star-ratings.js
137
+
138
  = 5.5.1 (2021-01-26) =
139
 
140
  - Added the missing "What's New" sections
site-reviews.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
- * Version: 5.5.1
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
+ * Version: 5.5.2
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
views/pages/documentation/faq/plugin-templates.php CHANGED
@@ -9,9 +9,14 @@
9
  <p>Site Reviews uses a custom templating system which makes it easy to customize the HTML of the widgets and shortcodes to meet your needs.</p>
10
  <ol>
11
  <li>Create a folder in your theme called "site-reviews".</li>
12
- <li>Copy the template files that you would like to customise from <code>/wp-content/plugins/site-reviews/templates/</code> into this new folder.</li>
13
  <li>Open the template files that you copied over in a text editor and make your changes.</li>
14
  </ol>
 
 
 
 
 
15
  <pre><code class="language-html"> wp-content/plugins/site-reviews/templates
16
  ├── form This folder contains the template files for the form fields
17
  │ ├── field.php This template displays the field. To target a specific field type, append the type with an underscore (i.e. field_email.php, field_textarea.php)
9
  <p>Site Reviews uses a custom templating system which makes it easy to customize the HTML of the widgets and shortcodes to meet your needs.</p>
10
  <ol>
11
  <li>Create a folder in your theme called "site-reviews".</li>
12
+ <li>Copy the template files that you would like to customise from <code>/wp-content/plugins/site-reviews/templates/</code> into this new folder, keeping the subdirectories the same.</li>
13
  <li>Open the template files that you copied over in a text editor and make your changes.</li>
14
  </ol>
15
+ <p>For example:</p>
16
+ <p><code>/wp-content/plugins/site-reviews/templates/form/field.php</code><br><br>
17
+ Would be copied here:<br><br>
18
+ <code>/wp-content/themes/&lt;your-child-theme&gt;/site-reviews/form/field.php</code>
19
+ </p>
20
  <pre><code class="language-html"> wp-content/plugins/site-reviews/templates
21
  ├── form This folder contains the template files for the form fields
22
  │ ├── field.php This template displays the field. To target a specific field type, append the type with an underscore (i.e. field_email.php, field_textarea.php)