/* Js for , Version=1785147892 */
 v.theme = {"template":"mobile","theme":"colorful","device":"mobile"};;
  // 核心优化：延迟初始化，避免阻塞页面加载
  document.addEventListener('DOMContentLoaded', () => {
    // 状态管理（精简变量）
    let isAnimating = false;
    const counters = document.querySelectorAll('.counter');
    const section = document.getElementById('counter-section');
    
    // 避免重复创建观察者，直接判断可见性
    function checkVisibility() {
      const rect = section.getBoundingClientRect();
      const windowHeight = window.innerHeight || document.documentElement.clientHeight;
      return rect.top < windowHeight * 0.9 && rect.bottom > 0; // 宽松触发条件
    }
    
    // 极简动画逻辑（减少计算量）
    function animateCounter(counter, target) {
      let current = 0;
      const step = Math.ceil(target / 30); // 30步完成，减少重绘次数
      
      function update() {
        current = Math.min(current + step, target);
        counter.textContent = current;
        
        if (current < target) {
          requestAnimationFrame(update);
        } else {
          counter.textContent = target;
          isAnimating = false;
        }
      }
      
      update();
    }
    
    // 启动所有计数器
    function startCounters() {
      if (isAnimating) return;
      isAnimating = true;
      
      counters.forEach(counter => {
        const target = +counter.dataset.target;
        animateCounter(counter, target);
      });
    }
    
    // 节流函数（进一步减少触发频率）
    function throttle(func, delay = 200) {
      let lastCall = 0;
      return () => {
        const now = Date.now();
        if (now - lastCall >= delay) {
          func();
          lastCall = now;
        }
      };
    }
    
    // 初始检查 + 滚动监听（极简版）
    const throttledCheck = throttle(() => {
      if (checkVisibility() && !isAnimating) {
        startCounters();
        // 动画启动后移除监听，避免重复触发
        window.removeEventListener('scroll', throttledCheck);
      }
    });
    
    // 初始检查
    if (checkVisibility()) {
      startCounters();
    } else {
      window.addEventListener('scroll', throttledCheck);
    }
  });
;$().ready(function() { $('#execIcon').click(function(){ $('#execInfoBar').toggle();});}); ;
  var logLink = "/log-record.mhtml";
  var browserLanguage = navigator.language || navigator.userLanguage; 
  var resolution      = screen.availWidth + ' X ' + screen.availHeight;
  $.get(logLink, {browserLanguage:browserLanguage, resolution:resolution});
  