// Assets/animated-text.js (function () {function setupAnimatedText(root) {if (!root) return; var p = root.querySelector("[data-animated-text]"); if (!p) return; var text = p.getAttribute("data-text") || p.textContent || ""; var minWeight = parseFloat(p.getAttribute("data-min-weight") || "200"); var maxWeight = parseFloat(p.getAttribute("data-max-weight") || "840"); var duration = parseFloat(p.getAttribute("data-duration") || "1.5"); var delayMultiplier = parseFloat(p.getAttribute("data-delay-multiplier") || "0.25"); var fontSize = parseFloat(p.getAttribute("data-font-size") || "40"); p.style.fontSize = fontSize + "px"; p.innerHTML = ""; var chars = text.split(""); chars.forEach(function (ch) {var span = document.createElement("span"); span.textContent = ch === " " ? "u00A0" : ch; span.style.animationDuration = duration + "s"; span.style.fontVariationSettings = '"wght" ' + minWeight; p.appendChild(span);}); var spans = p.querySelectorAll("span"); var numLetters = spans.length; spans.forEach(function (span,i) {var mappedIndex = i - numLetters / 2; span.style.animationDelay = mappedIndex * delayMultiplier + "s";}); // set keyframes weights globally var styleId = "animated-text-style"; var styleTag = document.getElementById(styleId); if (!styleTag) {styleTag = document.createElement("style"); styleTag.id = styleId; document.head.appendChild(styleTag);} styleTag.textContent = '@keyframes breath { 0% { font-variation-settings: "wght" ' + minWeight + '; } 100% { font-variation-settings: "wght" ' + maxWeight + "; } }";} function init() {document.querySelectorAll(".animated-text").forEach(setupAnimatedText);} document.addEventListener("DOMContentLoaded",init); document.addEventListener("shopify:section:load",init);})(); html.animated-text-loaded .animated-text--hero p{outline:2px solid red!important}
/*# sourceMappingURL=/cdn/shop/t/6/assets/animated-text.css.map */
