1 2document.addEventListener("DOMContentLoaded",function(){const menuBtn=document.querySelector(".menu-btn");const topHeader=document.querySelector(".top-header");const bottomHead=document.querySelector(".bottom-head");const menuClose=document.querySelector(".menu-close");function toggleMenu(){menuBtn.classList.toggle("open");topHeader.classList.toggle("open");bottomHead.classList.toggle("open");menuClose.classList.toggle("open")} 3if(menuBtn){menuBtn.addEventListener("click",toggleMenu)} 4if(menuClose){menuClose.addEventListener("click",toggleMenu)}});document.addEventListener("DOMContentLoaded",function(){let scriptLoaded=!1;function loadTgjuScript(){if(scriptLoaded)return;scriptLoaded=!0;const script=document.createElement("script");script.src="https://api.tgju.org/v1/widget/v2";script.defer=!0;document.body.appendChild(script)} 5const observer=new IntersectionObserver((entries)=>{entries.forEach(entry=>{if(entry.isIntersecting){loadTgjuScript();observer.disconnect()}})},{root:null,rootMargin:"0px 0px 200px 0px",threshold:0});const trigger=document.getElementById("arz");if(trigger){observer.observe(trigger)}});document.addEventListener('DOMContentLoaded',function(){document.querySelectorAll('input[required], textarea[required], select[required]').forEach(field=>{field.title="ÙØ·Ùا٠اÛÙ ÙÛÙØ¯ را پر Ú©ÙÛØ¯";field.oninvalid=function(){this.setCustomValidity('ÙØ·Ùا٠اÛÙ ÙÛÙØ¯ را پر Ú©ÙÛØ¯')};field.oninput=function(){this.setCustomValidity('')}})});document.addEventListener('DOMContentLoaded',function(){const phonePattern=/^09\d{9}$/;const phoneInputSelector='input[name="form_fields[tel]"], input[name="form_fields[phone]"]';function isValidPhone(phoneNumber){return phonePattern.test(phoneNumber)} 6function checkAndApplyWarning(inputElement){if(inputElement.value===''){inputElement.classList.remove('invalid-phone-format')}else if(isValidPhone(inputElement.value)){inputElement.classList.remove('invalid-phone-format')}else{inputElement.classList.add('invalid-phone-format')}} 7document.addEventListener('focusin',function(event){const target=event.target;if(target.matches(phoneInputSelector)){checkAndApplyWarning(target)}});document.addEventListener('input',function(event){const target=event.target;if(target.matches(phoneInputSelector)){checkAndApplyWarning(target)}});document.addEventListener('focusout',function(event){const target=event.target;if(target.matches(phoneInputSelector)){checkAndApplyWarning(target)}})});document.addEventListener("DOMContentLoaded",function(){const searchBtn=document.querySelector(".search-btn");const searchForm=document.querySelector(".search-form");const closeIcon=document.querySelector(".e-fas-times");function toggleSearch(){searchBtn.classList.toggle("open");searchForm.classList.toggle("open")} 8if(searchBtn){searchBtn.addEventListener("click",toggleSearch)} 9if(closeIcon){closeIcon.addEventListener("click",toggleSearch)}});let deferredPrompt;window.addEventListener('beforeinstallprompt',(e)=>{e.preventDefault();deferredPrompt=e;document.querySelectorAll('.install-pwa-btn').forEach(btn=>{btn.style.display='flex'})});document.addEventListener('click',async(e)=>{if(e.target.classList.contains('install-pwa-btn')){if(deferredPrompt){deferredPrompt.prompt();const result=await deferredPrompt.userChoice;console.log(`کاربر پاسخ داد: ${result.outcome}`);deferredPrompt=null;if(result.outcome==='accepted'){alert('Ø¨Ø±ÙØ§Ù ٠با Ù ÙÙÙÛØª ÙØµØ¨ شد!')}else{alert('ÙØµØ¨ Ø¨Ø±ÙØ§Ù Ù ÙØºÙ شد.')}}else{alert('در ØØ§Ù ØØ§Ø¶Ø± Ø§Ù Ú©Ø§Ù ÙØµØ¨ ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯ ÛØ§ Ø¨Ø±ÙØ§Ù Ù ÙØ¨ÙØ§Ù ÙØµØ¨ شد٠است.')}}});document.addEventListener("DOMContentLoaded",function(){const sliders=document.querySelectorAll(".jet-listing-grid__scroll-slider");const width=window.innerWidth;const isMobile=width<=767;const isTablet=width>767&&width<=1024;const isDesktop=width>1024;sliders.forEach((scrollContainer,sliderIndex)=>{const hasMobile=scrollContainer.classList.contains("jet-listing-grid__scroll-slider-mobile");const hasTablet=scrollContainer.classList.contains("jet-listing-grid__scroll-slider-tablet");const hasDesktop=scrollContainer.classList.contains("jet-listing-grid__scroll-slider-desktop");const shouldInit=(isMobile&&hasMobile)||(isTablet&&hasTablet)||(isDesktop&&hasDesktop);if(!shouldInit)return;const itemsContainer=scrollContainer.querySelector(".jet-listing-grid__items");const items=itemsContainer?.querySelectorAll(".jet-listing-grid__item");if(!scrollContainer||!items?.length)return;
9scrollContainer.style.scrollSnapType="x mandatory";scrollContainer.style.overflowX="scroll";scrollContainer.style.scrollBehavior="smooth";let itemWidth=scrollContainer.clientWidth;itemsContainer.style.display="flex";itemsContainer.style.flexWrap="nowrap";items.forEach(item=>{item.style.scrollSnapAlign="start";item.style.boxSizing="border-box";item.style.flex='0 0 ${itemWidth}px'});const prevBtn=document.createElement("div");const nextBtn=document.createElement("div");[prevBtn,nextBtn].forEach(btn=>{btn.classList.add("jet-prev-next")});prevBtn.classList.add("jet-prev");nextBtn.classList.add("jet-next");prevBtn.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M15 18L9.70711 12.7071C9.37377 12.3738 9.20711 12.2071 9.20711 12C9.20711 11.7929 9.37377 11.6262 9.70711 11.2929L15 6" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';nextBtn.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M15 18L9.70711 12.7071C9.37377 12.3738 9.20711 12.2071 9.20711 12C9.20711 11.7929 9.37377 11.6262 9.70711 11.2929L15 6" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';const wrapper=document.createElement("div");wrapper.style.position="relative";scrollContainer.parentNode.insertBefore(wrapper,scrollContainer);wrapper.appendChild(scrollContainer);wrapper.appendChild(prevBtn);wrapper.appendChild(nextBtn);const pagination=document.createElement("div");pagination.classList.add("jet-pagination");pagination.style.display="flex";pagination.style.justifyContent="center";pagination.style.gap="6px";pagination.style.margin="40px 0 20px";let currentIndex=0;const totalSlides=items.length;const dots=[];for(let i=0;i<totalSlides;i++){const dot=document.createElement("span");dot.style.width="32px";dot.style.height="5px";dot.style.borderRadius="50px";dot.style.backgroundColor=i===0?"#4ADAD5":"#E4F4F4";dot.style.cursor="pointer";pagination.appendChild(dot);dots.push(dot);dot.addEventListener("click",()=>{currentIndex=i;scrollToIndex(currentIndex);restartAutoplay()})} 10function scrollToIndex(index){const offset=items[index].offsetLeft+12;scrollContainer.scrollTo({left:offset,behavior:"smooth"});updateDots(index)} 11function updateDots(activeIndex){dots.forEach((dot,i)=>{dot.style.backgroundColor=i===activeIndex?"#4ADAD5":"#E4F4F4"})} 12scrollContainer.after(pagination);prevBtn.addEventListener("click",()=>{currentIndex=(currentIndex-1+totalSlides)%totalSlides;scrollToIndex(currentIndex);restartAutoplay()});nextBtn.addEventListener("click",()=>{currentIndex=(currentIndex+1)%totalSlides;scrollToIndex(currentIndex);restartAutoplay()});let interval=null;function autoplay(){interval=setInterval(()=>{currentIndex=(currentIndex+1)%totalSlides;scrollToIndex(currentIndex)},3000)} 13function restartAutoplay(){clearInterval(interval);autoplay()} 14autoplay();let scrollTimeout;scrollContainer.addEventListener("scroll",()=>{clearTimeout(scrollTimeout);scrollTimeout=setTimeout(()=>{let closestIndex=0;let minDistance=Infinity;const scrollLeft=scrollContainer.scrollLeft;items.forEach((item,index)=>{const distance=Math.abs(item.offsetLeft-scrollLeft);if(distance<minDistance){minDistance=distance;closestIndex=index}});currentIndex=closestIndex;scrollToIndex(currentIndex);restartAutoplay()},100)});let isDown=!1;let startX;let scrollLeftStart;scrollContainer.addEventListener("mousedown",(e)=>{isDown=!0;scrollContainer.classList.add("dragging");startX=e.pageX-scrollContainer.offsetLeft;scrollLeftStart=scrollContainer.scrollLeft;clearInterval(interval)});
14scrollContainer.addEventListener("mouseleave",()=>{isDown=!1;scrollContainer.classList.remove("dragging");restartAutoplay()});scrollContainer.addEventListener("mouseup",()=>{isDown=!1;scrollContainer.classList.remove("dragging");restartAutoplay()});scrollContainer.addEventListener("mousemove",(e)=>{if(!isDown)return;e.preventDefault();const x=e.pageX-scrollContainer.offsetLeft;const walk=(x-startX)*1.5;scrollContainer.scrollLeft=scrollLeftStart-walk});new ResizeObserver(()=>{itemWidth=scrollContainer.clientWidth;items.forEach(item=>{item.style.flex='0 0 ${itemWidth}px'});scrollToIndex(currentIndex)}).observe(scrollContainer)})});document.addEventListener("DOMContentLoaded",function(){const observer=new MutationObserver(function(mutationsList,observer){const successMessage=document.querySelector(".survey-form .elementor-message-success");if(successMessage){const form=successMessage.closest("form");const thanks=document.querySelector("#thanks");const result=document.querySelector("#result");if(form){form.classList.add("hide");thanks.classList.remove("hide");result.classList.remove("hidden")} 15observer.disconnect()}});observer.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener('DOMContentLoaded',function(){if(typeof addComment!=='undefined'){addComment.moveForm=function(){return!1}} 16document.querySelectorAll('.comment-reply-link').forEach(function(el){el.addEventListener('click',function(e){e.preventDefault();const parentId=this.getAttribute('data-commentid');const authorName=this.getAttribute('data-replyto')||'';const parentField=document.getElementById('comment_parent');if(parentField)parentField.value=parentId;const replyTitle=document.getElementById('reply-title');if(replyTitle){replyTitle.textContent='پاسخ ب٠: '+authorName} 17document.getElementById('respond').scrollIntoView({behavior:'smooth'})})})}); 18 19
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.