(window["wpJsonpOkeReviews"]=window["wpJsonpOkeReviews"]||[]).push([["modules/okendo-widget-init","modules/okendo-reviews-settings"],{"090b":function(e,t,o){"use strict";o.r(t),t["default"]={January:"{day} January {year}",February:"{day} February {year}",March:"{day} March {year}",April:"{day} April {year}",May:"{day} May {year}",June:"{day} June {year}",July:"{day} July {year}",August:"{day} August {year}",September:"{day} September {year}",October:"{day} October {year}",November:"{day} November {year}",December:"{day} December {year}","{0} day ago":"1 day ago | {0} days ago","{0} filter":"{0} filter","{0} hour ago":"1 hour ago | {0} hours ago","{0} logo":"{0} logo","{0} minute ago":"1 minute ago | {0} minutes ago","{0} month ago":"1 month ago | {0} months ago","{0} reviews":"0 reviews | 1 review | {0} reviews","{0} second ago":"1 second ago | {0} seconds ago","{0} verified reviews with an average of {1} stars out of 5 by Okendo Reviews":"{0} verified reviews with an average of {1} stars out of 5 by Okendo Reviews","{0} week ago":"1 week ago | {0} weeks ago","{0} year ago":"1 year ago | {0} years ago","Last updated {0} day ago":"Last updated 1 day ago | Last updated {0} days ago","Last updated {0} hour ago":"Last updated 1 hour ago | Last updated {0} hours ago","Last updated {0} minute ago":"Last updated 1 minute ago | Last updated {0} minutes ago","Last updated {0} month ago":"Last updated 1 month ago | Last updated {0} months ago","Last updated {0} second ago":"Last updated 1 second ago | Last updated {0} seconds ago","Last updated {0} week ago":"Last updated 1 week ago | Last updated {0} weeks ago","Last updated {0} year ago":"Last updated 1 year ago | Last updated {0} years ago","Last updated Just now":"Last updated just now","Last updated Yesterday":"Last updated yesterday","+ {0} more":"+ {0} more","All Products":"All Products","All Reviews":"All Reviews","Ask a Question":"Ask a Question","Based on {0} reviews":"Based on 0 reviews | Based on 1 review | Based on {0} reviews",Clear:"Clear","Click to scroll to reviews":"Click to scroll to reviews","Close Dialog":"Close Dialog","Customer-uploaded image, show more details":"Customer-uploaded image, show more details","Customer-uploaded image":"Customer-uploaded image","Customer-uploaded media carousel. Press left and right arrows to navigate. Press space or enter to open more details.":"Customer-uploaded media carousel. Press left and right arrows to navigate. Press space or enter to open more details.","Customer-uploaded video, show more details":"Customer-uploaded video, show more details","Customer-uploaded video":"Customer-uploaded video","Error Loading Filters":"Error Loading Filters","Error Loading Review":"Error Loading Review","Error occurred loading reviews, please try again":"Error occurred loading reviews, please try again","Error occurred while loading {0}":"Error occurred while loading {0}",Filters:"Filters","Filter Reviews":"Filter Reviews","Flag of {0}":"Flag of {0}","from {0}":"from {0}","Highest Rating":"Highest Rating","I do not recommend this product":"I do not recommend this product","I had this question too":"I had this question too","I recommend this product":"I recommend this product","Just now":"Just now","Least Helpful":"Least Helpful","Loading {0}":"Loading {0}","Loading More Reviews":"Loading More Reviews","Loading more":"Loading more","Loading Questions...":"Loading Questions...","Loading Reviews":"Loading Reviews","Loading...":"Loading...","Lowest Rating":"Lowest Rating","Media Carousel of Reviews User Generated Content":"Media Carousel of Reviews User Generated Content","Most Helpful":"Most Helpful","Most Recent":"Most Recent","Next Slide":"Next Slide",Next:"Next","No questions yet, ask one now?":"No questions yet, ask one now?","No questions yet":"No questions yet","No Reviews Found":"No Reviews Found","No reviews yet, write one now?":"No reviews yet, write one now?","No reviews yet":"No reviews yet","No, this review was not helpful":"No, this review was not helpful",Oldest:"Oldest","Opens in a new window":"Opens in a new window","Open Okendo Reviews in a new window":"Open Okendo Reviews in a new window","out of 5 Stars":"out of 5 Stars","person voted no":"person voted no | people voted no","person voted yes":"person voted yes | people voted yes","Photos & Videos":"Photos & Videos","Posted on Instagram {0}":"Posted on Instagram {0}","Powered by Okendo":"Powered by Okendo","Press left and right arrows to navigate.":"Press left and right arrows to navigate.","Previous Slide":"Previous Slide",Previous:"Previous","Profile picture for {0}":"Profile picture for {0}",Question:"Questions | Question | Questions",Questions:"Questions","Rated {0} on a scale of 1 to 5":"Rated {0} on a scale of 1 to 5","Rated {0} on a scale of minus 2 to 2":"Rated {0} on a scale of minus 2 to 2","Rating distribution":"Rating distribution","Rating filter":"Rating filter",Rating:"Rating","Read More":"Read More",Retry:"Retry","Review Carousel":"Review Carousel",Review:"Reviews | Review | Reviews",Reviewing:"Reviewing","Reviews Added":"Reviews Added","Reviews Loaded":"Reviews Loaded",Reviews:"Reviews","Show More":"Show More","Showing reviews starting from page {0}":"Showing reviews starting from page {0}","Slide {0} selected":"Slide {0} selected","Slide {0}":"Slide {0}",Sort:"Sort",Stars:"Stars","tab expanded":"tab expanded","tab collapsed":"tab collapsed","Total {0} star reviews: {1}":"Total {0} star reviews: {1}","Try Again":"Try Again","Unexpected error occurred, please try again":"Unexpected error occurred, please try again","User Media and Reviews Gallery":"User Media and Reviews Gallery","Verified Buyer":"Verified Buyer","Verified Reviewer":"Verified Reviewer","Verified Reviews":"Verified Reviews","View {0}":"View {0}","Viewing Slides {0} to {1} of {2}":"Viewing Slides {0} to {1} of {2}","Was this helpful?":"Was this helpful?","would recommend these products":"would recommend these products","would recommend this product":"would recommend this product","Write a Review":"Write a Review","Yes, this review was helpful":"Yes, this review was helpful",Yesterday:"Yesterday","Incentivized review":"Incentivized review","Verified by Shop app":"Verified by Shop app","This review was received as part of a promotion or in exchange for an incentive. The incentive was offered to both positive and negative reviews.":"This review was received as part of a promotion or in exchange for an incentive. The incentive was offered to both positive and negative reviews.","Translate to da":"Translate to Danish","Translate to de":"Translate to German","Translate to el":"Translate to Greek","Translate to en":"Translate to English","Translate to es":"Translate to Spanish","Translate to fr":"Translate to French","Translate to id":"Translate to Indonesian","Translate to it":"Translate to Italian","Translate to ja":"Translate to Japanese","Translate to ko":"Translate to Korean","Translate to nb":"Translate to Norwegian","Translate to nl":"Translate to Dutch","Translate to no":"Translate to Norwegian","Translate to pl":"Translate to Polish","Translate to pt":"Translate to Portuguese","Translate to pt-br":"Translate to Portuguese (Brazil)","Translate to pt-pt":"Translate to Portuguese (Portugal)","Translate to ro":"Translate to Romanian","Translate to ru":"Translate to Russian","Translate to sv":"Translate to Swedish","Translate to th":"Translate to Thai","Translate to uk":"Translate to Ukrainian","Translate to vi":"Translate to Vietnamese","Translate to zh-tw":"Translate to Chinese (Traditional)",Translated:"Translated","Translated from af":"Translated from Afrikaans","Translated from sq":"Translated from Albanian","Translated from am":"Translated from Amharic","Translated from ar":"Translated from Arabic","Translated from hy":"Translated from Armenian","Translated from az":"Translated from Azerbaijani","Translated from bn":"Translated from Bengali","Translated from bs":"Translated from Bosnian","Translated from bg":"Translated from Bulgarian","Translated from ca":"Translated from Catalan","Translated from zh":"Translated from Chinese (Simplified)","Translated from zh-tw":"Translated from Chinese (Traditional)","Translated from hr":"Translated from Croatian","Translated from cs":"Translated from Czech","Translated from da":"Translated from Danish","Translated from fa-af":"Translated from Dari","Translated from nl":"Translated from Dutch","Translated from en":"Translated from English","Translated from et":"Translated from Estonian","Translated from fa":"Translated from Farsi (Persian)","Translated from tl":"Translated from Filipino, Tagalog","Translated from fi":"Translated from Finnish","Translated from fr":"Translated from French","Translated from fr-ca":"Translated from French (Canada)","Translated from ka":"Translated from Georgian","Translated from de":"Translated from German","Translated from el":"Translated from Greek","Translated from gu":"Translated from Gujarati","Translated from ht":"Translated from Haitian Creole","Translated from ha":"Translated from Hausa","Translated from he":"Translated from Hebrew","Translated from hi":"Translated from Hindi","Translated from hu":"Translated from Hungarian","Translated from is":"Translated from Icelandic","Translated from id":"Translated from Indonesian","Translated from ga":"Translated from Irish","Translated from it":"Translated from Italian","Translated from ja":"Translated from Japanese","Translated from kn":"Translated from Kannada","Translated from kk":"Translated from Kazakh","Translated from ko":"Translated from Korean","Translated from lv":"Translated from Latvian","Translated from lt":"Translated from Lithuanian","Translated from mk":"Translated from Macedonian","Translated from ms":"Translated from Malay","Translated from ml":"Translated from Malayalam","Translated from mt":"Translated from Maltese","Translated from mr":"Translated from Marathi","Translated from mn":"Translated from Mongolian","Translated from no":"Translated from Norwegian (Bokmål)","Translated from ps":"Translated from Pashto","Translated from pl":"Translated from Polish","Translated from pt":"Translated from Portuguese (Brazil)","Translated from pt-pt":"Translated from Portuguese (Portugal)","Translated from pa":"Translated from Punjabi","Translated from ro":"Translated from Romanian","Translated from ru":"Translated from Russian","Translated from sr":"Translated from Serbian","Translated from si":"Translated from Sinhala","Translated from sk":"Translated from Slovak","Translated from sl":"Translated from Slovenian","Translated from so":"Translated from Somali","Translated from es":"Translated from Spanish","Translated from es-mx":"Translated from Spanish (Mexico)","Translated from sw":"Translated from Swahili","Translated from sv":"Translated from Swedish","Translated from ta":"Translated from Tamil","Translated from te":"Translated from Telugu","Translated from th":"Translated from Thai","Translated from tr":"Translated from Turkish","Translated from uk":"Translated from Ukrainian","Translated from ur":"Translated from Urdu","Translated from uz":"Translated from Uzbek","Translated from vi":"Translated from Vietnamese","Translated from cy":"Translated from Welsh","Show original":"Show original","Error while translating review":"Error while translating review","Redeem {0} rewards using your points":"Redeem {0} rewards using your points","Redeem a reward using your points":"Redeem a reward using your points","Complete {0} orders with a loyalty coupon":"Complete {0} orders with a loyalty coupon","Complete an order with a loyalty coupon":"Complete an order with a loyalty coupon","Refer {0} friends":"Refer {0} friends","Refer a friend":"Refer a friend","Leave {0} reviews":"Leave {0} reviews","Leave a review":"Leave a review","Leave a review with a photo":"Leave a review with a photo","Leave a review with a video":"Leave a review with a video","Earn loyalty points {0} times":"Earn loyalty points {0} times","Earn loyalty points once":"Earn loyalty points once","{0} tier":"{0} tier",Featured:"Featured","Generated by AI from {0} most recent customer reviews":"Generated by AI from {0} most recent customer reviews","Last updated {0}":"Last updated {0}",Search:"Search","Search Reviews":"Search Reviews"}},"1f59":function(e,t,o){e.exports=o.p+"img/broken-image.cbc04156.svg"},2003:function(e,t,o){"use strict";o.r(t),o.d(t,"InitialiseWidgets",(function(){return M}));var a=o("ec26"),r=o("2b0e"),i=(o("2fb4"),o("88c3")),n=o("9de8"),s=o("a8f8"),l=o("92ca"),d=o("7392"),u=o("b943"),c=o("dc15"),v={inserted:(e,t)=>{"IMG"===(null===e||void 0===e?void 0:e.nodeName)&&(e.src=t.value)}},g={inserted:(e,t)=>{var o;if(!t.value)return;const a=null!==(o=t.arg)&&void 0!==o?o:"click",r=t.value;l["a"].bindGAEventToElement(e,a,r)}},m=o("1f59"),f=o.n(m);class b{constructor(e,t){this.imageElement=e,this.imageSrc=t,this.isLoaded=!1,this.onImageErrorFunc=this.onImageError.bind(this),this.showImageFunc=this.showImage.bind(this),this.hideImage(),this.createObserver()}debounceValueUpdate(e){this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout(()=>{this.imageSrc=e,this.isLoaded&&this.loadImage(),this.timer=void 0},200)}hideImage(){this.imageElement.style.opacity="0",this.imageElement.style.transition="all 0.1s ease-out"}showImage(){this.imageElement.style.opacity="1",this.removeEventListeners()}onImageError(){this.imageElement.src=f.a,this.imageElement.classList.add("oke-is-error")}loadImage(){const e=this.imageSrc;this.imageElement.addEventListener("load",this.showImageFunc),this.imageElement.addEventListener("error",this.onImageErrorFunc),e?this.imageElement.src=e:this.onImageError(),this.isLoaded=!0}removeEventListeners(){this.imageElement.removeEventListener("load",this.showImageFunc),this.imageElement.removeEventListener("error",this.onImageErrorFunc)}createObserver(){const e=new IntersectionObserver((e,t)=>{for(const o of e)o.isIntersecting&&(this.loadImage(),t.disconnect())});e.observe(this.imageElement)}}var h=(()=>{const e=new WeakMap;return{inserted:(t,o)=>{if("IMG"===(null===t||void 0===t?void 0:t.nodeName)){const a=new b(t,o.value);e.set(t,a)}},componentUpdated:(t,o)=>{const a=e.get(t);a&&o.oldValue!==o.value&&o.value&&a.debounceValueUpdate(o.value)}}})(),p={inserted:e=>{"IMG"===(null===e||void 0===e?void 0:e.nodeName)&&(e.style.opacity="0")}},w={inserted:(e,t)=>{}},k=o("7c19");class y{constructor(){this.trackableWidgets=new Map,this.kTimerIntervalMilliseconds=5e3,document.addEventListener("visibilitychange",this.handleVisibilityChange.bind(this),!1)}createObserver(e,t){if(!e||!t.widgetId||!t.widgetType)return;const o={root:null,rootMargin:t.rootMargin,threshold:t.threshold?[t.threshold]:void 0},a=new IntersectionObserver(this.intersectionCallback.bind(this),o);a.observe(e),t.observer=a,this.trackableWidgets.set(e,t)}destroyObserver(e){var t;const o=this.trackableWidgets.get(e);o&&(o.isIntersecting=!1,this.clearInterval(o),null===(t=o.observer)||void 0===t||t.disconnect(),this.trackableWidgets.delete(e),0===this.trackableWidgets.size&&document.removeEventListener("visibilitychange",this.handleVisibilityChange.bind(this),!1))}handleVisibilityChange(){this.trackableWidgets.forEach(e=>{document.hidden?this.clearInterval(e):e.isIntersecting&&(e.intervalId=this.setInterval(e.widgetType))})}intersectionCallback(e){e.forEach(e=>{var t,o,a;const r=e.target,i=this.trackableWidgets.get(r);if(!i)return;const n=null===(t=r.parentElement)||void 0===t?void 0:t.style,s=!(null===n||void 0===n?void 0:n.opacity)||(null===n||void 0===n?void 0:n.opacity)&&+(null===n||void 0===n?void 0:n.opacity)>0,l="hidden"!==(null===(o=r.parentElement)||void 0===o?void 0:o.style.visibility);e.isIntersecting&&e.intersectionRatio>=(null!==(a=i.threshold)&&void 0!==a?a:0)&&l&&s?(i.isIntersecting=!0,i.intervalId=this.setInterval(i.widgetType)):e.isIntersecting||(i.isIntersecting=!1,this.clearInterval(i))})}sendAnalyticsEvent(e){l["a"].sendGAEvent({action:e+" On Screen Timer",value:this.kTimerIntervalMilliseconds,additionalProperties:{timer_interval_msec:this.kTimerIntervalMilliseconds},type:"view"})}setInterval(e){return window.setInterval(()=>this.sendAnalyticsEvent(e),this.kTimerIntervalMilliseconds)}clearInterval(e){e.intervalId&&(window.clearInterval(e.intervalId),e.intervalId=void 0)}}var C=(()=>{const e=new y;return{inserted:(t,o)=>{const a=k["default"].analyticsSettings;if("none"===(null===a||void 0===a?void 0:a.provider)||!(null===a||void 0===a?void 0:a.isWidgetOnScreenTrackingEnabled)||!o.value)return;const r=o.value;e.createObserver(t,r)},unbind:t=>{e.destroyObserver(t)}}})();function T(e,t){const o="cypress"===e||"prerender"===e;r["a"].directive("ga",o||t?w:g),r["a"].directive("onScreenTracking",o||t?w:C),"cypress"===e?r["a"].directive("lazySrc",v):r["a"].directive("lazySrc",o?p:h)}var S=o("4adb"),L=o("88a3"),A=o("3d80");class R{async setGlobalWidgetSettingsAndDirectives(e,t,o,a,i,n){e||(e=S["default"]),this.setWidgetSettings(e,t,a,i,n);const s=this.getDefaultWidgetLocale(t);await this.setWidgetLocale(s.code,s.variant,null===t||void 0===t?void 0:t.i18n),this.setSubscriberId(o),"on-load"===k["default"].widgetSettings.global.reviewTranslationsMode&&(r["a"].$localeStore.shouldFetchTranslationsWithReviews=!0,l["a"].sendGAEvent({action:"On-load Review Translation",additionalProperties:{toLocale:r["a"].$localeStore.currentLocale.code.toLowerCase()},type:"interaction"}));const d=window.okeInShopifyThemeCustomizer;T(null===t||void 0===t?void 0:t.widgetRenderMode,d)}setWidgetSettings(e,t,o,a,r){var i;const s=null!==(i=k["default"].widgetSettings)&&void 0!==i?i:S["default"];e&&n["a"].merge(e,s),k["default"].widgetSettings=s,t&&(k["default"].isTestModeEnabled=t.isTestModeEnabled||!1,k["default"].locale=t.locale||void 0,k["default"].matchCustomerLocale=t.matchCustomerLocale||!1),o&&(k["default"].features=o),a&&(k["default"].analyticsSettings=a),r&&(k["default"].customDomain=r),this.writeCSSVariables(s),this.writeStarSymbols(s)}async setWidgetLocale(e="en",t,o){const a=await Object(u["a"])(e,t,o);a&&r["a"].$localeStoreActions.setLocale(a)}setSubscriberId(e){k["default"].subscriberId=e}getDefaultWidgetLocale(e){if(!e)return s["LocaleUtils"].kEnglish;const t=s["LocaleUtils"].getOkendoLocaleWithFallback(null===e||void 0===e?void 0:e.localeAndVariant,null===e||void 0===e?void 0:e.locale),o=Object(c["a"])(e);return o&&o.code!==t.code?o:t}writeStarSymbols(e){var t,o;const a=null!==(o=null===(t=e.global)||void 0===t?void 0:t.stars.shape)&&void 0!==o?o:A["d"];if("custom"===a.type)fetch(a.assetUrl).then(e=>{if(e.ok)e.text().then(e=>{const t=Object(A["a"])(a,e);L["a"].addOrUpdateTargetBlock("svg",A["e"],t,"outerHTML","body")});else{k["default"].widgetSettings.global.stars.shape=A["d"];const e=Object(A["b"])(A["d"]);L["a"].addOrUpdateTargetBlock("svg",A["e"],e,"outerHTML","body")}});else{const e=Object(A["b"])(a);L["a"].addOrUpdateTargetBlock("svg",A["e"],e,"outerHTML","body")}}writeCSSVariables(e){const t=d["a"].cssVariablesId,o=d["a"].getCssVariablesSnippet(e);L["a"].addOrUpdateTargetBlock("style",t,o,"outerHTML")}}var E=o("da28");class M extends R{initialiseWidgets(e,t){if(e.starRating.length&&this.initialiseWidget(e.starRating,null===t||void 0===t?void 0:t.starRating),e.widget.length&&(this.removeMetafieldResizeEventBinding(),this.initialiseWidget(e.widget,null===t||void 0===t?void 0:t.widget)),e.questions.length&&this.initialiseWidget(e.questions,null===t||void 0===t?void 0:t.questions),e.homepageCarousel.length&&this.initialiseWidget(e.homepageCarousel,null===t||void 0===t?void 0:t.homepageCarousel),e.badge.length&&this.initialiseWidget(e.badge,null===t||void 0===t?void 0:t.badge),e.reviewsModal.length&&E["a"].bindOpenReviewsModalEventForElements(e.reviewsModal),e.reviewsTab){const e=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-reviews-tab")]).then(o.bind(null,"7197"));this.initialiseWidgetWithoutSnippet(e)}e.mediaGrid.length&&this.initialiseWidget(e.mediaGrid,null===t||void 0===t?void 0:t.mediaGrid),e.mediaCarousel.length&&this.initialiseWidget(e.mediaCarousel,null===t||void 0===t?void 0:t.mediaCarousel),e.reviewsSummary.length&&this.initialiseWidget(e.reviewsSummary,null===t||void 0===t?void 0:t.reviewsSummary)}componentSelect(e){let t;return e.hasAttribute("data-oke-star-rating")&&(t=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-star-rating")]).then(o.bind(null,"4cac"))),e.hasAttribute("data-oke-widget")&&(t=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-widget")]).then(o.bind(null,"ea14"))),e.hasAttribute("data-oke-questions-widget")&&(t=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-questions-widget")]).then(o.bind(null,"9dab"))),e.hasAttribute("data-oke-carousel")&&(t=()=>Promise.all([o.e("okendo-reviews-lib"),o.e("okendo-reviews-core"),o.e("modules/okendo-homepage-carousel")]).then(o.bind(null,"c0bb"))),e.hasAttribute("data-oke-badge")&&(t=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-reviews-badge")]).then(o.bind(null,"122a"))),e.hasAttribute("data-oke-media-grid")&&(t=()=>Promise.all([o.e("okendo-reviews-core"),o.e("modules/okendo-media-grid")]).then(o.bind(null,"57a1"))),e.hasAttribute("data-oke-media-carousel")&&(t=()=>Promise.all([o.e("okendo-reviews-lib"),o.e("okendo-reviews-core"),o.e("modules/okendo-media-carousel")]).then(o.bind(null,"9d4e"))),e.hasAttribute("data-oke-reviews-summary")&&(t=()=>Promise.all([o.e("okendo-reviews-lib"),o.e("okendo-reviews-core"),o.e("modules/okendo-reviews-summary")]).then(o.bind(null,"7459"))),t}initialiseWidget(e,t){var o,r;const i="0.75.2";for(const s of e){const e=s.getAttribute("data-oke-reviews-group-id"),l=s.getAttribute("data-oke-reviews-product-id"),d=n["a"].getWidgetMode(null!==l&&void 0!==l?l:void 0,null!==e&&void 0!==e?e:void 0),u=document.querySelectorAll("style[data-oke-reviews-version], link[data-oke-reviews-version]");u.forEach(e=>{const t=e.getAttribute("data-oke-reviews-version");t!==i&&e.remove()});const c=s.querySelector(".okeReviews"),v=null===c||void 0===c?void 0:c.getAttribute("data-oke-reviews-version"),g=s.querySelector("#oke-metafield-data, [data-oke-metafield-data]"),m=g?JSON.parse(g.innerHTML):void 0,f=(null===window||void 0===window?void 0:window.okeShowPreviewData)?void 0:null!==t&&void 0!==t?t:m,b=s.hasAttribute("data-oke-widget"),h=s.hasAttribute("data-oke-questions-widget"),p=b||h?s.getAttribute("data-oke-reviews-ask-question-product-id"):null,w=b?s.getAttribute("data-oke-reviews-write-review-product-id"):null;let k,y,C,T;if(s.hasAttribute("data-oke-badge")&&(k=this.getReviewsBadgeDataAttributes(s)),s.hasAttribute("data-oke-carousel")&&(y=this.getReviewsCarouselDataAttributeSettings(s)),s.hasAttribute("data-oke-star-rating")){const e=n["a"].stringOrNullToBoolOrUndefined(s.getAttribute("data-oke-all-reviews"));C={scrollDisabled:"true"===s.getAttribute("data-oke-scroll-disabled"),..."boolean"===typeof e?{isInAllReviewsMode:e}:void 0}}s.hasAttribute("data-oke-reviews-summary")&&(T={heading:null!==(o=s.getAttribute("data-oke-heading"))&&void 0!==o?o:"Reviews Summary",maxTextLines:parseInt(null!==(r=s.getAttribute("data-oke-max-text-lines"))&&void 0!==r?r:"5",10)});const S=this.componentSelect(s),L=Object(a["a"])(),A=t||!c||v!==i||!f,R=document.createElement("div"),E=document.createElement("div");if(R.appendChild(E),A){s.innerHTML="",s.appendChild(E);const e=t=>{const{id:o}=null===t||void 0===t?void 0:t.detail;o===L&&(s.setAttribute("data-oke-rendered",""),document.removeEventListener("oke-rendered",e))};document.addEventListener("oke-rendered",e)}else{const e=t=>{const{id:o}=null===t||void 0===t?void 0:t.detail,a=500,r=500;o===L&&(R.setAttribute("style",`position: absolute; opacity: 0; top: 0; left: 0; width: 100%; transition: opacity ${r/1e3}s linear;`),null===c||void 0===c||c.setAttribute("style",`opacity: 1; transition: opacity ${r/1e3}s linear;`),s.setAttribute("style","position: relative;"),s.setAttribute("data-oke-rendered",""),s.appendChild(R),setTimeout(()=>{R.style.opacity="1",c&&(c.style.opacity="0"),setTimeout(()=>{const e=R.querySelector(".okeReviews");e&&(s.removeAttribute("style"),s.innerHTML="",s.appendChild(e))},r)},a),document.removeEventListener("oke-rendered",e))};document.addEventListener("oke-rendered",e)}const M={askQuestionProductId:p,badgeDataAttributeSettings:k,carouselDataAttributeSettings:y,reviewsSummaryDataAttributeSettings:T,starRatingDataAttributeSettings:C,groupId:e,initialData:f,productId:l,widgetId:L,widgetMode:d,widgetSnippetElement:s,writeReviewProductId:w};this.initialiseWidgetSnippet(E,S,M)}}initialiseWidgetSnippet(e,t,o){new r["a"]({el:e,i18n:i["a"],render:e=>e(t,{props:o})})}initialiseWidgetWithoutSnippet(e){const t=document.createElement("div");document.body.appendChild(t),new r["a"]({el:t,i18n:i["a"],render:t=>t(e)})}getReviewsBadgeDataAttributes(e){var t,o,a,r,i,s;const l=e.getAttribute("data-oke-star-background-color"),d=e.getAttribute("data-oke-star-border-color"),u=e.getAttribute("data-oke-star-foreground-color"),c=n["a"].stringOrNullToBoolOrUndefined(e.getAttribute("data-oke-star-border-enabled")),v=e.getAttribute("data-oke-star-height-px"),g={backgroundColor:null!==(t=e.getAttribute("data-oke-background-color"))&&void 0!==t?t:void 0,borderColor:null!==(o=e.getAttribute("data-oke-border-color"))&&void 0!==o?o:void 0,colorScheme:null!==(a=e.getAttribute("data-oke-color-scheme"))&&void 0!==a?a:void 0,layout:null!==(r=e.getAttribute("data-oke-layout"))&&void 0!==r?r:void 0,stars:{globalOverrideSettings:{...l?{backgroundColor:l}:void 0,...d?{borderColor:d}:void 0,...u?{foregroundColor:u}:void 0,..."boolean"===typeof c?{showBorder:c}:void 0},...v?{height:{value:+v,unit:"px"}}:void 0},textColor:null!==(i=e.getAttribute("data-oke-text-color"))&&void 0!==i?i:void 0,url:null!==(s=e.getAttribute("data-oke-url"))&&void 0!==s?s:void 0};return g}getReviewsCarouselDataAttributeSettings(e){var t,o,a,r;return{autoPlay:!!n["a"].stringOrNullToBoolOrUndefined(e.getAttribute("data-oke-auto-play")),hideHeader:!!n["a"].stringOrNullToBoolOrUndefined(e.getAttribute("data-oke-hide-header")),headerText:null!==(t=e.getAttribute("data-oke-header-text"))&&void 0!==t?t:"Reviews from our customers",headerUrl:null!==(o=e.getAttribute("data-oke-header-badge-url"))&&void 0!==o?o:void 0,style:{layout:{name:null!==(a=e.getAttribute("data-oke-layout"))&&void 0!==a?a:void 0,reviewDetailsPosition:null!==(r=e.getAttribute("data-oke-reviewer-position"))&&void 0!==r?r:void 0,showProductName:n["a"].stringOrNullToBoolOrUndefined(e.getAttribute("data-oke-show-product-name")),showAttributeBars:n["a"].stringOrNullToBoolOrUndefined(e.getAttribute("data-oke-show-attribute-bars"))}}}}removeMetafieldResizeEventBinding(){window.okeResizeObserver&&(window.okeResizeObserver.disconnect(),window.okeResizeObserver=void 0)}}},"3d80":function(e,t,o){"use strict";o.d(t,"d",(function(){return a})),o.d(t,"e",(function(){return r})),o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return l}));const a={type:"default"},r="oke-star-symbols";function i(e){let t='
"))return e;{let t="
";return t+=e.replace(/(?:\r\n|\r|\n)+/g,"
"),t+="
",t}},escapeHTML(e){if(!e)return;const t={"&":"&","<":"<",">":">",'"':""","'":"'"},o=/(.*?<\/mark>)/gi,a=e.split(o),r=a.map(e=>o.test(e)?e.replace(/()(.*?)(<\/mark>)/gi,(e,o,a,r)=>{const i=a.replace(/[&<>"']/g,e=>t[e]);return`${o}${i}${r}`}):e.replace(/[&<>"']/g,e=>t[e]));return r.join("")},toTitleCase(e){return e.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())},titleToSnakeCase(e){return e.replace(/[^a-zA-Z0-9_\- ]/g,"").replace(/[_\- ]+/g,"_").toLowerCase()},kebabToCamelCase(e){if(!e)return"";const t=e.split("-");return t.map((e,t)=>t?this.capitalize(e):e.toLowerCase()).join("")},capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},toComaEscapedEncodedString(e){return encodeURIComponent(e.replace(/,/g,"\\,"))},isAbsoluteUrl(e){const t=/^(([a-zA-Z]+){1}:\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/i;return t.test(e)},getUniqueId(e){const t=Math.floor(1e6*Math.random());return e?`${e}-${t}`:""+t}}},ec26:function(e,t,o){"use strict";var a,r=new Uint8Array(16);function i(){if(!a&&(a="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(r)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function s(e){return"string"===typeof e&&n.test(e)}for(var l=s,d=[],u=0;u<256;++u)d.push((u+256).toString(16).substr(1));function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!l(o))throw TypeError("Stringified UUID is invalid");return o}var v=c;function g(e,t,o){e=e||{};var a=e.random||(e.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){o=o||0;for(var r=0;r<16;++r)t[o+r]=a[r];return t}return v(a)}t["a"]=g}}]);