Shopify.Products=function(){var r={howManyToShow:4,howManyToStoreInMemory:10,wrapperId:"recently-viewed-products",templateId:"recently-viewed-product-template",currencyStore:Shopify?Shopify.currency.active:"GBP"},o=[],t=$("#"+r.templateId),n=$("#"+r.wrapperId),i=0,c={},a=[],d={configuration:{expires:90,path:"/",domain:window.location.hostname},name:"shopify_recently_viewed",write:function(e){$.cookie(this.name,e.join(" "),this.configuration)},read:function(){var e=[],o=$.cookie(this.name);return e=null!=o?o.split(" "):e},destroy:function(){$.cookie(this.name,null,this.configuration)},remove:function(e){var o=this.read(),e=$.inArray(e,o);-1!==e&&(o.splice(e,1),this.write(o))}};function u(e,o){return Intl.NumberFormat(Shopify.locale,{style:"currency",currency:o}).format(e/100)}return{productHandle:function(){var e=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/);return null!=e?e[1]:""},showRecentlyViewed:function(e){$.extend(r,e||{}),o=d.read(),r.howManyToShow=Math.min(o.length,r.howManyToShow),r.howManyToShow&&t.length&&n.length&&o.forEach(e=>{var o;this.productHandle()!==e&&i