// source --> https://hennebert-formation.com/wp-content/plugins/business-reviews-bundle/assets/1.9.157/js/public-main.js 
var rpi=rpi||{};
rpi.Time={getFormatTime:function(a,b,d){a=new Date(this._ms(a));var t=d||"en";d=function(q){return 10>q?"0"+q:""+q};var m=a.getHours(),h=((new Intl.DateTimeFormat(t,{day:"numeric",month:"short"})).formatToParts(a).find(function(q){return"month"===q.type})||{}).value;t=(new Intl.DateTimeFormat(t,{day:"numeric",month:"long"})).formatToParts(a).find(function(q){return"month"===q.type}).value;var g=a.getFullYear(),l=String(g).slice(-2),r={yyyy:g,Y:g,yy:l,y:l,MMMM:t,MMM:h,M:h,MM:d(a.getMonth()+1),m:d(a.getMonth()+
1),dd:d(a.getDate()),d:d(a.getDate()),HH:d(m),H:m,hh:d(m%12||12),h:m%12||12,mm:d(a.getMinutes()),i:d(a.getMinutes()),ss:d(a.getSeconds()),s:d(a.getSeconds()),a:12<=m?"pm":"am",A:12<=m?"PM":"AM"};return b.replace(/(MMMM|MMM|yyyy|HH|hh|MM|mm|dd|ss|yy|H|h|M|m|d|Y|y|i|s|a|A)/g,q=>null!=r[q]?r[q]:q)},getTimeAgo:function(a,b){a=(this._ms(a)-Date.now())/1E3;var d=Math.abs(a);b=new Intl.RelativeTimeFormat(b||"en",{numeric:"auto"});return 60>d?b.format(Math.round(a),"second"):3600>d?b.format(Math.round(a/
60),"minute"):86400>d?b.format(Math.round(a/3600),"hour"):2592E3>d?b.format(Math.round(a/86400),"day"):31536E3>d?b.format(Math.round(a/2592E3),"month"):b.format(Math.round(a/31536E3),"year")},_ms:function(a){a=parseInt(a,10);return 1E10>a?1E3*a:a}};rpi=rpi||{};
rpi.Utils={__:function(a,b){return b&&b[a]||a},isVisible:function(a){let b=window.getComputedStyle(a);return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==b.visibility&&"none"!==b.display},isInViewport:function(a,b=0){a=a.getBoundingClientRect();return a.top<window.innerHeight*(1+b)&&a.bottom>-window.innerHeight*b&&a.left<window.innerWidth*(1+b)&&a.right>-window.innerWidth*b},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"):
document.body.currentStyle.direction)},getParent:function(a,b="rplg"){b=Array.isArray(b)?b:[b];return a?a.closest("."+b.join(",.")):null},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,b,d){var t=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+b+", height="+d+", top="+((window.innerHeight?window.innerHeight:t.clientHeight?t.clientHeight:screen.height)/2-d/2+(void 0!=window.screenTop?window.screenTop:
window.screenY))+", left="+((window.innerWidth?window.innerWidth:t.clientWidth?t.clientWidth:screen.width)/2-b/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,b,d,t){const m=new XMLHttpRequest;m.open(b,a,!0);m.setRequestHeader("Content-Type","application/json");m.onreadystatechange=function(){if((m.readyState===XMLHttpRequest.DONE||m.readyState===m.DONE)&&200===m.status){const h=JSON.parse(m.responseText);"function"===typeof t?t(h):
"function"===typeof d&&d(h)}};m.send(d&&"function"!==typeof d?JSON.stringify(d):null)},anchor:function(a,b,d,t,m){const h=[];d.open_link&&h.push("noopener");d.nofollow_link&&h.push("nofollow");return'<a href="'+a+'"'+(t?' class="'+t+'"':"")+(d.open_link?' target="_blank"':"")+(h.length?' rel="'+h.join(" ")+'"':"")+(m?' aria-label="'+m+'"':"")+">"+b+"</a>"},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},url:function(a){try{return(new URL(a,
window.location.origin)).href}catch(b){return""}},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{};
rpi.Column=function(a,b,d){const t=a.getAttribute("data-id"),m=new RegExp(d.col+"-[xsml]+"),h=new RegExp('$|(\\[data-id="'+t+'"\\]\\s+.'+d.card+"\\s*{\\s*--col:\\s*\\d+\\s*!important\\s*;?(\\s*--gap:\\s*\\d+\\s*!important;?)?})"),g=a.getElementsByClassName(d.cnt)[0];var l=null;return l={init:function(r,q){rpi.Utils.isVisible(g)?(r&&r(),l.resize(),window.addEventListener("resize",l.resize),q&&q(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(l)):setTimeout(l.init,300)},resize:function(){let r=
l.getSize();g.className=g.className.replace(m,d.col+"-"+r);if(b.breakpoints){let q=g.offsetWidth,c=b.breakpoints.split(",");c.sort(l.brsort);for(let e=0;e<c.length;e++){let k=c[e].split(":");if(q<parseInt(k[0])){l.setCol(k[1]);break}}}return r},getSize:function(){let r=g.offsetWidth;return 510>r?"xs":750>r?"x":1050>r?"s":1450>r?"m":1800>r?"l":"xl"},setCol:function(r){const q=this.getStyle();q.innerHTML=q.innerHTML.replace(h,(t?'[data-id="'+t+'"] ':"")+"."+d.card+"{--col:"+r+"!important;--gap:"+(r-
1)+"!important}")},getCol:function(){let r=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return r&&1<r.length?r[1]:!1},getStyle:function(){let r=document.getElementById("rpi-style");r||(r=document.createElement("style"),r.id="rpi-style",document.head.appendChild(r));return r},setBreakpoints:function(r){b.breakpoints=r},brsort:function(r,q){return parseInt(r.split(":")[0])>parseInt(q.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",l.resize)}}};rpi=rpi||{};rpi.AVA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
rpi.Common=function(a,b,d){let t=null;const m=rpi.Utils.lang();return t={init(){let h=a.getElementsByClassName(d.time),g=a.getElementsByClassName(d.text);for(const l of h)t.setTime(l);for(const l of g)t.setText(l)},initOnce(h){let g=h.getElementsByClassName(d.time)[0];h=h.getElementsByClassName(d.text)[0];t.setTime(g);t.setText(h)},setText(h){if(h&&h.textContent){var g=t.trimtext(h.textContent);h.textContent=g[0];g[1]&&(h.appendChild(rpi.el({tag:"span",cl:"rpi-s",text:"... "})),h.appendChild(rpi.el({tag:"span",
cl:d.readmore,text:rpi.Utils.__("read more",b.trans),data:{hidden:g[1]}})),h.lastChild.onclick=t.opentext)}},trimtext(h){const g=parseInt(b.text_size,10);if(!h||!g||h.length<=g)return[h||"",""];h=Array.from(h);let l=h.slice(0,g).join("").lastIndexOf(" ");l=-1===l?g:l;return[h.slice(0,l).join("").trimEnd(),h.slice(l).join("")]},opentext(){let h=this.parentNode,g=this.dataset.hidden||"";rpi.Utils.rm(this.previousElementSibling);rpi.Utils.rm(this);h.appendChild(document.createTextNode(g))},setTime(h){h&&
(h.textContent=t.time(h.dataset.time))},time(h){return b.time_format?rpi.Time.getFormatTime(h,b.time_format,m):rpi.Time.getTimeAgo(h,m)}}};
rpi.el=function(a={},...b){const d=document.createElement("string"===typeof a?a:a.tag||"div");"string"!==typeof a&&(a.id&&(d.id=a.id),a.cl&&d.classList.add(...[].concat(a.cl).join(" ").split(/\s+/).filter(Boolean)),null!=a.text&&(d.textContent=a.text),a.data&&Object.assign(d.dataset,Object.fromEntries(Object.entries(a.data).filter(([,t])=>void 0!==t&&null!==t))),a.style&&(d.style.cssText=a.style),a.atts&&Object.keys(a.atts).forEach(t=>{const m=a.atts[t];null!==m&&void 0!==m&&!1!==m&&d.setAttribute(t,
m)}),a.html&&(d.innerHTML=a.html),b=a.children?[].concat(a.children).concat(b):b);b.flat().forEach(t=>{t&&d.appendChild(t instanceof Node?t:document.createTextNode(String(t)))});return d};window.brb_vars=window.brb_vars||{ajaxurl:"/wp-admin/admin-ajax.php",gavatar:""};rpi=rpi||{};
rpi.View=function(a,b={},d={}){const t=b.id??a.getAttribute("data-id");a.getElementsByClassName("rpi-cnt");const m=a.getElementsByClassName("rpi-header")[0],h=a.getElementsByClassName(d&&d.names&&d.names.content||"rpi-content")[0],g=h?h.getElementsByClassName(d&&d.names&&d.names.cards||"rpi-cards")[0]:null,l=a.getElementsByClassName("rpi-url")[0],r=rpi.Media(a);var q=null;return q={media:r,boot(){d.cb&&d.cb.pre&&d.cb.pre();rpi.Utils.ajax(q.getAjaxUrl({act:"widget"}),"POST",function(c){g.setAttribute("data-offset",
c.offset);g.setAttribute("data-count",c.count);c.bizs&&q.addBusiness(c.bizs[0],c.options);q.addReviews(c,[],function(e){q.initStyle();d.cb&&d.cb.post&&d.cb.post()})});q.initPagin()},init(){r.init();q.initStyle();q.initPagin()},initPagin(){l&&(l.onclick=function(){l.disabled=!0;q.loadNextReviews(b.pagination,function(c){q.delPaginBtn();d.cbp&&d.cbp(c);l.disabled=!1});return!1})},loadNextReviews(c,e){if(0<c){const k=[];c=parseInt(c);q.preloadReviews(k,c);q.loadAjaxReviews(k,c,e)}},preloadReviews(c,
e){var k=parseInt(g.getAttribute("data-offset")),f=parseInt(g.getAttribute("data-count"));e=f-k>e?e:f-k;k=g.getElementsByClassName(d&&d.names&&d.names.card||"rpi-card");if(k.length){f=k.length-1;for(let u=0;u<e;u++){let y=k[Math.round(Math.random()*f)].cloneNode(!0);y.style="filter: blur(4px);";g.appendChild(y);c.push(y)}}},loadAjaxReviews(c,e,k){rpi.Utils.ajax(q.getAjaxUrl({act:"reviews",size:e}),"POST",function(f){g.setAttribute("data-offset",f.offset);g.setAttribute("data-count",f.count);q.addReviews(f,
c,k)})},getAjaxUrl(c){return rpi.View.ajaxurl({...c,id:t,offset:c.offset??(g?parseInt(g.dataset.offset):0),...(d.filter?.bid&&{bid:d.filter.bid}),...(d.filter?.provider&&{provider:d.filter.provider})},b)},addBusiness(c,e){m.getElementsByClassName("rpi-cards")[0].appendChild(q.createRating(c,e))},createRating(c,e){return rpi.el({cl:"rpi-card",data:{provider:c.provider}},q.ratingInner(c,e))},ratingInner(c,e){var k=rpi.el({cl:"rpi-info",children:[!e.header_hide_scale&&rpi.el({cl:"rpi-scale",text:q.scale(c)}),
!e.header_hide_name&&rpi.el({tag:"a",cl:"rpi-name",atts:{href:c.url},text:c.name}),rpi.View.stars(c.rating,c.provider,!0),!e.header_hide_count&&q.based(c)]});k=rpi.el({cl:"rpi-flex",children:[!e.header_hide_photo&&rpi.el({cl:"rpi-img-wrap"},q.bizPhoto(c)),k]});return rpi.el({cl:["rpi-card-inner rpi-flexwrap rpi-logo","rpi-logo-"+c.provider],children:[k,(!e.header_hide_seeall||!e.header_hide_write)&&q.ratingBtns(c,e)]})},scale(c){return 4.2<c.rating?rpi.Utils.__("Excellent",b.trans):3.7<c.rating?rpi.Utils.__("Great",
b.trans):2.7<c.rating?rpi.Utils.__("Good",b.trans):1.7<c.rating?rpi.Utils.__("Fair",b.trans):rpi.Utils.__("Poor",b.trans)},based(c){return rpi.el({cl:"rpi-based",text:rpi.Utils.__("Based on %s reviews",b.trans).replace("%s",c.total||c.review_count)})},bizPhoto(c,e=""){return rpi.el({tag:"img",cl:"rpi-img",atts:{loading:"lazy",alt:e,...(c.photo?{src:c.photo}:{})}})},ratingBtns(c,e){const k=rpi.el({cl:"rpi-slider-btn"});e.header_hide_seeall||k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable",children:rpi.el({tag:"a",
atts:{target:"_blank",rel:"noopener",href:rpi.View.allReviewsUrl(c)},text:rpi.Utils.__("See all reviews",b.trans)})}));if(!e.header_hide_write){const f=rpi.View.writeReviewUrl(c);c=rpi.el({tag:"a",cl:["rpi-logo_after","rpi-logo-"+c.provider],atts:{target:"_blank",rel:"noopener",href:f},text:rpi.Utils.__("review us on",b.trans)});c.addEventListener("click",function(u){u.preventDefault();rpi.Utils.popup(f,800,600)});k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable"},c))}return k},addReviews(c,
e,k){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});for(let f=0;f<c.reviews.length;f++){let u;d&&d.cb&&d.cb.createCard?u=d.cb.createCard(e.shift(),c.reviews[f]):(u=q.createCard(e.shift(),c.reviews[f]),d.common.initOnce(u),q.initReviewStyle(u,b),q.initLogoStyle(u,b.style_logo));e.length||g.appendChild(u)}for(;e.length;)rpi.Utils.rm(e.shift());r.init();q.delPaginBtn();k&&k(c)},createCard(c,e){c||=rpi.el({cl:"rpi-card"});c.setAttribute("data-rat",e.rating);c.setAttribute("data-provider",
e.provider);c.textContent="";c.appendChild(q.reviewInner(e));c.style="";return c},reviewInner(c){const e=c.reply?c.reply.text||c.reply:null;var k=rpi.el({cl:"rpi-info",children:[!b.hide_name&&q.reviewName(c),!b.disable_review_time&&q.reviewTime(c),rpi.View.stars(c.rating,c.provider)]});k=rpi.el({cl:"rpi-flex",children:[!b.hide_avatar&&q.reviewAvatar(c),k]});const f=rpi.el({cl:"rpi-body"},rpi.el({cl:"rpi-text rpi-scroll",atts:{tabindex:"0"},text:(c.text??"")+" "}));c.media&&c.media.length&&f.appendChild(rpi.el({cl:"rpi-media"},
q.reviewMedia(c)));e&&f.appendChild(rpi.el({cl:"rpi-reply rpi-scroll",children:[rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner",b.trans)+":"}),document.createTextNode(" "+e)]}));return rpi.el({cl:"rpi-card-inner",children:[rpi.el("i"),k,f]})},reviewTime(c){return rpi.el({cl:"rpi-time",data:c.time?{time:String(c.time)}:{}})},reviewName(c){const e=rpi.Utils.capit(c.provider)+" user",k=c.author_name?c.author_name:e;return c.author_url&&!b.disable_user_link?rpi.el({tag:"a",cl:"rpi-name",atts:{target:"_blank",
rel:"noopener",href:rpi.Utils.url(c.author_url),"aria-label":e+" profile"},text:k}):rpi.el({cl:"rpi-name",text:k})},reviewAvatar(c){var e=c.author_avatar,k=a.style.getPropertyValue("--img-size");k=k?k.replace("px",""):b.reviewer_avatar_size||56;const f=b.hide_name&&c.author_name?c.author_name:"";switch(c.provider){case "google":(c=e&&e.match(/googleusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/photo\.jpg/))&&4<c.length&&"AAAAAAAAAAA"===c[3][0]&&(e=e.replace("/photo.jpg","/s128-c0x00000000-cc-rp-mo/photo.jpg"));
e&&=/=.*s\d{2,3}/.test(e)?e.replace(/(=.*)s\d{2,3}/,"$1s"+k):-1<e.indexOf("-mo")?e.replace("-mo","-mo-s"+k):e.replace("-rp","-rp-s"+k);break;case "yelp":e&&=e.replace(/(ms)|(o)\.jpg/,128>=k?"ms":"o")}e=rpi.el({tag:"img",cl:"rpi-img",atts:{width:k,height:k,alt:f,...(b.lazy_load_img?{loading:"lazy"}:{}),...(e?{src:e}:{})}});e.addEventListener("error",function(){this.src!==brb_vars.gavatar&&(this.src=brb_vars.gavatar)});return rpi.el({cl:"rpi-img-wrap"},e)},reviewMedia(c){if(!c.media||!c.media.length)return[];
const e=a.style.getPropertyValue("--media-lines"),k=22*(e?e:2);return c.media.map(function(f){(f=f.thumbnailUrl||"")&&(f=f.replace(/(=.*)s\d{2,3}/,"$1s"+k));return rpi.el({tag:"img",cl:"rpi-thumb rpi-clickable",atts:{loading:"lazy",alt:"",...(f?{src:f}:{})}})})},reviewReply(c,e){let k=c.getElementsByClassName("rpi-reply")[0];k||(k=rpi.el({cl:"rpi-reply rpi-scroll"}),c.getElementsByClassName("rpi-body")[0].appendChild(k));k.innerHTML="";k.appendChild(rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner",
b.trans)+":"}));k.appendChild(document.createTextNode(" "+e))},initStyle(){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});if(m){var c=m.getElementsByClassName("rpi-card");for(var e=0;e<c.length;e++)this.initLogoStyle(c[e],b.head_logo),this.initYelpBasedLogo(c[e],b.head_logo)}if(h){c=g.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initReviewStyle(c[e],b);this.initCtrlStyle(b);c=h.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initLogoStyle(c[e],b.style_logo)}},
initYelpBasedLogo(c,e){5==e&&(c=c.getElementsByClassName("rpi-logo-yelp")[0])&&!c.textContent&&(c.classList.remove("rpi-logo"),c.classList.add("rpi-logo_after"))},initReviewStyle(c,e){let k=c.getElementsByClassName("rpi-card-inner")[0],f=c.getElementsByClassName("rpi-triangle")[0],u=c.getElementsByClassName("rpi-flex")[0],y=c.getElementsByClassName("rpi-img-wrap")[0],w=c.getElementsByClassName("rpi-info")[0],p=c.getElementsByClassName("rpi-time")[0],A=c.getElementsByClassName("rpi-name")[0],x=c.querySelector('[class^="rpi-star"]'),
z=c.getElementsByClassName("rpi-body")[0],C=c.getElementsByClassName("rpi-text")[0],D=c.getElementsByClassName("rpi-reply")[0];A&&w.appendChild(A);p&&w.appendChild(p);x&&w.appendChild(x);c.className="rpi-card";k.className="rpi-card-inner";u.className="rpi-flex";z.className="rpi-body";f&&(f.className="rpi-triangle");switch(e.style_style){case void 0:case "1":case "7":k.appendChild(u);z&&k.appendChild(z);z.className+=" rpi-normal-up__body";break;case "2":case "8":z&&k.appendChild(z);k.appendChild(u);
z.className+=" rpi-normal-down__body";break;case "3":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(u);c.appendChild(k);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_up";u.className+=" rpi-bubble__flex rpi-bubble__flex_up";"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_up",k.className+=" rpi-bubble__inner rpi-bubble__inner_up");break;case "4":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(k);c.appendChild(u);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_down";
u.className+=" rpi-bubble__flex rpi-bubble__flex_down";"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_down",k.className+=" rpi-bubble__inner rpi-bubble__inner_down");break;case "5":k.appendChild(u);u.appendChild(w);z&&w.appendChild(z);u.className+=" rpi-shift-up__flex";break;case "6":k.appendChild(u),u.appendChild(w),z&&w.prepend(z),u.className+=" rpi-shift-down__flex"}switch(e.style_style){case "7":c.className+=" rpi-avaborder-up";break;case "8":c.className+=" rpi-avaborder-down"}z&&
D&&z.appendChild(D);if(x)switch(e.style_stars){case "1":p?(w.insertBefore(x,p),w.insertBefore(p,x)):A?(w.insertBefore(x,A),w.insertBefore(A,x)):w.appendChild(x);break;case "2":p?w.insertBefore(x,p):w.appendChild(x);break;case "3":A?w.insertBefore(x,A):p?w.insertBefore(x,p):w.prepend(x);break;case void 0:case "4":z?z.prepend(x):k.appendChild(x);break;case "5":C?C.prepend(x):z.appendChild(x);break;case "6":z?z.appendChild(x):k.appendChild(x)}if(y)switch(e.style_ava){case "1":u.appendChild(y);u.appendChild(w);
break;case "2":u.appendChild(w),u.appendChild(y)}},initCtrlStyle(c){let e=h.getElementsByClassName("rpi-controls")[0];if(e)switch(e.className="rpi-controls",c.style_style){case "3":e.className+=" rpi-bubble-up__ctrl";break;case "4":e.className+=" rpi-bubble-down__ctrl"}},initLogoStyle(c,e){const k=c.getElementsByClassName("rpi-card-inner")[0],f=c.getAttribute("data-provider");if(f){var u=f.split(",");1<u.length?this.initLogoMultiple(c,k,u,e):this.initLogoSingle(c,k,f,e)}},initLogoSingle(c,e,k,f){let u;
var y=["rpi-logo","rpi-logo-"+k];const w=[...y,"rpi-logo_after","rpi-logo-left"];[e,c.getElementsByClassName("rpi-body")[0],c.getElementsByClassName("rpi-scale")[0],c.getElementsByClassName("rpi-name")[0],c.getElementsByClassName("rpi-img-wrap")[0]].forEach(p=>p&&p.classList.remove(...w));c.querySelectorAll("span.rpi-logo").forEach(p=>{p.classList.remove(...w);if(!p.className){for(;p.firstChild;)p.parentNode.insertBefore(p.firstChild,p);p.remove()}});switch(f){case "1":case "6":k=c.getElementsByClassName("rpi-body")[0];
"6"==f&&y.push("rpi-logo-left");e.classList.contains("rpi-bubble__inner")&&k?k.classList.add(...y):e.classList.add(...y);break;case "2":case "7":(e=c.getElementsByClassName(this.nameOrScale(f))[0])&&e.classList.add(...y);break;case "3":(y=c.getElementsByClassName("rpi-img-wrap")[0])&&y.classList.add(...["rpi-logo_after","rpi-logo-"+k]);break;case "4":e=c.querySelector('[class^="rpi-star"]');if(!e)break;u||=rpi.el("span");u.classList.add(...y);u.contains(e)||(e.replaceWith(u),u.appendChild(e));break;
case "5":if(e=c.getElementsByClassName("rpi-based")[0])k=e.textContent.trim().match(/\d+/)[0],e.textContent=e.textContent.replace(k,k+" "),e.appendChild(rpi.el({tag:"span",cl:y}))}},initLogoMultiple(c,e,k,f){let u=c.getElementsByClassName("rpi-logos")[0];if(u){if(k=u.querySelector('[class^="rpi-star"]')){const y=c.getElementsByClassName("rpi-info")[0],w=c.getElementsByClassName("rpi-based")[0];y&&(w?y.insertBefore(k,w):y.appendChild(k))}}else u=this.createLogos(k);switch(f){case "0":case "3":rpi.Utils.rm(u);
break;case "1":e.prepend(u);break;case "2":case "7":(c=c.getElementsByClassName(this.nameOrScale(f))[0])&&c.prepend(u);break;case "4":e=c.getElementsByClassName("rpi-info")[0];f=c.getElementsByClassName("rpi-based")[0];c=c.querySelector('[class^="rpi-star"]');if(!c)break;u.appendChild(c);f?e.insertBefore(u,f):e.appendChild(u);break;case "5":if(c=c.getElementsByClassName("rpi-based")[0])e=c.textContent.trim().match(/\d+/)[0],c.textContent=c.textContent.replace(e,e+" "),c.appendChild(u)}},nameOrScale:c=>
"2"===c?"rpi-name":"rpi-scale",createLogos(c){return rpi.el({tag:"span",cl:"rpi-logos"},c.map(e=>q.logo(e)))},logo(c){return rpi.el({tag:"span",cl:["rpi-logo","rpi-logo-"+c]})},getCssVar(c){return a.style.getPropertyValue(c)},delPaginBtn(){if(l){const c=parseInt(g.getAttribute("data-offset")),e=parseInt(g.getAttribute("data-count"));c>=e&&rpi.Utils.rm(l)}}}};
Object.assign(rpi.View,{ajaxurl(a,b={}){if("function"===typeof b.api)return b.api(a);const d={widget:b.v2?"rpi_reviews":"brb_widget",reviews:b.v2?"rpi_reviews":"brb_get_reviews"},{id:t,offset:m,bid:h,provider:g}=a;a=new URLSearchParams({action:d[a.act],id:t,offset:m,size:a.size??b.pagination});h&&a.set("bid",h);g&&a.set("provider",g);return brb_vars.ajaxurl+"?"+a},allReviewsUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/reviews?placeid="+
a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+a.id+"/reviews");case "yelp":return rpi.Utils.url(a.url)}},writeReviewUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/writereview?placeid="+a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+a.id+"/reviews");case "yelp":return rpi.Utils.url("https://www.yelp.com/writeareview/biz/"+a.id)}},stars(a,b,d=!1){switch(b){case "facebook":return d?
rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+a,text:a}):rpi.el({tag:"span",cl:"rpi-star-fb",data:{rating:a},text:(2>a?"doesn't ":"")+"recommends"});case "yelp":case "tripadvisor":return b=rpi.el({tag:"span",cl:"rpi-stars-"+b,data:{stars:Math.floor(2*a)/2}},Array.from({length:5},()=>rpi.el("i"))),d&&b.append(a),b;default:return rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+a,text:d?a:null})}},starRating(a){return rpi.el({tag:"span",cl:"rpi-star",data:{rating:String(a)}})},sidebar(a,b){function d(e){e&&
e.preventDefault();r.classList.remove("rpi-open");c&&(c.classList.remove("rpi-open"),document.body.style.overflow="");g&&g.focus();return!1}const {id:t}=a,m=a.root||document.body,h=["rpi-sb"];"left"===a.pos&&h.push("rpi-left");let g,l=document.getElementById(t),r;l?r=l.getElementsByClassName("rpi-sb")[0]:(l=rpi.el({id:t,cl:"rpi"}),r=rpi.el({cl:h,atts:{role:"dialog","aria-modal":"true","aria-label":a.label||"Reviews"},html:'<div class="rpi-sbh"></div><div class="rpi-sbc"></div><button type="button" class="rpi-x" aria-label="Close"></button>'}),
l.appendChild(r),m.appendChild(l),a.overlay&&m.appendChild(rpi.el({cl:"rpi-overlay"})));const q=r.getElementsByClassName("rpi-x")[0],c=m.querySelector(".rpi-overlay");q.addEventListener("click",d);c&&c.addEventListener("click",d);b&&b(r);return{rt:l,sb:r,toggle(e){r.classList.contains("rpi-open")?d():(g=e||null,r.classList.add("rpi-open"),c&&(c.classList.add("rpi-open"),document.body.style.overflow="hidden"),q.focus())}}},ajaxsb(a,b,d){const {id:t,bid:m,prov:h}=b.query,{data:g,...l}=b.options;d=["rpi-sb",
t,m,h].filter(Boolean).join("_");return rpi.View.sidebar({root:a,id:d,pos:l.badge_pos,overlay:l.overlay},r=>{rpi.Utils.ajax(rpi.View.ajaxurl(b.query,l),"POST",function(q){var c=r.getElementsByClassName("rpi-sbc")[0];const e=q.bizs??(g?g.bizs.find(f=>(!m||f.id===m)&&(!h||f.provider===h)):{}),k={};m&&(k.bid=m);h&&(k.provider=h);rpi.Layout(c,{id:t,data:{bizs:[e],...q},header_hide_scale:!0,header_hide_count:!0,autoplay:!1,...l,view_mode:l.tag_sidebar,cfg:{filter:k}}).render();q=r.getElementsByClassName("rpi-sbh")[0];
c=c.getElementsByClassName("rpi-header")[0];q.appendChild(c)})})}});rpi=rpi||{};
rpi.Media=function(a,b={},{root:d="rpi",card:t="rpi-card"}={}){let m,h=null,g=null;return g={init:function(){h=a.getElementsByClassName("rpi-thumb");for(let l=0;l<h.length;l++)h[l].setAttribute("data-idx",l),function(r,q){r.onclick=function(){g.show(r,q);return!1}}(h[l],l)},thumbs:function(l){if(Array.isArray(l)){var r=[];for(const q of l)l=document.createElement("img"),l.className="rpi-thumb rpi-clickable",l.src=q.thumbnailUrl,l.alt=rpi.Utils.__("Photo from customer review",b.trans),l.loading="lazy",
r.push(l);return r}},clicks:function(l){l=l.getElementsByClassName("rpi-thumb");for(let r=0;r<l.length;r++)(function(q,c){q.onclick=function(){let e=parseInt(q.getAttribute("data-idx"));g.show(h[e],e);return!1}})(l[r],r)},show:function(l,r){if(!(0>r||r>=h.length)){var q=l.src.replace(/=s[0-9]{1,3}/g,"=s500");l=(l=rpi.Utils.getParent(l,[t,"rpi-review"]))?l.outerHTML:"";if(m){let c=m.querySelector(".rpi-lightbox-media img"),e=m.querySelector(".rpi-lightbox-review"),k=m.querySelector(".rpi-lightbox-prev"),
f=m.querySelector(".rpi-lightbox-next");c.src=q;e.innerHTML!==l&&(e.innerHTML=l,g.clicks(e));k.onclick=function(u){g.show(h[r-1],r-1)};f.onclick=function(u){g.show(h[r+1],r+1)}}else m=document.createElement("div"),m.className="rpi-lightbox",m.innerHTML='<div class="rpi-x"></div><div class="rpi-lightbox-inner"><div class="rpi-lightbox-xxx"><div class="rpi-lightbox-content"><div class="rpi-lightbox-media"><div class="rpi-lightbox-btn rpi-lightbox-prev"></div><img src="'+q+'" alt=""><div class="rpi-lightbox-btn rpi-lightbox-next"></div></div><div class="'+
d+' rpi-lightbox-review">'+l+"</div></div></div></div>",q=m.querySelector(".rpi-x"),l=m.querySelector(".rpi-lightbox-prev"),next=m.querySelector(".rpi-lightbox-next"),q.onclick=function(){m.style.display="none"},m.onclick=function(c){m==c.target&&(m.style.display="none")},l.onclick=function(c){g.show(h[r-1],r-1)},next.onclick=function(c){g.show(h[r+1],r+1)},g.clicks(m),document.body.appendChild(m);m.style.display="flex"}}}};rpi=rpi||{};
rpi.Flash=function(a,b){if(b.data)a.appendChild(rpi.Flash.render(b));else{const d=a.getElementsByClassName("rpi-flash")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Flash.main(a,b);a.init();return a};
Object.assign(rpi.Flash,{LOGO:'<span style="position:relative;display:inline-block"><svg viewBox="0 0 1792 1792" width="44" height="44"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#FFAF02"></path></svg><svg width="25" height="25" viewBox="0 0 1792 1792" style="position:absolute;bottom:0;right:0;border:1px solid #fff;border-radius:50%;background:#fff"><path d="M1299 813l-422 422q-19 19-45 19t-45-19l-294-294q-19-19-19-45t19-45l102-102q19-19 45-19t45 19l147 147 275-275q19-19 45-19t45 19l102 102q19 19 19 45t-19 45zm141 83q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" fill="#8cc976"></path></svg></span>',render(a){return rpi.el({cl:["rpi-flash",
a.flash_hide_mobile?"rpi-flash-hide":""],children:this.wrap(a)})},wrap(a){return rpi.el({cl:["rpi-flash-wrap","right"==a.flash_pos?"rpi-flash-right":""],children:this.content(a)})},content(a){return rpi.el({cl:"rpi-flash-content",children:[rpi.el({cl:"rpi-flash-card",children:[this.story(),this.form(a)]}),rpi.el({cl:"rpi-x"})]})},story(){return rpi.el({cl:["rpi-flash-story","rpi-flex"],data:{idx:1}})},form(a){return rpi.el({cl:["rpi-flash-form","rpi-content"],children:[rpi.el({cl:"rpi-cards",data:{count:a.data.count,
offset:a.data.reviews.length}}),rpi.el({style:"text-align:center",children:rpi.el({tag:"a",cl:"rpi-url",atts:{href:"#"},text:rpi.Utils.__("More reviews",a.trans)})})]})},main(a,b){const d="rpi_flash_"+a.dataset.id;if(sessionStorage.getItem(d))return{};const t=a.getElementsByClassName("rpi-flash")[0],m=a.getElementsByClassName("rpi-flash-content")[0],h=m.getElementsByClassName("rpi-x")[0],g=m.getElementsByClassName("rpi-flash-card")[0],l=m.getElementsByClassName("rpi-flash-story")[0],r=[],q=rpi.Common(a,
b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:q,cbp:p=>r.push(...p.reviews)});b.data&&c.addReviews(b.data,[]);let e=0,k=!1,f=1E3*(b.flash_start||3),u=1E3*(b.flash_visible||5),y=1E3*(b.flash_invisible||5),w=null;return{init(){this.destroy();q.init();c.init();this.fillReviews();r.length&&(h.onclick=this.hide,l.onclick=()=>this.showReview(),document.body.appendChild(a),setTimeout(()=>this.showStory(),f))},destroy(){clearTimeout(w);w=null},fillReviews(){let p=a.getElementsByClassName("rpi-card");
for(let x=0;x<p.length;x++){let z=p[x].dataset.rat;var A="";b.disable_review_time||(A=p[x].getElementsByClassName("rpi-time")[0],A=b.time_format?A.textContent:A.dataset.time);let C=p[x].getElementsByClassName("rpi-name"),D=p[x].getElementsByClassName("rpi-text"),F=p[x].querySelector("img.rpi-img");r.push({rating:z,text:D[0]?.firstChild?.nodeValue??"",time:A,author_avatar:b.hide_avatar?"":F?.getAttribute("src")??"",author_name:b.hide_name?"":C[0]?.textContent??"",author_url:b.hide_name?"":C[0]?.href??
"",provider:p[x].dataset.provider})}},showStory(){clearTimeout(w);if(!k)if(this.nextStory(r,e),m.className="rpi-flash-content rpi-flash-visible",e+1<r.length)e+=1;else{var p=a.getElementsByClassName("rpi-cards")[0];const A=parseInt(p.dataset.count,10)||0;p=parseInt(p.dataset.offset,10)||0;if(A>p){clearTimeout(w);c.loadNextReviews(b.pagination,x=>{r.push(...x.reviews);e=e+1<r.length?e+1:0;this.waitStory()});return}e=0}this.waitStory()},waitStory(){w=setTimeout(()=>{k||m&&m.matches(":hover")||(m.className=
"rpi-flash-content");w=setTimeout(()=>this.showStory(),y)},u)},showReview(){k=!0;const p=g.querySelector(".rpi-flash-form .rpi-card:nth-child("+parseInt(l.dataset.idx)+")");p.className="rpi-card rpi-highlight";setTimeout(()=>{p.scrollIntoView({block:"center"})},50);g.className="rpi-flash-card rpi-flash-expanded";m.className="rpi-flash-content rpi-flash-visible";h.className="rpi-x rpi-xa";h.onclick=()=>{p.className="rpi-card";g.className="rpi-flash-card";h.className="rpi-x";k=!1;h.onclick=this.hide}},
hide(){let p=JSON.parse(sessionStorage.getItem(d)||"{}");p.hide=!0;sessionStorage.setItem(d,JSON.stringify(p));clearTimeout(w);a.getElementsByClassName("rpi-flash-content")[0].className="rpi-flash-content"},nextStory(p,A){const x=p[A];g.style.height="auto";t.style.setProperty("--flash-height","auto");if(l.firstChild){p=l.getElementsByClassName("rpi-flash-img");const z=l.getElementsByClassName("rpi-flash-head"),C=l.getElementsByClassName("rpi-flash-body"),D=l.getElementsByClassName("rpi-flash-footer");
b.flash_user_photo&&p.length&&(p[0].innerHTML=this.img(x));z.length&&(z[0].innerHTML=this.head(x));C.length&&(C[0].innerHTML=this.body(x));D.length&&(D[0].innerHTML=this.footer(x));l.dataset.idx=A+1}else l.innerHTML=this.createStory(p,A);l.dataset.provider=x.provider;setTimeout(()=>{t.style.setProperty("--flash-height",l.offsetHeight+"px");g.style.height=""},1)},createStory(p,A){p=p[A];return(b.flash_hide_logo&&!b.flash_user_photo?"":'<div class="rpi-flash-img">'+this.img(p)+"</div>")+'<div class="rpi-info"><div class="rpi-flash-head">'+
this.head(p)+'</div><div class="rpi-flash-body">'+this.body(p)+'</div><div class="rpi-flash-footer">'+this.footer(p)+"</div></div>"},img(p){return b.flash_user_photo?this.photoImg(p,44,44):rpi.Flash.LOGO},head(p){return b.flash_head?this.temp(p,b.flash_head):this.photo(p,16,16)+(b.hide_name?"":this.name(p))+"<span> "+b.text.m1.replace("%s",this.star(p))+"</span>"},body(p){return b.flash_body?this.temp(p,b.flash_body):rpi.View.stars(p.rating,p.provider).outerHTML+b.text.m2+this.provider(p)},footer(p){return b.flash_footer?
this.temp(p,b.flash_footer):b.disable_review_time?"":q.time(p.time)},name(p){return'<span class="rpi-flash-name">'+p.author_name+"</span> "},star(p){return'<span class="rpi-flash-rating rpi-star" data-rating="'+p.rating+'"></span>'},provider(p){return'<span class="rpi-logo rpi-logo-'+p.provider+'"></span>'},photo(p,A,x){return b.flash_user_photo||b.hide_avatar?"":this.photoImg(p,A,x)},photoImg(p,A,x){let z=p.author_avatar;return'<span class="rpi-flash-photo rpi-img-wrap"><img src="'+z+'" class="rpi-img" alt="'+
p.author_name+'" width="'+A+'" height="'+x+'" onerror="if(this.src!=\''+z+"')this.src='"+rpi.AVA+"'\"></span>"},temp(p,A){return decodeURIComponent(A).replace("{{review_rating}}",this.star(p)).replace("{{review_stars}}",rpi.View.stars(p.rating,p.provider).outerHTML).replace("{{review_text}}",q.trimtext(p.text,!0)).replace("{{review_time}}",q.time(p.time)).replace("{{review_provider}}",this.provider(p)).replace("{{review_name}}",this.name(p)).replace("{{review_name_url}}",p.author_url).replace("{{review_photo}}",
this.photo(p,16,16))}}}});rpi=rpi||{};rpi.Badge=function(a,b){if(b.data)a.appendChild(rpi.Badge.render(b));else{const d=a.getElementsByClassName("rpi-badge-cnt")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Badge.main(a,b);a.init();return a};
Object.assign(rpi.Badge,{render(a){return rpi.el({cl:["rpi-badge-cnt","rpi-badge-"+(a.badge_pos||"right"),a.badge_display_block?"rpi-badge-block":"",a.hide_float_badge?"rpi-badge-hide":""],children:a.data.bizs.map(b=>this.badge(b,a))})},badge(a,b){return rpi.el({cl:"rpi-badge",style:"display:none",data:"summary"!==a.provider?{id:a.id,provider:a.provider}:null,children:[!b.badge_line_hide&&rpi.el({cl:"rpi-badge-line"}),b.badge_close&&rpi.el({cl:"rpi-x"}),this.body(a,b)]})},body(a,b){return rpi.el({cl:["rpi-badge-body",
"rpi-flex","disable"!==b.badge_click&&"rpi-badge-clickable"],children:[this.img(a,b),this.info(a,b)]})},img(a,b){return"summary"===a.provider||b.badge_use_photo?rpi.el({tag:"img",cl:"rpi-logo",atts:{src:a.photo||"",alt:a.name||"",width:"44",height:"44",loading:b.lazy_load_img?"lazy":"eager"}}):rpi.el({cl:"rpi-logo rpi-logo-"+a.provider})},info(a,b){return rpi.el({cl:"rpi-info",children:[!b.badge_name_hide&&rpi.el({cl:"rpi-name",text:this.title(a,b)}),!b.badge_stars_hide&&rpi.View.stars(a.rating,a.provider,
!0),!b.badge_based_hide&&rpi.el({cl:"rpi-based",text:"Based on "+a.total+" reviews"})]})},title(a,b){return"summary"===a.provider?b.summary_name||"Social Rating":b.badge_use_name?a.name||"":rpi.Utils.capit(a.provider)+" Rating"},main:function(a,b){const d=a.dataset.id;return{init(){[...a.getElementsByClassName("rpi-badge")].forEach(t=>this.initBadge(t))},initBadge(t){const m=`rpi_badge_${[d,t.dataset.provider,t.dataset.id].join("_")}`;var h=sessionStorage.getItem(m);t.style.display=h?"none":"inline-block";
if(!h){if(h=t.querySelector(".rpi-x"))h.onclick=()=>{sessionStorage.setItem(m,1);t.style.display="none"};if("sidebar"===b.badge_click){const g=t.querySelector(".rpi-badge-body");g&&(g.onclick=()=>{var {dataset:l}=g.parentNode;l=rpi.View.ajaxsb(document.body,{query:{act:"reviews",id:d,bid:l.id,prov:l.provider},options:b});setTimeout(l.toggle,5);g.onclick=l.toggle})}}}}}});rpi=rpi||{};rpi.Tag=function(a,b){const d=b.data;d&&a.appendChild(rpi.Tag.render(d,b));a=rpi.Tag.main(a,b);a.init();return a};
Object.assign(rpi.Tag,{render(a,b){return rpi.el({cl:this.cls(b),children:[b.tag_text?rpi.el({cl:"rpi-tag-text",text:b.tag_text}):null,this.cnt(a,b)]})},cls:function(a){const b=["rpi-tag"];a.tag_popup&&b.push("rpi-pop");a.tag_pos&&b.push(a.tag_pos);a.tag_push&&b.push("push");a.tag_expand&&b.push("expand");return b},cnt:function(a,b){a=a.bizs[0];return rpi.el({cl:"rpi-tag-cnt",atts:{onclick:this.click(a,b)},children:[rpi.el({tag:"span",cl:"rpi-logos",children:a.platform.map(d=>rpi.el({tag:"span",cl:"rpi-logo rpi-logo-"+
d}))}),rpi.View.stars(a.rating,a.provider,b.tag_rating)]})},click:function(a,b){let d=null;switch(b.tag_click){case "link":d=b.tag_link;break;case "reviews":d=rpi.View.allReviewsUrl(a)}a=b.open_link?"blank":"self";return d?"window.open('"+d+"', '_"+a+"');return false":null},main:function(a,b){const d=a.getAttribute("data-id"),t=a.getElementsByClassName("rpi-tag")[0],m=a.getElementsByClassName("rpi-tag-cnt")[0];return{init:function(){let h=a.querySelector(".rpi-stars[data-reviewus]");h&&(this.starsInit(h),
h.onclick=function(g){g="svg"==g.target.tagName?g.target:g.target.parentNode;g=[...g.parentNode.children].indexOf(g);rpi.Utils.popup(2<g?this.getAttribute("data-reviewus"):"https://app.richplugins.com/feedback?s="+g,800,600)});0<b.tag_popup&&setTimeout(function(){t.className+=" rpi-pop-up"},1E3*b.tag_popup);"sidebar"===b.tag_click&&m&&(m.onclick=function(){const g=rpi.View.ajaxsb(a,{query:{act:"reviews",id:d},options:b});setTimeout(g.toggle,5);m.onclick=g.toggle})},starsInit:function(h){}}}});
rpi=rpi||{};
rpi.Slider=function(a,b,d,t){a.getAttribute("data-id");const m=a.getElementsByClassName(d.cnt)[0],h=a.getElementsByClassName(d.content)[0],g=h?h.getElementsByClassName(d.cards)[0]:null,l=h?h.getElementsByClassName(d.dotsWrap)[0]:null,r=h?h.getElementsByClassName(d.dots)[0]:null,q=g?parseInt(g.getAttribute("data-count")):0,{autoplay:c=!0,speed:e=5,mousestop:k=!0}=b;var f=null,u=h?h.getElementsByClassName(d.card):null,y="",w="",p=null,A=null,x=null,z=null,C=!1,D=!1,F=0,G=0;return f={init:function(n,v){rpi.Utils.isVisible(m)?
(n&&n(),f.resize(),f.actions(),u.length&&f.swipeAutoStart(),v&&v(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(f)):setTimeout(f.init,300)},resize:function(n){let v=t.column.resize(),B=t.column.getCol();n&&g.scrollLeft!=n*f.reviewWidth()&&g.scrollTo(u[n].offsetLeft,0);!u.length||y==v&&w==B||(f.hasDots()&&(f.dotsInit(),f.dotSwipe(n,!0)),y=v,w=B)},actions:function(){k&&f.addMouseEvents();window.addEventListener("resize",f.resizeListener);g&&(g.addEventListener("scroll",f.scrollListener,!1),b.wheelscroll&&
h.addEventListener("wheel",f.wheelListener,!1));var n=m.getElementsByClassName(d.btnPrev)[0];n&&(n.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(-1)});if(n=m.getElementsByClassName(d.btnNext)[0])n.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(1)}},resizeListener:function(){var n=G;clearTimeout(p);p=setTimeout(f.resize,150,n)},scrollListener:function(){clearTimeout(A);clearTimeout(x);x=setTimeout(f.scrollEnd,150)},wheelListener:function(n){var v=n.target;
if((v=-1<v.className.indexOf(d.text)?v:-1<v.parentNode.className.indexOf(d.text)?v.parentNode:null)&&v.scrollHeight>v.clientHeight)return!0;n.preventDefault();F++;clearTimeout(z);z=setTimeout(f.wheelEnd,150,n)},addMouseEvents:function(){m.addEventListener("mouseover",f.mouseOver,!1);m.addEventListener("mouseleave",f.mouseLeave,!1)},delMouseEvents:function(){m.removeEventListener("mouseover",f.mouseOver);m.removeEventListener("mouseleave",f.mouseLeave)},mouseOver:function(){C=1;f.swipeAutoStop()},
mouseLeave:function(){C=0;f.swipeAutoStart()},btnClick:function(n){f.swipeManual(n*f.swipePerBtn())},wheelEnd:function(n){f.swipeManual(Math.sign(n.wheelDelta)*F*f.swipeStep());F=0},scrollEnd:function(){G=f.reviewsIdx();D?D=!1:f.loadNextReviews();(!k||C)&&k||(!b.clickstop||D)&&b.clickstop||f.swipeAutoStart();f.hasDots()&&f.dotSwipe(void 0,!0)},loadNextReviews:function(n){n=n?f.reviewsIdx()+parseInt(n):f.hasDots()?(n=r.getElementsByClassName("active")[0])?parseInt(n.getAttribute("data-index"))*f.swipePerDot():
f.reviewsIdx():f.reviewsIdx();n=f.getAjaxSize(n);0<n&&t.view.loadNextReviews(n)},getAjaxSize:function(n){let v=0;const B=parseInt(g.getAttribute("data-offset")),E=parseInt(b.pagination);if(q>B){let H=n-B;Math.abs(H)<3*f.swipePerDot()?v=E:H&&(v=Math.ceil(n/E)*E-B)}n=B+v-q;return 0<n?v-n:v},dotsInit:function(){if(r){var n=Math.round(q/f.swipePerDot());r.innerHTML="";for(let v=0;v<n;v++){let B=document.createElement("button");B.className=d.dot;B.setAttribute("data-index",v);B.setAttribute("title",v);
B.setAttribute("aria-label","Go to page "+v);B.onclick=f.dotClick;r.appendChild(B)}f.dotsPadding()}},dotClick:function(n){n.preventDefault();n.stopPropagation();n=parseInt(this.getAttribute("data-index"));var v=r.getElementsByClassName("active")[0];v=parseInt(v.getAttribute("data-index"));f.swipeManual(Math.abs(n-v)*f.swipePerDot()*Math.sign(n-v))},dotsPadding:function(){let n=l.getBoundingClientRect().height;m.style.paddingBottom=n+"px"},dotSwipe:function(n,v){n=Math.round((void 0!==n?n:f.reviewsIdx())/
f.swipePerDot());n=0>n?0:n>=r.childNodes.length?r.childNodes.length-1:n;n=r.querySelector("."+d.dot+'[data-index="'+n+'"]');let B=r.getElementsByClassName("active")[0];f.dotActivate(B,n);f.dotScroll(n,v)},dotScroll:function(n,v){let B=Math.round(r.scrollWidth/r.childNodes.length),E=Math.floor(Math.round(r.offsetWidth/B)/2);v?r.scrollTo(n.offsetLeft-E*B,0):r.scrollTo({left:n.offsetLeft-E*B,behavior:"smooth"})},dotActivate:function(n,v){n&&(n.classList.remove("active"),n.classList.remove("s1"),n.previousSibling&&
(n.previousSibling.classList.remove("s2"),n.previousSibling.previousSibling&&n.previousSibling.previousSibling.classList.remove("s3")),n.nextSibling&&(n.nextSibling.classList.remove("s2"),n.nextSibling.nextSibling&&n.nextSibling.nextSibling.classList.remove("s3")));v&&(v.classList.add("active"),v.classList.add("s1"),v.previousSibling&&(v.previousSibling.classList.add("s2"),v.previousSibling.previousSibling&&v.previousSibling.previousSibling.classList.add("s3")),v.nextSibling&&(v.nextSibling.classList.add("s2"),
v.nextSibling.nextSibling&&v.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(n){D=!0;f.loadNextReviews(n);f.scroll(n);b.clickstop&&(f.swipeAutoStop(),f.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(m))if(f.isScrollEnd())f.scroll(-(q-f.reviewsPerView()));else{let n=f.swipeStep()<f.reviewsAhead()?f.swipeStep():f.reviewsAhead();f.scroll(n)}f.swipeAutoStart()},scroll:function(n){n=f.reviewsIdx()+parseInt(n);let v=rpi.Utils.isRTL()?n+f.reviewsPerView()-1:n;v=0>v?
0:v>=u.length?u.length-1:v;-1<v&&v<u.length&&(g.scrollTo({left:u[v].offsetLeft,behavior:"smooth"}),f.hasDots()&&f.dotSwipe(n))},swipeAutoStart:function(){c&&(A=setTimeout(f.swipeAuto,1E3*parseInt(e)))},swipeAutoStop:function(){clearTimeout(A);x&&setTimeout(function(){clearTimeout(x)},100)},isScrollEnd:function(){var n=g.querySelector("."+d.card+":last-child"),v=n.getBoundingClientRect();n=n.parentNode.getBoundingClientRect();return(2>Math.abs(n.left-v.left)||n.left<=v.left)&&v.left<n.right&&(2>Math.abs(n.right-
v.right)||n.right>=v.right)&&v.right>n.left},swipeStep:function(){return b.swipe_step||f.reviewsPerView()},swipePerBtn:function(){return b.swipe_per_btn||f.reviewsPerView()},swipePerDot:function(){return b.swipe_per_dot||f.reviewsPerView()},reviewWidth:function(){return Math.round(g.scrollWidth/u.length)},reviewHeight:function(){return u[0].offsetHeight},reviewsPerView:function(){return Math.round(g.offsetWidth/f.reviewWidth())},reviewsIdx:function(){let n=rpi.Utils.isRTL()?-g.scrollLeft:g.scrollLeft;
return Math.round(n/f.reviewWidth())},reviewsAhead:function(){return u.length-(f.reviewsIdx()+f.reviewsPerView())},hasDots:function(){return r&&!b.hide_dots&&0<f.swipePerDot()},setBreakpoints:function(n){t.column.setBreakpoints(n);f.resize()},clear:function(){clearTimeout(p);clearTimeout(A);clearTimeout(x);clearTimeout(z);window.removeEventListener("resize",f.resizeListener);g.removeEventListener("scroll",f.scrollListener);h.removeEventListener("wheel",f.wheelListener)}}};rpi=rpi||{};
rpi.Temp=function(a,b){const d=b.data;d&&(a.innerHTML=rpi.Temp.render(d,b));a=rpi.Temp.main(a,b);d&&a.init(d);return a};
Object.assign(rpi.Temp,{HEADER:"<div class=\"rpi-header\" data-temp='{{temp_rating}}'></div>",CONTENT:'<div class="rpi-content" data-temp=\'{{temp_review}}\' data-count="{{count}}" data-offset="{{offset}}"></div>',PAGIN:'<a href="#" class="rpi-url">{{label}}</a>',RATINGS:'<div class="rpi-rating">\n            {{photo}}\n            <a href="{{writereview_url}}" onclick="rpi.Utils.popup(this.href,620,580);return !1;">{{name}}</a>\n            {{rating}} {{stars}}\n            Based on <a href="{{reviews_url}}" target="_blank" rel="noopener">{{count}} reviews</a>\n         </div>',REVIEWS:'<div class="rpi-review">\n            <div>{{review_photo}} {{review_name_url}} {{review_time}} {{review_logo}}</div>\n            <div>{{review_stars}}</div>\n            <div class="rpi-text">{{review_text}}</div>\n            {{review_media}}\n            <div>{{review_reply}}</div>\n         </div>',
render(a,b){b=a.options??{};let d="";!1!==b.rating_temp_on&&(d+=this.fill(this.HEADER,{temp_rating:this.esc(b.rating_temp||encodeURIComponent(this.RATINGS))}));!1!==b.review_temp_on&&(d+=this.fill(this.CONTENT,{temp_review:this.esc(b.review_temp||encodeURIComponent(this.REVIEWS)),count:this.esc(a.count),offset:this.esc((a.reviews??[]).length)}));return d},ratings(a,b,d){const t=d.bizPhoto(b);return rpi.Temp.fill(a,{scale:d.scale(b),name:rpi.Temp.esc(b.name),photo:t?.outerHTML??"",stars:rpi.View.stars(b.rating,
b.provider,!1).outerHTML,rating_stars:rpi.View.stars(b.rating,b.provider,!0).outerHTML,rating:rpi.Temp.esc(b.rating),count:rpi.Temp.esc(b.total??b.review_count),reviews_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.allReviewsUrl(b))),writereview_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.writeReviewUrl(b)))})},reviews(a,b,d){const t=b.media?d.media.thumbs(b.media).map(m=>m.outerHTML).join(" "):"";return rpi.Temp.fill(a,{review_photo:d.reviewAvatar(b).outerHTML,review_provider:rpi.Temp.esc(b.provider),
review_logo:d.logo(b.provider).outerHTML,review_url:rpi.Temp.esc(rpi.Temp.safeUrl(b.author_url)),review_name:rpi.Temp.esc(b.author_name),review_name_url:d.reviewName(b).outerHTML,review_time:d.reviewTime(b).outerHTML,review_rating:rpi.Temp.esc(b.rating),review_stars:rpi.View.stars(b.rating,b.provider).outerHTML,review_text:rpi.Temp.esc(b.text??""),review_media:t,review_reply:rpi.Temp.esc(b.reply??"")})},fill(a,b){return Object.entries(b).reduce((d,[t,m])=>d.replace(new RegExp(`\\{\\{${t}\\}\\}`,"g"),
m),a)},esc(a){return String(a??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")},safeUrl(a){a=String(a??"").trim();if(!a)return"";if(/^(#|\/|\?|\.)/.test(a))return a;try{const {protocol:b,href:d}=new URL(a,window.location.href);return["http:","https:","mailto:","tel:"].includes(b.toLowerCase())?d:"#"}catch{return"#"}},decode(a,b){try{return decodeURIComponent(a||encodeURIComponent(b))}catch{return b}},main(a,b){let d=null;const {decode:t,
ratings:m,reviews:h,RATINGS:g,REVIEWS:l}=rpi.Temp,r=a.dataset.id,q=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:q}),e=a.querySelector(".rpi-header"),k=a.querySelector(".rpi-content"),f=(u,y,w)=>{const p=document.createElement("span");for(p.innerHTML=y;p.firstChild;)y=p.firstChild,w&&y.nodeType===Node.ELEMENT_NODE&&w(y),u.appendChild(y)};if(k&&b.pagination){let u=a.getElementsByClassName("rpi-url")[0];u=u??rpi.el({tag:"button",cl:"rpi-url",text:rpi.Utils.__("More reviews",
b.trans)});u.onclick=()=>{var y=parseInt(k.dataset.offset,10)||0;y=c.getAjaxUrl({id:r,offset:y,api:b.api,act:"reviews",size:b.pagination});rpi.Utils.ajax(y,"POST",w=>{w.reviews&&d.initReviews(w.reviews);k.setAttribute("data-count",w.count);k.setAttribute("data-offset",w.offset);w.offset>=w.count&&rpi.Utils.rm(u)});return!1};a.appendChild(u)}q.init();return d={init(u){u&&(e&&u.bizs&&this.initRatings(u.bizs),k&&u.reviews&&this.initReviews(u.reviews))},initRatings(u){if(e){var y=t(e.dataset.temp,g);
for(const w of u)f(e,m(y,w,c))}},initReviews(u){if(k){var y=t(k.dataset.temp,l);for(const w of u)f(k,h(y,w,c),p=>q.initOnce(p))}}}}});rpi=rpi||{};
rpi.Layout=function(a,b){function d(){var g=["rpi-cnt","rpi-col-m","rpi-"+b.view_mode];"grid"!==b.view_mode&&"slider"!==b.view_mode||g.push("rpi-sh");g=rpi.el({cl:g,data:{opts:"{}"},style:"visibility:var(--visible, hidden)"});h.bizs&&g.appendChild(t());h.reviews&&g.appendChild(m());a.appendChild(g);const l=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),r=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),q=rpi.View(a,b,{common:l,...(b.cfg??{})});h.bizs&&h.bizs.length&&
q.addBusiness(h.bizs[0],b);q.addReviews(h,[]);"slider"===b.view_mode?rpi.Slider(a,b,{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card",text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:q,column:r}).init(function(){l.init()},function(){q.init();console.log("RichPlugins slider initialized")}):(l.init(),q.init());return g}function t(){var g="slider"===b.view_mode;const l=["rpi-header",`rpi-header_${1==
(g?b.slider_head_pos||2:b.head_pos||1)?"top":"row"}`];g&&!b.slider_hide_nextprev&&l.push("rpi-header_pad");g=rpi.el({cl:l,data:{opts:""}});g.appendChild(rpi.el({cl:"rpi-cards"}));return g}function m(){var g="slider"===b.view_mode;const l=rpi.el({cl:["rpi-content",`rpi-content_${1==(g?b.slider_head_pos:b.head_pos)?"top":"row"}`]});g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-lt rpi-slider-prev",atts:{"aria-label":"Previous reviews",tabindex:"0"}}));var r=l.appendChild;
var q=["rpi-cards"];var c="slider"===b.view_mode;c&&!b.slider_hide_nextprev&&q.push("rpi-slides-bite");var e=h.reviews?.length;q=rpi.el({cl:q,data:{offset:e,count:h.count}});!c&&0<b.pagination&&h.count>e&&(c=rpi.el({style:"text-align:center"}),e=rpi.el({tag:"button",cl:"rpi-url",text:"More reviews"}),c.appendChild(e),e=document.createDocumentFragment(),e.appendChild(q),e.appendChild(c),q=e);r.call(l,q);g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-gt rpi-slider-next",
atts:{"aria-label":"Next reviews",tabindex:"0"}}));g&&!b.slider_hide_pagin&&(g=rpi.el({cl:"rpi-dots-wrap"}),g.appendChild(rpi.el({cl:"rpi-dots"})),l.appendChild(g));return l}const h=b.data;return{render:function(){a.innerHTML="";b.style_vars&&(a.style.cssText=b.style_vars);switch(b.view_mode){case "tag":rpi.Tag(a,b);break;case "flash":rpi.Flash(a,b);break;case "badge":rpi.Badge(a,b);break;case "temp":rpi.Temp(a,b);break;default:d()}}}};
var RichPlugins=RichPlugins||{opts(a,b,d){a=a.getElementsByClassName(d)[0];return{...b,...(a?.dataset?.opts?JSON.parse(a.dataset.opts):{})}},Tag:function(a,b){return{init:()=>rpi.Tag(a,RichPlugins.opts(a,b,"rpi-tag-cnt"))}},Flash:function(a,b){return{init:()=>rpi.Flash(a,RichPlugins.opts(a,b,"rpi-flash"))}},Badge:function(a,b){return{init:()=>rpi.Badge(a,RichPlugins.opts(a,b,"rpi-badge-cnt"))}},Temp:function(a,b){return{init:()=>rpi.Temp(a,b)}},List:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time",
text:"rpi-text",readmore:"rpi-readmore"}),t=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d});return{init:()=>{d.init();t.init();m.init()}}},Slider:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),t=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d}),h=rpi.Slider(a,RichPlugins.opts(a,{},"rpi-cnt"),{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card",
text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:m,column:t});return{init:()=>h.init(d.init.bind(d),m.init.bind(m))}},init:function(a){a.setAttribute("data-exec","1");let b=JSON.parse(a.getAttribute("data-opts")),d=rpi.Utils.capit(b.layout);"List"==d||"Grid"==d?RichPlugins.List(a,b).init():RichPlugins[d]&&RichPlugins[d](a,b).init()}};
window.rpi_boot=function(){function a(){const d=document.querySelectorAll('.rpi[data-exec=""]');if(!d.length)return!1;rpi.Utils.clear();d.forEach(t=>RichPlugins.init(t));return!0}function b(){(new MutationObserver((d,t)=>{a()&&t.disconnect()})).observe(document.body,{childList:!0,subtree:!0})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{a()||b()}):a()||b()};window.rpi_boot();
// source --> https://hennebert-formation.com/wp-content/plugins/widget-google-reviews/assets/6.9.6/js/public-main.js 
var rpi=rpi||{};
rpi.Time={getFormatTime:function(a,e,c){a=new Date(this._ms(a));var m=c||"en";c=function(p){return 10>p?"0"+p:""+p};var f=a.getHours(),h=((new Intl.DateTimeFormat(m,{day:"numeric",month:"short"})).formatToParts(a).find(function(p){return"month"===p.type})||{}).value;m=(new Intl.DateTimeFormat(m,{day:"numeric",month:"long"})).formatToParts(a).find(function(p){return"month"===p.type}).value;var n=a.getFullYear(),l=String(n).slice(-2),g={yyyy:n,Y:n,yy:l,y:l,MMMM:m,MMM:h,M:h,MM:c(a.getMonth()+1),m:c(a.getMonth()+
1),dd:c(a.getDate()),d:c(a.getDate()),HH:c(f),H:f,hh:c(f%12||12),h:f%12||12,mm:c(a.getMinutes()),i:c(a.getMinutes()),ss:c(a.getSeconds()),s:c(a.getSeconds()),a:12<=f?"pm":"am",A:12<=f?"PM":"AM"};return e.replace(/(MMMM|MMM|yyyy|HH|hh|MM|mm|dd|ss|yy|H|h|M|m|d|Y|y|i|s|a|A)/g,p=>null!=g[p]?g[p]:p)},getTimeAgo:function(a,e){a=(this._ms(a)-Date.now())/1E3;var c=Math.abs(a);e=new Intl.RelativeTimeFormat(e||"en",{numeric:"auto"});return 60>c?e.format(Math.round(a),"second"):3600>c?e.format(Math.round(a/
60),"minute"):86400>c?e.format(Math.round(a/3600),"hour"):2592E3>c?e.format(Math.round(a/86400),"day"):31536E3>c?e.format(Math.round(a/2592E3),"month"):e.format(Math.round(a/31536E3),"year")},_ms:function(a){a=parseInt(a,10);return 1E10>a?1E3*a:a}};rpi=rpi||{};
rpi.Utils={__:function(a,e){return e&&e[a]||a},isVisible:function(a){let e=window.getComputedStyle(a);return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==e.visibility&&"none"!==e.display},isInViewport:function(a,e=0){a=a.getBoundingClientRect();return a.top<window.innerHeight*(1+e)&&a.bottom>-window.innerHeight*e&&a.left<window.innerWidth*(1+e)&&a.right>-window.innerWidth*e},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"):
document.body.currentStyle.direction)},getParent:function(a,e="rplg"){e=Array.isArray(e)?e:[e];return a?a.closest("."+e.join(",.")):null},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,e,c){var m=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+e+", height="+c+", top="+((window.innerHeight?window.innerHeight:m.clientHeight?m.clientHeight:screen.height)/2-c/2+(void 0!=window.screenTop?window.screenTop:
window.screenY))+", left="+((window.innerWidth?window.innerWidth:m.clientWidth?m.clientWidth:screen.width)/2-e/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,e,c,m){const f=new XMLHttpRequest;f.open(e,a,!0);f.setRequestHeader("Content-Type","application/json");f.onreadystatechange=function(){if((f.readyState===XMLHttpRequest.DONE||f.readyState===f.DONE)&&200===f.status){const h=JSON.parse(f.responseText);"function"===typeof m?m(h):
"function"===typeof c&&c(h)}};f.send(c&&"function"!==typeof c?JSON.stringify(c):null)},anchor:function(a,e,c,m,f){const h=[];c.open_link&&h.push("noopener");c.nofollow_link&&h.push("nofollow");return'<a href="'+a+'"'+(m?' class="'+m+'"':"")+(c.open_link?' target="_blank"':"")+(h.length?' rel="'+h.join(" ")+'"':"")+(f?' aria-label="'+f+'"':"")+">"+e+"</a>"},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},url:function(a){try{return(new URL(a,
window.location.origin)).href}catch(e){return""}},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{};
rpi.Column=function(a,e,c){const m=a.getAttribute("data-id"),f=new RegExp(c.col+"-[xsml]+"),h=new RegExp('$|(\\[data-id="'+m+'"\\]\\s+.'+c.card+"\\s*{\\s*--col:\\s*\\d+\\s*!important\\s*;?(\\s*--gap:\\s*\\d+\\s*!important;?)?})"),n=a.getElementsByClassName(c.cnt)[0];var l=null;return l={init:function(g,p){rpi.Utils.isVisible(n)?(g&&g(),l.resize(),window.addEventListener("resize",l.resize),p&&p(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(l)):setTimeout(l.init,300)},resize:function(){let g=
l.getSize();n.className=n.className.replace(f,c.col+"-"+g);if(e.breakpoints){let p=n.offsetWidth,r=e.breakpoints.split(",");r.sort(l.brsort);for(let t=0;t<r.length;t++){let v=r[t].split(":");if(p<parseInt(v[0])){l.setCol(v[1]);break}}}return g},getSize:function(){let g=n.offsetWidth;return 510>g?"xs":750>g?"x":1050>g?"s":1450>g?"m":1800>g?"l":"xl"},setCol:function(g){const p=this.getStyle();p.innerHTML=p.innerHTML.replace(h,(m?'[data-id="'+m+'"] ':"")+"."+c.card+"{--col:"+g+"!important;--gap:"+(g-
1)+"!important}")},getCol:function(){let g=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return g&&1<g.length?g[1]:!1},getStyle:function(){let g=document.getElementById("rpi-style");g||(g=document.createElement("style"),g.id="rpi-style",document.head.appendChild(g));return g},setBreakpoints:function(g){e.breakpoints=g},brsort:function(g,p){return parseInt(g.split(":")[0])>parseInt(p.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",l.resize)}}};rpi=rpi||{};rpi.AVA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
rpi.Common=function(a,e,c){let m=null;const f=rpi.Utils.lang();return m={init(){let h=a.getElementsByClassName(c.time),n=a.getElementsByClassName(c.text);for(const l of h)m.setTime(l);for(const l of n)m.setText(l)},initOnce(h){let n=h.getElementsByClassName(c.time)[0];h=h.getElementsByClassName(c.text)[0];m.setTime(n);m.setText(h)},setText(h){if(h&&h.textContent){var n=m.trimtext(h.textContent);h.textContent=n[0];n[1]&&(h.appendChild(rpi.el({tag:"span",cl:"rpi-s",text:"... "})),h.appendChild(rpi.el({tag:"span",
cl:c.readmore,text:rpi.Utils.__("read more",e.trans),data:{hidden:n[1]}})),h.lastChild.onclick=m.opentext)}},trimtext(h){const n=parseInt(e.text_size,10);if(!h||!n||h.length<=n)return[h||"",""];h=Array.from(h);let l=h.slice(0,n).join("").lastIndexOf(" ");l=-1===l?n:l;return[h.slice(0,l).join("").trimEnd(),h.slice(l).join("")]},opentext(){let h=this.parentNode,n=this.dataset.hidden||"";rpi.Utils.rm(this.previousElementSibling);rpi.Utils.rm(this);h.appendChild(document.createTextNode(n))},setTime(h){h&&
(h.textContent=m.time(h.dataset.time))},time(h){return e.time_format?rpi.Time.getFormatTime(h,e.time_format,f):rpi.Time.getTimeAgo(h,f)}}};
rpi.el=function(a={},...e){const c=document.createElement("string"===typeof a?a:a.tag||"div");"string"!==typeof a&&(a.id&&(c.id=a.id),a.cl&&c.classList.add(...[].concat(a.cl).join(" ").split(/\s+/).filter(Boolean)),null!=a.text&&(c.textContent=a.text),a.data&&Object.assign(c.dataset,Object.fromEntries(Object.entries(a.data).filter(([,m])=>void 0!==m&&null!==m))),a.style&&(c.style.cssText=a.style),a.atts&&Object.keys(a.atts).forEach(m=>{const f=a.atts[m];null!==f&&void 0!==f&&!1!==f&&c.setAttribute(m,
f)}),a.html&&(c.innerHTML=a.html),e=a.children?[].concat(a.children).concat(e):e);e.flat().forEach(m=>{m&&c.appendChild(m instanceof Node?m:document.createTextNode(String(m)))});return c};rpi=rpi||{};
rpi.Media=function(a,e={},{root:c="rpi",card:m="rpi-card"}={}){let f,h=null,n=null;return n={init:function(){h=a.getElementsByClassName("rpi-thumb");for(let l=0;l<h.length;l++)h[l].setAttribute("data-idx",l),function(g,p){g.onclick=function(){n.show(g,p);return!1}}(h[l],l)},thumbs:function(l){if(Array.isArray(l)){var g=[];for(const p of l)l=document.createElement("img"),l.className="rpi-thumb rpi-clickable",l.src=p.thumbnailUrl,l.alt=rpi.Utils.__("Photo from customer review",e.trans),l.loading="lazy",
g.push(l);return g}},clicks:function(l){l=l.getElementsByClassName("rpi-thumb");for(let g=0;g<l.length;g++)(function(p,r){p.onclick=function(){let t=parseInt(p.getAttribute("data-idx"));n.show(h[t],t);return!1}})(l[g],g)},show:function(l,g){if(!(0>g||g>=h.length)){var p=l.src.replace(/=s[0-9]{1,3}/g,"=s500");l=(l=rpi.Utils.getParent(l,[m,"rpi-review"]))?l.outerHTML:"";if(f){let r=f.querySelector(".rpi-lightbox-media img"),t=f.querySelector(".rpi-lightbox-review"),v=f.querySelector(".rpi-lightbox-prev"),
d=f.querySelector(".rpi-lightbox-next");r.src=p;t.innerHTML!==l&&(t.innerHTML=l,n.clicks(t));v.onclick=function(u){n.show(h[g-1],g-1)};d.onclick=function(u){n.show(h[g+1],g+1)}}else f=document.createElement("div"),f.className="rpi-lightbox",f.innerHTML='<div class="rpi-x"></div><div class="rpi-lightbox-inner"><div class="rpi-lightbox-xxx"><div class="rpi-lightbox-content"><div class="rpi-lightbox-media"><div class="rpi-lightbox-btn rpi-lightbox-prev"></div><img src="'+p+'" alt=""><div class="rpi-lightbox-btn rpi-lightbox-next"></div></div><div class="'+
c+' rpi-lightbox-review">'+l+"</div></div></div></div>",p=f.querySelector(".rpi-x"),l=f.querySelector(".rpi-lightbox-prev"),next=f.querySelector(".rpi-lightbox-next"),p.onclick=function(){f.style.display="none"},f.onclick=function(r){f==r.target&&(f.style.display="none")},l.onclick=function(r){n.show(h[g-1],g-1)},next.onclick=function(r){n.show(h[g+1],g+1)},n.clicks(f),document.body.appendChild(f);f.style.display="flex"}}}};rpi=rpi||{};
rpi.Slider=function(a,e,c,m){a.getAttribute("data-id");const f=a.getElementsByClassName(c.cnt)[0],h=a.getElementsByClassName(c.content)[0],n=h?h.getElementsByClassName(c.cards)[0]:null,l=h?h.getElementsByClassName(c.dotsWrap)[0]:null,g=h?h.getElementsByClassName(c.dots)[0]:null,p=n?parseInt(n.getAttribute("data-count")):0,{autoplay:r=!0,speed:t=5,mousestop:v=!0}=e;var d=null,u=h?h.getElementsByClassName(c.card):null,E="",F="",A=null,y=null,x=null,B=null,C=!1,z=!1,D=0,G=0;return d={init:function(b,
k){rpi.Utils.isVisible(f)?(b&&b(),d.resize(),d.actions(),u.length&&d.swipeAutoStart(),k&&k(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(d)):setTimeout(d.init,300)},resize:function(b){let k=m.column.resize(),q=m.column.getCol();b&&n.scrollLeft!=b*d.reviewWidth()&&n.scrollTo(u[b].offsetLeft,0);!u.length||E==k&&F==q||(d.hasDots()&&(d.dotsInit(),d.dotSwipe(b,!0)),E=k,F=q)},actions:function(){v&&d.addMouseEvents();window.addEventListener("resize",d.resizeListener);n&&(n.addEventListener("scroll",
d.scrollListener,!1),e.wheelscroll&&h.addEventListener("wheel",d.wheelListener,!1));var b=f.getElementsByClassName(c.btnPrev)[0];b&&(b.onclick=function(k){k.preventDefault();k.stopPropagation();d.btnClick(-1)});if(b=f.getElementsByClassName(c.btnNext)[0])b.onclick=function(k){k.preventDefault();k.stopPropagation();d.btnClick(1)}},resizeListener:function(){var b=G;clearTimeout(A);A=setTimeout(d.resize,150,b)},scrollListener:function(){clearTimeout(y);clearTimeout(x);x=setTimeout(d.scrollEnd,150)},
wheelListener:function(b){var k=b.target;if((k=-1<k.className.indexOf(c.text)?k:-1<k.parentNode.className.indexOf(c.text)?k.parentNode:null)&&k.scrollHeight>k.clientHeight)return!0;b.preventDefault();D++;clearTimeout(B);B=setTimeout(d.wheelEnd,150,b)},addMouseEvents:function(){f.addEventListener("mouseover",d.mouseOver,!1);f.addEventListener("mouseleave",d.mouseLeave,!1)},delMouseEvents:function(){f.removeEventListener("mouseover",d.mouseOver);f.removeEventListener("mouseleave",d.mouseLeave)},mouseOver:function(){C=
1;d.swipeAutoStop()},mouseLeave:function(){C=0;d.swipeAutoStart()},btnClick:function(b){d.swipeManual(b*d.swipePerBtn())},wheelEnd:function(b){d.swipeManual(Math.sign(b.wheelDelta)*D*d.swipeStep());D=0},scrollEnd:function(){G=d.reviewsIdx();z?z=!1:d.loadNextReviews();(!v||C)&&v||(!e.clickstop||z)&&e.clickstop||d.swipeAutoStart();d.hasDots()&&d.dotSwipe(void 0,!0)},loadNextReviews:function(b){b=b?d.reviewsIdx()+parseInt(b):d.hasDots()?(b=g.getElementsByClassName("active")[0])?parseInt(b.getAttribute("data-index"))*
d.swipePerDot():d.reviewsIdx():d.reviewsIdx();b=d.getAjaxSize(b);0<b&&m.view.loadNextReviews(b)},getAjaxSize:function(b){let k=0;const q=parseInt(n.getAttribute("data-offset")),w=parseInt(e.pagination);if(p>q){let H=b-q;Math.abs(H)<3*d.swipePerDot()?k=w:H&&(k=Math.ceil(b/w)*w-q)}b=q+k-p;return 0<b?k-b:k},dotsInit:function(){if(g){var b=Math.round(p/d.swipePerDot());g.innerHTML="";for(let k=0;k<b;k++){let q=document.createElement("button");q.className=c.dot;q.setAttribute("data-index",k);q.setAttribute("title",
k);q.setAttribute("aria-label","Go to page "+k);q.onclick=d.dotClick;g.appendChild(q)}d.dotsPadding()}},dotClick:function(b){b.preventDefault();b.stopPropagation();b=parseInt(this.getAttribute("data-index"));var k=g.getElementsByClassName("active")[0];k=parseInt(k.getAttribute("data-index"));d.swipeManual(Math.abs(b-k)*d.swipePerDot()*Math.sign(b-k))},dotsPadding:function(){let b=l.getBoundingClientRect().height;f.style.paddingBottom=b+"px"},dotSwipe:function(b,k){b=Math.round((void 0!==b?b:d.reviewsIdx())/
d.swipePerDot());b=0>b?0:b>=g.childNodes.length?g.childNodes.length-1:b;b=g.querySelector("."+c.dot+'[data-index="'+b+'"]');let q=g.getElementsByClassName("active")[0];d.dotActivate(q,b);d.dotScroll(b,k)},dotScroll:function(b,k){let q=Math.round(g.scrollWidth/g.childNodes.length),w=Math.floor(Math.round(g.offsetWidth/q)/2);k?g.scrollTo(b.offsetLeft-w*q,0):g.scrollTo({left:b.offsetLeft-w*q,behavior:"smooth"})},dotActivate:function(b,k){b&&(b.classList.remove("active"),b.classList.remove("s1"),b.previousSibling&&
(b.previousSibling.classList.remove("s2"),b.previousSibling.previousSibling&&b.previousSibling.previousSibling.classList.remove("s3")),b.nextSibling&&(b.nextSibling.classList.remove("s2"),b.nextSibling.nextSibling&&b.nextSibling.nextSibling.classList.remove("s3")));k&&(k.classList.add("active"),k.classList.add("s1"),k.previousSibling&&(k.previousSibling.classList.add("s2"),k.previousSibling.previousSibling&&k.previousSibling.previousSibling.classList.add("s3")),k.nextSibling&&(k.nextSibling.classList.add("s2"),
k.nextSibling.nextSibling&&k.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(b){z=!0;d.loadNextReviews(b);d.scroll(b);e.clickstop&&(d.swipeAutoStop(),d.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(f))if(d.isScrollEnd())d.scroll(-(p-d.reviewsPerView()));else{let b=d.swipeStep()<d.reviewsAhead()?d.swipeStep():d.reviewsAhead();d.scroll(b)}d.swipeAutoStart()},scroll:function(b){b=d.reviewsIdx()+parseInt(b);let k=rpi.Utils.isRTL()?b+d.reviewsPerView()-1:b;k=0>k?
0:k>=u.length?u.length-1:k;-1<k&&k<u.length&&(n.scrollTo({left:u[k].offsetLeft,behavior:"smooth"}),d.hasDots()&&d.dotSwipe(b))},swipeAutoStart:function(){r&&(y=setTimeout(d.swipeAuto,1E3*parseInt(t)))},swipeAutoStop:function(){clearTimeout(y);x&&setTimeout(function(){clearTimeout(x)},100)},isScrollEnd:function(){var b=n.querySelector("."+c.card+":last-child"),k=b.getBoundingClientRect();b=b.parentNode.getBoundingClientRect();return(2>Math.abs(b.left-k.left)||b.left<=k.left)&&k.left<b.right&&(2>Math.abs(b.right-
k.right)||b.right>=k.right)&&k.right>b.left},swipeStep:function(){return e.swipe_step||d.reviewsPerView()},swipePerBtn:function(){return e.swipe_per_btn||d.reviewsPerView()},swipePerDot:function(){return e.swipe_per_dot||d.reviewsPerView()},reviewWidth:function(){return Math.round(n.scrollWidth/u.length)},reviewHeight:function(){return u[0].offsetHeight},reviewsPerView:function(){return Math.round(n.offsetWidth/d.reviewWidth())},reviewsIdx:function(){let b=rpi.Utils.isRTL()?-n.scrollLeft:n.scrollLeft;
return Math.round(b/d.reviewWidth())},reviewsAhead:function(){return u.length-(d.reviewsIdx()+d.reviewsPerView())},hasDots:function(){return g&&!e.hide_dots&&0<d.swipePerDot()},setBreakpoints:function(b){m.column.setBreakpoints(b);d.resize()},clear:function(){clearTimeout(A);clearTimeout(y);clearTimeout(x);clearTimeout(B);window.removeEventListener("resize",d.resizeListener);n.removeEventListener("scroll",d.scrollListener);h.removeEventListener("wheel",d.wheelListener)}}};
function rplg_badge_init(a,e,c){var m=a.querySelector(".wp-"+e+"-badge"),f=a.querySelector(".wp-"+e+"-form");m&&f&&(a=document.createElement("div"),a.className=c+" wpac",-1<m.className.indexOf("-fixed")&&a.appendChild(m),a.appendChild(f),document.body.appendChild(a),m.onclick=function(){f.style.display="block"})}
function rplg_next_reviews(a,e){var c=this.parentNode,m="."+a+"-review."+a+"-hide";reviews=c.querySelectorAll(m);for(var f=0;f<e&&f<reviews.length;f++)reviews[f]&&(reviews[f].className=reviews[f].className.replace(a+"-hide"," "));reviews=c.querySelectorAll(m);1>reviews.length&&c.removeChild(this);return!1}function rplg_leave_review_window(){rpi.Utils.popup(this.getAttribute("href"),620,500);return!1}
function grw_init(a,e){a=rpi.Utils.getParent(a,"wp-gr");if("true"!=a.getAttribute("data-exec")){a.setAttribute("data-exec","true");var c=JSON.parse(a.getAttribute("data-options"));rpi.Common(a,c,{time:"wp-google-time",text:"wp-google-text",readmore:"wp-more-toggle"}).init();rpi.Media(a,{},{root:"wp-gr",card:"grw-review"}).init();!a.getElementsByClassName("grw-review")[0]||"slider"!=e&&"grid"!=e||(e=a.getElementsByClassName("grw-row")[0],e=JSON.parse(e.getAttribute("data-options")),c=rpi.Column(a,
e,{cnt:"grw-row",col:"grw-row",card:"grw-review"}),rpi.Slider(a,e,{cnt:"grw-row",col:"grw-row",content:"grw-content",cards:"grw-reviews",card:"grw-review",text:"wp-google-text",btnPrev:"grw-prev",btnNext:"grw-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{column:c}).init())}}function grw_boot(){const a=document.querySelectorAll('.wp-gr[data-exec="false"]');for(let c=0;c<a.length;c++){var e=a[c];grw_init(e,e.getAttribute("data-layout"))}}
document.addEventListener("DOMContentLoaded",grw_boot);