Site Reviews - Version 5.20.3

Version Description

(2022-02-01) =

  • Added ability to autodetect the CSV delimeter when importing reviews
  • Fixed a bug which allowed spam reviews to bypass validation
  • Fixed licensing for outdated add-ons
Download this release

Release Info

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

Code changes from version 5.20.2 to 5.20.3

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={433: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:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/\blang(?:uage)?-([\w-]+)\b/i,e=0,i={},r={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof o?new o(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.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(n,e){var i,o;switch(e=e||{},r.util.type(n)){case"Object":if(o=r.util.objId(n),e[o])return e[o];for(var s in i={},e[o]=i,n)n.hasOwnProperty(s)&&(i[s]=t(n[s],e));return i;case"Array":return o=r.util.objId(n),e[o]?e[o]:(i=[],e[o]=i,n.forEach((function(n,r){i[r]=t(n,e)})),i);default:return n}},getLanguage:function(t){for(;t&&!n.test(t.className);)t=t.parentElement;return t?(t.className.match(n)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(t,n){var e=r.util.clone(r.languages[t]);for(var i in n)e[i]=n[i];return e},insertBefore:function(t,n,e,i){var o=(i=i||r.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=i[t];return i[t]=s,r.languages.DFS(r.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,i,o){o=o||{};var s=r.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],i||a);var u=n[a],c=r.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){r.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var i={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),r.hooks.run("before-all-elements-highlight",i);for(var o,s=0;o=i.elements[s++];)r.highlightElement(o,!0===n,i.callback)},highlightElement:function(e,i,o){var s=r.util.getLanguage(e),a=r.languages[s];e.className=e.className.replace(n,"").replace(/\s+/g," ")+" language-"+s;var u=e.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(n,"").replace(/\s+/g," ")+" language-"+s);var c={element:e,language:s,grammar:a,code:e.textContent};function l(t){c.highlightedCode=t,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,r.hooks.run("after-highlight",c),r.hooks.run("complete",c),o&&o.call(c.element)}if(r.hooks.run("before-sanity-check",c),(u=c.element.parentElement)&&"pre"===u.nodeName.toLowerCase()&&!u.hasAttribute("tabindex")&&u.setAttribute("tabindex","0"),!c.code)return r.hooks.run("complete",c),void(o&&o.call(c.element));if(r.hooks.run("before-highlight",c),c.grammar)if(i&&t.Worker){var f=new Worker(r.filename);f.onmessage=function(t){l(t.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(r.highlight(c.code,c.grammar,c.language));else l(r.util.encode(c.code))},highlight:function(t,n,e){var i={code:t,grammar:n,language:e};return r.hooks.run("before-tokenize",i),i.tokens=r.tokenize(i.code,i.grammar),r.hooks.run("after-tokenize",i),o.stringify(r.util.encode(i.tokens),i.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new u;return c(r,r.head,t),a(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=r.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=r.hooks.all[t];if(e&&e.length)for(var i,o=0;i=e[o++];)i(n)}},Token:o};function o(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function s(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function a(t,n,e,i,u,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,b=!!v.lookbehind,y=!!v.greedy,g=v.alias;if(y&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var k=v.pattern||v,_=i.next,j=u;_!==n.tail&&!(f&&j>=f.reach);j+=_.value.length,_=_.next){var x=_.value;if(n.length>t.length)return;if(!(x instanceof o)){var S,Q=1;if(y){if(!(S=s(k,j,t,b)))break;var F=S.index,O=S.index+S[0].length,R=j;for(R+=_.value.length;F>=R;)R+=(_=_.next).value.length;if(j=R-=_.value.length,_.value instanceof o)continue;for(var A=_;A!==n.tail&&(R<O||"string"==typeof A.value);A=A.next)Q++,R+=A.value.length;Q--,x=t.slice(j,R),S.index-=j}else if(!(S=s(k,0,x,b)))continue;F=S.index;var z=S[0],P=x.slice(0,F),L=x.slice(F+z.length),$=j+x.length;f&&$>f.reach&&(f.reach=$);var C=_.prev;if(P&&(C=c(n,C,P),j+=P.length),l(n,C,Q),_=c(n,C,new o(d,m?r.tokenize(z,m):z,g,z)),L&&c(n,_,L),Q>1){var T={cause:d+","+p,reach:$};a(t,n,e,_.prev,j,T),f&&T.reach>f.reach&&(f.reach=T.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function c(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function l(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=r,o.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var i="";return n.forEach((function(n){i+=t(n,e)})),i}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),r.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(r.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),i=e.language,o=e.code,s=e.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),s&&t.close()}),!1),r):r;var f=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(f&&(r.filename=f.src,f.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var h=document.readyState;"loading"===h||"interactive"===h&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))}(Prism)},980: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\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|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])+\/[dgimyus]{0,7}(?=(?:\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-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"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:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,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",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"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.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),b=d.substring(p+h.length),y=[];v&&y.push.apply(y,s([v])),y.push(m),b&&y.push.apply(y,s([b])),"string"==typeof c?a.splice.apply(a,[u,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},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/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"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,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),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},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},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*[\w|]\|\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*)?[\w|]\|\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},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|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,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|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:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},a=[{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:s}},{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:s}}];t.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"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:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,o=i.parentNode;if(o&&/pre/i.test(o.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),o.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),e.element.appendChild(s),r([o]),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 n=function(t){if(!t)return null;return window.getComputedStyle?getComputedStyle(t):t.currentStyle||null}(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,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=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}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.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,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"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,n=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(n||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(n){return n.value===+t}))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},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,n){return Object.prototype.hasOwnProperty.call(t,n)},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,n,e){return t[n]=e,t},encode:function(t){return"checkbox"===jQuery('[name="'+t.name+'"]',this.form).attr("type")&&"on"===t.value||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 n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.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 i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[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,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.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 n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r,o,s=i,a="function"==typeof Map?new Map:(r=[],o=[],{has:function(t){return r.indexOf(t)>-1},get:function(t){return o[r.indexOf(t)]},set:function(t,n){-1===r.indexOf(t)&&(r.push(t),o.push(n))},delete:function(t){var n=r.indexOf(t);n>-1&&(r.splice(n,1),o.splice(n,1))}}),u=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(r){u=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function c(t){var n=a.get(t);n&&n.destroy()}function l(t){var n=a.get(t);n&&n.update()}var f=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((f=function(t){return t}).destroy=function(t){return t},f.update=function(t){return t}):((f=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!a.has(t)){var n,e=null,i=null,r=null,o=function(){t.clientWidth!==i&&f()},s=function(n){window.removeEventListener("resize",o,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),a.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",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",a.set(t,{destroy:s,update:f}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),f()}function c(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function l(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",i=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function f(){l();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),i="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(i<n?"hidden"===e.overflowY&&(c("scroll"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(c("hidden"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),r!==i){r=i;var o=u("autosize:resized");try{t.dispatchEvent(o)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t},f.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t});var d=f;function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var p=function(){"object"===h(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){var t=jQuery(this),n=jQuery.extend({},t.data("colorpicker")||{},{change:function(t,n){jQuery(t.target).val(n.color.toString()).trigger("change")},mode:"hsl",palettes:!1,width:180});t.wpColorPicker(n)}))},v={},m=function(t,n){var e=v[t]||[],i=[];n&&[].forEach.call(e,(function(t){n!==t.fn&&n!==t.fn.once&&i.push(t)})),i.length?v[t]=i:delete v[t]},b=function(t,n,e){(v[t]||(v[t]=[])).push({fn:n,context:e})},y={events:v,trigger:function(t){var n=[].slice.call(arguments,1),e=(v[t]||[]).slice();[].forEach.call(e,(function(t){return t.fn.apply(t.context,n)}))},off:m,on:b,once:function(t,n,e){var i=arguments,r=function r(){m(t,r),n.apply(e,i)};r.once=n,b(t,r,e)}},g=function(){this.request=null,jQuery(".enable-filter-tog","#adv-settings").on("click",this.h.bind(this))};g.prototype={p:function(){return jQuery(".enable-filter-tog:checked").map((function(t,n){return n.value})).get()},h:function(t){var n=jQuery(t.currentTarget),e=n.prop("checked")?"removeClass":"addClass";jQuery("#glsr-filter-by-"+n.val())[e]("hidden"),this.v()},v:_.debounce((function(){this.request&&this.request.abort();var t={_ajax_request:!0};t[GLSR.nameprefix]={_action:"toggle-filters",_nonce:GLSR.nonce["toggle-filters"],enabled:this.p()},this.request=wp.ajax.post(GLSR.action,t),this.request.always(function(){this.request=null}.bind(this))}),500)};var w=g,k=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.m())};k.prototype={k:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return console.error(t)}},m:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this._.bind(this))},j:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this.S(n).indexOf(this.F(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},F:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},S:function(t){return t.map(this.F)},_:function(t){this.depends.forEach(function(n){var e=this.k(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.j(t.name,t.value)||(i=!1)}.bind(this)),this.O(n,i)}}.bind(this))},O:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var j=k,x=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.R.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.A.bind(this))};x.prototype={A:function(t){var n=jQuery(t.currentTarget);this.P(n.parent().find("img"),n.val())},R:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.P(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},P:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var S=x,Q=function(){this.m()};Q.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"))},m:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.h.bind(this))},h:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var F=Q,O=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.L.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.$.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.C.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.T.bind(this))};O.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},L:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},$:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},C:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(n).post(this.q.bind(this))},T:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id"),pinned:-1};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(n).post(this.M.bind(this))},q: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)},M:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var R=O,A=function(){jQuery.each(GLSR.pointers,function(t,n){this.m(n)}.bind(this))};A.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},m: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 z=A,P=e(325),L=e.n(P),$=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.m()});$.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"},m: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.B.bind(this),500)),this.options.searchEl.on("keyup",this.U.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.W.bind(this)),jQuery(document).on("keydown",this.H.bind(this))},N:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},V:function(){this.N(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},Z:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.K(),e.X()}))},Y:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},tt:function(){this.options.entriesEl.on("click","a.delete",this.nt.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},et: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()},W:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.V()},H:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.V(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.et(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.et(1))}},nt:function(t){t.preventDefault(),this.Z(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.V()},B:function(t){if(this.N(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.Y(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 n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:GLSR.nonce[this.options.action],exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.Y(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},U:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.B(t),t.preventDefault())},rt:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},K:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.V(),this.options.results={},this.options.searchEl.val("")},X:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var C=$,T=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.m()};T.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},m:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.h.bind(t)),n.addEventListener("touchend",t.h.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=this.dataset.expand;localStorage.setItem("glsr-expand",n),t.ot(jQuery(n))})),jQuery(window).on("load",(function(){t.ot(jQuery(localStorage.getItem("glsr-expand")))}))},h:function(t){t.preventDefault(),this.st(t.currentTarget)},ot:function(t){if(t.length){var n=t.closest(".glsr-nav-view"),e=t.closest(".glsr-card");n.removeClass("collapsed"),this.ut(n),n.removeClass("collapsed"),e.removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){localStorage.removeItem("glsr-expand"),jQuery("#glsr-notices .notice").length||e[0].scrollIntoView({behavior:"smooth",block:e.outerHeight()>=window.innerHeight?"start":"center"})}),10)}},ut:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},st:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery("#"+t.dataset.id);this.ut(n)}}};var E=T,G=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new s(n).post(this.ct.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.m(t,n,e)}.bind(this))};G.prototype={lt:{},ft:[],m:function(t,n,e){document.addEventListener("click",this.dt.bind(this,t,n)),n.addEventListener("click",this.ht.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.vt.bind(this,t,n))}.bind(this))},bt:function(){tinymce.execCommand("GLSR_Shortcode")},yt:function(){jQuery("#scTemp").length?this.bt():(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.bt()}.bind(this),200))},D:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},gt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.lt={},this.ft=[]},ct:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.gt();var n=this.wt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},kt:function(t){for(var n in this.lt=t,this.ft=[],t)t.hasOwnProperty(n)&&(this._t(n),this.jt(n),this.xt(n));this.lt.hide=this.ft.join(",")},_t:function(t){"display"!==t||jQuery.isNumeric(this.lt[t])||(this.lt[t]="")},jt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.lt[t]&&this.ft.push(n),delete this.lt[t])}},xt:function(t){"id"===t&&(this.lt[t]=(+new Date).toString(36))},dt:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,n)},ht:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,n):this.St(t,n)},vt:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.bt():this.yt(),setTimeout(function(){this.D(t,n)}.bind(this),100))},St:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},Qt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.Ft.bind(this),text:t.ok},{onclick:"close",text:t.close}]},wt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.Qt(t),onsubmit:this.Ot.bind(this,t),onclose:this.gt.bind(this)}},Ot:function(t,n){var e="";for(var i in this.kt(n.data),this.lt)this.lt.hasOwnProperty(i)&&""!==this.lt[i]&&(e+=" "+i+'="'+this.lt[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},Ft:function(){var t=this.editor.windowManager.getWindows()[0];this.Rt(t)&&t.submit()},Rt:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var q=G,M=e(449),D=e.n(M),I=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.h)}.bind(this))};I.prototype={h:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};jQuery(t.target).closest("tr").find(".locked-indicator").addClass("spinner is-active"),new s(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").find(".locked-indicator").removeClass("spinner is-active"),e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var B=I,U=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.At.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};U.prototype={Pt: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.Lt(!1)},At:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Lt(!0),this.$t())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},$t:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Ct.bind(this))},Ct:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Tt.bind(this,t):this.Ct.bind(this);this.Et(t.message),this.Gt(t.percent),setTimeout((function(){new s(n).post(e)}),1500)},Tt:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Et(t.message),t.percent_synced&&t.percent_synced>=100?this.Pt(t):new s(e).post(this.Tt.bind(this))},Et:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Gt:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Lt:function(t){if(!0===t&&(this.Et(this.progressbar.data("active-text")),this.Gt(),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.Lt.bind(this))}};var W=U,H=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.refererInputs=jQuery("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.refererInputs.length&&this.tabs&&this.views&&this.m()};H.prototype={defaults:{smartLinks:".glsr-card a, #glsr-notices a",tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},m:function(){var t=this;jQuery(this.options.tabSelector).each((function(n,e){var i=e.getAttribute("href"),r=t.qt(e,"tab"),o=t.Mt("tab");null===o&&0===n&&(o=r,history.replaceState({href:i,tab:r},"",i),t.refererInputs.val(i)),o===r&&t.Dt(r)})),jQuery(window).on("popstate",this.It.bind(this)),jQuery(this.options.smartLinks).on("click",this.Bt.bind(this)),jQuery(this.options.tabSelector+","+this.options.viewSubsubsub).on("click",this.h.bind(this))},h:function(t){var n=t.currentTarget,e=n.getAttribute("href"),i=this.qt(n,"tab");i&&(history.pushState({href:e,tab:i},"",e),this.refererInputs.val(e),this.Dt(i),t.preventDefault(),n.blur())},Bt:function(t){var n=t.currentTarget,e=this.Mt("page"),i=this.Mt("postType"),r=this.Mt("tab"),o=this.qt(n,"page"),s=this.qt(n,"postType"),a=this.qt(n,"tab");if(o===e&&s===i&&a){var u=n.getAttribute("href");history.pushState({href:u,tab:a},"",u),this.refererInputs.val(u),this.Dt(a),a!==r&&window.scrollTo(0,0),t.preventDefault()}},It:function(t){var n=t.originalEvent.state;n&&n.tab&&n.href&&(this.refererInputs.val(n.href),this.Dt(n.tab))},Ut:function(t){return t?"add":"remove"},qt:function(t,n){return new URLSearchParams(t.getAttribute("href")).get(n)},Mt:function(t){return new URLSearchParams(location.search).get(t)},Dt:function(t){for(var n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Wt(this.tabs[n]);break}},Ht:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),t.qt(e,"sub")===t.Mt("sub")&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.Ut(i!==n);e.classList[r]("ui-tabs-hide")}))},Wt:function(t){var n=this;[].forEach.call(this.tabs,(function(e,i){var r=n.Ut(e===t);"add"===r&&(n.active.value=n.views[i].id,n.Nt(i)),e.classList[r]("nav-tab-active")}))},Nt:function(t){var n=this;[].forEach.call(this.views,(function(e,i){var r=n.Ut(i!==t);e.classList[r]("ui-tabs-hide"),n.Ht()}))}};var N=H,V=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Vt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Vt(t)}.bind(this)))};V.prototype={Vt:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var Z=V,K=function(){jQuery("form").on("click","#glsr-clear-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","#glsr-fetch-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.h.bind(this)),jQuery(".glsr-button").on("click",this.Kt);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Xt.bind(this,t)),jQuery(document).on("keyup",this.Yt.bind(this,t)))};K.prototype={Zt:function(t,n){n&&jQuery("#glsr-log-file").val(t.console)},h:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new s({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Kt),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Xt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Yt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Kt:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var X=K;function Y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function J(t){return t instanceof Y(t).Element||t instanceof Element}function tt(t){return t instanceof Y(t).HTMLElement||t instanceof HTMLElement}function nt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Y(t).ShadowRoot||t instanceof ShadowRoot)}var et=Math.round;function it(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),i=1,r=1;if(tt(t)&&n){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(i=e.width/s||1),o>0&&(r=e.height/o||1)}return{width:et(e.width/i),height:et(e.height/r),top:et(e.top/r),right:et(e.right/i),bottom:et(e.bottom/r),left:et(e.left/i),x:et(e.left/i),y:et(e.top/r)}}function rt(t){var n=Y(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ot(t){return t?(t.nodeName||"").toLowerCase():null}function st(t){return((J(t)?t.ownerDocument:t.document)||window.document).documentElement}function at(t){return it(st(t)).left+rt(t).scrollLeft}function ut(t){return Y(t).getComputedStyle(t)}function ct(t){var n=ut(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function lt(t,n,e){void 0===e&&(e=!1);var i,r,o=tt(n),s=tt(n)&&function(t){var n=t.getBoundingClientRect(),e=n.width/t.offsetWidth||1,i=n.height/t.offsetHeight||1;return 1!==e||1!==i}(n),a=st(n),u=it(t,s),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&(("body"!==ot(n)||ct(a))&&(c=(i=n)!==Y(i)&&tt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:rt(i)),tt(n)?((l=it(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=at(a))),{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function ft(t){var n=it(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function dt(t){return"html"===ot(t)?t:t.assignedSlot||t.parentNode||(nt(t)?t.host:null)||st(t)}function ht(t){return["html","body","#document"].indexOf(ot(t))>=0?t.ownerDocument.body:tt(t)&&ct(t)?t:ht(dt(t))}function pt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Y(i),s=r?[o].concat(o.visualViewport||[],ct(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(pt(dt(s)))}function vt(t){return["table","td","th"].indexOf(ot(t))>=0}function mt(t){return tt(t)&&"fixed"!==ut(t).position?t.offsetParent:null}function bt(t){for(var n=Y(t),e=mt(t);e&&vt(e)&&"static"===ut(e).position;)e=mt(e);return e&&("html"===ot(e)||"body"===ot(e)&&"static"===ut(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&tt(t)&&"fixed"===ut(t).position)return null;for(var e=dt(t);tt(e)&&["html","body"].indexOf(ot(e))<0;){var i=ut(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var yt="top",gt="bottom",wt="right",kt="left",_t="auto",jt=[yt,gt,wt,kt],xt="start",St="end",Qt="viewport",Ft="popper",Ot=jt.reduce((function(t,n){return t.concat([n+"-"+xt,n+"-"+St])}),[]),Rt=[].concat(jt,[_t]).reduce((function(t,n){return t.concat([n,n+"-"+xt,n+"-"+St])}),[]),At=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function $t(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?Pt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){var r="function"==typeof e?e(a.options):e;f(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:J(t)?pt(t):t.contextElement?pt(t.contextElement):[],popper:pt(n)};var s=function(t){var n=zt(t);return At.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(Lt(n,e)){a.rects={reference:lt(n,bt(e),"fixed"===a.options.strategy),popper:ft(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!Lt(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var Ct={passive:!0};var Tt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=Y(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,Ct)})),a&&u.addEventListener("resize",e.update,Ct),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,Ct)})),a&&u.removeEventListener("resize",e.update,Ct)}},data:{}};function Et(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Mt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?Et(r):null,s=r?Gt(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case yt:n={x:a,y:e.y-i.height};break;case gt:n={x:a,y:e.y+e.height};break;case wt:n={x:e.x+e.width,y:u};break;case kt:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?qt(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case xt:n[c]=n[c]-(e[l]/2-i[l]/2);break;case St:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Dt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Mt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},It=Math.max,Bt=Math.min,Ut=Math.round,Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ht(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=!0===l?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:Ut(Ut(n*i)/i)||0,y:Ut(Ut(e*i)/i)||0}}(s):"function"==typeof l?l(s):s,d=f.x,h=void 0===d?0:d,p=f.y,v=void 0===p?0:p,m=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=kt,g=yt,w=window;if(c){var k=bt(e),_="clientHeight",j="clientWidth";k===Y(e)&&"static"!==ut(k=st(e)).position&&"absolute"===a&&(_="scrollHeight",j="scrollWidth"),k=k,r!==yt&&(r!==kt&&r!==wt||o!==St)||(g=gt,v-=k[_]-i.height,v*=u?1:-1),r!==kt&&(r!==yt&&r!==gt||o!==St)||(y=wt,h-=k[j]-i.width,h*=u?1:-1)}var x,S=Object.assign({position:a},c&&Wt);return u?Object.assign({},S,((x={})[g]=b?"0":"",x[y]=m?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",x)):Object.assign({},S,((n={})[g]=b?v+"px":"",n[y]=m?h+"px":"",n.transform="",n))}var Nt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];tt(r)&&ot(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});tt(i)&&ot(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Vt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=Rt.reduce((function(t,e){return t[e]=function(t,n,e){var i=Et(t),r=[kt,yt].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[kt,wt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},Zt={left:"right",right:"left",bottom:"top",top:"bottom"};function Kt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Zt[t]}))}var Xt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Xt[t]}))}function Jt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&nt(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function tn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nn(t,n){return n===Qt?tn(function(t){var n=Y(t),e=st(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+at(t),y:a}}(t)):tt(n)?function(t){var n=it(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):tn(function(t){var n,e=st(t),i=rt(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=It(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+at(t),u=-i.scrollTop;return"rtl"===ut(r||e).direction&&(a+=It(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(st(t)))}function en(t,n,e){var i="clippingParents"===n?function(t){var n=pt(dt(t)),e=["absolute","fixed"].indexOf(ut(t).position)>=0&&tt(t)?bt(t):t;return J(e)?n.filter((function(t){return J(t)&&Jt(t,e)&&"body"!==ot(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=nn(t,e);return n.top=It(i.top,n.top),n.right=Bt(i.right,n.right),n.bottom=Bt(i.bottom,n.bottom),n.left=It(i.left,n.left),n}),nn(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rn(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function on(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function sn(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?Qt:a,c=e.elementContext,l=void 0===c?Ft:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=rn("number"!=typeof p?p:on(p,jt)),m=l===Ft?"reference":Ft,b=t.rects.popper,y=t.elements[d?m:l],g=en(J(y)?y:y.contextElement||st(t.elements.popper),s,u),w=it(t.elements.reference),k=Mt({reference:w,element:b,strategy:"absolute",placement:r}),_=tn(Object.assign({},b,k)),j=l===Ft?_:w,x={top:g.top-j.top+v.top,bottom:j.bottom-g.bottom+v.bottom,left:g.left-j.left+v.left,right:j.right-g.right+v.right},S=t.modifiersData.offset;if(l===Ft&&S){var Q=S[r];Object.keys(x).forEach((function(t){var n=[wt,gt].indexOf(t)>=0?1:-1,e=[yt,gt].indexOf(t)>=0?"y":"x";x[t]+=Q[e]*n}))}return x}var an={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,b=Et(m),y=u||(b===m||!p?[Kt(m)]:function(t){if(Et(t)===_t)return[];var n=Kt(t);return[Yt(t),n,Yt(n)]}(m)),g=[m].concat(y).reduce((function(t,e){return t.concat(Et(e)===_t?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?Rt:u,l=Gt(i),f=l?a?Ot:Ot.filter((function(t){return Gt(t)===l})):jt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=sn(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[Et(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,k=n.rects.popper,_=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var Q=g[S],F=Et(Q),O=Gt(Q)===xt,R=[yt,gt].indexOf(F)>=0,A=R?"width":"height",z=sn(n,{placement:Q,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=R?O?wt:kt:O?gt:yt;w[A]>k[A]&&(P=Kt(P));var L=Kt(P),$=[];if(o&&$.push(z[F]<=0),a&&$.push(z[P]<=0,z[L]<=0),$.every((function(t){return t}))){x=Q,j=!1;break}_.set(Q,$)}if(j)for(var C=function(t){var n=g.find((function(n){var e=_.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===C(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function un(t,n,e){return It(t,Bt(n,e))}var cn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=sn(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),b=Et(n.placement),y=Gt(n.placement),g=!y,w=qt(b),k="x"===w?"y":"x",_=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,Q={x:0,y:0};if(_){if(o||a){var F="y"===w?yt:kt,O="y"===w?gt:wt,R="y"===w?"height":"width",A=_[w],z=_[w]+m[F],P=_[w]-m[O],L=h?-x[R]/2:0,$=y===xt?j[R]:x[R],C=y===xt?-x[R]:-j[R],T=n.elements.arrow,E=h&&T?ft(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=G[F],M=G[O],D=un(0,j[R],E[R]),I=g?j[R]/2-L-D-q-S:$-D-q-S,B=g?-j[R]/2+L+D+M+S:C+D+M+S,U=n.elements.arrow&&bt(n.elements.arrow),W=U?"y"===w?U.clientTop||0:U.clientLeft||0:0,H=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=_[w]+I-H-W,V=_[w]+B-H;if(o){var Z=un(h?Bt(z,N):z,A,h?It(P,V):P);_[w]=Z,Q[w]=Z-A}if(a){var K="x"===w?yt:kt,X="x"===w?gt:wt,Y=_[k],J=Y+m[K],tt=Y-m[X],nt=un(h?Bt(J,N):J,Y,h?It(tt,V):tt);_[k]=nt,Q[k]=nt-Y}}n.modifiersData[i]=Q}},requiresIfExists:["offset"]};var ln={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Et(e.placement),u=qt(a),c=[kt,wt].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return rn("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:on(t,jt))}(r.padding,e),f=ft(o),d="y"===u?yt:kt,h="y"===u?gt:wt,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=bt(o),b=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,g=l[d],w=b-f[c]-l[h],k=b/2-f[c]/2+y,_=un(g,k,w),j=u;e.modifiersData[i]=((n={})[j]=_,n.centerOffset=_-k,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Jt(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function dn(t){return[yt,wt,gt,kt].some((function(n){return t[n]>=0}))}var hn=$t({defaultModifiers:[Tt,Dt,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:Et(n.placement),variation:Gt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,Ht(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ht(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Nt,Vt,an,cn,ln,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=sn(n,{elementContext:"reference"}),a=sn(n,{altBoundary:!0}),u=fn(s,i),c=fn(a,r,o),l=dn(u),f=dn(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),pn="tippy-content",vn="tippy-backdrop",mn="tippy-arrow",bn="tippy-svg-arrow",yn={passive:!0,capture:!0},gn=function(){return document.body};function wn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function kn(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function _n(t,n){return"function"==typeof t?t.apply(void 0,n):t}function jn(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function xn(t){return[].concat(t)}function Sn(t,n){-1===t.indexOf(n)&&t.push(n)}function Qn(t){return t.split("-")[0]}function Fn(t){return[].slice.call(t)}function On(){return document.createElement("div")}function Rn(t){return["Element","Fragment"].some((function(n){return kn(t,n)}))}function An(t){return kn(t,"MouseEvent")}function zn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Pn(t){return Rn(t)?[t]:function(t){return kn(t,"NodeList")}(t)?Fn(t):Array.isArray(t)?t:Fn(document.querySelectorAll(t))}function Ln(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function $n(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Cn(t){var n,e=xn(t)[0];return(null==e||null==(n=e.ownerDocument)?void 0:n.body)?e.ownerDocument:document}function Tn(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}function En(t,n){for(var e=n;e;){var i;if(t.contains(e))return!0;e=null==(i=null==e.getRootNode?void 0:e.getRootNode())?void 0:i.host}return!1}var Gn={isTouch:!1},qn=0;function Mn(){Gn.isTouch||(Gn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Dn))}function Dn(){var t=performance.now();t-qn<20&&(Gn.isTouch=!1,document.removeEventListener("mousemove",Dn)),qn=t}function In(){var t=document.activeElement;if(zn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Bn=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Un={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wn=Object.assign({appendTo:gn,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Un,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Hn=Object.keys(Wn);function Nn(t){var n=(t.plugins||[]).reduce((function(n,e){var i,r=e.name,o=e.defaultValue;r&&(n[r]=void 0!==t[r]?t[r]:null!=(i=Wn[r])?i:o);return n}),{});return Object.assign({},t,{},n)}function Vn(t,n){var e=Object.assign({},n,{content:_n(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(Nn(Object.assign({},Wn,{plugins:n}))):Hn).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Wn.aria,{},e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Zn(t,n){t.innerHTML=n}function Kn(t){var n=On();return!0===t?n.className=mn:(n.className=bn,Rn(t)?n.appendChild(t):Zn(n,t)),n}function Xn(t,n){Rn(n.content)?(Zn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Zn(t,n.content):t.textContent=n.content)}function Yn(t){var n=t.firstElementChild,e=Fn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(pn)})),arrow:e.find((function(t){return t.classList.contains(mn)||t.classList.contains(bn)})),backdrop:e.find((function(t){return t.classList.contains(vn)}))}}function Jn(t){var n=On(),e=On();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=On();function r(e,i){var r=Yn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||Xn(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Kn(i.arrow))):o.appendChild(Kn(i.arrow)):a&&o.removeChild(a)}return i.className=pn,i.setAttribute("data-state","hidden"),Xn(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}Jn.$$tippy=!0;var te=1,ne=[],ee=[];function ie(t,n){var e,i,r,o,s,a,u,c,l,f=Vn(t,Object.assign({},Wn,{},Nn((e=n,Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{}))))),d=!1,h=!1,p=!1,v=!1,m=[],b=jn(V,f.interactiveDebounce),y=te++,g=(l=f.plugins).filter((function(t,n){return l.indexOf(t)===n})),w={id:y,reference:t,popper:On(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){0;if(w.state.isDestroyed)return;$("onBeforeUpdate",[w,n]),H();var e=w.props,i=Vn(t,Object.assign({},w.props,{},n,{ignoreAttributes:!0}));w.props=i,W(),e.interactiveDebounce!==i.interactiveDebounce&&(E(),b=jn(V,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?xn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");T(),L(),j&&j(e,i);w.popperInstance&&(Y(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));$("onAfterUpdate",[w,n])},setContent:function(t){w.setProps({content:t})},show:function(){0;var t=w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=Gn.isTouch&&!w.props.touch,r=wn(w.props.duration,0,Wn.duration);if(t||n||e||i)return;if(R().hasAttribute("disabled"))return;if($("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,O()&&(_.style.visibility="visible");L(),D(),w.state.isMounted||(_.style.transition="none");if(O()){var o=z(),s=o.box,a=o.content;Ln([s,a],0)}u=function(){var t;if(w.state.isVisible&&!v){if(v=!0,_.offsetHeight,_.style.transition=w.props.moveTransition,O()&&w.props.animation){var n=z(),e=n.box,i=n.content;Ln([e,i],r),$n([e,i],"visible")}C(),T(),Sn(ee,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,$("onMount",[w]),w.props.animation&&O()&&function(t,n){B(t,n)}(r,(function(){w.state.isShown=!0,$("onShown",[w])}))}},function(){var t,n=w.props.appendTo,e=R();t=w.props.interactive&&n===gn||"parent"===n?e.parentNode:_n(n,[e]);t.contains(_)||t.appendChild(_);Y(),!1}()},hide:function(){0;var t=!w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=wn(w.props.duration,1,Wn.duration);if(t||n||e)return;if($("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,O()&&(_.style.visibility="hidden");if(E(),I(),L(),O()){var r=z(),o=r.box,s=r.content;w.props.animation&&(Ln([o,s],i),$n([o,s],"hidden"))}C(),T(),w.props.animation?O()&&function(t,n){B(t,(function(){!w.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&n()}))}(i,w.unmount):w.unmount()},hideWithInteractivity:function(t){0;A().addEventListener("mousemove",b),Sn(ne,b),b(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){0;w.state.isVisible&&w.hide();if(!w.state.isMounted)return;J(),tt().forEach((function(t){t._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);ee=ee.filter((function(t){return t!==w})),w.state.isMounted=!1,$("onHidden",[w])},destroy:function(){0;if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),H(),delete t._tippy,w.state.isDestroyed=!0,$("onDestroy",[w])}};if(!f.render)return w;var k=f.render(w),_=k.popper,j=k.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+w.id,w.popper=_,t._tippy=w,_._tippy=w;var x=g.map((function(t){return t.fn(w)})),S=t.hasAttribute("aria-expanded");return W(),T(),L(),$("onCreate",[w]),f.showOnCreate&&nt(),_.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(A().addEventListener("mousemove",b),b(t))})),w;function Q(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function F(){return"hold"===Q()[0]}function O(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function R(){return c||t}function A(){var t=R().parentNode;return t?Cn(t):document}function z(){return Yn(_)}function P(t){return w.state.isMounted&&!w.state.isVisible||Gn.isTouch||s&&"focus"===s.type?0:wn(w.props.delay,t?0:1,Wn.delay)}function L(){_.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",_.style.zIndex=""+w.props.zIndex}function $(t,n,e){var i;(void 0===e&&(e=!0),x.forEach((function(e){e[t]&&e[t].apply(void 0,n)})),e)&&(i=w.props)[t].apply(i,n)}function C(){var n=w.props.aria;if(n.content){var e="aria-"+n.content,i=_.id;xn(w.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(w.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function T(){!S&&w.props.aria.expanded&&xn(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===R()?"true":"false"):t.removeAttribute("aria-expanded")}))}function E(){A().removeEventListener("mousemove",b),ne=ne.filter((function(t){return t!==b}))}function G(t){if(!Gn.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!w.props.interactive||!En(_,n)){if(En(R(),n)){if(Gn.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else $("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||I())}}}function q(){p=!0}function M(){p=!1}function D(){var t=A();t.addEventListener("mousedown",G,!0),t.addEventListener("touchend",G,yn),t.addEventListener("touchstart",M,yn),t.addEventListener("touchmove",q,yn)}function I(){var t=A();t.removeEventListener("mousedown",G,!0),t.removeEventListener("touchend",G,yn),t.removeEventListener("touchstart",M,yn),t.removeEventListener("touchmove",q,yn)}function B(t,n){var e=z().box;function i(t){t.target===e&&(Tn(e,"remove",i),n())}if(0===t)return n();Tn(e,"remove",a),Tn(e,"add",i),a=i}function U(n,e,i){void 0===i&&(i=!1),xn(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),m.push({node:t,eventType:n,handler:e,options:i})}))}function W(){var t;F()&&(U("touchstart",N,{passive:!0}),U("touchend",Z,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(U(t,N),t){case"mouseenter":U("mouseleave",Z);break;case"focus":U(Bn?"focusout":"blur",K);break;case"focusin":U("focusout",K)}}))}function H(){m.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),m=[]}function N(t){var n,e=!1;if(w.state.isEnabled&&!X(t)&&!h){var i="focus"===(null==(n=s)?void 0:n.type);s=t,c=t.currentTarget,T(),!w.state.isVisible&&An(t)&&ne.forEach((function(n){return n(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?e=!0:nt(t),"click"===t.type&&(d=!e),e&&!i&&et(t)}}function V(t){var n=t.target,e=R().contains(n)||_.contains(n);if("mousemove"!==t.type||!e){var i=tt().concat(_).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:f}:null})).filter(Boolean);(function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=Qn(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))})(i,t)&&(E(),et(t))}}function Z(t){X(t)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(t):et(t))}function K(t){w.props.trigger.indexOf("focusin")<0&&t.target!==R()||w.props.interactive&&t.relatedTarget&&_.contains(t.relatedTarget)||et(t)}function X(t){return!!Gn.isTouch&&F()!==t.type.indexOf("touch")>=0}function Y(){J();var n=w.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,a=O()?Yn(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||R()}:t,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(O()){var e=z().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},f=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];O()&&a&&f.push({name:"arrow",options:{element:a,padding:3}}),f.push.apply(f,(null==e?void 0:e.modifiers)||[]),w.popperInstance=hn(c,_,Object.assign({},e,{placement:i,onFirstUpdate:u,modifiers:f}))}function J(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return Fn(_.querySelectorAll("[data-tippy-root]"))}function nt(t){w.clearDelayTimeouts(),t&&$("onTrigger",[w,t]),D();var n=P(!0),e=Q(),r=e[0],o=e[1];Gn.isTouch&&"hold"===r&&o&&(n=o),n?i=setTimeout((function(){w.show()}),n):w.show()}function et(t){if(w.clearDelayTimeouts(),$("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=P(!1);n?r=setTimeout((function(){w.state.isVisible&&w.hide()}),n):o=requestAnimationFrame((function(){w.hide()}))}}else I()}}function re(t,n){void 0===n&&(n={});var e=Wn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Mn,yn),window.addEventListener("blur",In);var i=Object.assign({},n,{plugins:e}),r=Pn(t).reduce((function(t,n){var e=n&&ie(n,i);return e&&t.push(e),t}),[]);return Rn(t)?r[0]:r}re.defaultProps=Wn,re.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Wn[n]=t[n]}))},re.currentInput=Gn;Object.assign({},Nt,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var oe={clientX:0,clientY:0},se=[];function ae(t){var n=t.clientX,e=t.clientY;oe={clientX:n,clientY:e}}var ue={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=Cn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(se.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",ae)}(e))}function h(){0===(se=se.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",ae)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(oe),o=!1),a()||u())},onTrigger:function(t,n){An(n)&&(oe={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};re.setDefaultProps({render:Jn});var ce=re;GLSR.autosize=d,GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Event=y,GLSR.Tippy={tippy:ce,plugins:{followCursor:ue}},jQuery((function(t){L().highlightAll(),GLSR.notices=new F,GLSR.shortcode=new q(".glsr-mce"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),t(".glsr-tooltip").each((function(t,n){var e=n.dataset.tippyContent,i=n.dataset.syntax;n._tippy&&e&&i&&L().languages[i]&&n._tippy.setContent('<pre class="language-'+i+'"><code>'+L().highlight(e,L().languages[i],i)+"</code></pre>")})),p(),new w,new j("form.glsr-form"),new S,new R,new z,new C("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-translations",{action:"search-translations",onInit:function(){this.tt()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.X()}}),new C("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new B("a.glsr-toggle-status"),new E,new N,new Z,new X,new W;var n=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(n),t("select[data-glsr-track]").on("change",n),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 n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")})),t(".post-type-site-review #the-list").on("click",".editinline",(function(){var n=t(this).closest("tr");t(':input[data-name="post_content"]').val(""),t(':input[name="_response"]').val(""),setTimeout((function(){t(':input[data-name="post_content"]').val(n.find("._post_content").text()),t(':input[name="_response"]').val(n.find("._response").text())}),50)}));var e,i=t("#glsr-notices .bulk-action-notice").on("click","button.button-link",(function(){t(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!t(this).hasClass("bulk-action-errors-collapsed")),i.find(".bulk-action-errors").toggleClass("hidden")}));"no"===GLSR.isLicensed&&jQuery(".post-type-site-review.edit-php .page-title-action").after('<a href="'+GLSR.premiumurl+'" target="_blank" id="glsr-premium-button" class="page-title-action">'+GLSR.text.premium+"</a>"),e=GLSR.text.rate,jQuery("#footer-left",".post-type-site-review, .post-type-site-review-form, .post-type-site-review-theme, .dashboard_page_site-reviews-welcome").html(e.replace("%s",'<strong>Site Reviews</strong> <a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>').replace("%s",'<a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">wordpress.org</a>'))}));var le=function(t){[].forEach.call(document.querySelectorAll('[data-type="site-reviews/'.concat(t,'"] .glsr')),(function(t){var n="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(n)}))};y.on("site-reviews/form",(function(t,n){_.isEmpty(t)||t.error||(le("form"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}))})),y.on("site-reviews/reviews",(function(t,n){_.isEmpty(t)||t.error||le("reviews")})),y.on("site-reviews/summary",(function(t,n){_.isEmpty(t)||t.error||le("summary")}))}()}();
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
+ !function(){var t={433: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|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,i={},r={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof o?new o(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.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(n,e){var i,o;switch(e=e||{},r.util.type(n)){case"Object":if(o=r.util.objId(n),e[o])return e[o];for(var s in i={},e[o]=i,n)n.hasOwnProperty(s)&&(i[s]=t(n[s],e));return i;case"Array":return o=r.util.objId(n),e[o]?e[o]:(i=[],e[o]=i,n.forEach((function(n,r){i[r]=t(n,e)})),i);default:return n}},getLanguage:function(t){for(;t;){var e=n.exec(t.className);if(e)return e[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,e){t.className=t.className.replace(RegExp(n,"gi"),""),t.classList.add("language-"+e)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(t,n){var e=r.util.clone(r.languages[t]);for(var i in n)e[i]=n[i];return e},insertBefore:function(t,n,e,i){var o=(i=i||r.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=i[t];return i[t]=s,r.languages.DFS(r.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,i,o){o=o||{};var s=r.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],i||a);var u=n[a],c=r.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){r.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var i={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),r.hooks.run("before-all-elements-highlight",i);for(var o,s=0;o=i.elements[s++];)r.highlightElement(o,!0===n,i.callback)},highlightElement:function(n,e,i){var o=r.util.getLanguage(n),s=r.languages[o];r.util.setLanguage(n,o);var a=n.parentElement;a&&"pre"===a.nodeName.toLowerCase()&&r.util.setLanguage(a,o);var u={element:n,language:o,grammar:s,code:n.textContent};function c(t){u.highlightedCode=t,r.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r.hooks.run("after-highlight",u),r.hooks.run("complete",u),i&&i.call(u.element)}if(r.hooks.run("before-sanity-check",u),(a=u.element.parentElement)&&"pre"===a.nodeName.toLowerCase()&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","0"),!u.code)return r.hooks.run("complete",u),void(i&&i.call(u.element));if(r.hooks.run("before-highlight",u),u.grammar)if(e&&t.Worker){var l=new Worker(r.filename);l.onmessage=function(t){c(t.data)},l.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else c(r.highlight(u.code,u.grammar,u.language));else c(r.util.encode(u.code))},highlight:function(t,n,e){var i={code:t,grammar:n,language:e};return r.hooks.run("before-tokenize",i),i.tokens=r.tokenize(i.code,i.grammar),r.hooks.run("after-tokenize",i),o.stringify(r.util.encode(i.tokens),i.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new u;return c(r,r.head,t),a(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=r.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=r.hooks.all[t];if(e&&e.length)for(var i,o=0;i=e[o++];)i(n)}},Token:o};function o(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function s(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function a(t,n,e,i,u,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,b=!!v.lookbehind,y=!!v.greedy,g=v.alias;if(y&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var k=v.pattern||v,_=i.next,j=u;_!==n.tail&&!(f&&j>=f.reach);j+=_.value.length,_=_.next){var x=_.value;if(n.length>t.length)return;if(!(x instanceof o)){var S,F=1;if(y){if(!(S=s(k,j,t,b))||S.index>=t.length)break;var Q=S.index,R=S.index+S[0].length,A=j;for(A+=_.value.length;Q>=A;)A+=(_=_.next).value.length;if(j=A-=_.value.length,_.value instanceof o)continue;for(var O=_;O!==n.tail&&(A<R||"string"==typeof O.value);O=O.next)F++,A+=O.value.length;F--,x=t.slice(j,A),S.index-=j}else if(!(S=s(k,0,x,b)))continue;Q=S.index;var z=S[0],P=x.slice(0,Q),L=x.slice(Q+z.length),$=j+x.length;f&&$>f.reach&&(f.reach=$);var C=_.prev;if(P&&(C=c(n,C,P),j+=P.length),l(n,C,F),_=c(n,C,new o(d,m?r.tokenize(z,m):z,g,z)),L&&c(n,_,L),F>1){var T={cause:d+","+p,reach:$};a(t,n,e,_.prev,j,T),f&&T.reach>f.reach&&(f.reach=T.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function c(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function l(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=r,o.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var i="";return n.forEach((function(n){i+=t(n,e)})),i}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),r.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(r.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),i=e.language,o=e.code,s=e.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),s&&t.close()}),!1),r):r;var f=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(f&&(r.filename=f.src,f.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var h=document.readyState;"loading"===h||"interactive"===h&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))}(Prism)},980: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])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|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:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\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-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"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:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,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",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"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]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),b=d.substring(p+h.length),y=[];v&&y.push.apply(y,s([v])),y.push(m),b&&y.push.apply(y,s([b])),"string"==typeof c?a.splice.apply(a,[u,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},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/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"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,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),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},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|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:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},a=[{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:s}},{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:s}}];t.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"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:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,o=i.parentNode;if(o&&/pre/i.test(o.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),o.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),e.element.appendChild(s),r([o]),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 n=function(t){if(!t)return null;return window.getComputedStyle?getComputedStyle(t):t.currentStyle||null}(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,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=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}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.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,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"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,n=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(n||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(n){return n.value===+t}))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},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,n){return Object.prototype.hasOwnProperty.call(t,n)},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,n,e){return t[n]=e,t},encode:function(t){return"checkbox"===jQuery('[name="'+t.name+'"]',this.form).attr("type")&&"on"===t.value||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 n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.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 i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[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,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.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 n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r,o,s=i,a="function"==typeof Map?new Map:(r=[],o=[],{has:function(t){return r.indexOf(t)>-1},get:function(t){return o[r.indexOf(t)]},set:function(t,n){-1===r.indexOf(t)&&(r.push(t),o.push(n))},delete:function(t){var n=r.indexOf(t);n>-1&&(r.splice(n,1),o.splice(n,1))}}),u=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(r){u=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function c(t){var n=a.get(t);n&&n.destroy()}function l(t){var n=a.get(t);n&&n.update()}var f=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((f=function(t){return t}).destroy=function(t){return t},f.update=function(t){return t}):((f=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!a.has(t)){var n,e=null,i=null,r=null,o=function(){t.clientWidth!==i&&f()},s=function(n){window.removeEventListener("resize",o,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),a.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",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",a.set(t,{destroy:s,update:f}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),f()}function c(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function l(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",i=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function f(){l();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),i="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(i<n?"hidden"===e.overflowY&&(c("scroll"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(c("hidden"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),r!==i){r=i;var o=u("autosize:resized");try{t.dispatchEvent(o)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t},f.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t});var d=f;function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var p=function(){"object"===h(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){var t=jQuery(this),n=jQuery.extend({},t.data("colorpicker")||{},{change:function(t,n){jQuery(t.target).val(n.color.toString()).trigger("change")},mode:"hsl",palettes:!1,width:180});t.wpColorPicker(n)}))},v={},m=function(t,n){var e=v[t]||[],i=[];n&&[].forEach.call(e,(function(t){n!==t.fn&&n!==t.fn.once&&i.push(t)})),i.length?v[t]=i:delete v[t]},b=function(t,n,e){(v[t]||(v[t]=[])).push({fn:n,context:e})},y={events:v,trigger:function(t){var n=[].slice.call(arguments,1),e=(v[t]||[]).slice();[].forEach.call(e,(function(t){return t.fn.apply(t.context,n)}))},off:m,on:b,once:function(t,n,e){var i=arguments,r=function r(){m(t,r),n.apply(e,i)};r.once=n,b(t,r,e)}},g=function(){this.request=null,jQuery(".enable-filter-tog","#adv-settings").on("click",this.h.bind(this))};g.prototype={p:function(){return jQuery(".enable-filter-tog:checked").map((function(t,n){return n.value})).get()},h:function(t){var n=jQuery(t.currentTarget),e=n.prop("checked")?"removeClass":"addClass";jQuery("#glsr-filter-by-"+n.val())[e]("hidden"),this.v()},v:_.debounce((function(){this.request&&this.request.abort();var t={_ajax_request:!0};t[GLSR.nameprefix]={_action:"toggle-filters",_nonce:GLSR.nonce["toggle-filters"],enabled:this.p()},this.request=wp.ajax.post(GLSR.action,t),this.request.always(function(){this.request=null}.bind(this))}),500)};var w=g,k=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.m())};k.prototype={k:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return console.error(t)}},m:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this._.bind(this))},j:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this.S(n).indexOf(this.F(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},F:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},S:function(t){return t.map(this.F)},_:function(t){this.depends.forEach(function(n){var e=this.k(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.j(t.name,t.value)||(i=!1)}.bind(this)),this.R(n,i)}}.bind(this))},R:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var j=k,x=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.A.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.O.bind(this))};x.prototype={O:function(t){var n=jQuery(t.currentTarget);this.P(n.parent().find("img"),n.val())},A:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.P(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},P:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var S=x,F=function(){this.m()};F.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"))},m:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.h.bind(this))},h:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var Q=F,R=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.L.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.$.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.C.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.T.bind(this))};R.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},L:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},$:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},C:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(n).post(this.q.bind(this))},T:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id"),pinned:-1};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(n).post(this.M.bind(this))},q: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)},M:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var A=R,O=function(){jQuery.each(GLSR.pointers,function(t,n){this.m(n)}.bind(this))};O.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},m: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 z=O,P=e(325),L=e.n(P),$=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.m()});$.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"},m: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.B.bind(this),500)),this.options.searchEl.on("keyup",this.U.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.W.bind(this)),jQuery(document).on("keydown",this.H.bind(this))},N:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},V:function(){this.N(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},Z:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.K(),e.X()}))},Y:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},tt:function(){this.options.entriesEl.on("click","a.delete",this.nt.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},et: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()},W:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.V()},H:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.V(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.et(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.et(1))}},nt:function(t){t.preventDefault(),this.Z(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.V()},B:function(t){if(this.N(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.Y(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 n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:GLSR.nonce[this.options.action],exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.Y(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},U:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.B(t),t.preventDefault())},rt:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},K:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.V(),this.options.results={},this.options.searchEl.val("")},X:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var C=$,T=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.m()};T.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},m:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.h.bind(t)),n.addEventListener("touchend",t.h.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=this.dataset.expand;localStorage.setItem("glsr-expand",n),t.ot(jQuery(n))})),jQuery(window).on("load",(function(){t.ot(jQuery(localStorage.getItem("glsr-expand")))}))},h:function(t){t.preventDefault(),this.st(t.currentTarget)},ot:function(t){if(t.length){var n=t.closest(".glsr-nav-view"),e=t.closest(".glsr-card");n.removeClass("collapsed"),this.ut(n),n.removeClass("collapsed"),e.removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){localStorage.removeItem("glsr-expand"),jQuery("#glsr-notices .notice").length||e[0].scrollIntoView({behavior:"smooth",block:e.outerHeight()>=window.innerHeight?"start":"center"})}),10)}},ut:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},st:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery("#"+t.dataset.id);this.ut(n)}}};var E=T,G=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new s(n).post(this.ct.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.m(t,n,e)}.bind(this))};G.prototype={lt:{},ft:[],m:function(t,n,e){document.addEventListener("click",this.dt.bind(this,t,n)),n.addEventListener("click",this.ht.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.vt.bind(this,t,n))}.bind(this))},bt:function(){tinymce.execCommand("GLSR_Shortcode")},yt:function(){jQuery("#scTemp").length?this.bt():(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.bt()}.bind(this),200))},D:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},gt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.lt={},this.ft=[]},ct:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.gt();var n=this.wt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},kt:function(t){for(var n in this.lt=t,this.ft=[],t)t.hasOwnProperty(n)&&(this._t(n),this.jt(n),this.xt(n));this.lt.hide=this.ft.join(",")},_t:function(t){"display"!==t||jQuery.isNumeric(this.lt[t])||(this.lt[t]="")},jt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.lt[t]&&this.ft.push(n),delete this.lt[t])}},xt:function(t){"id"===t&&(this.lt[t]=(+new Date).toString(36))},dt:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,n)},ht:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,n):this.St(t,n)},vt:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.bt():this.yt(),setTimeout(function(){this.D(t,n)}.bind(this),100))},St:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},Ft:function(t){return[{classes:"btn glsr-btn primary",onclick:this.Qt.bind(this),text:t.ok},{onclick:"close",text:t.close}]},wt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.Ft(t),onsubmit:this.Rt.bind(this,t),onclose:this.gt.bind(this)}},Rt:function(t,n){var e="";for(var i in this.kt(n.data),this.lt)this.lt.hasOwnProperty(i)&&""!==this.lt[i]&&(e+=" "+i+'="'+this.lt[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},Qt:function(){var t=this.editor.windowManager.getWindows()[0];this.At(t)&&t.submit()},At:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var q=G,M=e(449),D=e.n(M),I=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.h)}.bind(this))};I.prototype={h:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};jQuery(t.target).closest("tr").find(".locked-indicator").addClass("spinner is-active"),new s(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").find(".locked-indicator").removeClass("spinner is-active"),e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var B=I,U=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.Ot.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};U.prototype={Pt: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.Lt(!1)},Ot:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Lt(!0),this.$t())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},$t:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Ct.bind(this))},Ct:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Tt.bind(this,t):this.Ct.bind(this);this.Et(t.message),this.Gt(t.percent),setTimeout((function(){new s(n).post(e)}),1500)},Tt:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Et(t.message),t.percent_synced&&t.percent_synced>=100?this.Pt(t):new s(e).post(this.Tt.bind(this))},Et:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Gt:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Lt:function(t){if(!0===t&&(this.Et(this.progressbar.data("active-text")),this.Gt(),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.Lt.bind(this))}};var W=U,H=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.refererInputs=jQuery("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.refererInputs.length&&this.tabs&&this.views&&this.m()};H.prototype={defaults:{smartLinks:".glsr-card a, #glsr-notices a",tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},m:function(){var t=this;jQuery(this.options.tabSelector).each((function(n,e){var i=e.getAttribute("href"),r=t.qt(e,"tab"),o=t.Mt("tab");null===o&&0===n&&(o=r,history.replaceState({href:i,tab:r},"",i),t.refererInputs.val(i)),o===r&&t.Dt(r)})),jQuery(window).on("popstate",this.It.bind(this)),jQuery(this.options.smartLinks).on("click",this.Bt.bind(this)),jQuery(this.options.tabSelector+","+this.options.viewSubsubsub).on("click",this.h.bind(this))},h:function(t){var n=t.currentTarget,e=n.getAttribute("href"),i=this.qt(n,"tab");i&&(history.pushState({href:e,tab:i},"",e),this.refererInputs.val(e),this.Dt(i),t.preventDefault(),n.blur())},Bt:function(t){var n=t.currentTarget,e=this.Mt("page"),i=this.Mt("postType"),r=this.Mt("tab"),o=this.qt(n,"page"),s=this.qt(n,"postType"),a=this.qt(n,"tab");if(o===e&&s===i&&a){var u=n.getAttribute("href");history.pushState({href:u,tab:a},"",u),this.refererInputs.val(u),this.Dt(a),a!==r&&window.scrollTo(0,0),t.preventDefault()}},It:function(t){var n=t.originalEvent.state;n&&n.tab&&n.href&&(this.refererInputs.val(n.href),this.Dt(n.tab))},Ut:function(t){return t?"add":"remove"},qt:function(t,n){return new URLSearchParams(t.getAttribute("href")).get(n)},Mt:function(t){return new URLSearchParams(location.search).get(t)},Dt:function(t){for(var n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Wt(this.tabs[n]);break}},Ht:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),t.qt(e,"sub")===t.Mt("sub")&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.Ut(i!==n);e.classList[r]("ui-tabs-hide")}))},Wt:function(t){var n=this;[].forEach.call(this.tabs,(function(e,i){var r=n.Ut(e===t);"add"===r&&(n.active.value=n.views[i].id,n.Nt(i)),e.classList[r]("nav-tab-active")}))},Nt:function(t){var n=this;[].forEach.call(this.views,(function(e,i){var r=n.Ut(i!==t);e.classList[r]("ui-tabs-hide"),n.Ht()}))}};var N=H,V=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Vt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Vt(t)}.bind(this)))};V.prototype={Vt:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var Z=V,K=function(){jQuery("form").on("click","#glsr-clear-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","#glsr-fetch-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.h.bind(this)),jQuery(".glsr-button").on("click",this.Kt);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Xt.bind(this,t)),jQuery(document).on("keyup",this.Yt.bind(this,t)))};K.prototype={Zt:function(t,n){n&&jQuery("#glsr-log-file").val(t.console)},h:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new s({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Kt),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Xt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Yt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Kt:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var X=K;function Y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function J(t){return t instanceof Y(t).Element||t instanceof Element}function tt(t){return t instanceof Y(t).HTMLElement||t instanceof HTMLElement}function nt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Y(t).ShadowRoot||t instanceof ShadowRoot)}var et=Math.round;function it(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),i=1,r=1;if(tt(t)&&n){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(i=e.width/s||1),o>0&&(r=e.height/o||1)}return{width:et(e.width/i),height:et(e.height/r),top:et(e.top/r),right:et(e.right/i),bottom:et(e.bottom/r),left:et(e.left/i),x:et(e.left/i),y:et(e.top/r)}}function rt(t){var n=Y(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ot(t){return t?(t.nodeName||"").toLowerCase():null}function st(t){return((J(t)?t.ownerDocument:t.document)||window.document).documentElement}function at(t){return it(st(t)).left+rt(t).scrollLeft}function ut(t){return Y(t).getComputedStyle(t)}function ct(t){var n=ut(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function lt(t,n,e){void 0===e&&(e=!1);var i,r,o=tt(n),s=tt(n)&&function(t){var n=t.getBoundingClientRect(),e=n.width/t.offsetWidth||1,i=n.height/t.offsetHeight||1;return 1!==e||1!==i}(n),a=st(n),u=it(t,s),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&(("body"!==ot(n)||ct(a))&&(c=(i=n)!==Y(i)&&tt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:rt(i)),tt(n)?((l=it(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=at(a))),{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function ft(t){var n=it(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function dt(t){return"html"===ot(t)?t:t.assignedSlot||t.parentNode||(nt(t)?t.host:null)||st(t)}function ht(t){return["html","body","#document"].indexOf(ot(t))>=0?t.ownerDocument.body:tt(t)&&ct(t)?t:ht(dt(t))}function pt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Y(i),s=r?[o].concat(o.visualViewport||[],ct(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(pt(dt(s)))}function vt(t){return["table","td","th"].indexOf(ot(t))>=0}function mt(t){return tt(t)&&"fixed"!==ut(t).position?t.offsetParent:null}function bt(t){for(var n=Y(t),e=mt(t);e&&vt(e)&&"static"===ut(e).position;)e=mt(e);return e&&("html"===ot(e)||"body"===ot(e)&&"static"===ut(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&tt(t)&&"fixed"===ut(t).position)return null;for(var e=dt(t);tt(e)&&["html","body"].indexOf(ot(e))<0;){var i=ut(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var yt="top",gt="bottom",wt="right",kt="left",_t="auto",jt=[yt,gt,wt,kt],xt="start",St="end",Ft="viewport",Qt="popper",Rt=jt.reduce((function(t,n){return t.concat([n+"-"+xt,n+"-"+St])}),[]),At=[].concat(jt,[_t]).reduce((function(t,n){return t.concat([n,n+"-"+xt,n+"-"+St])}),[]),Ot=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function $t(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?Pt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){var r="function"==typeof e?e(a.options):e;f(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:J(t)?pt(t):t.contextElement?pt(t.contextElement):[],popper:pt(n)};var s=function(t){var n=zt(t);return Ot.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(Lt(n,e)){a.rects={reference:lt(n,bt(e),"fixed"===a.options.strategy),popper:ft(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!Lt(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var Ct={passive:!0};var Tt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=Y(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,Ct)})),a&&u.addEventListener("resize",e.update,Ct),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,Ct)})),a&&u.removeEventListener("resize",e.update,Ct)}},data:{}};function Et(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Mt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?Et(r):null,s=r?Gt(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case yt:n={x:a,y:e.y-i.height};break;case gt:n={x:a,y:e.y+e.height};break;case wt:n={x:e.x+e.width,y:u};break;case kt:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?qt(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case xt:n[c]=n[c]-(e[l]/2-i[l]/2);break;case St:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Dt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Mt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},It=Math.max,Bt=Math.min,Ut=Math.round,Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ht(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=!0===l?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:Ut(Ut(n*i)/i)||0,y:Ut(Ut(e*i)/i)||0}}(s):"function"==typeof l?l(s):s,d=f.x,h=void 0===d?0:d,p=f.y,v=void 0===p?0:p,m=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=kt,g=yt,w=window;if(c){var k=bt(e),_="clientHeight",j="clientWidth";k===Y(e)&&"static"!==ut(k=st(e)).position&&"absolute"===a&&(_="scrollHeight",j="scrollWidth"),k=k,r!==yt&&(r!==kt&&r!==wt||o!==St)||(g=gt,v-=k[_]-i.height,v*=u?1:-1),r!==kt&&(r!==yt&&r!==gt||o!==St)||(y=wt,h-=k[j]-i.width,h*=u?1:-1)}var x,S=Object.assign({position:a},c&&Wt);return u?Object.assign({},S,((x={})[g]=b?"0":"",x[y]=m?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",x)):Object.assign({},S,((n={})[g]=b?v+"px":"",n[y]=m?h+"px":"",n.transform="",n))}var Nt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];tt(r)&&ot(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});tt(i)&&ot(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Vt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=At.reduce((function(t,e){return t[e]=function(t,n,e){var i=Et(t),r=[kt,yt].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[kt,wt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},Zt={left:"right",right:"left",bottom:"top",top:"bottom"};function Kt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Zt[t]}))}var Xt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Xt[t]}))}function Jt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&nt(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function tn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nn(t,n){return n===Ft?tn(function(t){var n=Y(t),e=st(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+at(t),y:a}}(t)):tt(n)?function(t){var n=it(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):tn(function(t){var n,e=st(t),i=rt(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=It(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+at(t),u=-i.scrollTop;return"rtl"===ut(r||e).direction&&(a+=It(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(st(t)))}function en(t,n,e){var i="clippingParents"===n?function(t){var n=pt(dt(t)),e=["absolute","fixed"].indexOf(ut(t).position)>=0&&tt(t)?bt(t):t;return J(e)?n.filter((function(t){return J(t)&&Jt(t,e)&&"body"!==ot(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=nn(t,e);return n.top=It(i.top,n.top),n.right=Bt(i.right,n.right),n.bottom=Bt(i.bottom,n.bottom),n.left=It(i.left,n.left),n}),nn(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rn(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function on(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function sn(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?Ft:a,c=e.elementContext,l=void 0===c?Qt:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=rn("number"!=typeof p?p:on(p,jt)),m=l===Qt?"reference":Qt,b=t.rects.popper,y=t.elements[d?m:l],g=en(J(y)?y:y.contextElement||st(t.elements.popper),s,u),w=it(t.elements.reference),k=Mt({reference:w,element:b,strategy:"absolute",placement:r}),_=tn(Object.assign({},b,k)),j=l===Qt?_:w,x={top:g.top-j.top+v.top,bottom:j.bottom-g.bottom+v.bottom,left:g.left-j.left+v.left,right:j.right-g.right+v.right},S=t.modifiersData.offset;if(l===Qt&&S){var F=S[r];Object.keys(x).forEach((function(t){var n=[wt,gt].indexOf(t)>=0?1:-1,e=[yt,gt].indexOf(t)>=0?"y":"x";x[t]+=F[e]*n}))}return x}var an={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,b=Et(m),y=u||(b===m||!p?[Kt(m)]:function(t){if(Et(t)===_t)return[];var n=Kt(t);return[Yt(t),n,Yt(n)]}(m)),g=[m].concat(y).reduce((function(t,e){return t.concat(Et(e)===_t?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?At:u,l=Gt(i),f=l?a?Rt:Rt.filter((function(t){return Gt(t)===l})):jt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=sn(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[Et(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,k=n.rects.popper,_=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var F=g[S],Q=Et(F),R=Gt(F)===xt,A=[yt,gt].indexOf(Q)>=0,O=A?"width":"height",z=sn(n,{placement:F,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=A?R?wt:kt:R?gt:yt;w[O]>k[O]&&(P=Kt(P));var L=Kt(P),$=[];if(o&&$.push(z[Q]<=0),a&&$.push(z[P]<=0,z[L]<=0),$.every((function(t){return t}))){x=F,j=!1;break}_.set(F,$)}if(j)for(var C=function(t){var n=g.find((function(n){var e=_.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===C(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function un(t,n,e){return It(t,Bt(n,e))}var cn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=sn(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),b=Et(n.placement),y=Gt(n.placement),g=!y,w=qt(b),k="x"===w?"y":"x",_=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,F={x:0,y:0};if(_){if(o||a){var Q="y"===w?yt:kt,R="y"===w?gt:wt,A="y"===w?"height":"width",O=_[w],z=_[w]+m[Q],P=_[w]-m[R],L=h?-x[A]/2:0,$=y===xt?j[A]:x[A],C=y===xt?-x[A]:-j[A],T=n.elements.arrow,E=h&&T?ft(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=G[Q],M=G[R],D=un(0,j[A],E[A]),I=g?j[A]/2-L-D-q-S:$-D-q-S,B=g?-j[A]/2+L+D+M+S:C+D+M+S,U=n.elements.arrow&&bt(n.elements.arrow),W=U?"y"===w?U.clientTop||0:U.clientLeft||0:0,H=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=_[w]+I-H-W,V=_[w]+B-H;if(o){var Z=un(h?Bt(z,N):z,O,h?It(P,V):P);_[w]=Z,F[w]=Z-O}if(a){var K="x"===w?yt:kt,X="x"===w?gt:wt,Y=_[k],J=Y+m[K],tt=Y-m[X],nt=un(h?Bt(J,N):J,Y,h?It(tt,V):tt);_[k]=nt,F[k]=nt-Y}}n.modifiersData[i]=F}},requiresIfExists:["offset"]};var ln={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Et(e.placement),u=qt(a),c=[kt,wt].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return rn("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:on(t,jt))}(r.padding,e),f=ft(o),d="y"===u?yt:kt,h="y"===u?gt:wt,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=bt(o),b=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,g=l[d],w=b-f[c]-l[h],k=b/2-f[c]/2+y,_=un(g,k,w),j=u;e.modifiersData[i]=((n={})[j]=_,n.centerOffset=_-k,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Jt(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function dn(t){return[yt,wt,gt,kt].some((function(n){return t[n]>=0}))}var hn=$t({defaultModifiers:[Tt,Dt,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:Et(n.placement),variation:Gt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,Ht(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ht(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Nt,Vt,an,cn,ln,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=sn(n,{elementContext:"reference"}),a=sn(n,{altBoundary:!0}),u=fn(s,i),c=fn(a,r,o),l=dn(u),f=dn(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),pn="tippy-content",vn="tippy-backdrop",mn="tippy-arrow",bn="tippy-svg-arrow",yn={passive:!0,capture:!0},gn=function(){return document.body};function wn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function kn(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function _n(t,n){return"function"==typeof t?t.apply(void 0,n):t}function jn(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function xn(t){return[].concat(t)}function Sn(t,n){-1===t.indexOf(n)&&t.push(n)}function Fn(t){return t.split("-")[0]}function Qn(t){return[].slice.call(t)}function Rn(t){return Object.keys(t).reduce((function(n,e){return void 0!==t[e]&&(n[e]=t[e]),n}),{})}function An(){return document.createElement("div")}function On(t){return["Element","Fragment"].some((function(n){return kn(t,n)}))}function zn(t){return kn(t,"MouseEvent")}function Pn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ln(t){return On(t)?[t]:function(t){return kn(t,"NodeList")}(t)?Qn(t):Array.isArray(t)?t:Qn(document.querySelectorAll(t))}function $n(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function Cn(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Tn(t){var n,e=xn(t)[0];return null!=e&&null!=(n=e.ownerDocument)&&n.body?e.ownerDocument:document}function En(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}function Gn(t,n){for(var e=n;e;){var i;if(t.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var qn={isTouch:!1},Mn=0;function Dn(){qn.isTouch||(qn.isTouch=!0,window.performance&&document.addEventListener("mousemove",In))}function In(){var t=performance.now();t-Mn<20&&(qn.isTouch=!1,document.removeEventListener("mousemove",In)),Mn=t}function Bn(){var t=document.activeElement;if(Pn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Un=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Wn={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Hn=Object.assign({appendTo:gn,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Wn,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Nn=Object.keys(Hn);function Vn(t){var n=(t.plugins||[]).reduce((function(n,e){var i,r=e.name,o=e.defaultValue;r&&(n[r]=void 0!==t[r]?t[r]:null!=(i=Hn[r])?i:o);return n}),{});return Object.assign({},t,n)}function Zn(t,n){var e=Object.assign({},n,{content:_n(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(Vn(Object.assign({},Hn,{plugins:n}))):Nn).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Hn.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Kn(t,n){t.innerHTML=n}function Xn(t){var n=An();return!0===t?n.className=mn:(n.className=bn,On(t)?n.appendChild(t):Kn(n,t)),n}function Yn(t,n){On(n.content)?(Kn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Kn(t,n.content):t.textContent=n.content)}function Jn(t){var n=t.firstElementChild,e=Qn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(pn)})),arrow:e.find((function(t){return t.classList.contains(mn)||t.classList.contains(bn)})),backdrop:e.find((function(t){return t.classList.contains(vn)}))}}function te(t){var n=An(),e=An();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=An();function r(e,i){var r=Jn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||Yn(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Xn(i.arrow))):o.appendChild(Xn(i.arrow)):a&&o.removeChild(a)}return i.className=pn,i.setAttribute("data-state","hidden"),Yn(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}te.$$tippy=!0;var ne=1,ee=[],ie=[];function re(t,n){var e,i,r,o,s,a,u,c,l=Zn(t,Object.assign({},Hn,Vn(Rn(n)))),f=!1,d=!1,h=!1,p=!1,v=[],m=jn(N,l.interactiveDebounce),b=ne++,y=(c=l.plugins).filter((function(t,n){return c.indexOf(t)===n})),g={id:b,reference:t,popper:An(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(e),clearTimeout(i),cancelAnimationFrame(r)},setProps:function(n){0;if(g.state.isDestroyed)return;L("onBeforeUpdate",[g,n]),W();var e=g.props,i=Zn(t,Object.assign({},e,Rn(n),{ignoreAttributes:!0}));g.props=i,U(),e.interactiveDebounce!==i.interactiveDebounce&&(T(),m=jn(N,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?xn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");C(),P(),_&&_(e,i);g.popperInstance&&(X(),J().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));L("onAfterUpdate",[g,n])},setContent:function(t){g.setProps({content:t})},show:function(){0;var t=g.state.isVisible,n=g.state.isDestroyed,e=!g.state.isEnabled,i=qn.isTouch&&!g.props.touch,r=wn(g.props.duration,0,Hn.duration);if(t||n||e||i)return;if(R().hasAttribute("disabled"))return;if(L("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,Q()&&(k.style.visibility="visible");P(),M(),g.state.isMounted||(k.style.transition="none");if(Q()){var o=O(),s=o.box,u=o.content;$n([s,u],0)}a=function(){var t;if(g.state.isVisible&&!p){if(p=!0,k.offsetHeight,k.style.transition=g.props.moveTransition,Q()&&g.props.animation){var n=O(),e=n.box,i=n.content;$n([e,i],r),Cn([e,i],"visible")}$(),C(),Sn(ie,g),null==(t=g.popperInstance)||t.forceUpdate(),L("onMount",[g]),g.props.animation&&Q()&&function(t,n){I(t,n)}(r,(function(){g.state.isShown=!0,L("onShown",[g])}))}},function(){var t,n=g.props.appendTo,e=R();t=g.props.interactive&&n===gn||"parent"===n?e.parentNode:_n(n,[e]);t.contains(k)||t.appendChild(k);g.state.isMounted=!0,X(),!1}()},hide:function(){0;var t=!g.state.isVisible,n=g.state.isDestroyed,e=!g.state.isEnabled,i=wn(g.props.duration,1,Hn.duration);if(t||n||e)return;if(L("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,p=!1,f=!1,Q()&&(k.style.visibility="hidden");if(T(),D(),P(!0),Q()){var r=O(),o=r.box,s=r.content;g.props.animation&&($n([o,s],i),Cn([o,s],"hidden"))}$(),C(),g.props.animation?Q()&&function(t,n){I(t,(function(){!g.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&n()}))}(i,g.unmount):g.unmount()},hideWithInteractivity:function(t){0;A().addEventListener("mousemove",m),Sn(ee,m),m(t)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){0;g.state.isVisible&&g.hide();if(!g.state.isMounted)return;Y(),J().forEach((function(t){t._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);ie=ie.filter((function(t){return t!==g})),g.state.isMounted=!1,L("onHidden",[g])},destroy:function(){0;if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),W(),delete t._tippy,g.state.isDestroyed=!0,L("onDestroy",[g])}};if(!l.render)return g;var w=l.render(g),k=w.popper,_=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+g.id,g.popper=k,t._tippy=g,k._tippy=g;var j=y.map((function(t){return t.fn(g)})),x=t.hasAttribute("aria-expanded");return U(),C(),P(),L("onCreate",[g]),l.showOnCreate&&tt(),k.addEventListener("mouseenter",(function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",m)})),g;function S(){var t=g.props.touch;return Array.isArray(t)?t:[t,0]}function F(){return"hold"===S()[0]}function Q(){var t;return!(null==(t=g.props.render)||!t.$$tippy)}function R(){return u||t}function A(){var t=R().parentNode;return t?Tn(t):document}function O(){return Jn(k)}function z(t){return g.state.isMounted&&!g.state.isVisible||qn.isTouch||o&&"focus"===o.type?0:wn(g.props.delay,t?0:1,Hn.delay)}function P(t){void 0===t&&(t=!1),k.style.pointerEvents=g.props.interactive&&!t?"":"none",k.style.zIndex=""+g.props.zIndex}function L(t,n,e){var i;(void 0===e&&(e=!0),j.forEach((function(e){e[t]&&e[t].apply(e,n)})),e)&&(i=g.props)[t].apply(i,n)}function $(){var n=g.props.aria;if(n.content){var e="aria-"+n.content,i=k.id;xn(g.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(g.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function C(){!x&&g.props.aria.expanded&&xn(g.props.triggerTarget||t).forEach((function(t){g.props.interactive?t.setAttribute("aria-expanded",g.state.isVisible&&t===R()?"true":"false"):t.removeAttribute("aria-expanded")}))}function T(){A().removeEventListener("mousemove",m),ee=ee.filter((function(t){return t!==m}))}function E(n){if(!qn.isTouch||!h&&"mousedown"!==n.type){var e=n.composedPath&&n.composedPath()[0]||n.target;if(!g.props.interactive||!Gn(k,e)){if(xn(g.props.triggerTarget||t).some((function(t){return Gn(t,e)}))){if(qn.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[g,n]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),d=!0,setTimeout((function(){d=!1})),g.state.isMounted||D())}}}function G(){h=!0}function q(){h=!1}function M(){var t=A();t.addEventListener("mousedown",E,!0),t.addEventListener("touchend",E,yn),t.addEventListener("touchstart",q,yn),t.addEventListener("touchmove",G,yn)}function D(){var t=A();t.removeEventListener("mousedown",E,!0),t.removeEventListener("touchend",E,yn),t.removeEventListener("touchstart",q,yn),t.removeEventListener("touchmove",G,yn)}function I(t,n){var e=O().box;function i(t){t.target===e&&(En(e,"remove",i),n())}if(0===t)return n();En(e,"remove",s),En(e,"add",i),s=i}function B(n,e,i){void 0===i&&(i=!1),xn(g.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),v.push({node:t,eventType:n,handler:e,options:i})}))}function U(){var t;F()&&(B("touchstart",H,{passive:!0}),B("touchend",V,{passive:!0})),(t=g.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(B(t,H),t){case"mouseenter":B("mouseleave",V);break;case"focus":B(Un?"focusout":"blur",Z);break;case"focusin":B("focusout",Z)}}))}function W(){v.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),v=[]}function H(t){var n,e=!1;if(g.state.isEnabled&&!K(t)&&!d){var i="focus"===(null==(n=o)?void 0:n.type);o=t,u=t.currentTarget,C(),!g.state.isVisible&&zn(t)&&ee.forEach((function(n){return n(t)})),"click"===t.type&&(g.props.trigger.indexOf("mouseenter")<0||f)&&!1!==g.props.hideOnClick&&g.state.isVisible?e=!0:tt(t),"click"===t.type&&(f=!e),e&&!i&&nt(t)}}function N(t){var n=t.target,e=R().contains(n)||k.contains(n);if("mousemove"!==t.type||!e){var i=J().concat(k).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:l}:null})).filter(Boolean);(function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=Fn(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))})(i,t)&&(T(),nt(t))}}function V(t){K(t)||g.props.trigger.indexOf("click")>=0&&f||(g.props.interactive?g.hideWithInteractivity(t):nt(t))}function Z(t){g.props.trigger.indexOf("focusin")<0&&t.target!==R()||g.props.interactive&&t.relatedTarget&&k.contains(t.relatedTarget)||nt(t)}function K(t){return!!qn.isTouch&&F()!==t.type.indexOf("touch")>=0}function X(){Y();var n=g.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,u=Q()?Jn(k).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||R()}:t,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(Q()){var e=O().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},f=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];Q()&&u&&f.push({name:"arrow",options:{element:u,padding:3}}),f.push.apply(f,(null==e?void 0:e.modifiers)||[]),g.popperInstance=hn(c,k,Object.assign({},e,{placement:i,onFirstUpdate:a,modifiers:f}))}function Y(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function J(){return Qn(k.querySelectorAll("[data-tippy-root]"))}function tt(t){g.clearDelayTimeouts(),t&&L("onTrigger",[g,t]),M();var n=z(!0),i=S(),r=i[0],o=i[1];qn.isTouch&&"hold"===r&&o&&(n=o),n?e=setTimeout((function(){g.show()}),n):g.show()}function nt(t){if(g.clearDelayTimeouts(),L("onUntrigger",[g,t]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&f)){var n=z(!1);n?i=setTimeout((function(){g.state.isVisible&&g.hide()}),n):r=requestAnimationFrame((function(){g.hide()}))}}else D()}}function oe(t,n){void 0===n&&(n={});var e=Hn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Dn,yn),window.addEventListener("blur",Bn);var i=Object.assign({},n,{plugins:e}),r=Ln(t).reduce((function(t,n){var e=n&&re(n,i);return e&&t.push(e),t}),[]);return On(t)?r[0]:r}oe.defaultProps=Hn,oe.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Hn[n]=t[n]}))},oe.currentInput=qn;Object.assign({},Nt,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var se={clientX:0,clientY:0},ae=[];function ue(t){var n=t.clientX,e=t.clientY;se={clientX:n,clientY:e}}var ce={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=Tn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(ae.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",ue)}(e))}function h(){0===(ae=ae.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",ue)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(se),o=!1),a()||u())},onTrigger:function(t,n){zn(n)&&(se={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};oe.setDefaultProps({render:te});var le=oe;GLSR.autosize=d,GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Event=y,GLSR.Tippy={tippy:le,plugins:{followCursor:ce}},jQuery((function(t){L().highlightAll(),GLSR.notices=new Q,GLSR.shortcode=new q(".glsr-mce"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),t(".glsr-tooltip").each((function(t,n){var e=n.dataset.tippyContent,i=n.dataset.syntax;n._tippy&&e&&i&&L().languages[i]&&n._tippy.setContent('<pre class="language-'+i+'"><code>'+L().highlight(e,L().languages[i],i)+"</code></pre>")})),p(),new w,new j("form.glsr-form"),new S,new A,new z,new C("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-translations",{action:"search-translations",onInit:function(){this.tt()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.X()}}),new C("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new B("a.glsr-toggle-status"),new E,new N,new Z,new X,new W;var n=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(n),t("select[data-glsr-track]").on("change",n),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 n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")})),t(".post-type-site-review #the-list").on("click",".editinline",(function(){var n=t(this).closest("tr");t(':input[data-name="post_content"]').val(""),t(':input[name="_response"]').val(""),setTimeout((function(){t(':input[data-name="post_content"]').val(n.find("._post_content").text()),t(':input[name="_response"]').val(n.find("._response").text())}),50)}));var e,i=t("#glsr-notices .bulk-action-notice").on("click","button.button-link",(function(){t(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!t(this).hasClass("bulk-action-errors-collapsed")),i.find(".bulk-action-errors").toggleClass("hidden")}));"no"===GLSR.isLicensed&&jQuery(".post-type-site-review.edit-php .page-title-action").after('<a href="'+GLSR.premiumurl+'" target="_blank" id="glsr-premium-button" class="page-title-action">'+GLSR.text.premium+"</a>"),e=GLSR.text.rate,jQuery("#footer-left",".post-type-site-review, .post-type-site-review-form, .post-type-site-review-theme, .dashboard_page_site-reviews-welcome").html(e.replace("%s",'<strong>Site Reviews</strong> <a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>').replace("%s",'<a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">wordpress.org</a>'))}));var fe=function(t){[].forEach.call(document.querySelectorAll('[data-type="site-reviews/'.concat(t,'"] .glsr')),(function(t){var n="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(n)}))};y.on("site-reviews/form",(function(t,n){_.isEmpty(t)||t.error||(fe("form"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}))})),y.on("site-reviews/reviews",(function(t,n){_.isEmpty(t)||t.error||fe("reviews")})),y.on("site-reviews/summary",(function(t,n){_.isEmpty(t)||t.error||fe("summary")}))}()}();
assets/scripts/site-reviews.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t,i={721:function(t,i,n){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var 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()},u: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):(this.xhr.responseText,void this.xhr.response)},h: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)}this.xhr.responseText,this.xhr.response}else this.u(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.h.bind(this,t),this.xhr.onerror=this.u.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(e){i.hasOwnProperty(e)&&(t=this.v(t,i[e],n?n[e]:e))}.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 s=o,r={},u=function(t,i){var n=r[t]||[],e=[];i&&[].forEach.call(n,(function(t){i!==t.fn&&i!==t.fn.once&&e.push(t)})),e.length?r[t]=e:delete r[t]},a=function(t,i,n){(r[t]||(r[t]=[])).push({fn:i,context:n})},h=function(t,i,n){var e=arguments,o=function o(){u(t,o),i.apply(n,e)};o.once=i,a(t,o,n)},c=function(t){var i=[].slice.call(arguments,1),n=(r[t]||[]).slice();[].forEach.call(n,(function(t){return t.fn.apply(t.context,i)}))},f={events:r,trigger:c,off:u,on:a,once:h};function d(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function l(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)}}function v(t,i,n){return i&&l(t.prototype,i),n&&l(t,n),t}var m={hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},w=function(){function t(i){var n=this;d(this,t);var e=(i||document).querySelectorAll(m.hiddenTextSelector);[].forEach.call(e,(function(t){return n.init(t)})),GLSR.Event.trigger("site-reviews/excerpts/init",i)}return v(t,[{key:"init",value:function(t){if(!t.parentNode.querySelector("."+m.readMoreClass)){var i=t.dataset.trigger,n=document.createElement("span"),e=document.createElement("a");e.setAttribute("href","#"),e.innerHTML=t.dataset.showMore,"excerpt"===i&&(e.addEventListener("click",this.onClick.bind(this)),e.setAttribute("data-text",t.dataset.showLess)),"modal"===i&&e.setAttribute("data-excerpt-trigger","glsr-modal"),n.setAttribute("class",m.readMoreClass),n.appendChild(e),t.parentNode.insertBefore(n,t.nextSibling)}}},{key:"onClick",value:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,e=i.dataset.text;n.classList.toggle(m.hiddenClass),n.classList.toggle(m.visibleClass),i.dataset.text=i.innerText,i.innerText=e}}]),t}(),p=w,g=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.p()}.bind(this),250))}.bind(this))};g.prototype={g:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},k:function(){if(-1!==this.id)return this.counter=0,this.S(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.L.call(this.Form,this.counter)}.bind(this),1e3)},S: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 e=document.querySelector("iframe[name=c-"+i[n]+"]");if(e){this.observer.observe(e.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},R:function(){this.Form.form.onsubmit=null,this.g(),this._()},_:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this._();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.L.bind(this.Form,this.counter),"expired-callback":this.G.bind(this),isolated:!0},!0)}.bind(this),250)},G:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},L:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.F(),void this.form.submit();this.L(t)}};var y=g,b=n(449),k=n.n(b),S=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},L=function(t){return"."+t.trim().split(" ").join(".")},R=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},_={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?R(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?R(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?R(this):void 0!==t&&""!==t},priority:99,halt:!0}},x=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.validateEvent=this.T.bind(this)};x.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.G();this.fields.length;){var t=this.fields.shift();this.P(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(L(t.config.field)).style.display&&t.fields.push(t.I(i))}))},N:function(t){t.addEventListener(this.A(t),this.validateEvent)},D:function(t,i,n){[].forEach.call(t,function(t){var e=t.name.replace("data-","");~this.M.indexOf(e)?this.q(i,n,e,t.value):"type"===t.name&&this.q(i,n,t.value)}.bind(this))},q:function(t,i,n,e){if(_[n]&&(_[n].name=n,t.push(_[n]),e)){var o=e.split(",");o.unshift(null),i[n]=o}},T:function(t){this.B(t.currentTarget)},P:function(t){t.removeEventListener(this.A(t),this.validateEvent)},G:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(L(this.config.field));S(this.fields[t].input,this.config.input_error,!1),S(this.fields[t].input,this.config.input_valid,!1),S(i,this.config.field_error,!1),S(i,this.config.field_valid,!1)}},A:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},I:function(t){var i={},n=[];return null!==t.offsetParent&&(this.D(t.attributes,n,i),this.H(n),this.N(t)),t.validation={form:this.form,input:t,params:i,validators:n}},J:function(t,i){var n=t.input.closest(L(this.config.field));if(S(t.input,this.config.input_error,i),S(t.input,this.config.input_valid,!i),n){S(n,this.config.field_error,i),S(n,this.config.field_valid,!i);var e=n.querySelector(L(this.config.field_message));e.innerHTML=i?t.errors.join("<br>"):"",e.style.display=i?"":"none"}},V:function(t,i){t.hasOwnProperty("validation")&&this.I(t),t.validation.errors=i},H:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},B:function(t){var i=!0,n=this.fields;for(var e in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(e)){var o=n[e];this.W(o)?this.J(o,!1):(i=!1,this.J(o,!0))}return i},W:function(t){var i=[],n=!0;for(var e in t.validators)if(t.validators.hasOwnProperty(e)){var o=t.validators[e],s=t.params[o.name]?t.params[o.name]:[];if(s[0]=t.input.value,!o.fn.apply(t.input,s)){n=!1;var r=this.strings[o.name];if(i.push(r.replace(/(\%s)/g,s[1])),!0===o.halt)break}}return t.errors=i,n}};var G=x,E=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 y(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new G(t)};E.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.K(),this.validation.destroy()},destroyRecaptcha:function(){this.recaptcha.g()},destroyStarRatings:function(){this.stars&&this.stars.destroy()},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit),this.validation.init()},initRecaptcha:function(){this.recaptcha.R()},initStarRatings:function(){null!==this.stars?this.stars.rebuild():this.stars=new(k())(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},F:function(){this.button.ariaBusy="true",this.button.setAttribute("disabled","")},p:function(){this.button.ariaBusy="false",this.button.removeAttribute("disabled")},Y:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.G(),n&&(this.recaptcha.G(),this.form.reset()),this.$(t.errors),this.Z(t.message,n),this.p(),GLSR.Event.trigger("site-reviews/form/handle",t,this.form),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.k()},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.B())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.K(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.L())},K:function(){S(this.form,this.config.form_error,!1),this.Z("",null),this.validation.G()},$:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,e=this.form.querySelector('[name="'+n+'"]');e&&(this.validation.V(e,t[i]),this.validation.J(e.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(L(this.config.form_message));null!==n&&(S(this.form,this.config.form_error,!1===i),S(n,this.config.form_message_failed,!1===i),S(n,this.config.form_message_success,!0===i),n.innerHTML=t)},L:function(t){GLSR.ajax.isFormDataSupported()?(this.F(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.Y.bind(this))):this.Z(this.strings.unsupported,!1)}};var F=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var e=0;e<i.length;e++)(n=i[e].querySelector("[type=submit]"))&&((t=new E(i[e],n)).init(),GLSR.forms.push(t))},O=F;function T(t){if(Array.isArray(t)){for(var i=0,n=Array(t.length);i<t.length;i++)n[i]=t[i];return n}return Array.from(t)}var j=!1;if("undefined"!=typeof window){var M={get passive(){j=!0}};window.addEventListener("testPassive",null,M),window.removeEventListener("testPassive",null,M)}var C="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),P=[],I=!1,N=-1,A=void 0,D=void 0,q=function(t){return P.some((function(i){return!(!i.options.allowTouchMove||!i.options.allowTouchMove(t))}))},B=function(t){var i=t||window.event;return!!q(i.target)||(i.touches.length>1||(i.preventDefault&&i.preventDefault(),!1))},H=function(t){if(void 0===D){var i=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;i&&n>0&&(D=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===A&&(A=document.body.style.overflow,document.body.style.overflow="hidden")},J=function(){void 0!==D&&(document.body.style.paddingRight=D,D=void 0),void 0!==A&&(document.body.style.overflow=A,A=void 0)},V=function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight},W=function(t,i){var n=t.targetTouches[0].clientY-N;return!q(t.target)&&(i&&0===i.scrollTop&&n>0||V(i)&&n<0?B(t):(t.stopPropagation(),!0))},U=function(t,i){if(t){if(!P.some((function(i){return i.targetElement===t}))){var n={targetElement:t,options:i||{}};P=[].concat(T(P),[n]),C?(t.ontouchstart=function(t){1===t.targetTouches.length&&(N=t.targetTouches[0].clientY)},t.ontouchmove=function(i){1===i.targetTouches.length&&W(i,t)},I||(document.addEventListener("touchmove",B,j?{passive:!1}:void 0),I=!0)):H(i)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},X=function(){C?(P.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),I&&(document.removeEventListener("touchmove",B,j?{passive:!1}:void 0),I=!1),N=-1):J(),P=[]},K=["[contenteditable]",'[tabindex]:not([tabindex^="-"])',"a[href]","button:not([disabled]):not([aria-hidden])",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])"],Y=function(){function t(i){var n=i.closeTrigger,e=void 0===n?"data-glsr-close":n,o=i.onClose,s=void 0===o?function(){}:o,r=i.onOpen,u=void 0===r?function(){}:r,a=i.openClass,h=void 0===a?"is-open":a,c=i.openTrigger,f=void 0===c?"data-glsr-trigger":c,l=i.targetModalId,v=void 0===l?"glsr-modal":l,m=i.triggers,w=void 0===m?[]:m;d(this,t),this.modal=document.getElementById(v),this.config={openTrigger:f,closeTrigger:e,openClass:h,onOpen:u,onClose:s},this.events={mouseup:this.onClick.bind(this),keydown:this.onKeydown.bind(this),touchstart:this.onClick.bind(this)},w.length>0&&this.registerTriggers(w)}return v(t,[{key:"addEventListeners",value:function(){this.eventListener(this.modal,"add",["mouseup","touchstart"]),this.eventListener(document,"add",["keydown"])}},{key:"closeModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i&&(i.preventDefault(),i.stopPropagation()),this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),X(),this.activeElement&&this.activeElement.focus&&this.activeElement.focus();var n=function n(){t.modal.classList.remove(t.config.openClass),t.modal.removeEventListener("animationend",n,!1),t.config.onClose(t.modal,t.activeElement,i)};this.modal.addEventListener("animationend",n,!1)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"eventListener",value:function(t,i,n){var e=this;n.forEach((function(n){return t[i+"EventListener"](n,e.events[n])}))}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(K);return Array.prototype.slice.call(t)}},{key:"onClick",value:function(t){t.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(t)}},{key:"onKeydown",value:function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.retainFocus(t)}},{key:"openModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,i&&(i.preventDefault(),this.activeElement=i.currentTarget),this.config.onOpen(this.modal,this.activeElement,i),this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),U(this.modal.querySelector("[data-glsr-modal]")),this.addEventListeners();var n=function i(){t.modal.removeEventListener("animationend",i,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}},{key:"registerTriggers",value:function(t){var i=this;t.filter(Boolean).forEach((function(t){t.triggerModal&&t.removeEventListener("click",t.triggerModal),t.triggerModal=i.openModal.bind(i),t.addEventListener("click",t.triggerModal)}))}},{key:"removeEventListeners",value:function(){this.eventListener(this.modal,"remove",["mouseup","touchstart"]),this.eventListener(document,"remove",["keydown"])}},{key:"retainFocus",value:function(t){var i=this.getFocusableNodes();if(0!==i.length)if(i=i.filter((function(t){return null!==t.offsetParent})),this.modal.contains(document.activeElement)){var n=i.indexOf(document.activeElement);t.shiftKey&&0===n&&(i[i.length-1].focus(),t.preventDefault()),!t.shiftKey&&i.length>0&&n===i.length-1&&(i[0].focus(),t.preventDefault())}else i[0].focus()}},{key:"setFocusToFirstNode",value:function(){var t=this,i=this.getFocusableNodes();if(0!==i.length){var n=i.filter((function(i){return!i.hasAttribute(t.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&i[0].focus()}}}]),t}(),$={},z=function(t){if(t)$[t].closeModalById(t);else for(var i in $)$[i].closeModal()},Q=function(t,i){var n={};return t.forEach((function(t){var e=t.attributes[i].value;void 0===n[e]&&(n[e]=[]),n[e].push(t)})),n},Z=function(t){var i=Object.assign({},{openTrigger:"data-glsr-trigger"},t),n=Array.prototype.slice.call(document.querySelectorAll("[".concat(i.openTrigger,"]"))),e=Q(n,i.openTrigger);return Object.keys(e).forEach((function(t){i.targetModalId=t,i.triggers=e[t],$[t]=new Y(i)})),$},tt=function(t,i){var n=i||{};n.targetModalId=t,$[t]&&$[t].removeEventListeners(),$[t]=new Y(n),$[t].openModal()},it={init:Z,open:tt,close:z},nt={scrollOffset:16,scrollTime:468},et={button:"button.glsr-button-loadmore",hide:"glsr-hide",link:"a.page-numbers",pagination:".glsr-pagination",reviews:".glsr-reviews, [data-reviews]"},ot=function(){function t(i){d(this,t),this.reviewsEl=i.querySelector(et.reviews),this.wrapperEl=i,this.init()}return v(t,[{key:"data",value:function(t,i){var n=t.closest(et.pagination);if(!n)return console.error("Pagination config not found."),!1;try{for(var e=JSON.parse(JSON.stringify(n.dataset)),o={},s=0,r=Object.keys(e);s<r.length;s++){var u=r[s],a=void 0;try{a=JSON.parse(e[u])}catch(t){a=e[u]}o["".concat(GLSR.nameprefix,"[atts][").concat(u,"]")]=a}return o["".concat(GLSR.nameprefix,"[_action]")]="fetch-paged-reviews",o["".concat(GLSR.nameprefix,"[page]")]=t.dataset.page||1,o["".concat(GLSR.nameprefix,"[schema]")]=!1,o["".concat(GLSR.nameprefix,"[url]")]=t.href||"",o}catch(t){return console.error("Invalid pagination config."),!1}}},{key:"init",value:function(){this.initLoadMore(),this.initPagination(),GLSR.state.popstate||(window.addEventListener("popstate",this.onPopstate.bind(this)),GLSR.state.popstate=!0)}},{key:"initLoadMore",value:function(){var t=this,i=this.wrapperEl.querySelectorAll(et.button);i.length&&[].forEach.call(i,(function(i){i.dataset.ready||(i.addEventListener("click",t.onLoadMore.bind(t,i)),i.dataset.ready=!0)}))}},{key:"initPagination",value:function(){var t=this,i=this.wrapperEl.querySelectorAll("".concat(et.pagination," ").concat(et.link));if(i.length){[].forEach.call(i,(function(i){i.dataset.ready||(i.addEventListener("click",t.onPaginate.bind(t,i)),i.dataset.ready=!0)}));var n=this.wrapperEl.querySelector("".concat(et.pagination," .current"));if(n){var e=this.data(n),o=n.nextElementSibling;e&&o&&2==+o.dataset.page&&GLSR.urlparameter&&window.history.replaceState(e,"",window.location)}}}},{key:"onLoadMore",value:function(t,i){var n=this.data(t);n&&(t.ariaBusy="true",t.setAttribute("disabled",""),i.preventDefault(),GLSR.ajax.post(n,this.handleLoadMore.bind(this,t,n)))}},{key:"onPaginate",value:function(t,i){var n=this.data(t);n&&(this.wrapperEl.classList.add(et.hide),i.preventDefault(),GLSR.ajax.post(n,this.handlePagination.bind(this,t,n)))}},{key:"onPopstate",value:function(t){GLSR.Event.trigger("site-reviews/pagination/popstate",t,this),t.state&&t.state["".concat(GLSR.nameprefix,"[_action]")]&&(this.wrapperEl.classList.add(et.hide),GLSR.ajax.post(t.state,this.handlePopstate.bind(this,t.state)))}},{key:"handleLoadMore",value:function(t,i,n,e){t.ariaBusy="false",t.removeAttribute("disabled"),e?([].forEach.call(this.wrapperEl.querySelectorAll(et.pagination),(function(t){t.innerHTML=n.pagination})),this.reviewsEl.innerHTML+=n.reviews,this.init(),new p(this.reviewsEl)):window.location=location}},{key:"handlePagination",value:function(t,i,n,e){e?(this.paginate(n),GLSR.urlparameter&&window.history.pushState(i,"",t.href)):window.location=t.href}},{key:"handlePopstate",value:function(t,i,n){n?this.paginate(i):console.error(i)}},{key:"paginate",value:function(t){[].forEach.call(this.wrapperEl.querySelectorAll(et.pagination),(function(i){i.innerHTML=t.pagination})),this.reviewsEl.innerHTML=t.reviews,this.scrollToTop(),this.init(),this.wrapperEl.classList.remove(et.hide),new p(this.reviewsEl),GLSR.Event.trigger("site-reviews/pagination/handle",t,this)}},{key:"scrollToTop",value:function(){var t=nt.scrollOffset;[].forEach.call(GLSR.ajaxpagination,(function(i){var n=document.querySelector(i);n&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(t+=n.clientHeight)}));var i=this.reviewsEl.getBoundingClientRect().top-t;i>0||this.scrollStep({endY:i,offset:window.pageYOffset,startTime:window.performance.now(),startY:this.reviewsEl.scrollTop})}},{key:"scrollStep",value:function(t){var i=Math.min(1,(window.performance.now()-t.startTime)/nt.scrollTime),n=.5*(1-Math.cos(Math.PI*i)),e=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+e),e!==t.endY&&window.requestAnimationFrame(this.scrollStep.bind(this,t))}}]),t}(),st=function(){[].forEach.call(document.querySelectorAll(et.pagination),(function(t){var i=t.closest(".glsr");i&&(t.classList.contains("glsr-ajax-loadmore")||t.classList.contains("glsr-ajax-pagination"))&&new ot(i)}))},rt=function(){var t="glsr-modal__content",i="glsr-modal__review";window.GLSR.Modal.init({onClose:function(n,e,o){n.querySelector("."+t).innerHTML="",n.classList.remove(i),GLSR.Event.trigger("site-reviews/modal/close",n,e,o)},onOpen:function(n,e,o){var s=e.closest(".glsr").cloneNode(!0),r=e.closest(".glsr-review").cloneNode(!0);s.innerHTML="",s.appendChild(r),n.querySelector("."+t).appendChild(s),n.classList.add(i),GLSR.Event.trigger("site-reviews/modal/open",n,e,o)},openTrigger:"data-excerpt-trigger"})},ut=function(){[].forEach.call(document.querySelectorAll(".glsr"),(function(t){var i="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(i)})),new p,new O,st()};window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new s,window.GLSR.forms=[],window.GLSR.Event=f,window.GLSR.Forms=O,window.GLSR.Modal=it,f.on("site-reviews/init",ut),f.on("site-reviews/excerpts/init",rt),document.addEventListener("DOMContentLoaded",(function(){f.trigger("site-reviews/init")}))},113:function(){},30:function(){},966:function(){},83:function(){},649:function(){},408:function(){},529:function(){},275:function(){},872:function(){},865:function(){},774:function(){},625:function(){},193:function(){},644:function(){},651:function(){},344:function(){},753:function(){},189:function(){},832:function(){},345:function(){},974:function(){},511:function(){},894:function(){},474:function(){},688:function(){},522:function(){},167:function(){},406:function(){},829:function(){},273:function(){},518:function(){},963:function(){},449:function(t){function i(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function n(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)}}function e(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),t}var o={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},s=function(t,i,n){t.classList[i?"add":"remove"](n)},r=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},u=function(t,i,n){var e=r(n);return t.parentNode.insertBefore(e,i?t.nextSibling:t),e},a=function t(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var o={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(e){if(void 0!==n[0][e]){var s=i[e];"Object"!==h(s)||"Object"!==h(o[e])?o[e]=s:o[e]=t(o[e],s)}}))})),o},h=function(t){return{}.toString.call(t).slice(8,-1)},c=function(){function t(n,e){var o,s;i(this,t),this.direction=window.getComputedStyle(n,null).getPropertyValue("direction"),this.el=n,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=e,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}))}(n),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),o=this.values.length,s=this.props.maxStars,/^\d+$/.test(o)&&1<=o&&o<=s?this.build():this.destroy()}return e(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,i,n=this;this.props.prebuilt?(t=this.el.parentNode,i=t.querySelector("."+this.props.classNames.base+"--stars")):((t=u(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),i=u(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,e){var o=r({"data-index":e,"data-value":t.value});"function"==typeof n.props.stars&&n.props.stars.call(n,o,t,e),[].forEach.call(o.children,(function(t){return t.style.pointerEvents="none"})),i.innerHTML+=o.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if([].forEach.call(this.widgetEl.children,(function(i,e){s(i,e<=t,n.props.classNames.active),s(i,e===n.indexSelected,n.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(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.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,i,n,e){var o=this;n.forEach((function(n){return t[i+"EventListener"](n,o.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"],!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,o=document.elementFromPoint(e.clientX,e.clientY);return[].slice.call(o.parentNode.children).indexOf(o)}},{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,o=Math.min(Math.max(this.selected()+n,-1),e);this.selectValue(o,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i,!0)}},{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=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(i||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,i){var n;this.el.value=(null===(n=this.values[t])||void 0===n?void 0:n.value)||"",this.indexSelected=this.selected(),!1===i?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(i){return i.value===+t}))}}]),t}(),f=function(){function t(n,e){i(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(n,e)}return e(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var e=a(o,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!e.prebuilt&&t.parentNode.classList.contains(e.classNames.base)&&n.unwrap(t),n.widgets.push(new c(t,e)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===h(t)?[t]:"NodeList"===h(t)?[].slice.call(t):"String"===h(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var i=t.parentNode,n=i.parentNode;n.insertBefore(t,i),n.removeChild(i)}}]),t}();t.exports=f}},n={};function e(t){var o=n[t];if(void 0!==o)return o.exports;var s=n[t]={exports:{}};return i[t](s,s.exports,e),s.exports}e.m=i,t=[],e.O=function(i,n,o,s){if(!n){var r=1/0;for(c=0;c<t.length;c++){n=t[c][0],o=t[c][1],s=t[c][2];for(var u=!0,a=0;a<n.length;a++)(!1&s||r>=s)&&Object.keys(e.O).every((function(t){return e.O[t](n[a])}))?n.splice(a--,1):(u=!1,s<r&&(r=s));if(u){t.splice(c--,1);var h=o();void 0!==h&&(i=h)}}return i}s=s||0;for(var c=t.length;c>0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[n,o,s]},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.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0,884:0,320:0,974:0,570:0,184:0,979:0,444:0,224:0,384:0,81:0,877:0,691:0,931:0,192:0,77:0,753:0,540:0,69:0,16:0,831:0,181:0,337:0,193:0,994:0,232:0,896:0,737:0,612:0,554:0,483:0,49:0,985:0};e.O.j=function(i){return 0===t[i]};var i=function(i,n){var o,s,r=n[0],u=n[1],a=n[2],h=0;if(r.some((function(i){return 0!==t[i]}))){for(o in u)e.o(u,o)&&(e.m[o]=u[o]);if(a)var c=a(e)}for(i&&i(n);h<r.length;h++)s=r[h],e.o(t,s)&&t[s]&&t[s][0](),t[r[h]]=0;return e.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n))}(),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(721)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(406)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(829)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(273)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(518)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(963)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(113)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(30)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(966)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(83)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(649)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(408)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(529)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(275)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(872)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(865)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(774)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(625)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(193)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(644)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(651)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(344)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(753)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(189)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(832)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(345)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(974)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(511)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(894)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(474)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(688)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(522)}));var o=e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(167)}));o=e.O(o)}();
1
+ !function(){"use strict";var t,i={289:function(t,i,n){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var 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()},u: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):(this.xhr.responseText,void this.xhr.response)},h: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)}this.xhr.responseText,this.xhr.response}else this.u(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.h.bind(this,t),this.xhr.onerror=this.u.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(e){i.hasOwnProperty(e)&&(t=this.v(t,i[e],n?n[e]:e))}.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 s=o,r={},u=function(t,i){var n=r[t]||[],e=[];i&&[].forEach.call(n,(function(t){i!==t.fn&&i!==t.fn.once&&e.push(t)})),e.length?r[t]=e:delete r[t]},a=function(t,i,n){(r[t]||(r[t]=[])).push({fn:i,context:n})},h=function(t,i,n){var e=arguments,o=function o(){u(t,o),i.apply(n,e)};o.once=i,a(t,o,n)},c=function(t){var i=[].slice.call(arguments,1),n=(r[t]||[]).slice();[].forEach.call(n,(function(t){return t.fn.apply(t.context,i)}))},f={events:r,trigger:c,off:u,on:a,once:h};function d(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function l(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)}}function v(t,i,n){return i&&l(t.prototype,i),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var m={hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},w=function(){function t(i){var n=this;d(this,t);var e=(i||document).querySelectorAll(m.hiddenTextSelector);[].forEach.call(e,(function(t){return n.init(t)})),GLSR.Event.trigger("site-reviews/excerpts/init",i)}return v(t,[{key:"init",value:function(t){if(!t.parentNode.querySelector("."+m.readMoreClass)){var i=t.dataset.trigger,n=document.createElement("span"),e=document.createElement("a");e.setAttribute("href","#"),e.innerHTML=t.dataset.showMore,"excerpt"===i&&(e.addEventListener("click",this.onClick.bind(this)),e.setAttribute("data-text",t.dataset.showLess)),"modal"===i&&e.setAttribute("data-excerpt-trigger","glsr-modal"),n.setAttribute("class",m.readMoreClass),n.appendChild(e),t.parentNode.insertBefore(n,t.nextSibling)}}},{key:"onClick",value:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,e=i.dataset.text;n.classList.toggle(m.hiddenClass),n.classList.toggle(m.visibleClass),i.dataset.text=i.innerText,i.innerText=e}}]),t}(),p=w,g=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.p()}.bind(this),250))}.bind(this))};g.prototype={g:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},k:function(){if(-1!==this.id)return this.counter=0,this.S(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.L.call(this.Form,this.counter)}.bind(this),1e3)},S: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 e=document.querySelector("iframe[name=c-"+i[n]+"]");if(e){this.observer.observe(e.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},R:function(){this.Form.form.onsubmit=null,this.g(),this._()},_:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this._();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.L.bind(this.Form,this.counter),"expired-callback":this.G.bind(this),isolated:!0},!0)}.bind(this),250)},G:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},L:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.F(),void this.form.submit();this.L(t)}};var y=g,b=n(449),k=n.n(b),S=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},L=function(t){return"."+t.trim().split(" ").join(".")},R=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},_={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?R(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?R(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?R(this):void 0!==t&&""!==t},priority:99,halt:!0}},x=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.validateEvent=this.T.bind(this)};x.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.G();this.fields.length;){var t=this.fields.shift();this.P(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(L(t.config.field)).style.display&&t.fields.push(t.I(i))}))},N:function(t){t.addEventListener(this.A(t),this.validateEvent)},D:function(t,i,n){[].forEach.call(t,function(t){var e=t.name.replace("data-","");~this.M.indexOf(e)?this.q(i,n,e,t.value):"type"===t.name&&this.q(i,n,t.value)}.bind(this))},q:function(t,i,n,e){if(_[n]&&(_[n].name=n,t.push(_[n]),e)){var o=e.split(",");o.unshift(null),i[n]=o}},T:function(t){this.B(t.currentTarget)},P:function(t){t.removeEventListener(this.A(t),this.validateEvent)},G:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(L(this.config.field));S(this.fields[t].input,this.config.input_error,!1),S(this.fields[t].input,this.config.input_valid,!1),S(i,this.config.field_error,!1),S(i,this.config.field_valid,!1)}},A:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},I:function(t){var i={},n=[];return null!==t.offsetParent&&(this.D(t.attributes,n,i),this.H(n),this.N(t)),t.validation={form:this.form,input:t,params:i,validators:n}},J:function(t,i){var n=t.input.closest(L(this.config.field));if(S(t.input,this.config.input_error,i),S(t.input,this.config.input_valid,!i),n){S(n,this.config.field_error,i),S(n,this.config.field_valid,!i);var e=n.querySelector(L(this.config.field_message));e.innerHTML=i?t.errors.join("<br>"):"",e.style.display=i?"":"none"}},V:function(t,i){t.hasOwnProperty("validation")&&this.I(t),t.validation.errors=i},H:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},B:function(t){var i=!0,n=this.fields;for(var e in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(e)){var o=n[e];this.W(o)?this.J(o,!1):(i=!1,this.J(o,!0))}return i},W:function(t){var i=[],n=!0;for(var e in t.validators)if(t.validators.hasOwnProperty(e)){var o=t.validators[e],s=t.params[o.name]?t.params[o.name]:[];if(s[0]=t.input.value,!o.fn.apply(t.input,s)){n=!1;var r=this.strings[o.name];if(i.push(r.replace(/(\%s)/g,s[1])),!0===o.halt)break}}return t.errors=i,n}};var G=x,E=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 y(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new G(t)};E.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.K(),this.validation.destroy()},destroyRecaptcha:function(){this.recaptcha.g()},destroyStarRatings:function(){this.stars&&this.stars.destroy()},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit),this.validation.init()},initRecaptcha:function(){this.recaptcha.R()},initStarRatings:function(){null!==this.stars?this.stars.rebuild():this.stars=new(k())(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},F:function(){this.button.ariaBusy="true",this.button.setAttribute("disabled","")},p:function(){this.button.ariaBusy="false",this.button.removeAttribute("disabled")},Y:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.G(),n&&(this.recaptcha.G(),this.form.reset()),this.$(t.errors),this.Z(t.message,n),this.p(),GLSR.Event.trigger("site-reviews/form/handle",t,this.form),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.k()},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.B())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.K(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.L())},K:function(){S(this.form,this.config.form_error,!1),this.Z("",null),this.validation.G()},$:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,e=this.form.querySelector('[name="'+n+'"]');e&&(this.validation.V(e,t[i]),this.validation.J(e.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(L(this.config.form_message));null!==n&&(S(this.form,this.config.form_error,!1===i),S(n,this.config.form_message_failed,!1===i),S(n,this.config.form_message_success,!0===i),n.innerHTML=t)},L:function(t){GLSR.ajax.isFormDataSupported()?(this.F(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.Y.bind(this))):this.Z(this.strings.unsupported,!1)}};var O=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var e=0;e<i.length;e++)(n=i[e].querySelector("[type=submit]"))&&((t=new E(i[e],n)).init(),GLSR.forms.push(t))},F=O;function j(t){if(Array.isArray(t)){for(var i=0,n=Array(t.length);i<t.length;i++)n[i]=t[i];return n}return Array.from(t)}var T=!1;if("undefined"!=typeof window){var M={get passive(){T=!0}};window.addEventListener("testPassive",null,M),window.removeEventListener("testPassive",null,M)}var C="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),P=[],I=!1,N=-1,A=void 0,D=void 0,q=function(t){return P.some((function(i){return!(!i.options.allowTouchMove||!i.options.allowTouchMove(t))}))},B=function(t){var i=t||window.event;return!!q(i.target)||(i.touches.length>1||(i.preventDefault&&i.preventDefault(),!1))},H=function(t){if(void 0===D){var i=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;i&&n>0&&(D=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===A&&(A=document.body.style.overflow,document.body.style.overflow="hidden")},J=function(){void 0!==D&&(document.body.style.paddingRight=D,D=void 0),void 0!==A&&(document.body.style.overflow=A,A=void 0)},V=function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight},W=function(t,i){var n=t.targetTouches[0].clientY-N;return!q(t.target)&&(i&&0===i.scrollTop&&n>0||V(i)&&n<0?B(t):(t.stopPropagation(),!0))},U=function(t,i){if(t){if(!P.some((function(i){return i.targetElement===t}))){var n={targetElement:t,options:i||{}};P=[].concat(j(P),[n]),C?(t.ontouchstart=function(t){1===t.targetTouches.length&&(N=t.targetTouches[0].clientY)},t.ontouchmove=function(i){1===i.targetTouches.length&&W(i,t)},I||(document.addEventListener("touchmove",B,T?{passive:!1}:void 0),I=!0)):H(i)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},X=function(){C?(P.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),I&&(document.removeEventListener("touchmove",B,T?{passive:!1}:void 0),I=!1),N=-1):J(),P=[]},K=["[contenteditable]",'[tabindex]:not([tabindex^="-"])',"a[href]","button:not([disabled]):not([aria-hidden])",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])"],Y=function(){function t(i){var n=i.closeTrigger,e=void 0===n?"data-glsr-close":n,o=i.onClose,s=void 0===o?function(){}:o,r=i.onOpen,u=void 0===r?function(){}:r,a=i.openClass,h=void 0===a?"is-open":a,c=i.openTrigger,f=void 0===c?"data-glsr-trigger":c,l=i.targetModalId,v=void 0===l?"glsr-modal":l,m=i.triggers,w=void 0===m?[]:m;d(this,t),this.modal=document.getElementById(v),this.config={openTrigger:f,closeTrigger:e,openClass:h,onOpen:u,onClose:s},this.events={mouseup:this.onClick.bind(this),keydown:this.onKeydown.bind(this),touchstart:this.onClick.bind(this)},w.length>0&&this.registerTriggers(w)}return v(t,[{key:"addEventListeners",value:function(){this.eventListener(this.modal,"add",["mouseup","touchstart"]),this.eventListener(document,"add",["keydown"])}},{key:"closeModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i&&(i.preventDefault(),i.stopPropagation()),this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),X(),this.activeElement&&this.activeElement.focus&&this.activeElement.focus();var n=function n(){t.modal.classList.remove(t.config.openClass),t.modal.removeEventListener("animationend",n,!1),t.config.onClose(t.modal,t.activeElement,i)};this.modal.addEventListener("animationend",n,!1)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"eventListener",value:function(t,i,n){var e=this;n.forEach((function(n){return t[i+"EventListener"](n,e.events[n])}))}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(K);return Array.prototype.slice.call(t)}},{key:"onClick",value:function(t){t.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(t)}},{key:"onKeydown",value:function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.retainFocus(t)}},{key:"openModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,i&&(i.preventDefault(),this.activeElement=i.currentTarget),this.config.onOpen(this.modal,this.activeElement,i),this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),U(this.modal.querySelector("[data-glsr-modal]")),this.addEventListeners();var n=function i(){t.modal.removeEventListener("animationend",i,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}},{key:"registerTriggers",value:function(t){var i=this;t.filter(Boolean).forEach((function(t){t.triggerModal&&t.removeEventListener("click",t.triggerModal),t.triggerModal=i.openModal.bind(i),t.addEventListener("click",t.triggerModal)}))}},{key:"removeEventListeners",value:function(){this.eventListener(this.modal,"remove",["mouseup","touchstart"]),this.eventListener(document,"remove",["keydown"])}},{key:"retainFocus",value:function(t){var i=this.getFocusableNodes();if(0!==i.length)if(i=i.filter((function(t){return null!==t.offsetParent})),this.modal.contains(document.activeElement)){var n=i.indexOf(document.activeElement);t.shiftKey&&0===n&&(i[i.length-1].focus(),t.preventDefault()),!t.shiftKey&&i.length>0&&n===i.length-1&&(i[0].focus(),t.preventDefault())}else i[0].focus()}},{key:"setFocusToFirstNode",value:function(){var t=this,i=this.getFocusableNodes();if(0!==i.length){var n=i.filter((function(i){return!i.hasAttribute(t.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&i[0].focus()}}}]),t}(),$={},z=function(t){if(t)$[t].closeModalById(t);else for(var i in $)$[i].closeModal()},Q=function(t,i){var n={};return t.forEach((function(t){var e=t.attributes[i].value;void 0===n[e]&&(n[e]=[]),n[e].push(t)})),n},Z=function(t){var i=Object.assign({},{openTrigger:"data-glsr-trigger"},t),n=Array.prototype.slice.call(document.querySelectorAll("[".concat(i.openTrigger,"]"))),e=Q(n,i.openTrigger);return Object.keys(e).forEach((function(t){i.targetModalId=t,i.triggers=e[t],$[t]=new Y(i)})),$},tt=function(t,i){var n=i||{};n.targetModalId=t,$[t]&&$[t].removeEventListeners(),$[t]=new Y(n),$[t].openModal()},it={init:Z,open:tt,close:z},nt={scrollOffset:16,scrollTime:468},et={button:"button.glsr-button-loadmore",hide:"glsr-hide",link:"a.page-numbers",pagination:".glsr-pagination",reviews:".glsr-reviews, [data-reviews]"},ot=function(){function t(i){d(this,t),this.reviewsEl=i.querySelector(et.reviews),this.wrapperEl=i,this.init()}return v(t,[{key:"data",value:function(t,i){var n=t.closest(et.pagination);if(!n)return console.error("Pagination config not found."),!1;try{for(var e=JSON.parse(JSON.stringify(n.dataset)),o={},s=0,r=Object.keys(e);s<r.length;s++){var u=r[s],a=void 0;try{a=JSON.parse(e[u])}catch(t){a=e[u]}o["".concat(GLSR.nameprefix,"[atts][").concat(u,"]")]=a}return o["".concat(GLSR.nameprefix,"[_action]")]="fetch-paged-reviews",o["".concat(GLSR.nameprefix,"[page]")]=t.dataset.page||1,o["".concat(GLSR.nameprefix,"[schema]")]=!1,o["".concat(GLSR.nameprefix,"[url]")]=t.href||"",o}catch(t){return console.error("Invalid pagination config."),!1}}},{key:"init",value:function(){this.initLoadMore(),this.initPagination(),GLSR.state.popstate||(window.addEventListener("popstate",this.onPopstate.bind(this)),GLSR.state.popstate=!0)}},{key:"initLoadMore",value:function(){var t=this,i=this.wrapperEl.querySelectorAll(et.button);i.length&&[].forEach.call(i,(function(i){i.dataset.ready||(i.addEventListener("click",t.onLoadMore.bind(t,i)),i.dataset.ready=!0)}))}},{key:"initPagination",value:function(){var t=this,i=this.wrapperEl.querySelectorAll("".concat(et.pagination," ").concat(et.link));if(i.length){[].forEach.call(i,(function(i){i.dataset.ready||(i.addEventListener("click",t.onPaginate.bind(t,i)),i.dataset.ready=!0)}));var n=this.wrapperEl.querySelector("".concat(et.pagination," .current"));if(n){var e=this.data(n),o=n.nextElementSibling;e&&o&&2==+o.dataset.page&&GLSR.urlparameter&&window.history.replaceState(e,"",window.location)}}}},{key:"onLoadMore",value:function(t,i){var n=this.data(t);n&&(t.ariaBusy="true",t.setAttribute("disabled",""),i.preventDefault(),GLSR.ajax.post(n,this.handleLoadMore.bind(this,t,n)))}},{key:"onPaginate",value:function(t,i){var n=this.data(t);n&&(this.wrapperEl.classList.add(et.hide),i.preventDefault(),GLSR.ajax.post(n,this.handlePagination.bind(this,t,n)))}},{key:"onPopstate",value:function(t){GLSR.Event.trigger("site-reviews/pagination/popstate",t,this),t.state&&t.state["".concat(GLSR.nameprefix,"[_action]")]&&(this.wrapperEl.classList.add(et.hide),GLSR.ajax.post(t.state,this.handlePopstate.bind(this,t.state)))}},{key:"handleLoadMore",value:function(t,i,n,e){t.ariaBusy="false",t.removeAttribute("disabled"),e?([].forEach.call(this.wrapperEl.querySelectorAll(et.pagination),(function(t){t.innerHTML=n.pagination})),this.reviewsEl.innerHTML+=n.reviews,this.init(),new p(this.reviewsEl)):window.location=location}},{key:"handlePagination",value:function(t,i,n,e){e?(this.paginate(n),GLSR.urlparameter&&window.history.pushState(i,"",t.href)):window.location=t.href}},{key:"handlePopstate",value:function(t,i,n){n?this.paginate(i):console.error(i)}},{key:"paginate",value:function(t){[].forEach.call(this.wrapperEl.querySelectorAll(et.pagination),(function(i){i.innerHTML=t.pagination})),this.reviewsEl.innerHTML=t.reviews,this.scrollToTop(),this.init(),this.wrapperEl.classList.remove(et.hide),new p(this.reviewsEl),GLSR.Event.trigger("site-reviews/pagination/handle",t,this)}},{key:"scrollToTop",value:function(){var t=nt.scrollOffset;[].forEach.call(GLSR.ajaxpagination,(function(i){var n=document.querySelector(i);n&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(t+=n.clientHeight)}));var i=this.reviewsEl.getBoundingClientRect().top-t;i>0||this.scrollStep({endY:i,offset:window.pageYOffset,startTime:window.performance.now(),startY:this.reviewsEl.scrollTop})}},{key:"scrollStep",value:function(t){var i=Math.min(1,(window.performance.now()-t.startTime)/nt.scrollTime),n=.5*(1-Math.cos(Math.PI*i)),e=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+e),e!==t.endY&&window.requestAnimationFrame(this.scrollStep.bind(this,t))}}]),t}(),st=function(){[].forEach.call(document.querySelectorAll(et.pagination),(function(t){var i=t.closest(".glsr");i&&(t.classList.contains("glsr-ajax-loadmore")||t.classList.contains("glsr-ajax-pagination"))&&new ot(i)}))},rt=function(){var t="glsr-modal__content",i="glsr-modal__review";window.GLSR.Modal.init({onClose:function(n,e,o){n.querySelector("."+t).innerHTML="",n.classList.remove(i),GLSR.Event.trigger("site-reviews/modal/close",n,e,o)},onOpen:function(n,e,o){var s=e.closest(".glsr").cloneNode(!0),r=e.closest(".glsr-review").cloneNode(!0);s.innerHTML="",s.appendChild(r),n.querySelector("."+t).appendChild(s),n.classList.add(i),GLSR.Event.trigger("site-reviews/modal/open",n,e,o)},openTrigger:"data-excerpt-trigger"})},ut=function(){[].forEach.call(document.querySelectorAll(".glsr"),(function(t){var i="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(i)})),new p,new F,st()};window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new s,window.GLSR.forms=[],window.GLSR.Event=f,window.GLSR.Forms=F,window.GLSR.Modal=it,f.on("site-reviews/init",ut),f.on("site-reviews/excerpts/init",rt),document.addEventListener("DOMContentLoaded",(function(){f.trigger("site-reviews/init")}))},113:function(){},30:function(){},966:function(){},83:function(){},649:function(){},408:function(){},529:function(){},275:function(){},872:function(){},865:function(){},774:function(){},625:function(){},193:function(){},644:function(){},651:function(){},344:function(){},753:function(){},189:function(){},832:function(){},345:function(){},974:function(){},511:function(){},894:function(){},474:function(){},688:function(){},522:function(){},167:function(){},406:function(){},829:function(){},273:function(){},518:function(){},963:function(){},449:function(t){function i(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function n(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)}}function e(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),t}var o={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},s=function(t,i,n){t.classList[i?"add":"remove"](n)},r=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},u=function(t,i,n){var e=r(n);return t.parentNode.insertBefore(e,i?t.nextSibling:t),e},a=function t(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var o={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(e){if(void 0!==n[0][e]){var s=i[e];"Object"!==h(s)||"Object"!==h(o[e])?o[e]=s:o[e]=t(o[e],s)}}))})),o},h=function(t){return{}.toString.call(t).slice(8,-1)},c=function(){function t(n,e){var o,s;i(this,t),this.direction=window.getComputedStyle(n,null).getPropertyValue("direction"),this.el=n,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=e,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}))}(n),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),o=this.values.length,s=this.props.maxStars,/^\d+$/.test(o)&&1<=o&&o<=s?this.build():this.destroy()}return e(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,i,n=this;this.props.prebuilt?(t=this.el.parentNode,i=t.querySelector("."+this.props.classNames.base+"--stars")):((t=u(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),i=u(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,e){var o=r({"data-index":e,"data-value":t.value});"function"==typeof n.props.stars&&n.props.stars.call(n,o,t,e),[].forEach.call(o.children,(function(t){return t.style.pointerEvents="none"})),i.innerHTML+=o.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if([].forEach.call(this.widgetEl.children,(function(i,e){s(i,e<=t,n.props.classNames.active),s(i,e===n.indexSelected,n.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(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.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,i,n,e){var o=this;n.forEach((function(n){return t[i+"EventListener"](n,o.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"],!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,o=document.elementFromPoint(e.clientX,e.clientY);return[].slice.call(o.parentNode.children).indexOf(o)}},{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,o=Math.min(Math.max(this.selected()+n,-1),e);this.selectValue(o,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i,!0)}},{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=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(i||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,i){var n;this.el.value=(null===(n=this.values[t])||void 0===n?void 0:n.value)||"",this.indexSelected=this.selected(),!1===i?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(i){return i.value===+t}))}}]),t}(),f=function(){function t(n,e){i(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(n,e)}return e(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var e=a(o,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!e.prebuilt&&t.parentNode.classList.contains(e.classNames.base)&&n.unwrap(t),n.widgets.push(new c(t,e)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===h(t)?[t]:"NodeList"===h(t)?[].slice.call(t):"String"===h(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var i=t.parentNode,n=i.parentNode;n.insertBefore(t,i),n.removeChild(i)}}]),t}();t.exports=f}},n={};function e(t){var o=n[t];if(void 0!==o)return o.exports;var s=n[t]={exports:{}};return i[t](s,s.exports,e),s.exports}e.m=i,t=[],e.O=function(i,n,o,s){if(!n){var r=1/0;for(c=0;c<t.length;c++){n=t[c][0],o=t[c][1],s=t[c][2];for(var u=!0,a=0;a<n.length;a++)(!1&s||r>=s)&&Object.keys(e.O).every((function(t){return e.O[t](n[a])}))?n.splice(a--,1):(u=!1,s<r&&(r=s));if(u){t.splice(c--,1);var h=o();void 0!==h&&(i=h)}}return i}s=s||0;for(var c=t.length;c>0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[n,o,s]},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.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0,884:0,320:0,974:0,570:0,184:0,979:0,444:0,224:0,384:0,81:0,877:0,691:0,931:0,192:0,77:0,753:0,540:0,69:0,16:0,831:0,181:0,337:0,193:0,994:0,232:0,896:0,737:0,612:0,554:0,483:0,49:0,985:0};e.O.j=function(i){return 0===t[i]};var i=function(i,n){var o,s,r=n[0],u=n[1],a=n[2],h=0;if(r.some((function(i){return 0!==t[i]}))){for(o in u)e.o(u,o)&&(e.m[o]=u[o]);if(a)var c=a(e)}for(i&&i(n);h<r.length;h++)s=r[h],e.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return e.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n))}(),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(289)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(406)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(829)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(273)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(518)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(963)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(113)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(30)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(966)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(83)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(649)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(408)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(529)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(275)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(872)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(865)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(774)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(625)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(193)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(644)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(651)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(344)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(753)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(189)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(832)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(345)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(974)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(511)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(894)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(474)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(688)})),e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(522)}));var o=e.O(void 0,[884,320,974,570,184,979,444,224,384,81,877,691,931,192,77,753,540,69,16,831,181,337,193,994,232,896,737,612,554,483,49,985],(function(){return e(167)}));o=e.O(o)}();
compatibility.php CHANGED
@@ -274,8 +274,14 @@ add_action('site-reviews/addon/update', function ($app) {
274
  ];
275
  foreach ($addons as $basename => $addon) {
276
  $file = trailingslashit(WP_PLUGIN_DIR).$basename;
277
- if (file_exists($file)) {
278
- $app->update($addon, $file);
 
 
 
 
 
 
279
  }
280
  }
281
  });
274
  ];
275
  foreach ($addons as $basename => $addon) {
276
  $file = trailingslashit(WP_PLUGIN_DIR).$basename;
277
+ try {
278
+ $reflection = new \ReflectionClass($addon);
279
+ $addonId = $reflection->getConstant('ID');
280
+ if (file_exists($file) && !in_array($addonId, $app->updated)) {
281
+ $app->update($addon, $file);
282
+ }
283
+ } catch (\ReflectionException $e) {
284
+ // Fail silently
285
  }
286
  }
287
  });
helpers.php CHANGED
@@ -194,7 +194,6 @@ function glsr_get_review($postId)
194
  */
195
  function glsr_get_reviews($args = [])
196
  {
197
- glsr()->sessionSet('glsr_get_reviews', true); // Tell Site Reviews that the helper function was used
198
  return glsr(ReviewManager::class)->reviews(Arr::consolidate($args));
199
  }
200
 
194
  */
195
  function glsr_get_reviews($args = [])
196
  {
 
197
  return glsr(ReviewManager::class)->reviews(Arr::consolidate($args));
198
  }
199
 
languages/site-reviews-en_US.mo CHANGED
Binary file
languages/site-reviews-en_US.po CHANGED
@@ -1638,6 +1638,22 @@ msgctxt "admin-text"
1638
  msgid "Choose the action that should be taken when a review is blacklisted."
1639
  msgstr "Choose the action that should be taken when a review is blacklisted."
1640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1641
  #: plugin/Deprecated.php:24
1642
  msgctxt "admin-text"
1643
  msgid ""
@@ -1737,22 +1753,6 @@ msgctxt "admin-text"
1737
  msgid "Help"
1738
  msgstr "Help"
1739
 
1740
- #: plugin/Addons/Controller.php:198
1741
- msgctxt "admin-text"
1742
- msgid ""
1743
- "Make sure to first activate your website domain with your license before "
1744
- "adding it here. You can do this by visiting the %s page on your Nifty "
1745
- "Plugins account and clicking the \"Manage Sites\" button."
1746
- msgstr ""
1747
- "Make sure to first activate your website domain with your license before "
1748
- "adding it here. You can do this by visiting the %s page on your Nifty "
1749
- "Plugins account and clicking the \"Manage Sites\" button."
1750
-
1751
- #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:173
1752
- msgctxt "admin-text"
1753
- msgid "License Keys"
1754
- msgstr "License Keys"
1755
-
1756
  #: plugin/Addons/Updater.php:221
1757
  msgctxt "admin-text"
1758
  msgid "A valid license key is required to download this update."
@@ -1783,41 +1783,41 @@ msgctxt "admin-text"
1783
  msgid "Please rate %s on %s and help us spread the word. Thank you so much!"
1784
  msgstr "Please rate %s on %s and help us spread the word. Thank you so much!"
1785
 
1786
- #: plugin/Commands/ImportReviews.php:139
1787
  msgctxt "admin-text"
1788
  msgid "%s review was imported."
1789
  msgid_plural "%s reviews were imported."
1790
  msgstr[0] "%s review was imported."
1791
  msgstr[1] "%s reviews were imported."
1792
 
1793
- #: plugin/Commands/ImportReviews.php:147
1794
  msgctxt "admin-text"
1795
  msgid "%s entry was skipped."
1796
  msgid_plural "%s entries were skipped."
1797
  msgstr[0] "%s entry was skipped."
1798
  msgstr[1] "%s entries were skipped."
1799
 
1800
- #: plugin/Commands/ImportReviews.php:150
1801
  msgctxt "admin-text"
1802
  msgid "See the %s for more details."
1803
  msgstr "See the %s for more details."
1804
 
1805
- #: plugin/Commands/ImportReviews.php:153, plugin/Controllers/MenuController.php:167
1806
  msgctxt "admin-text"
1807
  msgid "Console"
1808
  msgstr "Console"
1809
 
1810
- #: plugin/Commands/ImportReviews.php:174
1811
  msgctxt "admin-text"
1812
  msgid "wrong date format"
1813
  msgstr "wrong date format"
1814
 
1815
- #: plugin/Commands/ImportReviews.php:175
1816
  msgctxt "admin-text"
1817
  msgid "empty or missing content"
1818
  msgstr "empty or missing content"
1819
 
1820
- #: plugin/Commands/ImportReviews.php:176
1821
  msgctxt "admin-text"
1822
  msgid "empty or invalid rating"
1823
  msgstr "empty or invalid rating"
@@ -4016,8 +4016,8 @@ msgstr "Delimiter"
4016
 
4017
  #: views/pages/tools/general/import-reviews.php:49
4018
  msgctxt "admin-text"
4019
- msgid "Select the delimiter used in the CSV file"
4020
- msgstr "Select the delimiter used in the CSV file"
4021
 
4022
  #: views/pages/tools/general/import-reviews.php:50
4023
  msgctxt "admin-text"
1638
  msgid "Choose the action that should be taken when a review is blacklisted."
1639
  msgstr "Choose the action that should be taken when a review is blacklisted."
1640
 
1641
+ #: plugin/Application.php:183
1642
+ msgctxt "admin-text"
1643
+ msgid ""
1644
+ "Make sure to activate your website domain with your license before adding "
1645
+ "it here. You can do this by visiting the %s page on your Nifty Plugins "
1646
+ "account and clicking the \"Manage Sites\" button."
1647
+ msgstr ""
1648
+ "Make sure to activate your website domain with your license before adding "
1649
+ "it here. You can do this by visiting the %s page on your Nifty Plugins "
1650
+ "account and clicking the \"Manage Sites\" button."
1651
+
1652
+ #: plugin/Application.php:184, plugin/Controllers/SettingsController.php:173
1653
+ msgctxt "admin-text"
1654
+ msgid "License Keys"
1655
+ msgstr "License Keys"
1656
+
1657
  #: plugin/Deprecated.php:24
1658
  msgctxt "admin-text"
1659
  msgid ""
1753
  msgid "Help"
1754
  msgstr "Help"
1755
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1756
  #: plugin/Addons/Updater.php:221
1757
  msgctxt "admin-text"
1758
  msgid "A valid license key is required to download this update."
1783
  msgid "Please rate %s on %s and help us spread the word. Thank you so much!"
1784
  msgstr "Please rate %s on %s and help us spread the word. Thank you so much!"
1785
 
1786
+ #: plugin/Commands/ImportReviews.php:160
1787
  msgctxt "admin-text"
1788
  msgid "%s review was imported."
1789
  msgid_plural "%s reviews were imported."
1790
  msgstr[0] "%s review was imported."
1791
  msgstr[1] "%s reviews were imported."
1792
 
1793
+ #: plugin/Commands/ImportReviews.php:168
1794
  msgctxt "admin-text"
1795
  msgid "%s entry was skipped."
1796
  msgid_plural "%s entries were skipped."
1797
  msgstr[0] "%s entry was skipped."
1798
  msgstr[1] "%s entries were skipped."
1799
 
1800
+ #: plugin/Commands/ImportReviews.php:171
1801
  msgctxt "admin-text"
1802
  msgid "See the %s for more details."
1803
  msgstr "See the %s for more details."
1804
 
1805
+ #: plugin/Commands/ImportReviews.php:174, plugin/Controllers/MenuController.php:167
1806
  msgctxt "admin-text"
1807
  msgid "Console"
1808
  msgstr "Console"
1809
 
1810
+ #: plugin/Commands/ImportReviews.php:195
1811
  msgctxt "admin-text"
1812
  msgid "wrong date format"
1813
  msgstr "wrong date format"
1814
 
1815
+ #: plugin/Commands/ImportReviews.php:196
1816
  msgctxt "admin-text"
1817
  msgid "empty or missing content"
1818
  msgstr "empty or missing content"
1819
 
1820
+ #: plugin/Commands/ImportReviews.php:197
1821
  msgctxt "admin-text"
1822
  msgid "empty or invalid rating"
1823
  msgstr "empty or invalid rating"
4016
 
4017
  #: views/pages/tools/general/import-reviews.php:49
4018
  msgctxt "admin-text"
4019
+ msgid "Detect automatically"
4020
+ msgstr "Detect automatically"
4021
 
4022
  #: views/pages/tools/general/import-reviews.php:50
4023
  msgctxt "admin-text"
languages/site-reviews.pot CHANGED
@@ -1178,6 +1178,16 @@ msgctxt "admin-text"
1178
  msgid "Choose the action that should be taken when a review is blacklisted."
1179
  msgstr ""
1180
 
 
 
 
 
 
 
 
 
 
 
1181
  #: plugin/Deprecated.php:24
1182
  msgctxt "admin-text"
1183
  msgid "The [%s] method has been deprecated and will be soon be removed, please use the [%s] method instead."
@@ -1321,16 +1331,6 @@ msgctxt "admin-text"
1321
  msgid "Help"
1322
  msgstr ""
1323
 
1324
- #: plugin/Addons/Controller.php:198
1325
- msgctxt "admin-text"
1326
- msgid "Make sure to first activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the \"Manage Sites\" button."
1327
- msgstr ""
1328
-
1329
- #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:173
1330
- msgctxt "admin-text"
1331
- msgid "License Keys"
1332
- msgstr ""
1333
-
1334
  #: plugin/Addons/Updater.php:221
1335
  msgctxt "admin-text"
1336
  msgid "A valid license key is required to download this update."
@@ -1373,41 +1373,41 @@ msgctxt "admin-text"
1373
  msgid "Please rate %s on %s and help us spread the word. Thank you so much!"
1374
  msgstr ""
1375
 
1376
- #: plugin/Commands/ImportReviews.php:139
1377
  msgctxt "admin-text"
1378
  msgid "%s review was imported."
1379
  msgid_plural "%s reviews were imported."
1380
  msgstr[0] ""
1381
  msgstr[1] ""
1382
 
1383
- #: plugin/Commands/ImportReviews.php:147
1384
  msgctxt "admin-text"
1385
  msgid "%s entry was skipped."
1386
  msgid_plural "%s entries were skipped."
1387
  msgstr[0] ""
1388
  msgstr[1] ""
1389
 
1390
- #: plugin/Commands/ImportReviews.php:150
1391
  msgctxt "admin-text"
1392
  msgid "See the %s for more details."
1393
  msgstr ""
1394
 
1395
- #: plugin/Commands/ImportReviews.php:153, plugin/Controllers/MenuController.php:167
1396
  msgctxt "admin-text"
1397
  msgid "Console"
1398
  msgstr ""
1399
 
1400
- #: plugin/Commands/ImportReviews.php:174
1401
  msgctxt "admin-text"
1402
  msgid "wrong date format"
1403
  msgstr ""
1404
 
1405
- #: plugin/Commands/ImportReviews.php:175
1406
  msgctxt "admin-text"
1407
  msgid "empty or missing content"
1408
  msgstr ""
1409
 
1410
- #: plugin/Commands/ImportReviews.php:176
1411
  msgctxt "admin-text"
1412
  msgid "empty or invalid rating"
1413
  msgstr ""
@@ -3947,7 +3947,7 @@ msgstr ""
3947
 
3948
  #: views/pages/tools/general/import-reviews.php:49
3949
  msgctxt "admin-text"
3950
- msgid "Select the delimiter used in the CSV file"
3951
  msgstr ""
3952
 
3953
  #: views/pages/tools/general/import-reviews.php:50
1178
  msgid "Choose the action that should be taken when a review is blacklisted."
1179
  msgstr ""
1180
 
1181
+ #: plugin/Application.php:183
1182
+ msgctxt "admin-text"
1183
+ msgid "Make sure to activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the \"Manage Sites\" button."
1184
+ msgstr ""
1185
+
1186
+ #: plugin/Application.php:184, plugin/Controllers/SettingsController.php:173
1187
+ msgctxt "admin-text"
1188
+ msgid "License Keys"
1189
+ msgstr ""
1190
+
1191
  #: plugin/Deprecated.php:24
1192
  msgctxt "admin-text"
1193
  msgid "The [%s] method has been deprecated and will be soon be removed, please use the [%s] method instead."
1331
  msgid "Help"
1332
  msgstr ""
1333
 
 
 
 
 
 
 
 
 
 
 
1334
  #: plugin/Addons/Updater.php:221
1335
  msgctxt "admin-text"
1336
  msgid "A valid license key is required to download this update."
1373
  msgid "Please rate %s on %s and help us spread the word. Thank you so much!"
1374
  msgstr ""
1375
 
1376
+ #: plugin/Commands/ImportReviews.php:160
1377
  msgctxt "admin-text"
1378
  msgid "%s review was imported."
1379
  msgid_plural "%s reviews were imported."
1380
  msgstr[0] ""
1381
  msgstr[1] ""
1382
 
1383
+ #: plugin/Commands/ImportReviews.php:168
1384
  msgctxt "admin-text"
1385
  msgid "%s entry was skipped."
1386
  msgid_plural "%s entries were skipped."
1387
  msgstr[0] ""
1388
  msgstr[1] ""
1389
 
1390
+ #: plugin/Commands/ImportReviews.php:171
1391
  msgctxt "admin-text"
1392
  msgid "See the %s for more details."
1393
  msgstr ""
1394
 
1395
+ #: plugin/Commands/ImportReviews.php:174, plugin/Controllers/MenuController.php:167
1396
  msgctxt "admin-text"
1397
  msgid "Console"
1398
  msgstr ""
1399
 
1400
+ #: plugin/Commands/ImportReviews.php:195
1401
  msgctxt "admin-text"
1402
  msgid "wrong date format"
1403
  msgstr ""
1404
 
1405
+ #: plugin/Commands/ImportReviews.php:196
1406
  msgctxt "admin-text"
1407
  msgid "empty or missing content"
1408
  msgstr ""
1409
 
1410
+ #: plugin/Commands/ImportReviews.php:197
1411
  msgctxt "admin-text"
1412
  msgid "empty or invalid rating"
1413
  msgstr ""
3947
 
3948
  #: views/pages/tools/general/import-reviews.php:49
3949
  msgctxt "admin-text"
3950
+ msgid "Detect automatically"
3951
  msgstr ""
3952
 
3953
  #: views/pages/tools/general/import-reviews.php:50
plugin/Addons/Controller.php CHANGED
@@ -188,22 +188,7 @@ abstract class Controller extends BaseController
188
  */
189
  public function filterSettings(array $settings)
190
  {
191
- $settings = array_merge($this->addon->config('settings'), $settings);
192
- if ($this->addon->licensed) {
193
- $license = [
194
- 'settings.licenses.'.$this->addon->id => [
195
- 'class' => 'regular-text',
196
- 'default' => '',
197
- 'label' => $this->addon->name,
198
- 'tooltip' => sprintf(_x('Make sure to first activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the "Manage Sites" button.', 'admin-text', 'site-reviews'),
199
- sprintf('<a href="https://niftyplugins.com/account/license-keys/" target="_blank">%s</a>', _x('License Keys', 'admin-text', 'site-reviews'))
200
- ),
201
- 'type' => 'text',
202
- ],
203
- ];
204
- $settings = array_merge($license, $settings);
205
- }
206
- return $settings;
207
  }
208
 
209
  /**
188
  */
189
  public function filterSettings(array $settings)
190
  {
191
+ return array_merge($this->addon->config('settings'), $settings);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  }
193
 
194
  /**
plugin/Application.php CHANGED
@@ -62,6 +62,11 @@ final class Application extends Container
62
  */
63
  protected $name;
64
 
 
 
 
 
 
65
  /**
66
  * @var array
67
  */
@@ -155,6 +160,38 @@ final class Application extends Container
155
  return (is_admin() || is_network_admin()) && !wp_doing_ajax();
156
  }
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  /**
159
  * @param string|object $addon
160
  * @return void
@@ -173,6 +210,21 @@ final class Application extends Container
173
  }
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  /**
177
  * @return void
178
  */
@@ -205,6 +257,7 @@ final class Application extends Container
205
  $addonId = $reflection->getConstant('ID');
206
  $updateUrl = $reflection->getConstant('UPDATE_URL');
207
  if ($addonId && $updateUrl && !in_array($addonId, $this->updated)) {
 
208
  $license = glsr_get_option('licenses.'.$addonId);
209
  $updater = new Updater($updateUrl, $file, compact('license'));
210
  $updater->init();
62
  */
63
  protected $name;
64
 
65
+ /**
66
+ * @var array
67
+ */
68
+ protected $settings;
69
+
70
  /**
71
  * @var array
72
  */
160
  return (is_admin() || is_network_admin()) && !wp_doing_ajax();
161
  }
162
 
163
+ /**
164
+ * @param object|string $addon
165
+ * @return void
166
+ */
167
+ public function license($addon)
168
+ {
169
+ try {
170
+ $settings = $this->settings(); // populate the initial settings
171
+ $reflection = new \ReflectionClass($addon);
172
+ $id = $reflection->getConstant('ID');
173
+ $licensed = $reflection->getConstant('LICENSED');
174
+ $name = $reflection->getConstant('NAME');
175
+ if (true !== $licensed || 2 !== count(array_filter([$id, $name]))) {
176
+ return;
177
+ }
178
+ $license = [
179
+ 'settings.licenses.'.$id => [
180
+ 'class' => 'regular-text',
181
+ 'default' => '',
182
+ 'label' => $name,
183
+ 'tooltip' => sprintf(_x('Make sure to activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the "Manage Sites" button.', 'admin-text', 'site-reviews'),
184
+ sprintf('<a href="https://niftyplugins.com/account/license-keys/" target="_blank">%s</a>', _x('License Keys', 'admin-text', 'site-reviews'))
185
+ ),
186
+ 'type' => 'text',
187
+ ],
188
+ ];
189
+ $this->settings = array_merge($license, $settings);
190
+ } catch (\ReflectionException $e) {
191
+ // Fail silently
192
+ }
193
+ }
194
+
195
  /**
196
  * @param string|object $addon
197
  * @return void
210
  }
211
  }
212
 
213
+ /**
214
+ * @return array
215
+ */
216
+ public function settings()
217
+ {
218
+ if (empty($this->settings)) {
219
+ $settings = $this->filterArray('addon/settings', $this->config('settings'));
220
+ array_walk($settings, function (&$setting) {
221
+ isset($setting['default']) ?: $setting['default'] = '';
222
+ });
223
+ $this->settings = $settings;
224
+ }
225
+ return $this->settings;
226
+ }
227
+
228
  /**
229
  * @return void
230
  */
257
  $addonId = $reflection->getConstant('ID');
258
  $updateUrl = $reflection->getConstant('UPDATE_URL');
259
  if ($addonId && $updateUrl && !in_array($addonId, $this->updated)) {
260
+ $this->license($addon);
261
  $license = glsr_get_option('licenses.'.$addonId);
262
  $updater = new Updater($updateUrl, $file, compact('license'));
263
  $updater->init();
plugin/Commands/ImportReviews.php CHANGED
@@ -44,7 +44,7 @@ class ImportReviews extends Upload implements Contract
44
  /**
45
  * @var string
46
  */
47
- protected $delimiter = ',';
48
 
49
  /**
50
  * @var string[]
@@ -59,7 +59,7 @@ class ImportReviews extends Upload implements Contract
59
  public function __construct(Request $request)
60
  {
61
  $this->date_format = Str::restrictTo(static::ALLOWED_DATE_FORMATS, $request->date_format, 'Y-m-d');
62
- $this->delimiter = Str::restrictTo(static::ALLOWED_DELIMITERS, $request->delimiter, ',');
63
  $this->errors = [];
64
  }
65
 
@@ -80,6 +80,26 @@ class ImportReviews extends Upload implements Contract
80
  }
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * @return int|bool
85
  */
@@ -92,10 +112,7 @@ class ImportReviews extends Upload implements Contract
92
  require_once glsr()->path('vendors/thephpleague/csv/functions_include.php');
93
  try {
94
  wp_raise_memory_limit('admin');
95
- $reader = Reader::createFromPath($this->file()->tmp_name);
96
- $reader->setDelimiter($this->delimiter);
97
- $reader->setHeaderOffset(0);
98
- $reader->skipEmptyRecords();
99
  $header = array_map('trim', $reader->getHeader());
100
  if (!empty(array_diff(static::REQUIRED_KEYS, $header))) {
101
  throw new Exception('The CSV import header is missing some of the required columns (or maybe you selected the wrong delimiter).');
@@ -108,7 +125,11 @@ class ImportReviews extends Upload implements Contract
108
  ->process($reader, $header);
109
  return $this->importRecords($records);
110
  } catch (Exception $e) {
111
- glsr(Notice::class)->addError($e->getMessage());
 
 
 
 
112
  return false;
113
  }
114
  }
44
  /**
45
  * @var string
46
  */
47
+ protected $delimiter = '';
48
 
49
  /**
50
  * @var string[]
59
  public function __construct(Request $request)
60
  {
61
  $this->date_format = Str::restrictTo(static::ALLOWED_DATE_FORMATS, $request->date_format, 'Y-m-d');
62
+ $this->delimiter = Str::restrictTo(static::ALLOWED_DELIMITERS, $request->delimiter, '');
63
  $this->errors = [];
64
  }
65
 
80
  }
81
  }
82
 
83
+ /**
84
+ * @return Reader
85
+ */
86
+ protected function createReader()
87
+ {
88
+ $reader = Reader::createFromPath($this->file()->tmp_name);
89
+ if (empty($this->delimiter)) {
90
+ $delimiters = \GeminiLabs\League\Csv\delimiter_detect($reader, [',',';']);
91
+ $delimiters = array_keys(array_filter($delimiters));
92
+ if (1 !== count($delimiters)) {
93
+ throw new Exception('Cannot detect the delimiter used in the CSV file (supported delimiters are comma and semicolon).');
94
+ }
95
+ $this->delimiter = $delimiters[0];
96
+ }
97
+ $reader->setDelimiter($this->delimiter);
98
+ $reader->setHeaderOffset(0);
99
+ $reader->skipEmptyRecords();
100
+ return $reader;
101
+ }
102
+
103
  /**
104
  * @return int|bool
105
  */
112
  require_once glsr()->path('vendors/thephpleague/csv/functions_include.php');
113
  try {
114
  wp_raise_memory_limit('admin');
115
+ $reader = $this->createReader();
 
 
 
116
  $header = array_map('trim', $reader->getHeader());
117
  if (!empty(array_diff(static::REQUIRED_KEYS, $header))) {
118
  throw new Exception('The CSV import header is missing some of the required columns (or maybe you selected the wrong delimiter).');
125
  ->process($reader, $header);
126
  return $this->importRecords($records);
127
  } catch (Exception $e) {
128
+ if ('The header record must be an empty or a flat array with unique string values.' === $e->getMessage()) {
129
+ glsr(Notice::class)->addError('Site Reviews does not support UTF-16 encoded CSV files. Please save as UTF-8 and try again.');
130
+ } else {
131
+ glsr(Notice::class)->addError($e->getMessage());
132
+ }
133
  return false;
134
  }
135
  }
plugin/Database/DefaultsManager.php CHANGED
@@ -11,7 +11,7 @@ class DefaultsManager
11
  */
12
  public function defaults()
13
  {
14
- $settings = $this->settings();
15
  $defaults = (array) array_combine(array_keys($settings), wp_list_pluck($settings, 'default'));
16
  return wp_parse_args($defaults, [
17
  'version' => '',
@@ -33,7 +33,7 @@ class DefaultsManager
33
  */
34
  public function pluck($path)
35
  {
36
- $settings = Arr::convertFromDotNotation($this->settings());
37
  return Arr::get($settings, $path);
38
  }
39
 
@@ -49,31 +49,4 @@ class DefaultsManager
49
  update_option(OptionManager::databaseKey(), $updatedSettings);
50
  return $defaultSettings;
51
  }
52
-
53
- /**
54
- * @return array
55
- */
56
- public function settings()
57
- {
58
- static $settings;
59
- if (empty($settings)) {
60
- $settings = glsr()->filterArray('addon/settings', glsr()->config('settings'));
61
- $settings = $this->normalize($settings);
62
- }
63
- return $settings;
64
- }
65
-
66
- /**
67
- * @return array
68
- */
69
- protected function normalize(array $settings)
70
- {
71
- array_walk($settings, function (&$setting) {
72
- if (isset($setting['default'])) {
73
- return;
74
- }
75
- $setting['default'] = '';
76
- });
77
- return $settings;
78
- }
79
  }
11
  */
12
  public function defaults()
13
  {
14
+ $settings = glsr()->settings();
15
  $defaults = (array) array_combine(array_keys($settings), wp_list_pluck($settings, 'default'));
16
  return wp_parse_args($defaults, [
17
  'version' => '',
33
  */
34
  public function pluck($path)
35
  {
36
+ $settings = Arr::convertFromDotNotation(glsr()->settings());
37
  return Arr::get($settings, $path);
38
  }
39
 
49
  update_option(OptionManager::databaseKey(), $updatedSettings);
50
  return $defaultSettings;
51
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
plugin/Defaults/CreateReviewDefaults.php CHANGED
@@ -32,7 +32,7 @@ class CreateReviewDefaults extends Defaults
32
  'custom' => 'array',
33
  'date' => 'date',
34
  'email' => 'user-email',
35
- 'form_id' => 'int',
36
  'ip_address' => 'text',
37
  'is_approved' => 'bool',
38
  'is_pinned' => 'bool',
32
  'custom' => 'array',
33
  'date' => 'date',
34
  'email' => 'user-email',
35
+ 'form_id' => 'key',
36
  'ip_address' => 'text',
37
  'is_approved' => 'bool',
38
  'is_pinned' => 'bool',
plugin/Defaults/SiteReviewsFormDefaults.php CHANGED
@@ -29,6 +29,7 @@ class SiteReviewsFormDefaults extends Defaults
29
  * @var array
30
  */
31
  public $sanitize = [
 
32
  'id' => 'id',
33
  ];
34
 
@@ -44,6 +45,7 @@ class SiteReviewsFormDefaults extends Defaults
44
  'class' => '',
45
  'description' => '',
46
  'excluded' => '',
 
47
  'hide' => '',
48
  'id' => '',
49
  'title' => '',
29
  * @var array
30
  */
31
  public $sanitize = [
32
+ 'form_id' => 'id',
33
  'id' => 'id',
34
  ];
35
 
45
  'class' => '',
46
  'description' => '',
47
  'excluded' => '',
48
+ 'form_id' => '', // used for the validation session key and to generate the honeypot hash
49
  'hide' => '',
50
  'id' => '',
51
  'title' => '',
plugin/Hooks.php CHANGED
@@ -110,7 +110,7 @@ class Hooks implements HooksContract
110
  add_action('pre_get_posts', [$this->listtable, 'setQueryForColumn']);
111
  add_action('restrict_manage_posts', [$this->listtable, 'renderColumnFilters']);
112
  add_action('manage_'.glsr()->post_type.'_posts_custom_column', [$this->listtable, 'renderColumnValues'], 10, 2);
113
- add_action('init', [$this->main, 'initDefaults'], 1);
114
  add_action('wp_insert_site', [$this->main, 'installOnNewSite']);
115
  add_action('admin_footer', [$this->main, 'logOnce']);
116
  add_action('wp_footer', [$this->main, 'logOnce']);
110
  add_action('pre_get_posts', [$this->listtable, 'setQueryForColumn']);
111
  add_action('restrict_manage_posts', [$this->listtable, 'renderColumnFilters']);
112
  add_action('manage_'.glsr()->post_type.'_posts_custom_column', [$this->listtable, 'renderColumnValues'], 10, 2);
113
+ add_action('init', [$this->main, 'initDefaults'], 2); // run after updateAddons!
114
  add_action('wp_insert_site', [$this->main, 'installOnNewSite']);
115
  add_action('admin_footer', [$this->main, 'logOnce']);
116
  add_action('wp_footer', [$this->main, 'logOnce']);
plugin/Modules/Html/Settings.php CHANGED
@@ -11,18 +11,12 @@ use GeminiLabs\SiteReviews\Modules\Translation;
11
 
12
  class Settings
13
  {
14
- /**
15
- * @var array
16
- */
17
- public $settings;
18
-
19
  /**
20
  * @param string $id
21
  * @return string
22
  */
23
  public function buildFields($id)
24
  {
25
- $this->settings = glsr(DefaultsManager::class)->settings();
26
  $method = Helper::buildMethodName($id, 'getTemplateDataFor');
27
  $data = !method_exists($this, $method)
28
  ? $this->getTemplateData($id)
@@ -54,7 +48,7 @@ class Settings
54
  */
55
  protected function getSettingFields($path)
56
  {
57
- return array_filter($this->settings, function ($key) use ($path) {
58
  return Str::startsWith($path, $key);
59
  }, ARRAY_FILTER_USE_KEY);
60
  }
@@ -172,8 +166,8 @@ class Settings
172
  */
173
  protected function isMultiDependency($path)
174
  {
175
- if (isset($this->settings[$path])) {
176
- $field = $this->settings[$path];
177
  return ('checkbox' == $field['type'] && !empty($field['options']))
178
  || !empty($field['multiple']);
179
  }
11
 
12
  class Settings
13
  {
 
 
 
 
 
14
  /**
15
  * @param string $id
16
  * @return string
17
  */
18
  public function buildFields($id)
19
  {
 
20
  $method = Helper::buildMethodName($id, 'getTemplateDataFor');
21
  $data = !method_exists($this, $method)
22
  ? $this->getTemplateData($id)
48
  */
49
  protected function getSettingFields($path)
50
  {
51
+ return array_filter(glsr()->settings(), function ($key) use ($path) {
52
  return Str::startsWith($path, $key);
53
  }, ARRAY_FILTER_USE_KEY);
54
  }
166
  */
167
  protected function isMultiDependency($path)
168
  {
169
+ if (isset(glsr()->settings()[$path])) {
170
+ $field = glsr()->settings()[$path];
171
  return ('checkbox' == $field['type'] && !empty($field['options']))
172
  || !empty($field['multiple']);
173
  }
plugin/Modules/Html/Tags/FormFieldsTag.php CHANGED
@@ -32,7 +32,7 @@ class FormFieldsTag extends FormTag
32
  {
33
  $fields = $this->fields();
34
  $hiddenFields = array_merge($this->hiddenFields(), [
35
- 'honeypot' => glsr(Honeypot::class)->build($this->args->id)
36
  ]);
37
  foreach ($fields as $name => $field) {
38
  unset($hiddenFields[$name]);
@@ -58,7 +58,7 @@ class FormFieldsTag extends FormTag
58
  'assigned_terms' => $this->args->assigned_terms,
59
  'assigned_users' => $this->args->assigned_users,
60
  'excluded' => $this->args->hide,
61
- 'form_id' => $this->args->id,
62
  'terms_exist' => Cast::toInt(!in_array('terms', $this->args->hide)),
63
  ];
64
  foreach ($hiddenFields as $name => $value) {
32
  {
33
  $fields = $this->fields();
34
  $hiddenFields = array_merge($this->hiddenFields(), [
35
+ 'honeypot' => glsr(Honeypot::class)->build($this->args->form_id)
36
  ]);
37
  foreach ($fields as $name => $field) {
38
  unset($hiddenFields[$name]);
58
  'assigned_terms' => $this->args->assigned_terms,
59
  'assigned_users' => $this->args->assigned_users,
60
  'excluded' => $this->args->hide,
61
+ 'form_id' => $this->args->form_id,
62
  'terms_exist' => Cast::toInt(!in_array('terms', $this->args->hide)),
63
  ];
64
  foreach ($hiddenFields as $name => $value) {
plugin/Modules/Sanitizer.php CHANGED
@@ -124,7 +124,8 @@ class Sanitizer
124
  public function sanitizeId($value)
125
  {
126
  require_once ABSPATH.WPINC.'/pluggable.php';
127
- $value = $this->sanitizeSlug($value);
 
128
  if (empty($value)) {
129
  $value = glsr()->prefix.substr(wp_hash(serialize($this->values), 'nonce'), -12, 8);
130
  }
@@ -166,7 +167,8 @@ class Sanitizer
166
  */
167
  public function sanitizeKey($value)
168
  {
169
- return Str::snakeCase(sanitize_key($this->sanitizeText($value)));
 
170
  }
171
 
172
  /**
124
  public function sanitizeId($value)
125
  {
126
  require_once ABSPATH.WPINC.'/pluggable.php';
127
+ $value = sanitize_key($this->sanitizeText($value));
128
+ $value = substr($value, 0, 32); // limit the id to 32 characters
129
  if (empty($value)) {
130
  $value = glsr()->prefix.substr(wp_hash(serialize($this->values), 'nonce'), -12, 8);
131
  }
167
  */
168
  public function sanitizeKey($value)
169
  {
170
+ $value = sanitize_key($this->sanitizeText($value));
171
+ return substr(Str::snakeCase($value), 0, 32); // limit the key to 32 characters
172
  }
173
 
174
  /**
plugin/Modules/Validator/RecaptchaValidator.php CHANGED
@@ -26,10 +26,10 @@ class RecaptchaValidator extends ValidatorAbstract
26
  return true;
27
  }
28
  if (static::RECAPTCHA_EMPTY === $this->status) {
29
- glsr()->sessionSet($this->sessionKey('recaptcha'), 'unset');
30
  return true;
31
  }
32
- glsr()->sessionSet($this->sessionKey('recaptcha'), 'reset');
33
  return false;
34
  }
35
 
26
  return true;
27
  }
28
  if (static::RECAPTCHA_EMPTY === $this->status) {
29
+ glsr()->sessionSet('form_recaptcha', 'unset');
30
  return true;
31
  }
32
+ glsr()->sessionSet('form_recaptcha', 'reset');
33
  return false;
34
  }
35
 
plugin/Modules/Validator/ValidateReview.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Modules\Validator;
4
 
 
5
  use GeminiLabs\SiteReviews\Helpers\Cast;
6
  use GeminiLabs\SiteReviews\Request;
7
 
@@ -56,9 +57,9 @@ class ValidateReview
56
  }
57
  }
58
  $this->blacklisted = Cast::toBool($this->request->blacklisted);
59
- $this->errors = glsr()->sessionGet($this->request->form_id.'_errors', false);
60
- $this->message = glsr()->sessionGet($this->request->form_id.'_message');
61
- $this->recaptcha = glsr()->sessionGet($this->request->form_id.'_recaptcha');
62
  return $this;
63
  }
64
 
2
 
3
  namespace GeminiLabs\SiteReviews\Modules\Validator;
4
 
5
+ use GeminiLabs\SiteReviews\Helpers\Arr;
6
  use GeminiLabs\SiteReviews\Helpers\Cast;
7
  use GeminiLabs\SiteReviews\Request;
8
 
57
  }
58
  }
59
  $this->blacklisted = Cast::toBool($this->request->blacklisted);
60
+ $this->errors = glsr()->sessionPluck('form_errors', false);
61
+ $this->message = glsr()->sessionPluck('form_message');
62
+ $this->recaptcha = glsr()->sessionPluck('form_recaptcha');
63
  return $this;
64
  }
65
 
plugin/Modules/Validator/ValidatorAbstract.php CHANGED
@@ -43,16 +43,7 @@ abstract class ValidatorAbstract
43
  */
44
  protected function alreadyFailed()
45
  {
46
- return is_array(glsr()->session()->get($this->sessionKey('errors')));
47
- }
48
-
49
- /**
50
- * @param string $type
51
- * @return string
52
- */
53
- protected function sessionKey($type)
54
- {
55
- return $this->request->form_id.'_'.$type;
56
  }
57
 
58
  /**
@@ -62,9 +53,9 @@ abstract class ValidatorAbstract
62
  */
63
  protected function setErrors($message, $loggedMessage = null)
64
  {
65
- glsr()->sessionSet($this->sessionKey('errors'), $this->errors);
66
- glsr()->sessionSet($this->sessionKey('message'), $message);
67
- glsr()->sessionSet($this->sessionKey('values'), $this->request->toArray());
68
  if (!empty($loggedMessage)) {
69
  glsr_log()->warning($loggedMessage)->debug($this->request->toArray());
70
  }
43
  */
44
  protected function alreadyFailed()
45
  {
46
+ return is_array(glsr()->sessionGet('form_errors'));
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  /**
53
  */
54
  protected function setErrors($message, $loggedMessage = null)
55
  {
56
+ glsr()->sessionSet('form_errors', $this->errors);
57
+ glsr()->sessionSet('form_message', $message);
58
+ glsr()->sessionSet('form_values', $this->request->toArray());
59
  if (!empty($loggedMessage)) {
60
  glsr_log()->warning($loggedMessage)->debug($this->request->toArray());
61
  }
plugin/Plugin.php CHANGED
@@ -60,12 +60,16 @@ trait Plugin
60
 
61
  public function __get($property)
62
  {
63
- if (property_exists($this, $property)) {
64
- return $this->$property;
 
 
 
 
65
  }
66
- $constant = 'static::'.strtoupper($property);
67
- if (defined($constant)) {
68
- return constant($constant);
69
  }
70
  }
71
 
60
 
61
  public function __get($property)
62
  {
63
+ $instance = new \ReflectionClass($this);
64
+ if ($instance->hasProperty($property)) {
65
+ $prop = $instance->getProperty($property);
66
+ if ($prop->isPublic() || $prop->isProtected()) {
67
+ return $this->$property;
68
+ }
69
  }
70
+ $constant = strtoupper($property);
71
+ if ($instance->hasConstant($constant)) {
72
+ return $instance->getConstant($constant);
73
  }
74
  }
75
 
plugin/Session.php CHANGED
@@ -32,7 +32,15 @@ trait Session
32
  */
33
  public function sessionGet($key, $fallback = '')
34
  {
35
- $value = Arr::get($this->session, $key, $fallback);
 
 
 
 
 
 
 
 
36
  unset($this->session[$key]);
37
  return $value;
38
  }
32
  */
33
  public function sessionGet($key, $fallback = '')
34
  {
35
+ return Arr::get($this->session, $key, $fallback);
36
+ }
37
+
38
+ /**
39
+ * @return mixed
40
+ */
41
+ public function sessionPluck($key, $fallback = '')
42
+ {
43
+ $value = $this->sessionGet($key, $fallback);
44
  unset($this->session[$key]);
45
  return $value;
46
  }
plugin/Shortcodes/SiteReviewsFormShortcode.php CHANGED
@@ -185,10 +185,10 @@ class SiteReviewsFormShortcode extends Shortcode
185
  protected function with()
186
  {
187
  return glsr()->args([
188
- 'errors' => glsr()->sessionGet($this->args['id'].'errors', []),
189
- 'message' => glsr()->sessionGet($this->args['id'].'message', ''),
190
  'required' => glsr_get_option('submissions.required', []),
191
- 'values' => glsr()->sessionGet($this->args['id'].'values', []),
192
  ]);
193
  }
194
  }
185
  protected function with()
186
  {
187
  return glsr()->args([
188
+ 'errors' => glsr()->sessionPluck($this->args['id'].'errors', []),
189
+ 'message' => glsr()->sessionPluck($this->args['id'].'message', ''),
190
  'required' => glsr_get_option('submissions.required', []),
191
+ 'values' => glsr()->sessionPluck($this->args['id'].'values', []),
192
  ]);
193
  }
194
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, woocommerce, product reviews, business rev
5
  Tested up to: 5.9
6
  Requires at least: 5.5
7
  Requires PHP: 5.6.20
8
- Stable tag: 5.20.2
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,12 @@ All documentation can be found in the "Help" page of the plugin. If your questio
140
 
141
  ## Changelog
142
 
 
 
 
 
 
 
143
  = 5.20.2 (2022-01-29) =
144
 
145
  - Fixed the search on the Strings settings page
5
  Tested up to: 5.9
6
  Requires at least: 5.5
7
  Requires PHP: 5.6.20
8
+ Stable tag: 5.20.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
  ## Changelog
142
 
143
+ = 5.20.3 (2022-02-01) =
144
+
145
+ - Added ability to autodetect the CSV delimeter when importing reviews
146
+ - Fixed a bug which allowed spam reviews to bypass validation
147
+ - Fixed licensing for outdated add-ons
148
+
149
  = 5.20.2 (2022-01-29) =
150
 
151
  - Fixed the search on the Strings settings page
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.20.2
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.20.3
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
views/pages/tools/general/import-reviews.php CHANGED
@@ -45,8 +45,8 @@
45
  </p>
46
  <p>
47
  <label for="csv_delimiter"><strong><?= _x('Delimiter', 'admin-text', 'site-reviews'); ?></strong></label><br>
48
- <select name="{{ id }}[delimiter]" id="csv_delimiter" required>
49
- <option value=""><?= _x('Select the delimiter used in the CSV file', 'admin-text', 'site-reviews'); ?></option>
50
  <option value=","><?= _x('Comma (,)', 'admin-text', 'site-reviews'); ?></option>
51
  <option value=";"><?= _x('Semicolon (;)', 'admin-text', 'site-reviews'); ?></option>
52
  </select>
45
  </p>
46
  <p>
47
  <label for="csv_delimiter"><strong><?= _x('Delimiter', 'admin-text', 'site-reviews'); ?></strong></label><br>
48
+ <select name="{{ id }}[delimiter]" id="csv_delimiter">
49
+ <option value=""><?= _x('Detect automatically', 'admin-text', 'site-reviews'); ?></option>
50
  <option value=","><?= _x('Comma (,)', 'admin-text', 'site-reviews'); ?></option>
51
  <option value=";"><?= _x('Semicolon (;)', 'admin-text', 'site-reviews'); ?></option>
52
  </select>