PageSourceSearch

https://www.thegiftedtype.com/cdn/shop/t/41/compiled_assets/scripts.js?v=98559651995932147101764714645

js thegiftedtype.com collected 2026-10-08 23:22:55 UTC 12,392 bytes, 2 lines download raw bytes

1(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");i<s.length;i++)__sections__[s[i]]=!0})(),(function(){if(!(!__sections__["pxu-highlights-banner"]&&!Shopify.designMode))try{const{Section,Carousel}=window.PxuThemeSections;class HighlightsBannerSection extends Section{constructor($root){super($root),this.$root=$root,this.id=$root.id,this.data=this.loadData(),this.carousel=null,this.onMount()}onMount(){this.data.hasSlider&&(this.carousel=new Carousel(this.$root,{draggable:!0,cellAlign:"left"}),setTimeout(()=>{this.carousel.onMount()},100))}onUnmount(){this.carousel&&(this.carousel.onUnmount(),this.carousel=null)}onBlockSelect(event){if(!this.data.hasSlider||!this.carousel)return;const $slide=event.target.parentElement;this.carousel.selectSlide($slide)}}document.querySelectorAll("[data-pxu-highlights-banner]").forEach($section=>{Section.init($section,HighlightsBannerSection)}),Shopify.designMode&&(window.PxuThemeSections.HighlightsBannerSection=HighlightsBannerSection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-menu-list"]&&!Shopify.designMode))try{const{Section}=window.PxuThemeSections;class MenuListSection extends Section{constructor($root){super($root),this.$root=$root,this.id=$root.id,this.data=this.loadData(),this.menus=this.$root.querySelectorAll("[data-pxu-menu-list-block]"),this.onMount()}onMount(){this.initEventListeners()}onUnmount(){this.events.unregisterAll()}initEventListeners(){this.menus.forEach(el=>{const trigger=el.querySelector("[data-pxu-menu-list-toggle]");if(trigger){const overflowList=el.querySelector("[data-pxu-menu-list-overflow]");this.events.register(trigger,"click",e=>this.handleToggle(overflowList)),this.events.register(overflowList,"transitionend",e=>{e.currentTarget.toggleAttribute("data-animating",!1)})}const mobileTriggers=el.querySelectorAll("[data-pxu-menu-list-toggle-mobile]"),list=el.querySelector("[data-pxu-menu-list-content]");list.querySelector("li")&&(mobileTriggers.forEach(mobileTrigger=>{this.events.register(mobileTrigger,"click",e=>this.handleMobileToggle(e.currentTarget,list))}),this.events.register(list,"transitionend",e=>{e.currentTarget.toggleAttribute("data-animating",!1)}))})}handleToggle(overflowList){let animateTo="data-hidden",animateFrom="data-shown";if(overflowList.setAttribute("data-animating",!0),overflowList.hasAttribute("data-hidden")){animateTo="data-shown",animateFrom="data-hidden";let height=overflowList.scrollHeight;overflowList.style.setProperty("--pxu-hidden-menu-list-height",`${height}px`)}overflowList.toggleAttribute(animateTo,!0),overflowList.toggleAttribute(animateFrom,!1)}handleMobileToggle(target,list){this.handleToggle(list);const menu=target.closest("[data-pxu-menu-list-menu-wrapper]");menu.querySelector(".pxu-menu-list__icon").toggleAttribute("data-closed"),menu.querySelector(".pxu-menu-list__icon").toggleAttribute("data-open")}}document.querySelectorAll("[data-pxu-menu-list]").forEach($section=>{Section.init($section,MenuListSection)}),Shopify.designMode&&(window.PxuThemeSections.MenuListSection=MenuListSection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-mosaic"]&&!Shopify.designMode))try{const{Section,Carousel}=window.PxuThemeSections;class MosaicSection extends Section{constructor($root){super($root),this.$root=$root,this.id=$root.id,this.data=this.loadData(),this.carousel=null,this.onMount()}onMount(){this.data.hasSlider&&(this.carousel=new Carousel(this.$root,{draggable:!0}),setTimeout(()=>{this.carousel.onMount()},100))}onUnmount(){this.carousel&&(this.carousel.onUnmount(),this.carousel=null)}onBlockSelect(event){if(!this.data.hasSlider||!this.carousel)return;const $slide=event.target.parentElement;this.carousel.selectSlide($slide)}}document.querySelectorAll("[data-pxu-mosaic]").forEach($section=>{Section.init($section,MosaicSection)}),Shopify.designMode&&(window.PxuThemeSections.MosaicSection=MosaicSection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-scrolling-images"]&&!Shopify.designMode))try{let debounce2=function(func,wait){let timeout;return function(...args){clearTimeout(timeout),timeout=setTimeout(()=>func.apply(this,args),wait)}};var debounce=debounce2;class ScrollingImages extends HTMLElement{constructor(){super(),this.paused=!1}connectedCallback(){this.scrollingImageContent=this.querySelectorAll("[data-scrolling-image-content]"),this.scrollingImageContent.length&&(this.pauseOnHover=this.getAttribute("pause-on-hover")==="true",this.#initScroll(),this.#handleResize(),this.#setupTouchClick())}disconnectedCallback(){this.observer&&(this.observer.unobserve(this),this.observer=null),this.ro&&(this.ro.unobserve(this),this.ro=null)}#handleResize(){this.ro||(this.ro=new ResizeObserver(debounce2(()=>{this.#initScroll()},50)),this.ro.observe(this))}#initScroll(){this.scrollingImageContent.forEach(el=>{const isDesktop=window.matchMedia("(min-width: 480px)").matches,imageGap=parseInt(isDesktop?this.getAttribute("image-gap-desktop"):this.getAttribute("image-gap-mobile"),10),marqueeItems=el.querySelectorAll("[data-scrolling-image-content-item]:not([data-is-clone])"),width=el.offsetWidth;let totalItemWidth=[...marqueeItems].reduce((total,item)=>{const itemWidth=parseInt(isDesktop?item.dataset.desktopWidth:item.dataset.mobileWidth,10);return total+(itemWidth+imageGap)},0);totalItemWidth>0&&(totalItemWidth-=imageGap);const numImageGroups=Math.max(2,Math.ceil(width*1.5/Math.max(totalItemWidth,1))),existingClones=el.querySelectorAll('[data-is-clone="true"]'),currentCloneGroups=existingClones.length/marqueeItems.length;if(Math.floor(currentCloneGroups)!==numImageGroups-1){existingClones.forEac
1h(clone=>clone.remove());for(let i=1;i<numImageGroups;i++)marqueeItems.forEach(item=>{const clone=item.cloneNode(!0);clone.setAttribute("data-is-clone","true"),el.appendChild(clone)})}if(numImageGroups>1){const adjustedDuration=parseFloat(getComputedStyle(this).getPropertyValue("--duration"))*numImageGroups;el.style.setProperty("--duration",`${adjustedDuration}s`)}}),this.observer||this.#observeAnimations()}#observeAnimations(){this.observer=new IntersectionObserver(([entry])=>{const{isIntersecting}=entry;this.classList.toggle("scrolling-images--is-animated",isIntersecting)}),this.observer.observe(this)}#setupTouchClick(){!window.matchMedia("(pointer: coarse)").matches||!this.pauseOnHover||this.addEventListener("click",e=>{this.paused=!this.paused,this.scrollingImageContent.forEach(el=>{el.style.animationPlayState=this.paused?"paused":"running"})})}}customElements.define("scrolling-images",ScrollingImages)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-scrolling-text"]&&!Shopify.designMode))try{const{Section}=window.PxuThemeSections,{debounce}=window.PxuUtils;class ScrollingTextSection extends Section{constructor($root){super($root),this.$root=$root,this.id=$root.id,this.data=this.loadData(),this.contentItems=this.$root.querySelectorAll("[data-scrolling-text-content]"),this.onMount()}onMount(){this._initScroll()}_initScroll(){this.contentItems.forEach(el=>{const textItems=el.querySelectorAll("[data-scrolling-text-content-item]"),width=el.offsetWidth,totalItemWidth=[...textItems].reduce((total,item)=>total+item.offsetWidth,0),numItems=Math.ceil(width/totalItemWidth);for(let i=0;i<numItems;i++)textItems.forEach(item=>{const clone=item.cloneNode(!0);el.appendChild(clone)})}),this._observeAnimations()}_observeAnimations(){this.observer=new IntersectionObserver(debounce(([entry])=>{const{isIntersecting}=entry;this.$root.classList.toggle("pxu-scrolling-text--is-animated",isIntersecting)},100)),this.observer.observe(this.$root)}onUnmount(){this.observer.unobserve(this.$root)}}document.querySelectorAll("[data-pxu-scrolling-text]").forEach($section=>{Section.init($section,ScrollingTextSection)}),Shopify.designMode&&(window.PxuThemeSections.ScrollingTextSection=ScrollingTextSection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-shoppable-image"]&&!Shopify.designMode))try{const{Section}=window.PxuThemeSections,{debounce}=window.PxuUtils;class Hotspot{OPEN_CLASS="pxu-shoppable-image__hotspot--open";CLOSE_CLASS="pxu-shoppable-image__hotspot--closed";constructor($el){this.$hotspot=$el,this.$pin=$el.querySelector("[data-pxu-shoppable-image-pin]"),this.isOpen=!1}open(){this.isOpen=!0,this.$hotspot.classList.add(this.OPEN_CLASS)}close(){this.isOpen=!1,this.$hotspot.classList.remove(this.OPEN_CLASS),this.$hotspot.classList.add(this.CLOSE_CLASS),setTimeout(()=>{this.$hotspot.classList.remove(this.CLOSE_CLASS)},2e3)}}class ShoppableImageSection extends Section{PIN_WIDTH=30;constructor($root){super($root),this.$root=$root,this.$interface=this.query("[data-pxu-shoppable-image-interface]"),this.$hotspots=this.queryAll("[data-pxu-shoppable-image-hotspot]"),this.$tooltips=this.queryAll("[data-pxu-shoppable-image-tooltip]"),this.hotspots=[...this.$hotspots].map($el=>new Hotspot($el)),this.id=$root.id,this.data=this.loadData(),this.onMount()}onMount(){this.initEventListeners(),this.updateTooltipVw(),this.updateHotspotAxes()}onUnmount(){this.events.unregisterAll()}initEventListeners(){this.hotspots.forEach(hotspot=>{this.events.register(hotspot.$hotspot,"focusout",e=>{this.handleHotspotFocusOut(e,hotspot)}),this.events.register(hotspot.$pin,"click",e=>this.handlePinClick(e,hotspot))}),this.events.register(window,"resize",debounce(()=>{this.updateTooltipVw(),this.updateHotspotAxes()},200))}handlePinClick(event,hotspot){this.toggleTooltip(hotspot)}handleHotspotFocusOut(event,hotspot){hotspot.$hotspot.contains(event.relatedTarget)||(hotspot.$pin.dataset.timer=setTimeout(()=>{hotspot.close()},0))}updateTooltipVw(){this.$tooltips.forEach($tooltip=>{const vw=this.$root.offsetWidth;$tooltip.style.setProperty("--pxu-100vw",`${vw}px`)}
1)}updateHotspotAxes(){this.$hotspots.forEach($hotspot=>{let hAxis=$hotspot.style.getPropertyValue("--pxu-section-horizontal-axis-base");const interfaceWidth=this.$interface.offsetWidth,pinWidth=this.PIN_WIDTH,subAreaWidthFactor=(interfaceWidth-pinWidth)/interfaceWidth;hAxis=hAxis*subAreaWidthFactor;let vAxis=$hotspot.style.getPropertyValue("--pxu-section-vertical-axis-base");const interfaceHeight=this.$interface.offsetHeight,pinHeight=this.PIN_WIDTH,subAreaHeightFactor=(interfaceHeight-pinHeight)/interfaceHeight;vAxis=vAxis*subAreaHeightFactor,$hotspot.style.setProperty("--pxu-section-horizontal-axis",hAxis),$hotspot.style.setProperty("--pxu-section-vertical-axis",vAxis)})}toggleTooltip(hotspot){hotspot.isOpen?(hotspot.$pin.blur(),hotspot.close()):(this.closeAllHotspots(),hotspot.open())}closeAllHotspots(){this.hotspots.forEach(hotspot=>hotspot.close())}onBlockSelect(event){const{blockId}=event.detail,hotspot=this.hotspots.find(hotspot2=>hotspot2.$hotspot.id===blockId);hotspot&&hotspot.open()}onBlockDeselect(event){const{blockId}=event.detail,hotspot=this.hotspots.find(hotspot2=>hotspot2.$hotspot.id===blockId);hotspot&&hotspot.close()}}document.querySelectorAll("[data-pxu-shoppable-image]").forEach($section=>{Section.init($section,ShoppableImageSection)}),Shopify.designMode&&(window.PxuThemeSections.ShoppableImageSection=ShoppableImageSection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["pxu-slideshow"]&&!Shopify.designMode))try{const{Section,Carousel}=window.PxuThemeSections;class SlideshowSection extends Section{constructor($root){super($root),this.$root=$root,this.id=$root.id,this.data=this.loadData(),this.autoplay=this.data.autoplay,this.autoplayDuration=this.data.autoplayDuration*1e3,this.carousel=null,this.onMount()}onMount(){const options={autoPlay:this.autoplay?this.autoplayDuration:!1,prevNextButtons:!0,lazyLoad:!0},mobileOptions={draggable:!0,autoPlay:this.autoplay?this.autoplayDuration:!1,lazyLoad:!0};this.carousel=new Carousel(this.$root,options,mobileOptions),this.carousel.onMount()}onUnmount(){this.carousel.onUnmount(),this.carousel=null}onBlockSelect(event){if(!this.carousel)return;const $slide=event.target.parentElement;this.carousel.selectSlide($slide)}}document.querySelectorAll("[data-pxu-slideshow]").forEach($section=>{Section.init($section,SlideshowSection)}),Shopify.designMode&&(window.PxuThemeSections.SlideshowSection=SlideshowSection)}catch(e){console.error(e)}})()})();
2//# sourceMappingURL=/cdn/shop/t/41/compiled_assets/scripts.js.map?v=98559651995932147101764714645

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.