<html><head></head><body>{"version":3,"file":"index-DA3OpK7r.js","sources":["../../src/scripts/helpers/index.ts"],"sourcesContent":["import modules from '../modules';\r\nimport { breakpoints } from './variables';\r\n\r\nconst debounce = (callback: (args: unknown) =&gt; void, wait: number) =&gt; {\r\n  let timerId: ReturnType<typeof settimeout="">;\r\n  return (...args: [unknown]) =&gt; {\r\n    clearTimeout(timerId);\r\n    timerId = setTimeout(() =&gt; {\r\n      callback(...args);\r\n    }, wait);\r\n  };\r\n};\r\n\r\nconst throttle = (callback: (args: unknown) =&gt; void, wait: number) =&gt; {\r\n  let inThrottle: boolean;\r\n  return (...args: [unknown]) =&gt; {\r\n    if (!inThrottle) {\r\n      callback(...args);\r\n      inThrottle = true;\r\n      setTimeout(() =&gt; {\r\n        inThrottle = false;\r\n      }, wait);\r\n    }\r\n  };\r\n};\r\n// Map number x from range [a, b] to [c, d]\r\nconst map = (x: number, a: number, b: number, c: number, d: number) =&gt;\r\n  ((x - a) * (d - c)) / (b - a) + c;\r\n// Linear interpolation\r\nconst lerp = (a: number, b: number, n: number) =&gt; (1 - n) * a + n * b;\r\nconst calcWinsize = () =&gt; {\r\n  return { width: window.innerWidth, height: window.innerHeight };\r\n};\r\n\r\n// Gets the mouse position\r\nconst getMousePos = (e: { clientX: number; clientY: number }) =&gt; {\r\n  return {\r\n    x: e.clientX,\r\n    y: e.clientY\r\n  };\r\n};\r\n\r\nconst distance = (x1: number, y1: number, x2: number, y2: number) =&gt; {\r\n  const a = x1 - x2;\r\n  const b = y1 - y2;\r\n  return Math.hypot(a, b);\r\n};\r\n\r\nconst isDesktop = () =&gt; {\r\n  return window.matchMedia(`(min-width: ${breakpoints.desktop}px)`).matches;\r\n};\r\n\r\nconst isSmallDesktop = () =&gt; {\r\n  return window.matchMedia(`(min-width: ${breakpoints.smallDesktop}px)`).matches;\r\n};\r\n\r\nconst isTabletLandscape = () =&gt; {\r\n  return window.matchMedia(`(min-width: ${breakpoints.tabletLandscape}px)`).matches;\r\n};\r\n\r\nconst isTablet = () =&gt; {\r\n  return window.matchMedia(\r\n    `(min-width: ${breakpoints.tablet}px) and (max-width: ${breakpoints.desktop - 1}px)`\r\n  ).matches;\r\n};\r\n\r\nconst isMobile = () =&gt; {\r\n  return window.matchMedia(`(max-width: ${breakpoints.desktop - 1}px)`).matches;\r\n};\r\n\r\nconst prefersReducedMotion = () =&gt; {\r\n  return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\r\n};\r\n\r\nconst getBrowserName = () =&gt; {\r\n  const userAgent = navigator.userAgent;\r\n  let browserName;\r\n  if (userAgent.match(/chrome|chromium|crios/i)) {\r\n    browserName = 'chrome';\r\n  } else if (userAgent.match(/firefox|fxios/i)) {\r\n    browserName = 'firefox';\r\n  } else if (userAgent.match(/safari/i)) {\r\n    browserName = 'safari';\r\n  } else if (userAgent.match(/opr\\//i)) {\r\n    browserName = 'opera';\r\n  } else if (userAgent.match(/edg/i)) {\r\n    browserName = 'edge';\r\n  } else {\r\n    browserName = 'No browser detection';\r\n  }\r\n  return browserName;\r\n};\r\n\r\nconst iOS = () =&gt; {\r\n  return (\r\n    ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(\r\n      navigator.platform\r\n    ) ||\r\n    // iPad on iOS 13 detection\r\n    (navigator.userAgent.includes('Mac') &amp;&amp; 'ontouchend' in document)\r\n  );\r\n};\r\nexport {\r\n  iOS,\r\n  debounce,\r\n  throttle,\r\n  map,\r\n  lerp,\r\n  calcWinsize,\r\n  getMousePos,\r\n  distance,\r\n  isDesktop,\r\n  isSmallDesktop,\r\n  isTablet,\r\n  isMobile,\r\n  isTabletLandscape,\r\n  prefersReducedMotion,\r\n  getBrowserName\r\n};\r\n\r\nexport const loadDeferredModules = async (el: Element) =&gt; {\r\n  const deferredModules = el.querySelectorAll<htmlelement>(\r\n    '[data-module]:not([data-loaded=\"true\"])'\r\n  );\r\n  deferredModules.forEach(node =&gt; {\r\n    const mappedModule = modules.find(m =&gt; m.name === node.dataset.module);\r\n    if (mappedModule) {\r\n      mappedModule\r\n        .loader?.()\r\n        .then(module =&gt; {\r\n          mappedModule.render?.(module.default, [node] as unknown as NodeListOf<htmlelement>);\r\n          node.dataset.loaded = 'true';\r\n        })\r\n        .catch(err =&gt; {\r\n          console.log(`There was an error loading your module's javascript file - ${err}`);\r\n        });\r\n    }\r\n  });\r\n};\r\n\r\nexport const getEnvGQLUrl = () =&gt; {\r\n  const baseUrl = import.meta.env.VITE_OPTIGRAPHQL_BASE_URL as string;\r\n\r\n  if (document.querySelector('body')?.getAttribute('graph-env') === 'prd') {\r\n    return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_PROD_KEY}`;\r\n  } else if (document.querySelector('body')?.getAttribute('graph-env') === 'stg') {\r\n    return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_STG_KEY}`;\r\n  } else {\r\n    return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_INTE_KEY}`;\r\n  }\r\n};\r\n"],"names":["debounce","callback","wait","timerId","args","isDesktop","breakpoints","isSmallDesktop","isTabletLandscape","isTablet","isMobile","prefersReducedMotion","iOS","getEnvGQLUrl","baseUrl","_a","_b"],"mappings":"qCAGM,MAAAA,EAAW,CAACC,EAAmCC,IAAiB,CAChE,IAAAC,EACJ,MAAO,IAAIC,IAAoB,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CACzBF,EAAS,GAAGG,CAAI,GACfF,CAAI,CACT,CACF,EAqCMG,EAAY,IACT,OAAO,WAAW,eAAeC,EAAY,OAAO,KAAK,EAAE,QAG9DC,EAAiB,IACd,OAAO,WAAW,eAAeD,EAAY,YAAY,KAAK,EAAE,QAGnEE,EAAoB,IACjB,OAAO,WAAW,eAAeF,EAAY,eAAe,KAAK,EAAE,QAGtEG,EAAW,IACR,OAAO,WACZ,eAAeH,EAAY,MAAM,uBAAuBA,EAAY,QAAU,CAAC,KAAA,EAC/E,QAGEI,EAAW,IACR,OAAO,WAAW,eAAeJ,EAAY,QAAU,CAAC,KAAK,EAAE,QAGlEK,EAAuB,IACpB,OAAO,WAAW,kCAAkC,EAAE,QAsBzDC,EAAM,IAER,CAAC,iBAAkB,mBAAoB,iBAAkB,OAAQ,SAAU,MAAM,EAAE,SACjF,UAAU,QACZ,GAEC,UAAU,UAAU,SAAS,KAAK,GAAK,eAAgB,SAyC/CC,EAAe,IAAM,SAC1B,MAAAC,EAAU,6CAEhB,QAAIC,EAAA,SAAS,cAAc,MAAM,IAA7B,YAAAA,EAAgC,aAAa,gBAAiB,MACzD,GAAGD,CAAO,qDACRE,EAAA,SAAS,cAAc,MAAM,IAA7B,YAAAA,EAAgC,aAAa,gBAAiB,MAChE,GAAGF,CAAO,mDAEV,GAAGA,CAAO,kDAErB"}</htmlelement></htmlelement></typeof><style>
.hidden {
display: none;
}
</style>

<a href="http://www.yezi-studio.com"  class="hidden">澳门威尼斯</a>
<a href="http://xaxkcf.nenkin-guide.com" class="hidden">宣城新闻网新闻中心</a>
<a href="http://www.turuntilataksit.net"  class="hidden">太阳城官网</a>
<a href="http://www.866045.com"  class="hidden">澳门皇冠体育</a>
<a href="http://www.media2v-api.net"  class="hidden">bet365体育</a>
<a href="http://tmxtcy.odamconsulting.net" class="hidden">辽宁消费维权网</a>
<a href="http://www.smart-launch.net"  class="hidden">买球平台</a>
<a href="http://www.hongjiuchina.com"  class="hidden">esball-is-easy-to-Expo-contact@hongjiuchina.com</a>
<a href="http://web-sitemap.rpv-ip.com" class="hidden">南京新东方英语培训机构</a>
<a href="http://gtcatc.e-staffsharing.com" class="hidden">保险岛</a>
<a href="http://www.orkexpo.net"  class="hidden">Crown-Sports-customerservice@orkexpo.net</a>
<a href="http://www.joker47.net"  class="hidden">Sands-Gaming-support@joker47.net</a>
<a href="http://kbxpju.057410000.net" class="hidden">世游科技</a>
<a href="http://www.smxjjl.com"  class="hidden">Sports-platform-service@smxjjl.com</a>
<a href="http://www.jayconscious.com"  class="hidden">Crown-Sports-Betting-customerservice@jayconscious.com</a>
<a href="http://www.xlhl.net"  class="hidden">买球app</a>
<a href="http://www.bigtrecords.com"  class="hidden">欧洲杯竞猜</a>
<a href="http://vxtuix.jiating158.com" class="hidden">E金融</a>
<a href="http://ewlxfi.xyfyyzx.com" class="hidden">启明星辰</a>
<a href="http://www.haerbinjiudian.com"  class="hidden">沙巴体育官网</a>

<a href="https://tw.dictionary.yahoo.com/dictionary?p=靠谱的网络博彩推荐博彩网站✔️网址:la666.net✔️靠谱的网络博彩推荐博彩网站✔️网址:la666.net✔️" class="hidden">国际环保在线</a>
<a href="https://www.deep6gear.com/catalogsearch/result/?q=✔️网址:la666.net✔️(关于全球最大网络博彩的简介)全球最大网络博彩.iai" class="hidden">山西医科大学第二医院</a>
<a href="https://es-la.facebook.com/public/>>✔️网址:la66.net✔️手输<<最正规澳门线上赌场>>✔️网址:la66.net✔️手输<<最正规澳门线上赌场.ggp" class="hidden">安畅云</a>
<a href="https://acrmc.com/search/腾讯分分彩官网-维基百科✔️网址:la66.net✔️" class="hidden">功夫派 - 淘米网</a>
<a href="https://stock.adobe.com/search/images?k=>>✔️官方网址:la777.net✔️手输<<金沙城中心app>>✔️官方网址:la777.net✔️手输<<金沙城中心app.nri" class="hidden">正品手表网</a>
<a href="https://m.facebook.com/public/✔️网址:la666.net✔️beat365手机版官方网站-维基百科✔️网址:la666.net✔️beat365手机版官方网站-维基百科.qgu" class="hidden">甜蜜泰迪 </a>
<a href="https://tw.dictionary.yahoo.com/dictionary?p=>>✔️网址:ad11.net✔️手输<<og平台网站官方>>✔️网址:ad11.net✔️手输<<og平台网站官方.uxs" class="hidden">中磁视讯</a>
<a href="https://acrmc.com/search/科普一下爱游戏官方网站的百科✔️网址:ad11.net✔️.fky" class="hidden">浙江造价网</a>
<a href="https://es-la.facebook.com/public/✔️官方网址:la777.net✔️(关于可以玩滚球的正规app的简介)可以玩滚球的正规app.smk" class="hidden">家庭医生在线皮肤病</a>
<a href="https://stock.adobe.com/search/images?k=欧宝体育app下载(中国)有限公司✔️网址:ad11.net✔️" class="hidden">37RO仙境物语网页游戏官网</a>

<a href="/sttcs/hot-news/centripetence.html" class="hidden">MSDN 我告诉你</a>
<a href="/cn/totyqx-538930.html" class="hidden">第一考试网</a>
<a href="/sttcs/hot-news/archibenthal.html" class="hidden">唱吧</a>
<a href="/sitemap.xml" class="hidden">站点地图</a>
<a href="/sttcs/hot-news/Scytopetalum.html" class="hidden">爱棋游</a>


</body></html>