!function(){"use strict";var e,t,n={5688:function(e,t,n){n.d(t,{H:function(){return r}});const r=50,i=(()=>{const e=(window.fetch,(()=>{const e=document.createElement("iframe");e.style.display="none",document.body.appendChild(e);const{fetch:t}=e.contentWindow;return t||window.fetch})()),t={_headers:{},_params:{},_baseUrl:"https://api.juniphq.com",_storeId:null,setStoreId:e=>{t._storeId=e},setHeaders:e=>{t._headers={"Content-Type":"application/json",...e}},setParams:e=>{t._params=e},fetch:(t,n)=>e(t,n)},n=async(n,i,a)=>{const o={method:n,headers:t._headers,referrer:window?.location?.origin||""};i=new URL(i,r(i)),a&&("GET"===n?(a={...a,...t._params},Object.keys(a).forEach((e=>a[e]&&i.searchParams.append(e,a[e])))):o.body=JSON.stringify(a));return(e=>e.text().then((t=>{const n=t&&JSON.parse(t);if(!e.ok){const t=n&&n.message||e.statusText;return Promise.reject(t)}return{data:n}})))(await e(i,o))},r=e=>{const{_baseUrl:n,_storeId:r}=t,i=100*parseFloat("1.00")||0;return e.includes("v2")&&r&&r%1001&&void 0!==arguments[1]?arguments[1]:{};return n("GET",e,t)},t.post=async function(e){return n("POST",e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},t.put=async function(e){return n("PUT",e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},t})();t.A=i},568:function(e,t,n){function r(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),"function"==typeof t&&t())}n.d(t,{A:function(){return r}})},445:function(e,t,n){var r=n(1601),i=n.n(r),a=n(6314),o=n.n(a)()(i());o.push([e.id,":root{--junipOutlineColor:#637381}[class^=junip-],[class^=junip-] *,[class^=junip-] :after,[class^=junip-] :before,[class^=junip-]:after,[class^=junip-]:before{box-sizing:border-box}[class^=junip-] svg{fill:none;stroke:none}.junip-product-review,.junip-product-summary,.junip-review-section{animation:junipNodeInserted .01s}.junip-product-review{outline:none;width:100%}.junip-review-section{display:block!important}.junip-product-summary-rendered{display:block}.junip-product-summary-clickable{cursor:pointer}.junip-product-summary-clickable .junip-product-summary-star-ratings-container{outline:none;transition:box-shadow .15s ease-in}.junip-product-summary-clickable .junip-product-summary-star-ratings-container:focus{box-shadow:0 0 0 .2em #637381;box-shadow:0 0 0 .2em var(--junipOutlineColor)}.junip-product-summary-stars-wrapper{text-align:inherit}.junip-product-summary-star-ratings-container{align-items:center;display:inline-flex;margin-left:-1px}.junip-stars-container{position:relative}.junip-stars-container,.junip-stars-container .junip-stars-outline{align-items:center;display:flex}.junip-stars-container .junip-stars-filled{align-items:center;display:flex;height:100%;left:0;overflow:hidden;position:absolute;top:0}.junip-stars-container .junip-stars-filled .junip-star-filled{flex-shrink:0}.junip-product-summary-star{height:20px;padding:2px;width:20px;z-index:inherit}.junip-product-summary-star svg{display:block;height:auto;margin:auto;width:auto}.junip-product-summary-review-count{color:inherit;margin-left:3px}.junip-see-more{display:block;margin-left:auto;margin-right:auto;margin-top:16px}@keyframes junipNodeInserted{0%{transform:translateZ(1px)}to{transform:translateZ(0)}}",""]),t.A=o},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},1601:function(e){e.exports=function(e){return e[1]}},5072:function(e){var t=[];function n(e){for(var n=-1,r=0;r0?" ".concat(i.layer):""," {")),a+=i.css,o&&(a+="}"),i.media&&(a+="}"),i.supports&&(a+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,a);else{var s=document.createTextNode(a),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(s,l[t]):e.appendChild(s)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,exports:{}};return n[e].call(a.exports,a,a.exports,i),a.exports}i.m=n,i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"chunks/junip."+e+".js?v="+{195:"1855af544e4d1d58cbf0",519:"110c9481fb370152dc7b",576:"7689994fec74ac039edc",579:"f525afc41fae80512863",761:"95939550e1641ab9f161",891:"f00ba183fb5e888607a6",892:"89aed84ae0e34615a45e",976:"4f14cec5dce5f03dcaea",985:"61840669017db50e2516"}[e]},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="junip-scripts:",i.l=function(n,r,a,o){if(e[n])e[n].push(r);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),c=0;c-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}(),function(){i.b=document.baseURI||self.location.href;var e={814:0};i.f.j=function(t,n){var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise((function(n,i){r=e[t]=[n,i]}));n.push(r[2]=a);var o=i.p+i.u(t),s=new Error;i.l(o,(function(n){if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var r,a,o=n[0],s=n[1],l=n[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(l)l(i)}for(t&&t(n);ue.text())),r=document.getElementById("junipStarSymbols");r?.innerHTML&&(r.innerHTML=n)}function w(e){let{primary_color:t,button_color:n,button_text_color_option:r,dark_mode_enabled:i,star_color:a}=e;const o=document.getElementById("junipCssVariables");o&&o.remove(),document.head.insertAdjacentHTML("beforeend",`\n \n `.replace(/\s+/g," "))}async function h(e){let{displaySettings:t}=e;const r=document.querySelectorAll(".junip-review-section");if(r?.forEach?.((e=>e.setAttribute("data-initialized",!0))),n){if(r.length>0){const{previewData:e}=await i.e(976).then(i.bind(i,4976));for(let n of r)b({displaySettings:t,element:n,data:e,previewMode:!0})}}else if(r.length>0)try{for(let e of r){const n=parseInt(e.dataset?.reviewsCount)||10,r=e.dataset?.reviewsType||"all";let i="product_reviews",o={};"store_reviews"===r&&(i="store_reviews");const s="store_reviews"===i?"/v2/store/reviews":"/v2/product_overview/reviews";b({displaySettings:t,element:e,data:(await a.A.get(s,{params:{sort_field:t.prioritize_featured_reviews?"featured":"created_at",sort_order:"desc",page_size:n,page_after:null,page_before:null,...o}})).data,pageSize:n})}}catch(e){}}async function b(e){let{displaySettings:t,element:n,data:r,previewMode:a=!1}=e;n.style.display="block";const o=n.dataset.layout,s=parseInt(n.dataset?.reviewsCount)||10,l=n.dataset?.reviewsType||"all",u="true"===n.dataset?.showSummary||!1,d="true"===n?.dataset?.mediaGalleryEnabled||!1,{renderReviewSection:p}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891));p({storeKey:c,displaySettings:{...t,media_gallery_enabled:d},element:n,data:r,layout:o,previewMode:a,pageSize:s,reviewsType:l,showSummary:u})}async function j(e){let{displaySettings:t,element:r}=e;r?.setAttribute("data-initialized",!0);const{renderUgcGallery:a}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891));a({storeKey:c,displaySettings:t,element:r,previewMode:n})}async function S(e){let{displaySettings:t,element:r}=e;r?.setAttribute("data-initialized",!0);const{renderReviewCarousel:a}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891));a({storeKey:c,displaySettings:t,element:r,previewMode:n})}async function _(e){let{displaySettings:t,element:r}=e;if(!r){const l=document.querySelectorAll(".junip-product-review");for(const u of l)_({displaySettings:t,element:u});return}r?.setAttribute("data-initialized",!0);const o=r?.dataset?.productId,s=t.review_page_size||10;if(n){if(r&&o){r.id=`junipProductReviews${o}`,r.setAttribute("tabindex","-1");const{default:d}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891)),{previewData:p}=await i.e(976).then(i.bind(i,4976));d({storeKey:c,displaySettings:t,element:r,data:p,product:p.product,previewMode:!0})}}else if(r&&o){async function f(){return await a.A.get(`/v2/products/remote/${o}/reviews`,{params:{sort_field:t.prioritize_featured_reviews?"featured":"created_at",sort_order:"desc",page_size:s,page_after:null,page_before:null}})}async function m(){return await a.A.get(`/v2/products/remote/${o}`)}r.id=`junipProductReviews${o}`,r.setAttribute("tabindex","-1");try{let[g,y]=await Promise.all([f(),m()]);const v=y.data?.data;if(v.unreviewable)return;if(g?.data?.data?.length>0)k({product:v});else if(r.classList.add("junip-product-review-empty"),t.smart_display_enabled)return;const{default:w}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891));w({storeKey:c,displaySettings:t,element:r,data:g.data,product:v})}catch(h){}}}async function x(e){let{displaySettings:t,fetchData:r,elements:i=null}=e;const o=i||document.querySelectorAll(".junip-product-summary");o?.forEach?.((e=>e.setAttribute("data-initialized",!0)));const s=document.querySelector(".junip-product-review");let l={};for(let e of o){const t=e.dataset?.productId;t&&(l[t]?l[t].push(e):l[t]=[e])}if(n)return void function(e,t,n){const r=Object.values(t);for(let t of r)for(let r of t)E({element:r,rating:4,count:3,displaySettings:e,productReviewElement:n})}(t,l,s);if(!1===r||!t.onsite_enabled)return void function(e){let{displaySettings:t,productElements:n,productReviewElement:r}=e;for(let e of n)if(t.onsite_enabled){const n=parseInt(e.dataset?.productRatingCount),i=parseFloat(e.dataset?.productRatingAverage);n>0&&i>0&&E({element:e,rating:i,count:n,displaySettings:t,productReviewElement:r,fromMetaData:!0})}else E({element:e,displaySettings:t})}({displaySettings:t,productElements:o,productReviewElement:s});const u=Object.keys(l),c=[];for(let e=0;ee.data.data)).flat();for(let e of d)for(let n of l[e.remote_id]){const r=e.rating_count;E({element:n,rating:e.rating_average,count:r,displaySettings:t,productReviewElement:s,unreviewable:e.unreviewable})}}function E(e){let{element:t,rating:r,count:i,displaySettings:a,productReviewElement:s,unreviewable:l,fromMetaData:u}=e;if(!a.onsite_enabled&&!n||0===r||0===i||l)return t.innerHTML="",t.classList.remove("junip-product-summary-clickable"),void t.classList.remove("junip-product-summary-rendered");const c=a.review_count_enabled,d='\n
\n \n \n Outline Star\n \n \n \n
\n '.repeat(5),p='\n
\n \n \n Filled Star\n \n \n \n
\n '.repeat(5),f=c?`\n
\n (${i?.toLocaleString?.()||i})\n
\n `:"",m=Math.round(100*(r+(Number?.EPSILON||0)))/100;t.innerHTML=`\n
\n
\n
\n
\n ${d}\n
\n
\n ${p}\n
\n
\n ${f}\n
\n
\n `,s?.dataset?.productId===t.dataset?.productId&&(u&&k({rating_average:r,rating_count:i}),t.classList.contains("junip-product-summary-clickable")||(t.classList.add("junip-product-summary-clickable"),t.addEventListener("click",(()=>{s.focus({preventScroll:!0}),s.scrollIntoView({behavior:"smooth"})})),t.addEventListener("keydown",(e=>{(0,o.A)(e,(()=>{s.focus({preventScroll:!0}),s.scrollIntoView({behavior:"smooth"})}))})))),t.classList.contains("junip-product-summary-rendered")||t.classList.add("junip-product-summary-rendered")}function k(e){let{rating_average:t,rating_count:n,product:r}=e;if(r&&(t=Math.round(100*r.rating_average)/100,n=r.rating_count),0===n)return;let i={"@context":"http://schema.org","@type":"Product",name:r?.title||"",aggregateRating:{"@type":"AggregateRating",ratingValue:t,reviewCount:n,bestRating:5,worstRating:1}},a=!1;const o=document.querySelectorAll('[type="application/ld+json"]'),s=[];for(let e of o)try{let t=JSON.parse(e.innerHTML.replaceAll("\n"," "));if("Product"===t["@type"]){if(t.aggregateRating){a=!0;break}s.push(e)}}catch(e){break}if(!a)for(let e of s)try{let t=JSON.parse(e.innerHTML.replaceAll("\n"," "));!t.name&&r?.title&&(t.name=r.title),t.aggregateRating=i.aggregateRating,e.innerHTML=JSON.stringify(t),a=!0;break}catch(e){break}if(!1===a&&i.name){let e=document.createElement("script");e.type="application/ld+json",e.innerHTML=JSON.stringify(i);let t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}}"true"===m&&window?.Shopify?.designMode&&(n="true"===g||!1),d="true"===d,p="true"===p,a.A.setHeaders({"Junip-Store-Key":c}),a.A.setParams({v:r?Date.now():c}),c&&async function(){if(!0===window.junipLoaded)return;window.junipLoaded=!0;try{!function(){if(document.getElementById("junipStarSymbols"))return;const e='\n Outline star\n ',t=`\n \n `;document.body.insertAdjacentHTML("afterbegin",t)}(),y&&v({star_template_url:y}),d&&!n&&(w({star_color:f}),x({displaySettings:{onsite_enabled:d,review_count_enabled:p,star_color:f},fetchData:!1}));const e=await a.A.get("/v1/display_settings",{params:{include:"store"}});let t=e.data?.display_settings?.[0];if(a.A.setStoreId(t?.store_id),"https://junip.co"===window.location.origin&&(t={...t,smart_display_enabled:!1,dark_mode_enabled:!1,onsite_enabled:!0}),s&&!1===t?.onsite_enabled&&(t.onsite_enabled=!0),l&&(t.media_gallery_enabled=!0),!t||!t?.onsite_enabled&&!n)return void x({displaySettings:{onsite_enabled:!1},fetchData:!1});if(y&&y===t?.star_template_url||v(t),w(t),x({displaySettings:t,fetchData:!0}),_({displaySettings:t}),async function(e){let{displaySettings:t}=e;const n=document.querySelectorAll(".junip-ugc-gallery");for(const e of n)j({displaySettings:t,element:e})}({displaySettings:t}),async function(e){let{displaySettings:t}=e;const n=document.querySelectorAll(".junip-review-carousel");for(const e of n)S({displaySettings:t,element:e})}({displaySettings:t}),h({displaySettings:t}),function(e){document.addEventListener("animationstart",(t=>{if("junipNodeInserted"===t.animationName){if("true"===t.target.dataset?.initialized)return;const n=t.target?.className||"";n.includes?.("junip-product-summary")?x({displaySettings:e,fetchData:!0,elements:[t.target]}):n.includes?.("junip-product-review")?_({displaySettings:e,element:"junip-product-review"===t.target.className?t.target:null}):n.includes?.("junip-review-section")?h({displaySettings:e}):n.includes?.("junip-ugc-gallery")?j({displaySettings:e,element:t.target}):n.includes?.("junip-review-carousel")&&S({displaySettings:e,element:t.target})}}),!1)}(t),n){const{renderPreviewBar:e}=await Promise.all([i.e(195),i.e(891)]).then(i.bind(i,7891));e({displaySettings:t})}}catch(e){}}()}let b=document.querySelector(".junip-store-key");b?h(b):window.addEventListener("DOMContentLoaded",(()=>{b=document.querySelector(".junip-store-key"),b&&h(b)}))}();