PageSourceSearch

https://cozo.co/cdn/shop/t/9/assets/district.js?v=36486433151790067181571875573

js cozo.co collected 2026-10-06 04:29:20 UTC 57,864 bytes, 2 lines download raw bytes

1(function(){"use strict";window.StyleHatch=window.StyleHatch||{},StyleHatch.Sections=function(){this.constructors={},this.instances=[],$(document).on("shopify:section:load",this._onSectionLoad.bind(this)).on("shopify:section:unload",this._onSectionUnload.bind(this)).on("shopify:section:select",this._onSelect.bind(this)).on("shopify:section:deselect",this._onDeselect.bind(this)).on("shopify:block:select",this._onBlockSelect.bind(this)).on("shopify:block:deselect",this._onBlockDeselect.bind(this))},StyleHatch.Sections.prototype=_.assignIn({},StyleHatch.Sections.prototype,{_createInstance:function(container,constructor){var $container=$(container),id=$container.attr("data-section-id"),type=$container.attr("data-section-type");if(constructor=constructor||this.constructors[type],!_.isUndefined(constructor)){var instance=_.assignIn(new constructor(container),{id:id,type:type,container:container});this.instances.push(instance)}},_onSectionLoad:function(evt){var container=$("[data-section-id]",evt.target)[0];container&&this._createInstance(container)},_onSectionUnload:function(evt){this.instances=_.filter(this.instances,function(instance){var isEventInstance=instance.id===evt.detail.sectionId;return isEventInstance&&_.isFunction(instance.onUnload)&&instance.onUnload(evt),!isEventInstance})},_onSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onSelect)&&instance.onSelect(evt),$("body").hasClass("panel-open")&&(StyleHatch.closePanelMenu(),$("html, body").addClass("scroll-lock"),setTimeout(function(){$("html, body").removeClass("scroll-lock"),$("html, body").animate({scrollTop:instance.$container.offset().top},600)},400))},_onDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onDeselect)&&instance.onDeselect(evt),$("body").hasClass("panel-open")&&StyleHatch.closePanelMenu()},_onBlockSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockSelect)&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockDeselect)&&instance.onBlockDeselect(evt)},register:function(type,constructor){this.constructors[type]=constructor,$("[data-section-type="+type+"]").each(function(index,container){this._createInstance(container,constructor)}.bind(this))}}),StyleHatch.cacheSelectors=function(){StyleHatch.cache={$body:$("body"),$html:$("html"),$util:$("header.util"),$header:$("header.site-header"),$siteNav:$("header.site-header ul.site-nav"),$featuredCollection:$(".featured-collection"),$instagramCollection:$(".instagram-collection"),$addToCartForm:$("#AddToCartForm"),$addToCartButton:$("#AddToCart"),$cartButton:$("#CartButton"),$recoverPasswordLink:$("#RecoverPassword"),$hideRecoverPasswordLink:$("#HideRecoverPasswordLink"),$recoverPasswordForm:$("#RecoverPasswordForm"),$customerLoginForm:$("#CustomerLoginForm"),$passwordResetSuccess:$("#ResetSuccess")}},StyleHatch.init=function(){var doc=document.documentElement;doc.setAttribute("data-useragent",navigator.userAgent),StyleHatch.cacheSelectors(),StyleHatch.largeMobile=700;var sections=new StyleHatch.Sections;sections.register("promos-section",StyleHatch.PromosSection),sections.register("header-section",StyleHatch.HeaderSection),sections.register("footer-section",StyleHatch.FooterSection),sections.register("slideshow-section",StyleHatch.SlideshowSection),sections.register("hero-video-section",StyleHatch.HeroVideoSection),sections.register("featured-collection-section",StyleHatch.FeaturedCollectionSection),sections.register("simple-collection-section",StyleHatch.SimpleCollectionSection),sections.register("featured-text-section",StyleHatch.PageSection),sections.register("custom-content-section",StyleHatch.PageSection),sections.register("instagram-section",StyleHatch.InstagramSection),sections.register("featured-blog-section",StyleHatch.GenericSection),sections.register("product-template",StyleHatch.Product),sections.register("collection-template",StyleHatch.Collection),sections.register("collection-list-template",StyleHatch.Collection),sections.register("list-collections-template",StyleHatch.ListCollections),sections.register("blog-template",StyleHatch.BlogArticle),sections.register("article-template",StyleHatch.BlogArticle),sections.register("password-template",StyleHatch.Password),sections.register("cart-template",StyleHatch.Cart),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init(),StyleHatch.loginForms(),StyleHatch.videoLayout(),StyleHatch.initTemplates()},StyleHatch.PromosSection=(function(){function PromosSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.Promos.init()}return PromosSection})(),StyleHatch.PromosSection.prototype=_.assignIn({},StyleHatch.PromosSection.prototype,{onUnload:function(){StyleHatch.Promos.unload()},onBlockSelect:function(evt){StyleHatch.Promos.blockSelect(evt)},onBlockDeselect:function(evt){StyleHatch.Promos.blockDeselect(evt)}}),StyleHatch.Promos=(function(){var selectors={body:"body",page:"#page",promos:"#shopify-section-promos",promoBar:"header.promo-bar",bottomContainer:".promo-bar-container.bottom",popup:".promo-popup"},config={};config={scrollLock:!1,fixToZIndex:992,hideTimers:[],slideSpeed:400};var cache={};
1function init(){cacheSelectors(),config.scrollLock=cache.$promos.find(">*:first").data("scroll-lock"),initPromoBars(),initPopups(),StyleHatch.Header.rebuildFixTo()}function cacheSelectors(){cache={$body:$(selectors.body),$promos:$(selectors.promos),$promosContainer:$(selectors.promos).find(">*:first"),$promoBar:$(selectors.promoBar),$bottomContainer:$(selectors.bottomContainer),$popup:$(selectors.popup)}}function initPromoBars(){cache.$promoBar.length&&(cache.$promoBar.each(function(){var $promoBar=$(this),hideDelay=$promoBar.data("hide-delay"),barPlacement=$promoBar.data("bar-placement"),$errors=$promoBar.find("div.errors");$errors.length&&$errors.prependTo($promoBar),barPlacement=="bottom"&&(cache.$bottomContainer.length||(cache.$promosContainer.append('<div class="promo-bar-container bottom"></div>'),cache.$bottomContainer=$(selectors.bottomContainer)),$promoBar.appendTo(cache.$bottomContainer),cache.$bottomContainer.resize(function(){var bottomHeight=$(this).height()+"px";cache.$body.css({"margin-bottom":bottomHeight})})),$promoBar.hasClass("signup-bar")&&$promoBar.showPopup(),hideDelay!=="no-delay"&&config.hideTimers.push(setTimeout(function(){$promoBar.data("pause-hide")||$promoBar.promoSlideUp()},hideDelay))}),destroyFixTo(),fixTo())}function destroyFixTo(){cache.$promos.data("fixtoInstance")&&cache.$promos.fixTo("destroy")}function refreshFixTo(){cache.$promos.data("fixtoInstance")&&cache.$promos.fixTo("refresh")}function fixTo(){config.scrollLock&&cache.$promos.fixTo(selectors.page,{zIndex:config.fixToZIndex})}function initPopups(){cache.$popup.length&&cache.$popup.each(function(){var $popup=$(this),popupEnable=!0,showDelay=$popup.data("show-delay"),homepageLimit=$popup.data("homepage-limit"),visitorLimit=$popup.data("visitor-limit"),isVisitor=$popup.data("visitor"),showFor=$popup.data("show-for");visitorLimit==!0&&isVisitor==!1&&(popupEnable=!1);var $errors=$popup.find(".errors");$errors.length&&(showDelay=0);var popupTimeout=setTimeout(function(){var windowWidth=$(window).width();switch(showFor){case"mobile":windowWidth<=StyleHatch.largeMobile&&$popup.showPopup();break;case"desktop":windowWidth>StyleHatch.largeMobile&&$popup.showPopup();break;case"both":$popup.showPopup();break}},showDelay)})}$.fn.extend({showPopup:function(force){var $popup=$(this),popupEnable=!0,showDelay=$popup.data("show-delay"),showAgainDelay=$popup.data("show-again-delay"),homepageLimit=$popup.data("homepage-limit"),visitorLimit=$popup.data("visitor-limit"),isVisitor=$popup.data("visitor"),showFor=$popup.data("show-for"),type=$popup.data("type"),id=$popup.data("id");visitorLimit==!0&&isVisitor==!1&&(popupEnable=!1);var cookieName="popup-"+id;$.cookie(cookieName)&&(popupEnable=!1),homepageLimit&&!cache.$body.hasClass("template-index")&&(popupEnable=!1),window.self!==window.top&&type=="popup"&&(popupEnable=!1),force&&(popupEnable=!0);var $errors=$popup.find(".errors"),formTags=getQueryString("contact%5Btags%5D");if($errors.length&&formTags.includes("popup")&&(popupEnable=!0,$popup.find("input#email").addClass("errors")),$errors.length&&formTags.includes("signup-bar")&&(popupEnable=!0),Modernizr.touchevents&&$popup.find("form").removeAttr("target"),popupEnable){type=="popup"&&$.magnificPopup.open({items:{src:$popup,type:"inline",showCloseBtn:!1},mainClass:"mfp-slideup",removalDelay:300,callbacks:{close:function(){$.cookie(cookieName,"shown",{expires:showAgainDelay,path:"/"})}}}),type=="signup-bar"&&(force?$popup.addClass("visible force"):$popup.addClass("visible"));var $close=$popup.find(".icon-text");$close.on("click",function(e){$popup.hidePopup(),e.preventDefault()});var $form=$popup.find("form");$form.on("submit",function(e){if(e.target.checkValidity())$popup.hidePopup(),$(this).submit();else return!1})}},hidePopup:function(){var $promos=$("#shopify-section-promos"),$popup=$(this),type=$popup.data("type"),id=$popup.data("id");if(type=="popup"&&$.magnificPopup.close(),type=="signup-bar"){var cookieName="popup-"+id;$.cookie(cookieName,"shown",{expires:60,path:"/"}),$(".promo-bar.signup-bar").each(function(i){$(this).slideUp({duration:400,progress:function(){StyleHatch.refreshFixTo()},complete:function(){StyleHatch.refreshFixTo(),$(this).removeClass("visible force")}})})}},promoSlideUp:function(){$(this).slideUp({duration:config.slideSpeed,progress:StyleHatch.refreshFixTo,complete:StyleHatch.refreshFixTo})},promoSlideDown:function(){$(this).slideDown({duration:config.slideSpeed,progress:StyleHatch.refreshFixTo,complete:StyleHatch.refreshFixTo})},showMockPopup:function(){var $promos=$("#shopify-section-promos");$(".mock-popup-container").length||$promos.find(">*:first").append('<div class="mock-popup-container"></div>');var $mockPopupContainer=$(".mock-popup-container"),$popup=$(this);$popup.appendTo($mockPopupContainer),$mockPopupContainer.show(),$popup.show()},hideMockPopup:function(){var $mockPopupContainer=$(".mock-popup-container"),$popup=$(this);$mockPopupContainer.hide(),$popup.hide()}});
1function blockSelect(evt){var $block=$("#block-"+evt.detail.blockId),blockType=$block.data("type");switch($.magnificPopup.close(),blockType){case"announcement-bar":$block.promoSlideDown(),$block.attr("data-pause-hide",!0);break;case"popup":$block.showMockPopup();break;case"signup-bar":$block.showPopup(!0);break}StyleHatch.Header.rebuildFixTo(),StyleHatch.refreshFixTo()}function blockDeselect(evt){var $block=$("#block-"+evt.detail.blockId),blockType=$block.data("type"),showFor=$block.data("show-for"),windowWidth=$(window).width();switch(blockType){case"announcement-bar":var $promoBar=$block;$promoBar.attr("data-pause-hide",!1);var hideDelay=$promoBar.data("hide-delay"),barPlacement=$promoBar.data("bar-placement");(showFor=="desktop"&&windowWidth<=StyleHatch.largeMobile||showFor=="mobile"&&windowWidth>StyleHatch.largeMobile)&&$block.promoSlideUp(),hideDelay!=="no-delay"&&config.hideTimers.push(setTimeout(function(){$promoBar.data("pause-hide")||$promoBar.promoSlideUp()},hideDelay));break;case"popup":$block.hideMockPopup();break;case"signup-bar":showFor=="desktop"&&windowWidth<=StyleHatch.largeMobile&&($block.hidePopup(),StyleHatch.refreshFixTo()),showFor=="mobile"&&windowWidth>StyleHatch.largeMobile&&($block.hidePopup(),StyleHatch.refreshFixTo());break}StyleHatch.Header.rebuildFixTo()}function unload(){if(typeof config.hideTimers=="undefined"||!(config.hideTimers instanceof Array))config.hideTimers=[];else{for(var i=0;i<config.hideTimers.length;i++)clearTimeout(config.hideTimers[i]);config.hideTimers.length=0}destroyFixTo(),StyleHatch.refreshFixTo(),cache.$bottomContainer.remove(),$.magnificPopup.close()}return{init:init,unload:unload,blockSelect:blockSelect,blockDeselect:blockDeselect,refreshFixTo:refreshFixTo}})(),StyleHatch.HeaderSection=(function(){function HeaderSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.Header.init()}return HeaderSection})(),StyleHatch.HeaderSection.prototype=_.assignIn({},StyleHatch.HeaderSection.prototype,{onUnload:function(){StyleHatch.Header.unload()}}),StyleHatch.Header=(function(){var selectors={htmlBody:"html, body",body:"body",page:"#page",section:"#shopify-section-header",promosSection:"#shopify-section-promos",util:"header.util",header:"header.site-header",siteNav:"header.site-header ul.site-nav",menuLink:".menu-link",menuPanel:"#menu.panel",menuOverlay:".mobile-menu-overlay"},config={};config={blurTimer:{},blurTime:2e3,slideSpeed:300,dropdownActiveClass:"dropdown-hover",subDropdownActiveClass:"sub-dropdown-hover"};var cache={};function init(){cacheSelectors(),initUtilHeader(),bindUtilHeaderEvents(),initHeader(),bindHeaderEvents(),rebuildFixTo()}function cacheSelectors(){cache={$htmlBody:$(selectors.htmlBody),$body:$(selectors.body),$page:$(selectors.page),$section:$(selectors.section),$promosSection:$(selectors.promosSection),$util:$(selectors.util),$header:$(selectors.header),$siteNav:$(selectors.siteNav),$dropdownParent:$(selectors.siteNav).find("li.has-dropdown"),$defaultLink:$(selectors.siteNav).find("> li:not(.has-dropdown)"),$subMenuLinks:$(selectors.siteNav).find("li.has-dropdown a"),$subDropdownParent:$(selectors.siteNav).find("li.has-sub-dropdown"),$search:$(selectors.util).find(".search-wrapper"),$searchLink:$(selectors.util).find("a.search"),$searchClose:$(selectors.util).find("form.search-bar button"),$searchInput:$(selectors.util).find("form.search-bar input"),$menuLink:$(selectors.menuLink),$menuPanel:$(selectors.menuPanel),$menuPanelDropdown:$(selectors.menuPanel).find("li.has-dropdown"),$menuPanelSubDropdown:$(selectors.menuPanel).find("li.has-sub-dropdown")}}function initUtilHeader(){$(selectors.menuOverlay).length||(cache.$section.append('<div class="mobile-menu-overlay"></div>'),cache.$menuOverlay=$(selectors.menuOverlay))}function openSearch(){cache.$search.slideDown({duration:config.slideSpeed,progress:function(){StyleHatch.refreshFixTo()},complete:function(){StyleHatch.refreshFixTo()}}),cache.$searchInput.focus()}function closeSearch(){cache.$searchInput.blur(),clearTimeout(config.blurTimer),cache.$search.slideUp({duration:config.slideSpeed,progress:function(){StyleHatch.refreshFixTo()},complete:function(){StyleHatch.refreshFixTo()}})}function togglePanelMenu(){cache.$body.hasClass("panel-open")?closePanelMenu():openPanelMenu()}function openPanelMenu(){cache.$htmlBody.addClass("panel-open"),window.scrollTo(0,0)}function closePanelMenu(){cache.$htmlBody.removeClass("panel-open")}function bindUtilHeaderEvents(){cache.$searchLink.on("click.search",function(e){openSearch(),e.preventDefault()}),cache.$searchClose.on("click.search",function(e){closeSearch(),e.preventDefault()}),cache.$searchInput.on("blur.search",function(e){config.blurTimer=setTimeout(closeSearch,config.blurTime),e.preventDefault()}),cache.$menuLink.on("click.panel",function(e){togglePanelMenu(),e.preventDefault()}),cache.$menuOverlay.on("click.panel",function(e){togglePanelMenu(),e.preventDefault()}),cache.$menuPanelDropdown.on("click.panelDropdown",function(e){cache.$menuPanelDropdown.find("ul.dropdown").slide
1Up(),cache.$menuPanelDropdown.removeClass("expanded"),$(this).find("ul.dropdown").is(":visible")||($(this).find("ul.dropdown").slideDown(),$(this).addClass("expanded"))}),cache.$menuPanelDropdown.find("> a").on("click.panelDropdown",function(e){e.preventDefault()}),cache.$menuPanelDropdown.find("ul.dropdown li:not(.has-sub-dropdown) a").on("click.panelDropdown",function(e){e.stopPropagation()}),cache.$menuPanelSubDropdown.on("click.panelDropdown",function(e){e.stopPropagation(),cache.$menuPanelSubDropdown.find("ul.sub-dropdown").slideUp(),cache.$menuPanelSubDropdown.removeClass("expanded"),$(this).find("ul.sub-dropdown").is(":visible")||($(this).find("ul.sub-dropdown").slideDown(),$(this).addClass("expanded"))}),cache.$menuPanelSubDropdown.find("> a").on("click.panelDropdown",function(e){e.preventDefault()}),cache.$menuPanelSubDropdown.find("ul.sub-dropdown a").on("click.panelDropdown",function(e){e.stopPropagation()}),cache.$promosSection.resize(StyleHatch.refreshFixTo)}function unbindUtilHeaderEvents(){clearTimeout(config.blurTimer),cache.$searchLink.off("click.search"),cache.$searchClose.off("click.search"),cache.$searchInput.off("blur.search"),cache.$menuLink.off("click.panel"),cache.$menuPanelDropdown.off("click.panelDropdown"),cache.$menuPanelDropdown.find("> a").off("click.panelDropdown"),cache.$menuPanelDropdown.find("ul.dropdown li:not(.has-sub-dropdown) a").off("
1click.panelDropdown"),cache.$menuPanelSubDropdown.off("click.panelDropdown"),cache.$menuPanelSubDropdown.find("> a").off("click.panelDropdown"),cache.$menuPanelSubDropdown.find("ul.sub-dropdown a").off("click.panelDropdown"),cache.$promosSection.removeResize(StyleHatch.refreshFixTo)}function initHeader(){cache.$subMenuLinks.each(function(){var $link=$(this),linkText=$link.text(),linkTextWrapped=wordWrapper(linkText,24,"<br/>\n");$link.html(linkTextWrapped)}),hideDropdown(cache.$dropdownParent)}function showDropdown($el){hideDropdown($("."+config.dropdownActiveClass)),$el.addClass(config.dropdownActiveClass),$el.find(".dropdown").attr("aria-hidden","false"),$el.find(".dropdown a").attr("tabindex","0");var $dropdown=$el.find("ul.dropdown");$dropdown.css({left:"auto"});var dropdownEnd=$dropdown.offset().left+$dropdown.outerWidth(),pageWidth=$(window).width()-20,siteWidth=cache.$header.width(),logoOffset=cache.$header.find(".logo-nav-contain").offset().left;if(siteWidth+40>$(window).width()&&(siteWidth=$(window).width(),logoOffset=-20),pageWidth=siteWidth+logoOffset+1,dropdownEnd>pageWidth){var rightEdge="-"+(dropdownEnd-pageWidth)+"px";$dropdown.css({left:rightEdge})}setTimeout(function(){cache.$body.on("touchstart",function(){hideDropdown($el)})},250)}function hideDropdown($el){$el.removeClass(config.dropdownActiveClass),cache.$body.off("touchstart"),$el.find(".dropdown").attr("aria-hidden","true"),$el.find(".dropdown a").attr("tabindex","-1")}function showSubDropdown($el){hideDropdown($("."+config.subDropdownActiveClass)),$el.addClass(config.subDropdownActiveClass),$el.find(".sub-dropdown").attr("aria-hidden","false"),$el.find(".sub-dropdown a").attr("tabindex","0");var dropdownOffsetEdge=$el.find(".sub-dropdown").offset().left+$el.find(".sub-dropdown").width(),windowWidth=$(window).width();dropdownOffsetEdge>windowWidth?$el.addClass("alternate-align"):$el.removeClass("alternate-align")}function hideSubDropdown($el){$el.removeClass(config.subDropdownActiveClass),$el.removeClass("alternate-align"),$el.find(".sub-dropdown").attr("aria-hidden","true"),$el.find(".sub-dropdown a").attr("tabindex","-1")}function bindHeaderEvents(){cache.$dropdownParent.on("mouseenter.dropdown touchstart.dropdown focusin.dropdown",function(e){var $el=$(this);$el.hasClass(config.dropdownActiveClass)||e.preventDefault(),$el.hasClass(config.dropdownActiveClass)||showDropdown($el)}),cache.$dropdownParent.on("mouseleave.dropdown",function(){hideDropdown($(this))}),cache.$subMenuLinks.on("touchstart.dropdown",function(e){e.stopImmediatePropagation()}),cache.$subDropdownParent.on("mouseenter.subdropdown touchstart.subdropdown focusin.subdropdown",function(e){var $el=$(this);$el.hasClass(config.subDropdownActiveClass)||e.preventDefault(),$el.hasClass(config.subDropdownActiveClass)||showSubDropdown($el)}),cache.$subDropdownParent.on("mouseleave.subdropdown",function(){hideSubDropdown($(this))}),cache.$subDropdownParent.on("touchstart.subdropdown",function(e){e.stopImmediatePropagation()}),cache.$subMenuLinks.on("focusout.dropdown",function(e){e.relatedTarget==null?hideDropdown($("."+config.dropdownActiveClass)):($(e.target).closest("li.has-dropdown")[0]!==$(e.relatedTarget).closest("li.has-dropdown")[0]&&hideDropdown($("."+config.dropdownActiveClass)),$(e.target).closest("li.has-sub-dropdown")[0]!==$(e.relatedTarget).closest("li.has-sub-dropdown")[0]&&hideSubDropdown($("."+config.subDropdownActiveClass)))})}function unbindHeaderEvents(){cache.$dropdownParent.off("mouseenter.dropdown touchstart.dropdown focusin.dropdown"),cache.$dropdownParent.off("mouseleave.dropdown"),cache.$subMenuLinks.off("touchstart.dropdown"),cache.$subDropdownParent.off("mouseenter.subdropdown touchstart.subdropdown focusin.subdropdown"),cache.$subDropdownParent.off("mouseleave.subdropdown"),cache.$subDropdownParent.off("touchstart.subdropdown"),cache.$subMenuLinks.off("focusout.dropdown")}function createFixTo(){var $headerSection=cache.$section,$promosSection=cache.$promosSection,$header=cache.$header,$util=cache.$util,scrollLock=$header.data("scroll-lock");if(scrollLock=="util"||scrollLock=="header"){var mindElements="";$promosSection.data("fixtoInstance")&&(mindElements="#shopify-section-promos"),$util.fixTo("#page",{zIndex:991,mind:mindElements})}if(scrollLock=="header"){var mindElements="header.util";$promosSection.data("fixtoInstance")&&(mindElements="header.util, #shopify-section-promos"),$headerSection.fixTo("#page",{zIndex:990,mind:mindElements}),$headerSection.resize(function(){$(this).width()<=700?$headerSection.fixTo("stop"):$headerSection.fixTo("start")})}}function destroyFixTo(){var $fixToElements=$("header.util, #shopify-section-header").filter(function(){return $(this).data("fixtoInstance")});$fixToElements.length&&$fixToElements.fixTo("destroy")}function rebuildFixTo(){cacheSelectors(),destroyFixTo(),createFixTo()}function unload(){closePanelMenu(),unbindUtilHeaderEvents(),unbindHeaderEvents(),destroyFixTo()}return{init:init,unload:unload,openSearch:openSearch,closeSearch:closeSearch,togglePanelMenu:togglePanelMenu,openPanelMenu:openPanelMenu,closePanelMenu:closePanelMenu,rebuildFixTo:rebuildFixTo}})(),StyleHatch.FooterSection=(function(){function FooterSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id")}return FooterSection})(),StyleHatch.SlideshowSection=(function(){function SlideshowSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.Slideshow.init($container)}return SlideshowSection})(),StyleHatch.SlideshowSection.prototype=_.assignIn({},StyleHatch.SlideshowSection.prototype,{onUnload:function(evt){StyleHatch.Slideshow.unload(evt)},onBlockSelect:function(evt){StyleHatch.Slideshow.blockSelect(evt)},onBlockDeselect:function(evt){StyleHatch.Slideshow.blockDeselect(evt)}}),StyleHatch.Slideshow=(function(){function init($container){var $carousel=$container.find(".slideshow-carousel"),flickityOptions=$carousel.data("flickity-options");$carousel.flickity(flickityOptions);var $videoSlides=$container.find(".slide__item-video");$videoSlides.each(function(){var $slideVideo=$(this).find(".slide__item-image"),videoId=$(this).data("video-id");
1$slideVideo.YTPlayer({fitToBackground:!0,videoId:videoId,repeat:!0,mute:!0,playerVars:{rel:0},callback:function(){$(window).trigger("resize")}})})}function blockSelect(evt){var $block=$("#block-"+evt.detail.blockId),$carousel=$block.closest(".slideshow-carousel"),slideIndex=$block.data("slide-index");$carousel.flickity("pausePlayer"),$carousel.flickity("select",slideIndex,!0,!0)}function blockDeselect(evt){var $block=$("#block-"+evt.detail.blockId),$carousel=$block.closest(".slideshow-carousel");$carousel.flickity("unpausePlayer")}function unload(evt){var $section=$(".slideshow-"+evt.detail.sectionId),$carousel=$section.find(".slideshow-carousel");$carousel.flickity("destroy");var $slideVideo=$section.find(".slide__item-video .slide__item-image");$slideVideo.removeData("yt-init").removeData("ytPlayer").removeClass("loaded"),$(window).off("resize.YTplayer"+$slideVideo.ID),$(window).off("scroll.YTplayer"+$slideVideo.ID),$slideVideo.$body=null,$slideVideo.$node=null,$slideVideo.$YTPlayerString=null,$slideVideo.player=null}return{init:init,unload:unload,blockSelect:blockSelect,blockDeselect:blockDeselect}})(),StyleHatch.HeroVideoSection=(function(){function HeroVideoSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.HeroVideo.init($container)}return HeroVideoSection})(),StyleHatch.HeroVideoSection.prototype=_.assignIn({},StyleHatch.HeroVideoSection.prototype,{onUnload:function(evt){StyleHatch.HeroVideo.unload(evt)}}),StyleHatch.HeroVideo=(function(){function init($container){var $heroVideo=$container.find(".wrapper"),videoId=$container.data("video-id");$heroVideo.removeData("ytPlayer"),$heroVideo.YTPlayer({fitToBackground:!0,videoId:videoId,repeat:!0,mute:!0,playerVars:{rel:0}})}function unload(evt){var $section=$(".slideshow-"+evt.detail.sectionId),$heroVideo=$section.find(".wrapper");$heroVideo.removeData("yt-init").removeData("ytPlayer").removeClass("loaded"),$heroVideo.find(".ytplayer-container .ytplayer-shield").remove()}return{init:init,unload:unload}})(),StyleHatch.PageSection=(function(){function PageSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.Page.init($container)}return PageSection})(),StyleHatch.Page=(function(){function init($container){$container.fitVids()}function unload(evt){}return{init:init,unload:unload}})(),StyleHatch.FeaturedCollectionSection=(function(){function FeaturedCollectionSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id"),$box=$container.find(".box .image-table");$box.matchHeight(),$.fn.matchHeight._throttle=20,$container.imagesLoaded(function(){$.fn.matchHeight._update()}),StyleHatch.productBox(),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init()}return FeaturedCollectionSection})(),StyleHatch.FeaturedCollectionSection.prototype=_.assignIn({},StyleHatch.FeaturedCollectionSection.prototype,{onUnload:function(evt){var $container=$("#section-"+evt.detail.sectionId),id=$container.attr("data-section-id"),$box=$container.find(".box .image-table");$box.matchHeight({remove:!0})}}),StyleHatch.SimpleCollectionSection=(function(){function SimpleCollectionSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id"),$box=$container.find(".box");$box.matchHeight(),$.fn.matchHeight._throttle=20,$container.imagesLoaded(function(){$.fn.matchHeight._update()}),StyleHatch.productBox(),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init()}return SimpleCollectionSection})(),StyleHatch.instagrams={},StyleHatch.InstagramSection=(function(){function InstagramSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id"),instagram=this.instagram="#Instagram-"+id;if($("html").hasClass("lt-ie9"))return!1;var $shotContainer=$container.find(".instagram-container"),$profileLink=$container.find("header a.button, footer a.button"),imageCount=$container.data("image-count"),accessToken=$container.data("instagram-access-token"),apiURL="https://api.instagram.com/v1/users/self/media/recent/?access_token="+accessToken+"&count=20",expireTime=1e3*60*60*12,addAccessToken=StyleHatch.Strings.instagramAddToken,invalidAccessToken=StyleHatch.Strings.instagramInvalidToken,rateLimitAcce
1ssToken=StyleHatch.Strings.instagramRateLimitToken,getData=function(){accessToken?$.ajax({url:apiURL,dataType:"jsonp",timeout:5e3,success:function(data2){switch(data2.meta.code){case 400:$shotContainer.attr("data-helper-text",invalidAccessToken),storeWithExpiration.set(accessToken,data2,expireTime),$container.show();break;case 429:$shotContainer.attr("data-helper-text",rateLimitAccessToken),$container.show();break;default:loadImages(data2),storeWithExpiration.set(accessToken,data2,expireTime)}}}):($shotContainer.attr("data-helper-text",addAccessToken),$container.show())},loadImages=function(data2){if(data2.data){if(data2.data.length<imageCount){var dataCount=data2.data.length,settingsCount=imageCount,lastIndex=settingsCount-(settingsCount-dataCount);imageCount=data2.data.length,$container.find(".box").each(function(i2){i2>=lastIndex&&$(this).hide()})}for(var i=0;i<imageCount;i++){var image=data2.data[i].images.low_resolution.url,thumbnail=data2.data[i].images.thumbnail.url,link=data2.data[i].link,likes=data2.data[i].likes.count,comments=data2.data[i].comments.count,largerThumbnail=thumbnail.replace("s150x150","s480x480"),caption="";data2.data[i].caption&&(caption=data2.data[i].caption.text);var $shot=$container.find(".box-"+i),$shotImageContainer=$shot.find("figure > a"),$shotLinks=$shot.find("figure > a, li > a"),$shotCaption=$shot.find("figcaption > p"),$shotLikes=$shot.find("a.likes span.label"),$shotComments=$shot.find("a.comments span.label");$shotImageContainer.html('<img src="'+largerThumbnail+'" height="230" width="230" alt="'+caption+'">'),$shotLinks.attr("href",link),$shotCaption.html(caption),$shotLikes.text(likes),$shotComments.text(comments)}var instagramFeed="https://www.instagram.com/"+data2.data[0].user.username;$profileLink.attr("href",instagramFeed),$profileLink.attr("target","_blank"),$container.show(),$shotContainer.addClass("loaded")}};if(storeWithExpiration.get(accessToken)){var data=storeWithExpiration.get(accessToken);loadImages(data)}else getData();StyleHatch.instagrams[instagram]=this}return InstagramSection})(),StyleHatch.InstagramSection.prototype=_.assignIn({},StyleHatch.InstagramSection.prototype,{onUnload:function(){delete StyleHatch.instagrams[this.instagram]}}),StyleHatch.GenericSection=(function(){function GenericSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id");StyleHatch.cacheSelectors()}return GenericSection})(),StyleHatch.Product=(function(){function Product(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");this.settings={enableHistoryState:$container.data("enable-history-state")||!1,imageSize:null,imageZoomSize:null,namespace:".slideshow-"+sectionId,sectionId:sectionId,zoomEnabled:!1,lightboxEnabled:!1,productImageLightboxData:[]},this.selectors={addToCart:"#AddToCart-"+sectionId,addToCartText:"#AddToCartText-"+sectionId,comparePrice:"#ComparePrice-"+sectionId,originalPrice:"#ProductPrice-"+sectionId,originalSelectorId:"#ProductSelect-"+sectionId,productFeaturedImage:"#FeaturedImage-"+sectionId,productImageWrap:".featured-container-"+sectionId,productPrices:".product-single__price-"+sectionId,productThumbImages:".product-single__thumbnail--"+sectionId,productThumbs:"#ProductThumbs-"+sectionId,quantityWrap:".quantity-"+sectionId,quantity:".quantity-select-"+sectionId,cartError:".cart-error-"+sectionId,singleOptionSelector:".single-option-selector-"+sectionId},$("#ProductJson-"+sectionId).html()&&(this.productSingleObject=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML),this.settings.zoomEnabled=$(this.selectors.productImageWrap).hasClass("featured-zoom"),this.settings.imageSize=theme.Images.imageSize($(this.selectors.productFeaturedImage).attr("src")),this.settings.lightboxEnabled=$(this.selectors.productImageWrap).data("lightbox"),this.settings.zoomEnabled&&(this.settings.imageZoomSize=theme.Images.imageSize($(this.selectors.productImageWrap).find("a").attr("href"))),StyleHatch.productBox(),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init(),StyleHatch.ajaxCartEnable&&StyleHatch.AjaxCart.init(),this._initVariants(),this._initQuanitySelect(),this._initImageSwitch(),this._setActiveThumbn
1ail(),theme.Images.preload(this.productSingleObject.images,this.settings.imageSize))}Product.prototype=_.assignIn({},Product.prototype,{_initVariants:function(){var options={$container:this.$container,enableHistoryState:this.$container.data("enable-history-state")||!1,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,product:this.productSingleObject};this.variants=new slate.Variants(options),this.$container.on("variantChange"+this.settings.namespace,this._updateAddToCart.bind(this)),this.$container.on("variantImageChange"+this.settings.namespace,this._updateImages.bind(this)),this.$container.on("variantPriceChange"+this.settings.namespace,this._updatePrice.bind(this))},_initQuanitySelect:function(){var $quantitySelect=$(this.selectors.quantity);$quantitySelect.each(function(){var $el=$(this),$quantityDown=$el.find(".adjust-minus"),$quantityUp=$el.find(".adjust-plus"),$quantity=$el.find("input.quantity"),quantity=$quantity.val();$quantityDown.on("click",function(e){quantity=$quantity.val(),quantity>1&&(quantity--,$quantity.val(quantity)),e.preventDefault()}),$quantityUp.on("click",function(e){quantity=$quantity.val(),quantity++,$quantity.val(quantity),e.preventDefault()})})},_initImageSwitch:function(){if(!Modernizr.touchevents&&this.settings.zoomEnabled&&_enableZoom($(this.selectors.productImageWrap)),this.settings.lightboxEnabled){for(var images=this.productSingleObject.images,i=0;i<images.length;i++){var image=theme.Images.getSizedImageUrl(images[i],this.settings.imageZoomSize),obj={src:image};this.settings.productImageLightboxData.push(obj)}var $productImageWrap=$(this.selectors.productImageWrap);$(this.selectors.productImageWrap).find("a").magnificPopup({type:"image",mainClass:"mfp-with-zoom",items:this.settings.productImageLightboxData,gallery:{enabled:!0},callbacks:{beforeOpen:function(e){var imageIndex=parseInt($productImageWrap.find("a").attr("data-position"));this.goTo(imageIndex)}}})}if($(this.selectors.productThumbImages).length){var self=this;$(this.selectors.productThumbImages).on("click",function(evt){evt.preventDefault();var $el=$(this),imageSrc=$el.find("img").data("img"),zoomSrc=$el.find("img").data("highres");self._switchImage(imageSrc,zoomSrc),self._setActiveThumbnail(imageSrc)})}},_setActiveThumbnail:function(src){var activeClass="active";typeof src=="undefined"&&(src=$(this.selectors.productFeaturedImage).attr("src"));var $thumbnail=$(this.selectors.productThumbImages+' img[data-img="'+src+'"]');$(this.selectors.productThumbImages).removeClass(activeClass),$thumbnail.parent().addClass(activeClass);var position=$thumbnail.data("position");$(this.selectors.productImageWrap).find("a").attr("data-position",position)},_switchImage:function(image,zoomImage){$(this.selectors.productFeaturedImage).attr("src",image),$(this.selectors.productImageWrap).find("a").attr("href",zoomImage),this.settings.zoomEnabled&&_destroyZoom($(this.selectors.productImageWrap)),!Modernizr.touchevents&&this.settings.zoomEnabled&&zoomImage&&($(this.selectors.productImageWrap).data("zoom",zoomImage),_enableZoom($(this.selectors.productImageWrap)))},_updateAddToCart:function(evt){var variant=evt.variant;variant?($(this.selectors.cartError).hide(),$(this.selectors.productPrices).removeClass("visibility-hidden").attr("aria-hidden","true"),variant.available?($(this.selectors.addToCart).removeClass("disabled").prop("disabled",!1),$(this.selectors.addToCartText).text(StyleHatch.Strings.addToCart),$(this.selectors.quantityWrap).show()):($(this.selectors.addToCart).addClass("disabled").prop("disabled",!0),$(this.selectors.addToCartText).text(StyleHatch.Strings.soldOut),$(this.selectors.quantityWrap).hide())):($(this.selectors.addToCart).addClass("disabled").prop("disabled",!0),$(this.selectors.addToCartText).text(StyleHatch.Strings.soldOut),$(this.selectors.productPrices).addClass("visibility-hidden").attr("aria-hidden","false"),$(this.selectors.quantityWrap).hide())},_updateImages:function(evt){var variant=evt.variant,sizedImgUrl=theme.Images.getSizedImageUrl(variant.featured_image.src,this.settings.imageSize),zoomSizedImgUrl;this.settings.zoomEnabled&&(zoomSizedImgUrl=theme.Images.getSizedImageUrl(variant.featured_image.src,this.settings.imageZoomSize)),this._switchImage(sizedImgUrl,zoomSizedImgUrl),this._setActiveThumbn
1ail(sizedImgUrl)},_updatePrice:function(evt){var variant=evt.variant;$(this.selectors.originalPrice).html(theme.Currency.formatMoney(variant.price,StyleHatch.currencyFormat)),StyleHatch.currencyConverter&&(removeDataAttributes($(this.selectors.originalPrice)),Currency.convertAll(StyleHatch.shopCurrency,$("[name=currencies]").val()),$(".selected-currency").text(Currency.currentCurrency)),variant.compare_at_price>variant.price?($(this.selectors.comparePrice).find("span.money").html(theme.Currency.formatMoney(variant.compare_at_price,StyleHatch.currencyFormat)),$(this.selectors.comparePrice).show()):$(this.selectors.comparePrice).hide()},onUnload:function(){this.$container.off(this.settings.namespace),$.magnificPopup.close(),this.settings.zoomEnabled&&_destroyZoom($(this.selectors.productImageWrap)),StyleHatch.ajaxCartEnable&&StyleHatch.AjaxCart.unload()}});function _enableZoom($el){var $easyzoom=$el.easyZoom()}function _destroyZoom($el){var easyZoomApi=$el.easyZoom().data("easyZoom");easyZoomApi.teardown()}return Product})(),StyleHatch.Collection=(function(){var constants={SORT_BY:"sort_by",DEFAULT_SORT:"title-ascending",VIEW:"view"},selectors={sortSelection:"#SortBy",defaultSort:".sort-by__default-sort",viewChange:".change-view",advancedFilter:".advanced-filter a",filterCollection:".mobile-aside-container > a.button.simple",mobileAside:".mobile-aside-container aside",productBox:".box.product .image-table"};function Collection(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");this.$sortSelect=$(selectors.sortSelection,$container),this.defaultSort=this._getDefaultSortValue(),this.$viewButton=$(selectors.viewChange),this.$sortSelect.on("change",this._onSortChange.bind(this)),this.$viewButton.on("click",this._onViewChange),this.$productbox=$(selectors.productBox,$container),this._initMatchHeight(),this._initSidebar(),this._initAdvancedTags(),StyleHatch.productBox(),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init()}return Collection.prototype=_.assignIn({},Collection.prototype,{_onSortChange:function(evt){var query="";this.sort=this._getSortValue(),this.sort!==this.defaultSort&&(query=[constants.SORT_BY+"="+this.sort]);var url=document.URL,hasParams=url.indexOf("?")>-1;if(hasParams)document.location.href=replaceUrlParam(url,constants.SORT_BY,this.sort);else{var search=document.location.search=query.length?"?"+query:"";document.location.href=this.$filterSelect.val()+search}},_getSortValue:function(){return this.$sortSelect.val()||this.defaultSort},_getDefaultSortValue:function(){return $(selectors.defaultSort,this.$container).val()||constants.DEFAULT_SORT},_onViewChange:function(evt){var query="",view=$(this).data("view"),url=document.URL,hasParams=url.indexOf("?")>-1;hasParams?document.location.href=replaceUrlParam(url,"view",view):document.location.href=url+"?"+constants.DEFAULT_SORT+"="+view,evt.preventDefault()},_initSidebar:function(){$(selectors.filterCollection).on("click",function(e){$(selectors.mobileAside).slideToggle(),e.preventDefault()})},_initAdvancedTags:function(){var $filters=$(selectors.advancedFilter),$tag,tagGroup,tagHandle,$activeTagInGroup;$filters.on("click",function(e){$tag=$(this).parent(),tagGroup=$tag.data("group"),tagHandle=$tag.data("handle"),$activeTagInGroup=$('.active[data-group="'+tagGroup+'"]'),!$tag.hasClass("active")&&$activeTagInGroup.size()&&(e.preventDefault(),location.href=location.href.replace($activeTagInGroup.data("handle"),tagHandle).replace(/(&page=\d+)|(page=\d+&)|(\?page=\d+$)/,""))})},_initMatchHeight:function(){this.$productbox.matchHeight(),$.fn.matchHeight._throttle=20,this.$container.imagesLoaded(function(){$.fn.matchHeight._update()})},_destroyMatchHeight:function(){this.$productbox.matchHeight({remove:!0})},onUnload:function(){this.$sortSelect.off("change"),this.$viewButton.off("click"),$(selectors.advancedFilter).off("click"),this._destroyMatchHeight()}}),Collection})(),StyleHatch.ListCollections=(function(){var selectors={productBox:".box .image-table"};function ListCollections(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),layout=$container.data("layout");this.$productbox=$(selectors.productBox,$container),this._initMatchHeight(),layout=="preview"&&StyleHatch.productBox(),StyleHatch.currencyConverter&&StyleHatch.CurrencyConverter.init()}return ListCollections.prototype=_.assignIn({},ListCollections.prototype,{_initMatchHeight:function(){this.$productbox.matchHeight(),$.fn.matchHeight._throttle=20,this.$container.imagesLoaded(function(){$.fn.matchHeight._update()})},_destroyMatchHeight:function(){this.$productbox.matchHeight({remove:!0})},onUnload:function(){this._destroyMatchHeight()}}),ListCollections})(),StyleHatch.BlogArticle=(function(){var selectors={filterCollection:".mobile-aside-container > a.button.simple",mobileAside:".mobile-aside-container aside"};function BlogArticle(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");this._initSidebar(),StyleHatch.videoLayout()}return BlogArticle.prototype=_.assignIn({},BlogArticle.prototype,{_initSidebar:function(){$(selectors.filterCollection).on("click",function(e){$(selectors.mobileAside).slideToggle(),e.preventDefault()})},onUnload:function(){$(selectors.filterCollection).off("click")}}),BlogArticle})(),StyleHatch.Password=(function(){function Password(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),$loginForm=$("#login_form");$(".login-popup").magnificPopup({type:"inline",midClick:!0,mainClass:"mfp-fade",closeBtnInside:!1,callbacks:{afterClose:function(){$("a").blur(),$loginForm.find(".errors").remove()}}}),$("#mc-embedded-subscribe-form").on("submit",function(){$("p.signup-message").hide(),$("p.thanks-message").show(),$(this).find(".input-row").hide()}),$loginForm.find(".errors").length>0&&$(".login-popup").magnificPopup("open")}return Password.prototype=_.assignIn({},Password.prototype,{onUnload:function(){$.magnificPopup.close(),$("#mc-embedded-subscribe-form").off("submit")}}),Password})(),StyleHatch.Cart=(function(){function Cart(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");StyleHatch.quantitySelect()}return Cart.prototype=_.assignIn({},Cart.prototype,{onUnload:function(){}}),Cart})(),StyleHatch.AjaxCart=(function(){var selectors={body:"body",util:"header.util",cartPreview:"header.util .cart-preview",addToCartForm:"#AddToCartForm",addToCartButton:"#AddToCartForm",cartButton:"#CartButton",cartCount:"#CartCount",cartCost:"#CartCost"},config={addURL:"/cart/add.js",cartURL:"/cart.js",clearURL:"/cart/clear.js"},cache={};function cacheSelectors(){cache={$body:$(selectors.body),$util:$(selectors.util),$cartPreview:$(selectors.cartPreview),$addToCartForm:$(selectors.addToCartForm),$addToCartButton:$(selectors.addToCartButton),$cartButton:$(selectors.cartButton),$cartCount:$(selectors.cartCount),$cartCost:$(selectors.cartCost)}}
1function init(){cacheSelectors(),bindEvents()}function submitCart($form){var $form=$form,$cartError=$form.find(".cart-error"),cartButtonText=$("#AddToCartText").html(),cartButtonAddedText=$("#AddToCartText").attr("data-added"),cartButtonAddingText=$("#AddToCartText").attr("data-adding");return cache.$addToCartButton.addClass("added").prop("disabled",!0),$("#AddToCartText").html(cartButtonAddingText),$cartError.hide(),$.post(config.addURL,$form.serialize(),function(data){var productData=data;$.get(config.cartURL,function(data2){var cartData=data2;updateCartButton(cartData),showCartPreview(productData,cartData);var resetCartButton;resetCartButton=setTimeout(function(){cache.$addToCartButton.removeClass("added").prop("disabled",!1),$("#AddToCartText").html(cartButtonText)},500)},"json")},"text").error(function(data){if(typeof data!="undefined"&&typeof data.status!="undefined"){var responseText=JSON.parse(data.responseText);$cartError.html("<strong>"+responseText.message+":</strong> <em>"+responseText.description+"<em>"),$cartError.slideDown()}var resetCartButton;resetCartButton=setTimeout(function(){cache.$addToCartButton.removeClass("added").prop("disabled",!1),$("#AddToCartText").html(cartButtonText)},500)}),!1}function clearCart(){$.post(config.clearURL)}function updateCartButton(cartData){var $cartButton=cache.$cartButton,$cartCount=cache.$cartCount,$cartCost=cache.$cartCost,itemCount=cartData.item_count,totalPrice=theme.Currency.formatMoney(cartData.total_price,StyleHatch.currencyFormat);$cartCount.text(itemCount),$cartCost.removeClass("money"),$cartCost.html('<span class="money">'+totalPrice+"</span>"),StyleHatch.currencyConverter&&Currency.convertAll(StyleHatch.shopCurrency,jQuery("[name=currencies]").val())}function showCartPreview(productData,cartData){var $util=cache.$util,$cartPreview=cache.$cartPreview;clearTimeout(cache.hideCartPreview),cache.$cartPreview.hide();var itemCount=cartData.item_count,totalPrice=theme.Currency.formatMoney(cartData.total_price,StyleHatch.currencyFormat),productData=JSON.parse(productData),productTitle=productData.product_title,productVariant=productData.variant_options,productImage=productData.image,productURL=productData.url,productPrice=theme.Currency.formatMoney(productData.price,StyleHatch.currencyFormat),productQuantity=productData.quantity,productTotal=theme.Currency.formatMoney(productData.line_price,StyleHatch.currencyFormat),$productImage=$cartPreview.find(".product-image").empty();$productImage.append('<img src="'+productImage+'" alt="'+productTitle+'">'),$productImage.attr("href",productURL);var $productTitle=$cartPreview.find(".product-title");$productTitle.html(productTitle),$productTitle.attr("href",productURL);var $productVarient=$cartPreview.find(".product-variant").empty();$.each(productVariant,function(){var variantStr=this;variantStr.toLowerCase().indexOf("default title")<0?($productVarient.show(),$productVarient.append("<li>"+variantStr+"</li>")):$productVarient.hide()});var $productPrice=$cartPreview.find(".product-price");$productPrice.removeClass("money"),$productPrice.html('<span class="money">'+productPrice+"</span>");var $itemCount=$cartPreview.find(".item-count");$itemCount.text(itemCount),itemCount>1?($cartPreview.find(".count.plural").show(),$cartPreview.find(".count.singular").hide()):($cartPreview.find(".count.plural").hide(),$cartPreview.find(".count.singular").show());var $totalPrice=$cartPreview.find(".total-price");$totalPrice.html('<span class="money">'+totalPrice+"</span>");var utilHeight=$util.height();$cartPreview.css({top:utilHeight}),$cartPreview.fadeIn(300),cache.hideCartPreview=setTimeout(function(){$cartPreview.fadeOut(300)},6e3),$cartPreview.find("a.continue-shopping").on("click",function(e){$cartPreview.fadeOut(300),e.preventDefault()}),StyleHatch.currencyConverter&&Currency.convertAll(StyleHatch.shopCurrency,jQuery("[name=currencies]").val())}function bindEvents(){cache.$addToCartForm.on("submit",function(e){var $form=$(this);submitCart($form),e.preventDefault()})}function unbindEvents(){cache.$addToCartForm.off("submit")}function unload(){unbindEvents(),clearTimeout(cache.hideCartPreview),cache.$cartPreview.hide()}return{init:init,clearCart:clearCart,unload:unload}})(),StyleHatch.CurrencyConverter=(function(){var selectors={body:"body",money:"span.money"},config={enabled:!1},cache={};function cacheSelectors(){cache={$body:$(selectors.body),$money:$(selectors.money)}}
1function init(){cacheSelectors(),convert()}function convert(){config.cookieCurrency=Currency.cookie.read(),$("span.money span.money").each(function(){$(this).parents(selectors.money).removeClass("money")}),cache.$money.each(function(){Currency.currentCurrency!==""?$(this).attr("data-currency-"+Currency.currentCurrency,$(this).html()):$(this).attr("data-currency-"+StyleHatch.shopCurrency,$(this).html())}),config.cookieCurrency==null?StyleHatch.shopCurrency!==StyleHatch.defaultCurrency?Currency.convertAll(StyleHatch.shopCurrency,StyleHatch.defaultCurrency):Currency.currentCurrency=StyleHatch.defaultCurrency:$("[name=currencies]").size()&&$("[name=currencies] option[value="+config.cookieCurrency+"]").size()===0?(Currency.currentCurrency=StyleHatch.shopCurrency,Currency.cookie.write(StyleHatch.shopCurrency)):config.cookieCurrency===StyleHatch.shopCurrency?Currency.currentCurrency=StyleHatch.shopCurrency:Currency.convertAll(StyleHatch.shopCurrency,config.cookieCurrency),$("[name=currencies]").val(Currency.currentCurrency).change(function(){var newCurrency=$(this).val();Currency.convertAll(Currency.currentCurrency,newCurrency),$(".selected-currency").text(Currency.currentCurrency)}),$(".selected-currency").text(Currency.currentCurrency)}return{init:init,config:config,convert:convert}})(),window.theme=window.theme||{},window.slate=window.slate||{},theme.Images=(function(){function preload(images,size){typeof images=="string"&&(images=[images]);for(var i=0;i<images.length;i++){var image=images[i];this.loadImage(this.getSizedImageUrl(image,size))}}function loadImage(path){new Image().src=path}function switchImage(image,element,callback){var size=this.imageSize(element.src),imageUrl=this.getSizedImageUrl(image.src,size);callback?callback(imageUrl,image,element):element.src=imageUrl}function imageSize(src){var match=src.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return match!==null?match[1]:null}function getSizedImageUrl(src,size){if(size==null)return src;if(size==="master")return this.removeProtocol(src);var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];return this.removeProtocol(prefix[0]+"_"+size+suffix)}return null}function removeProtocol(path){return path.replace(/http(s)?:/,"")}return{preload:preload,loadImage:loadImage,switchImage:switchImage,imageSize:imageSize,getSizedImageUrl:getSizedImageUrl,removeProtocol:removeProtocol}})(),theme.Currency=(function(){var moneyFormat="$";function formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));var value="",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(precision=precision||2,thousands=thousands||",",decimal=decimal||".",isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break}return formatString.replace(placeholderRegex,value)}return{formatMoney:formatMoney}})(),slate.utils={findInstance:function(array,key,value){for(var i=0;i<array.length;i++)if(array[i][key]===value)return array[i]},removeInstance:function(array,key,value){for(var i=array.length;i--;)if(array[i][key]===value){array.splice(i,1);break}return array},compact:function(array){for(var index=-1,length=array==null?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}},slate.Variants=(function(){function Variants(options){this.$container=options.$container,this.product=options.product,this.singleOptionSelector=options.singleOptionSelector,this.originalSelectorId=options.originalSelectorId,this.enableHistoryState=options.enableHistoryState,this.currentVariant=this._getVariantFromOptions(),$(this.singleOptionSelector,this.$container).on("change",this._onSelectChange.bind(this))}return Variants.prototype=$.extend({},Variants.prototype,{_getCurrentOptions:function(){var currentOptions=$.map($(this.singleOptionSelector,this.$container),function(element){var $element=$(element),type=$element.attr("type"),currentOption={};return type==="radio"||type==="checkbox"?$element[0].checked?(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption):!1:(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption)});return currentOptions=slate.utils.compact(currentOptions),currentOptions},_getVariantFromOptions:function(){var selectedValues=this._getCurrentOptions(),variants=this.product.variants,found=!1;
1return variants.forEach(function(variant){var satisfied=!0,options=variant.options;selectedValues.forEach(function(option){satisfied&&(satisfied=option.value===variant[option.index])}),satisfied&&(found=variant)}),found||null},_onSelectChange:function(){var variant=this._getVariantFromOptions();this.$container.trigger({type:"variantChange",variant:variant}),variant&&(this._updateMasterSelect(variant),this._updateImages(variant),this._updatePrice(variant),this.currentVariant=variant,this.enableHistoryState&&this._updateHistoryState(variant))},_updateImages:function(variant){var variantImage=variant.featured_image||{},currentVariantImage=this.currentVariant.featured_image||{};!variant.featured_image||variantImage.src===currentVariantImage.src||this.$container.trigger({type:"variantImageChange",variant:variant})},_updatePrice:function(variant){variant.price===this.currentVariant.price&&variant.compare_at_price===this.currentVariant.compare_at_price||this.$container.trigger({type:"variantPriceChange",variant:variant})},_updateHistoryState:function(variant){if(!(!history.replaceState||!variant)){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant.id;window.history.replaceState({path:newurl},"",newurl)}},_updateMasterSelect:function(variant){$(this.originalSelectorId,this.$container)[0].value=variant.id}}),Variants})(),StyleHatch.refreshFixTo=function(){StyleHatch.Promos.refreshFixTo();var $fixToElements=$("*").filter(function(){return $(this).data("fixtoInstance")});$fixToElements.each(function(i){$(this).data("fixto-instance")._running&&$(this).fixTo("refresh")})},StyleHatch.videoLayout=function(){$(".rte").fitVids()},StyleHatch.loginForms=function(){function showRecoverPasswordForm(){StyleHatch.cache.$recoverPasswordForm.show(),StyleHatch.cache.$customerLoginForm.hide()}function hideRecoverPasswordForm(){StyleHatch.cache.$recoverPasswordForm.hide(),StyleHatch.cache.$customerLoginForm.show()}StyleHatch.cache.$recoverPasswordLink.on("click",function(evt){evt.preventDefault(),showRecoverPasswordForm(),StyleHatch.updateHash("recover")}),StyleHatch.cache.$hideRecoverPasswordLink.on("click",function(evt){evt.preventDefault(),hideRecoverPasswordForm(),StyleHatch.updateHash()}),StyleHatch.getHash()=="#recover"&&showRecoverPasswordForm()},StyleHatch.productBox=function(){var $productBox=$(".box.product figure");$productBox.on("click",function(e){if(!($(e.target).is(".vendor")||$(e.target).parent().is(".vendor"))){e.preventDefault();var productURL=$(this).find("a").attr("href");e.shiftKey||e.ctrlKey||e.metaKey?window.open(productURL,"_blank"):window.location=productURL}})},StyleHatch.initTemplates=function(){var $body=StyleHatch.cache.$body,template=$.grep($body.attr("class").split(" "),function(v,i){return v.indexOf("template")===0}).join();template==="template-customers-addresses"&&StyleHatch.initCustomerAddressTemplate()},StyleHatch.initCustomerAddressTemplate=function(){if(StyleHatch.addressJSValidation){var $submit=$('.customer-address input[type="submit"]');$submit.on("click",function(e){var $form=$(this).closest("form"),$lastName=$form.find('input[name="address[last_name]"]'),$address1=$form.find('input[name="address[address1]"]'),$city=$form.find('input[name="address[city]"]'),$country=$form.find('select[name="address[country]"]'),$province=$form.find('select[name="address[province]"]'),$zip=$form.find('input[name="address[zip]"]');$lastName.val()||$lastName.addClass("required"),$address1.val()||$address1.addClass("required"),$city.val()||$city.addClass("required"),$country.val()=="---"&&$country.addClass("required"),$province.closest(".input-row").is(":visible")&&(!$province.val()||$province.val()=="---"||$province.val()=="")&&$province.addClass("required"),$zip.val()||$zip.addClass("required");var $required=$form.find("input.required, select.required");$required.on("focus",function(){$(this).removeClass("required")}),$required.length>0?($form.find("div.errors").parent().show(),e.preventDefault()):$form.find("div.errors").parent().hide()})}},StyleHatch.updateHash=function(hash){hash?(window.location.hash="#"+hash,$("#"+hash).attr("tabindex",-1).focus()):window.location.hash=""},StyleHatch.getHash=function(){return window.location.hash},StyleHatch.quantitySelect=function(){var $quantitySelect=$(".quantity-select");$quantitySelect.each(function(){var $el=$(this),$quantityDown=$el.find(".adjust-minus"),$quantityUp=$el.find(".adjust-plus"),$quantity=$el.find("input.quantity"),quantity=$quantity.val();$quantityDown.on("click",function(e){quantity=$quantity.val(),quantity>1&&(quantity--,$quantity.val(quantity)),e.preventDefault()}),$quantityUp.on("click",function(e){quantity=$quantity.val(),quantity++,$quantity.val(quantity),e.preventDefault()})})},StyleHatch.resetPasswordSuccess=function(){StyleHatch.cache.$passwordResetSuccess.show()},StyleHatch.init()})();
2//# sourceMappingURL=/cdn/shop/t/9/assets/district.js.map?v=36486433151790067181571875573

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.