"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[29],{83:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.trackRecentlyViewed=t.hasRecentlyViewedItems=void 0;const s=n(0),u=(n(3),o(n(61))),i="theme-recent";let c;if("undefined"!=typeof window){let e=document.cookie.split("; ").find((e=>e.startsWith(`${i}=`)));e=null==e?void 0:e.substring(e.indexOf("=")+1),c=e?JSON.parse(e):{}}t.hasRecentlyViewedItems=function(){return void 0!==c&&Object.keys(c).length>0},t.trackRecentlyViewed=function(e,t,n){Object.prototype.hasOwnProperty.call(c,e)&&delete c[e];const o=n.match(/(?\.\w{3,4})($|\?)/).groups.ext,s=n.replace(o,`_{width}x${o}`);c[e]={url:t,aspectRatio:"100.0",featuredImage:s},document.cookie=`${i}=${JSON.stringify(c)}`},t.default=function({handle:e,heading:t="Recently viewed",rows:n=1,columns:o=5,showProductColors:i=!1,products:c=[],useSharedState:r}){return c.length<=0?null:(0,s.jsx)(u.default,{heading:t,products:c,rows:n,columns:o,showProductColors:i,useSharedState:r})}}}]);