PageSourceSearch

https://truegreenorganics.com/cdn/shop/t/15/assets/sticky-atc.min.js?v=112185840901062107351668524778

js truegreenorganics.com collected 2026-09-27 13:32:31 UTC 11,117 bytes, 1 lines download raw bytes

1!function(){var e={4558:function(e,t,n){"use strict";n.r(t),n.d(t,{MinimogEvents:function(){return o},MinimogTheme:function(){return r},MinimogSettings:function(){return s},MinimogStrings:function(){return c},MinimogLibs:function(){return a}});var i=n(8971);n(9280);window.MinimogEvents=window.MinimogEvents||new i.Z,window._ThemeEvent=window.MinimogEvents,window.MinimogLibs.loadjs=__loadjs;const o=window.MinimogEvents,r=window.MinimogTheme||{},s=window.MinimogSettings||{},c=window.MinimogStrings||{},a=window.MinimogLibs||{}},9280:function(){__loadjs=function(){var e=function(){},t={},n={},i={};function o(e,t){if(e){var o=i[e];if(n[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function r(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function s(t,n,i,o){var r,c,a=document,l=i.async,u=(i.numRetries||0)+1,d=i.before||e,f=t.replace(/[\?|#].*$/,""),m=t.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(f)?((c=a.createElement("link")).rel="stylesheet",c.href=m,(r="hideFocus"in c)&&c.relList&&(r=0,c.rel="preload",c.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(f)?(c=a.createElement("img")).src=m:((c=a.createElement("script")).src=t,c.async=void 0===l||l),!(c.onload=c.onerror=c.onbeforeload=function(e){var a=e.type[0];if(r)try{c.sheet.cssText.length||(a="e")}catch(e){18!=e.code&&(a="e")}if("e"==a){if((o+=1)<u)return s(t,n,i,o)}else if("preload"==c.rel&&"style"==c.as)return c.rel="stylesheet";n(t,a,e.defaultPrevented)})!==d(t,c)&&a.head.appendChild(c)}function c(e,n,i){var c,a;if(n&&n.trim&&(c=n),a=(c?i:n)||{},c){if(c in t)throw"LoadJS";t[c]=!0}function l(t,n){!function(e,t,n){var i,o,r=(e=e.push?e:[e]).length,c=r,a=[];for(i=function(e,n,i){if("e"==n&&a.push(e),"b"==n){if(!i)return;a.push(e)}--r||t(a)},o=0;o<c;o++)s(e[o],i,n)}(e,(function(e){r(a,e),t&&r({success:t,error:n},e),o(c,e)}),a)}if(a.returnPromise)return new Promise(l);l()}return c.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,r,s,c=[],a=e.length,l=a;
1for(o=function(e,n){n.length&&c.push(e),--l||t(c)};a--;)r=e[a],(s=n[r])?o(r,s):(i[r]=i[r]||[]).push(o)}(e,(function(e){r(t,e)})),c},c.done=function(e){o(e,[])},c.reset=function(){t={},n={},i={}},c.isDefined=function(e){return e in t},c}()},6295:function(e,t,n){"use strict";n.r(t);n(2422);t.default=new class{constructor(){return this.component=this.component.bind(this),this.component}component(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if("function"==typeof e)return e({...t,children:i});i&&(i=i.filter((e=>null!==e))),t&&(t.class&&(t.className=t.class),delete t.children);let r="fragment"!==e?function(e,t){t=t||{};let n=document.createElement(e);try{n=Object.assign(n,t)}catch{const e=Object.keys(t);for(let i=0;i<e.length;i++)"dataSet"!==t[i]&&n.setAttribute(e[i],t[e[i]])}return n}(e,t):document.createDocumentFragment();if(-1!==["svg","path","rect","text","circle","g"].indexOf(e)){r=document.createElementNS("http://www.w3.org/2000/svg",e);for(const e in t){const n="className"===e?"class":e;r.setAttribute(n,t[e])}}for(const e of i)Array.isArray(e)?r.append(...e):r.append(e);if(t?.dataSet)for(const e in t.dataSet)Object.prototype.hasOwnProperty.call(t.dataSet,e)&&(r.dataset[e]=t.dataSet[e]);return t&&!window.__aleartedJSXData&&Object.keys(t).find((e=>e.match(/^data-/)))&&(alert("Do not use data-* in your JSX component! Use dataSet instead!! - Check the console.trace for more info"),window.__aleartedJSXData=!0),t?.ref&&("function"==typeof t.ref?t.ref(r):t.ref=r),t?.on&&Object.entries(t.on).forEach((e=>{let[t,n]=e;r.addEventListener(t,n)}
1)),t?.style&&Object.entries(t.style).forEach((e=>{let[t,n]=e;r.style.setProperty(t,n)})),r}}},8971:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});class i{constructor(){this.events={}}get evts(){return Object.keys(this.events)}subscribe(e,t){return this.events[e]=this.events[e]||[],this.events[e].push(t),()=>this.unSubscribe(e,t)}unSubscribe(e,t){const n=this.events[e];if(n&&Array.isArray(n))for(let e=0;e<n.length;e++)if(n[e]===t){n.splice(e,1);break}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];(this.events[e]||[]).forEach((e=>{e(...n)}))}}},2422:function(){!function(){function e(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.appendChild(t)}[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(t){t.hasOwnProperty("append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value:e})}))}()},643:function(e){var t="complete",n="canceled";function i(e,t,n){Math.max(0,t),Math.max(0,n),e.self===e?e.scrollTo(t,n):(e.scrollLeft=t,e.scrollTop=n)}function o(e){var n=e._scrollSettings;if(n){var r=n.maxSynchronousAlignments,s=function(e,t){var n,i,o,r,s,c,a,l=e.align,u=e.target.getBoundingClientRect(),d=l&&null!=l.left?l.left:.5,f=l&&null!=l.top?l.top:.5,m=l&&null!=l.leftOffset?l.leftOffset:0,h=l&&null!=l.topOffset?l.topOffset:0,p=d,g=f;if(e.isWindow(t))c=Math.min(u.width,t.innerWidth),a=Math.min(u.height,t.innerHeight),i=u.left+t.pageXOffset-t.innerWidth*p+c*p,o=u.top+t.pageYOffset-t.innerHeight*g+a*g,i-=m,o-=h,i=e.align.lockX?t.pageXOffset:i,o=e.align.lockY?t.pageYOffset:o,r=i-t.pageXOffset,s=o-t.pageYOffset;else{c=u.width,a=u.height,n=t.getBoundingClientRect();var y=u.left-(n.left-t.scrollLeft),v=u.top-(n.top-t.scrollTop);i=y+c*p-t.clientWidth*p,o=v+a*g-t.clientHeight*g,i-=m,o-=h,i=Math.max(Math.min(i,t.scrollWidth-t.clientWidth),0),o=Math.max(Math.min(o,t.scrollHeight-t.clientHeight),0),i=e.align.lockX?t.scrollLeft:i,o=e.align.lockY?t.scrollTop:o,r=i-t.scrollLeft,s=o-t.scrollTop}return{x:i,y:o,differenceX:r,differenceY:s}}(n,e),c=Date.now()-n.startTime,a=Math.min(1/n.time*c,1);if(n.endIterations>=r)return i(e,s.x,s.y),e._scrollSettings=null,n.end(t);var l=1-n.ease(a);if(i(e,s.x-s.differenceX*l,s.y-s.differenceY*l),c>=n.time)return n.endIterations++,n.scrollAncestor&&o(n.scrollAncestor),void o(e);!function(e){if("requestAnimationFrame"in window)return window.requestAnimationFrame(e);setTimeout(e,16)}(o.bind(null,e))}}function r(e){return e.self===e}function s(e){return"pageXOffset"in e||(e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth)&&"hidden"!==getComputedStyle(e).overflow}function c(){return!0}function a(e){if(e.assignedSlot)return a(e.assignedSlot);if(e.parentElement)return"BODY"===e.parentElement.tagName?e.parentElement.ownerDocument.defaultView||e.parentElement.ownerDocument.ownerWindow:e.parentElement;if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t.host}}e.exports=function(e,i,l){if(e){"function"==typeof i&&(l=i,i=null),i||(i={}),i.time=isNaN(i.time)?1e3:i.time,i.ease=i.ease||function(e){return 1-Math.pow(1-e,e/2)},i.align=i.align||{};var u=a(e),d=1,f=i.validTarget||c,m=i.isScrollable;i.debug;for(var h=[];u;)if(i.debug,f(u,d)&&(m?m(u,s):s(u))&&(d++,h.push(u)),!(u=a(u))){p(t);break}return h.reduce(((t,s,c)=>function(e,t,i,s,c){var a,l=!t._scrollSettings,u=t._scrollSettings,d=Date.now(),f={passive:!0};function m(e){t._scrollSettings=null,t.parentElement&&t.parentElement._scrollSettings&&t.parentElement._scrollSettings.end(e),i.debug,c(e),a&&(t.removeEventListener("touchstart",a,f),t.removeEventListener("wheel",a,f))}u&&u.end(n);var h=i.maxSynchronousAlignments;return null==h&&(h=3),t._scrollSettings={startTime:d,endIterations:0,target:e,time:i.time,ease:i.ease,align:i.align,isWindow:i.isWindow||r,maxSynchronousAlignments:h,end:m,scrollAncestor:s},"cancellable"in i&&!i.cancellable||(a=m.bind(null,n),t.addEventListener("touchstart",a,f),t.addEventListener("wheel",a,f)),l&&o(t),a}(e,s,i,h[c+1],p)),null)}function p(e){--d||l&&l(e)}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}
1n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e=n(643),t=n.n(e);const{themeScriptURLs:i,themeStyleURLs:o}=window;n(4558).MinimogSettings,n(6295).default;window.__getSectionInstanceByType=e=>window.Shopify.theme.sections.instances.find((t=>t.type===e));const r=document.querySelector("#scroll-to-top-target");function s(e){t()(r,e)}var c=n(4558).MinimogSettings;customElements.get("sticky-atc")||customElements.define("sticky-atc",class extends HTMLElement{constructor(){var e,t,n;super(),n=()=>{this.observer.observe(this.productFormActions),this.observeTarget=this.productFormActions},(t="setObserveTarget")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this.selectors={prodTitle:".psa__title",mainImage:".spc__main-img",atc:".add-to-cart",buyNowBtn:".prod__dynamic_checkout"},document.body.classList.add("sticky-atc-bar-enabled"),this.hasCustomFields=!!document.querySelector(".sf-prod-template__desktop .product__custom-field")}connectedCallback(){this.productFormActions=document.querySelector(".f-product-form"),this.container=this.closest(".prod__sticky-atc"),this.init()}init(){this.mainProduct=document.querySelector(".main-product.product-form"),this.mainATCButton=this.mainProduct?.querySelector(".f-product-form"),this.mainProductDynamic=this.mainProduct?.querySelector(this.selectors.buyNowBtn);const e=document.querySelector(".prod__sticky-atc");this.stickyATCBar=e,this.domNodes=queryDomNodes(this.selectors,e);const{prodTitle:t,mainImage:n,atc:i,buyNowBtn:o}=this.domNodes;o&&(this.enable_dynamic_checkout=!0),this.productId=this.dataset.productId;const r=window.matchMedia("(max-width: 639px)");r.addEventListener("change",this.checkDevice.bind(this)),this.checkDevice(r);const a=`-${c.headerHeight||66}px 0px 0px 0px`;this.observer=new IntersectionObserver((e=>{e.forEach((e=>{const t=1!==e.intersectionRatio?"remove":"add";this.container.classList[t]("translate-y-full"),document.documentElement.classList[1!=e.intersectionRatio?"remove":"add"]("stick-atc-show")}))}),{threshold:1,rootMargin:a}),t?.addEventListener("click",s),n?.addEventListener("click",s),this.hasCustomFields&&(i.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),s((()=>this.mainATCButton.click()))})),o&&o.addEventListener("click",(e=>{validateForm(this.mainProduct).length>0&&(e.preventDefault(),e.stopPropagation(),s((()=>this.mainProductDynamic?.click())))}),!0)),this.setObserveTarget(),this.syncWithMainProductForm()}checkDevice(e){const t=this.clientHeight+"px";document.documentElement.style.setProperty("--f-sticky-atc-bar-height",t)}syncWithMainProductForm(){const e=this.querySelector('[name="id"]');window.MinimogEvents.subscribe(`${this.productId}__VARIANT_CHANGE`,(async t=>{e.value=t.id}))}})}()}();

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.