https://hadayajewelry.com/cdn/shop/t/17/assets/hadaya-product-ux.js?v=156765573945245842011791390520
1(function(){function boot(){document.querySelectorAll('[id^="MainProduct-"]').forEach(function(root){if(root.dataset.hdyProductUx)return;root.dataset.hdyProductUx="true";var sticky=root.querySelector(".hdy-sticky-purchase"),action=sticky&&sticky.querySelector("button");if(!action)return;var back=null,toggle=null,backExpanded=!1,queued=!1,recoveryTimer=null;function actualButton(){return Array.from(root.querySelectorAll(".product-form__submit")).find(function(button){return button.getBoundingClientRect().width>0})}function personalizationPending(){return root.dataset.hadayaPersonalization==="true"&&!root.querySelector(".front_tbox textarea")}function refreshRecovery(pending){var recovery=root.querySelector(".hdy-personalization-recovery");recovery&&(pending?recoveryTimer===null&&recovery.hidden&&(recoveryTimer=setTimeout(function(){recoveryTimer=null,personalizationPending()&&(recovery.hidden=!1)},2e4)):(recoveryTimer!==null&&clearTimeout(recoveryTimer),recoveryTimer=null,recovery.hidden=!0))}root.addEventListener("click",function(event){var retry=event.target.closest(".hdy-options-retry");!retry||!personalizationPending()||(event.preventDefault(),event.stopImmediatePropagation(),window.location.reload())},!0),root.addEventListener("submit",function(event){if(personalizationPending()){event.preventDefault(),event.stopImmediatePropagation();var loading=root.querySelector(".hdy-personalization-placeholder");loading&&loading.scrollIntoView({block:"center",behavior:"instant"})}},!0);function reveal(field){back&&back.contains(field)&&(backExpanded=!0),refresh(),field.scrollIntoView({block:"center",behavior:"instant"}),field.focus({preventScroll:!0})}function missingRequiredOption(){for(var options=root.querySelectorAll(".mw-option--required"),i=0;i<options.length;i++){var option=options[i];if(option.getBoundingClientRect().height){var controls=Array.from(option.querySelectorAll(".mw-option__control")).filter(function(field){return!field.disabled});if(controls.length){var grouped=controls[0].type==="radio"||controls[0].type==="checkbox";if(grouped?!controls.some(function(field){return field.checked}):!String(controls[0].value||"").trim())return controls[0]}}}return null}function refresh(){queued=!1;var currentBack=root.querySelector(".back_tbox");if(currentBack&¤tBack!==back&&(toggle&&toggle.remove(),back=currentBack,toggle=document.createElement("button"),toggle.type="button",toggle.className="hdy-back-toggle",toggle.setAttribute("aria-controls",back.id),back.before(toggle),toggle.addEventListener("click",function(){backExpanded=!backExpanded,refresh(),backExpanded&&back.querySelector("textarea").focus({preventScroll:!0})}
1)),back){var field=back.querySelector("textarea");field&&(field.value||field.getAttribute("aria-invalid")==="true")&&(backExpanded=!0),typeof window.getSkylineSelected=="function"&&/back|both/.test(window.getSkylineSelected())&&(backExpanded=!0),back.hidden=!backExpanded,toggle.setAttribute("aria-expanded",String(backExpanded));var label=backExpanded?"Back engraving":"+ Add engraving on the back";toggle.textContent!==label&&(toggle.textContent=label)}var button=actualButton(),mobile=window.matchMedia("(max-width:1024px), (orientation:portrait)").matches,keyboard=window.visualViewport&&window.visualViewport.height<window.innerHeight*.75,focusedInput=/INPUT|TEXTAREA|SELECT/.test(document.activeElement.tagName),rect=button&&button.getBoundingClientRect();sticky.hidden=!mobile||!button||document.body.classList.contains("show_menu")||keyboard||focusedInput||rect.top>=60&&rect.bottom<=window.innerHeight-100;var pending=personalizationPending();refreshRecovery(pending),action.disabled=pending||root.dataset.hadayaProductAvailable==="false"||button&&(button.getAttribute("aria-busy")==="true"||button.getAttribute("aria-disabled")==="true"),sticky.style.setProperty("--hdy-preview-offset",document.getElementById("PBarNextFrame")?"64px":"0px")}function schedule(){queued||(queued=!0,requestAnimationFrame(refresh))}action.addEventListener("click",function(){if(!personalizationPending()){if(typeof window.hadayaEngravingValidate=="function"&&!window.hadayaEngravingValidate()){var invalid=root.querySelector('textarea[aria-invalid="true"]');invalid&&reveal(invalid);return}var button=actualButton();if(!(!button||button.disabled)){var missing=missingRequiredOption();button.click(),setTimeout(function(){var invalid2=root.querySelector('.mw-option--error input, .mw-option--error select, .mw-option--error textarea, [aria-invalid="true"]');missing?reveal(missing):invalid2?reveal(invalid2):button.scrollIntoView({block:"center",behavior:"instant"})},100)}}}),["input","change","keyup"].forEach(function(name){root.addEventListener(name,schedule)}),["scroll","resize","orientationchange","pageshow"].forEach(function(name){window.addEventListener(name,schedule,{passive:!0})}),document.addEventListener("focusin",schedule),document.addEventListener("focusout",schedule),new MutationObserver(schedule).observe(root,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-invalid","aria-busy","aria-disabled"]}),new MutationObserver(schedule).observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.visualViewport&&window.visualViewport.addEventListener("resize",schedule),refresh()})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",boot):boot(),document.addEventListener("shopify:section:load",boot)})(); 2//# sourceMappingURL=/cdn/shop/t/17/assets/hadaya-product-ux.js.map?v=156765573945245842011791390520
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.