(() => { "use strict"; const t = {}; function e() { if (location.hash) return location.hash.replace("#", "") } let o = !0, s = (t = 500) => { if (o) { const e = document.querySelectorAll("[data-lp]"); setTimeout((() => { e.forEach((t => { t.style.paddingRight = "" })), document.body.style.paddingRight = "", document.documentElement.classList.remove("lock") }), t), o = !1, setTimeout((function () { o = !0 }), t) } }, a = (t = 500) => { if (o) { const e = document.querySelectorAll("[data-lp]"), s = window.innerWidth - document.body.offsetWidth + "px"; e.forEach((t => { t.style.paddingRight = s })), document.body.style.paddingRight = s, document.documentElement.classList.add("lock"), o = !1, setTimeout((function () { o = !0 }), t) } }; function c() { s(), document.documentElement.classList.remove("menu-open") } function n(t) { setTimeout((() => { window.FLS && console.log(t) }), 0) } function l(t) { return t.filter((function (t, e, o) { return o.indexOf(t) === e })) } t.mousePrlx = new class { constructor(t, e = null) { if (this.config = Object.assign({ init: !0, logging: !0 }, t), this.config.init) { const t = document.querySelectorAll("[data-prlx-mouse]"); t.length ? (this.paralaxMouseInit(t), this.setLogging(`Прокинувся, стежу за об'єктами: (${t.length})`)) : this.setLogging("Немає жодного обєкта. Сплю...") } } paralaxMouseInit(t) { t.forEach((t => { const e = t.closest("[data-prlx-mouse-wrapper]"), o = t.dataset.prlxCx ? +t.dataset.prlxCx : 100, s = t.dataset.prlxCy ? +t.dataset.prlxCy : 100, a = t.hasAttribute("data-prlx-dxr") ? -1 : 1, c = t.hasAttribute("data-prlx-dyr") ? -1 : 1, n = t.dataset.prlxA ? +t.dataset.prlxA : 50; let l = 0, r = 0, i = 0, d = 0; function h(e = window) { e.addEventListener("mousemove", (function (e) { const o = t.getBoundingClientRect().top + window.scrollY; if (o >= window.scrollY || o + t.offsetHeight >= window.scrollY) { const t = window.innerWidth, o = window.innerHeight, s = e.clientX - t / 2, a = e.clientY - o / 2; i = s / t * 100, d = a / o * 100 } })) } ! function e() { l += (i - l) * n / 1e3, r += (d - r) * n / 1e3, t.style.cssText = `transform: translate3D(${a * l / (o / 10)}%,${c * r / (s / 10)}%,0) rotate(0.02deg);`, requestAnimationFrame(e) }(), e ? h(e) : h() })) } setLogging(t) { this.config.logging && n(`[PRLX Mouse]: ${t}`) } }({}); let r = (t, e = !1, o = 500, s = 0) => { const a = document.querySelector(t); if (a) { let l = "", r = 0; if (e) { l = "header.header"; const t = document.querySelector(l); t.classList.contains("_header-scroll") ? r = t.offsetHeight : (t.style.cssText = "transition-duration: 0s;", t.classList.add("_header-scroll"), r = t.offsetHeight, t.classList.remove("_header-scroll"), setTimeout((() => { t.style.cssText = "" }), 0)) } let i = { speedAsDuration: !0, speed: o, header: l, offset: s, easing: "easeOutQuad" }; if (document.documentElement.classList.contains("menu-open") && c(), "undefined" != typeof SmoothScroll) (new SmoothScroll).animateScroll(a, "", i); else { let t = a.getBoundingClientRect().top + scrollY; t = r ? t - r : t, t = s ? t - s : t, window.scrollTo({ top: t, behavior: "smooth" }) } n(`[gotoBlock]: Юхуу...їдемо до ${t}`) } else n(`[gotoBlock]: Йой... Такого блоку немає на сторінці: ${t}`) }; t.watcher = new class { constructor(t) { this.config = Object.assign({ logging: !0 }, t), this.observer, !document.documentElement.classList.contains("watcher") && this.scrollWatcherRun() } scrollWatcherUpdate() { this.scrollWatcherRun() } scrollWatcherRun() { document.documentElement.classList.add("watcher"), this.scrollWatcherConstructor(document.querySelectorAll("[data-watch]")) } scrollWatcherConstructor(t) { if (t.length) { this.scrollWatcherLogging(`Прокинувся, стежу за об'єктами (${t.length})...`), l(Array.from(t).map((function (t) { if ("navigator" === t.dataset.watch && !t.dataset.watchThreshold) { let e; t.clientHeight > 2 ? (e = window.innerHeight / 2 / (t.clientHeight - 1), e > 1 && (e = 1)) : e = 1, t.setAttribute("data-watch-threshold", e.toFixed(2)) } return `${t.dataset.watchRoot ? t.dataset.watchRoot : null}|${t.dataset.watchMargin ? t.dataset.watchMargin : "0px"}|${t.dataset.watchThreshold ? t.dataset.watchThreshold : 0}` }))).forEach((e => { let o = e.split("|"), s = { root: o[0], margin: o[1], threshold: o[2] }, a = Array.from(t).filter((function (t) { let e = t.dataset.watchRoot ? t.dataset.watchRoot : null, o = t.dataset.watchMargin ? t.dataset.watchMargin : "0px", a = t.dataset.watchThreshold ? t.dataset.watchThreshold : 0; if (String(e) === s.root && String(o) === s.margin && String(a) === s.threshold) return t })), c = this.getScrollWatcherConfig(s); this.scrollWatcherInit(a, c) })) } else this.scrollWatcherLogging("Сплю, немає об'єктів для стеження. ZzzZZzz") } getScrollWatcherConfig(t) { let e = {}; if (document.querySelector(t.root) ? e.root = document.querySelector(t.root) : "null" !== t.root && this.scrollWatcherLogging(`Эмм... батьківського об'єкта ${t.root} немає на сторінці`), e.rootMargin = t.margin, !(t.margin.indexOf("px") < 0 && t.margin.indexOf("%") < 0)) { if ("prx" === t.threshold) { t.threshold = []; for (let e = 0; e <= 1; e += .005) t.threshold.push(e) } else t.threshold = t.threshold.split(","); return e.threshold = t.threshold, e } this.scrollWatcherLogging("йой, налаштування data-watch-margin потрібно задавати в PX або %") } scrollWatcherCreate(t) { console.log(t), this.observer = new IntersectionObserver(((t, e) => { t.forEach((t => { this.scrollWatcherCallback(t, e) })) }), t) } scrollWatcherInit(t, e) { this.scrollWatcherCreate(e), t.forEach((t => this.observer.observe(t))) } scrollWatcherIntersecting(t, e) { t.isIntersecting ? (!e.classList.contains("_watcher-view") && e.classList.add("_watcher-view"), this.scrollWatcherLogging(`Я бачу ${e.classList}, додав клас _watcher-view`)) : (e.classList.contains("_watcher-view") && e.classList.remove("_watcher-view"), this.scrollWatcherLogging(`Я не бачу ${e.classList}, прибрав клас _watcher-view`)) } scrollWatcherOff(t, e) { e.unobserve(t), this.scrollWatcherLogging(`Я перестав стежити за ${t.classList}`) } scrollWatcherLogging(t) { this.config.logging && n(`[Спостерігач]: ${t}`) } scrollWatcherCallback(t, e) { const o = t.target; this.scrollWatcherIntersecting(t, o), o.hasAttribute("data-watch-once") && t.isIntersecting && this.scrollWatcherOff(o, e), document.dispatchEvent(new CustomEvent("watcherCallback", { detail: { entry: t } })) } }({}); let i = !1; setTimeout((() => { if (i) { let t = new Event("windowScroll"); window.addEventListener("scroll", (function (e) { document.dispatchEvent(t) })) } }), 0); document.querySelectorAll(".item-how").forEach((t => { t.addEventListener("click", (() => { t.classList.toggle("active"), t.classList.contains("active") && (t.querySelector(".item-how__image .video1").play(), t.querySelector(".item-how__image .video2").play()) })) })); const d = document.querySelectorAll(".item-roadmap__button"), h = document.querySelectorAll(".display-roadmap__item"); d.forEach(((t, e) => { t.querySelector("button").addEventListener("click", (() => { d.forEach((t => { t.classList.remove("active") })), t.classList.add("active"), h.forEach((t => { t.classList.remove("active") })); h[e + 1].classList.add("active") })) })); const u = document.querySelector(".tokenomics__wind"); setInterval((() => { const t = document.createElement("span"); t.classList.add("wind-item"); const e = 15 * Math.random(), o = 100 * Math.random(), s = Math.floor(4 * Math.random()), a = Math.floor(6 * Math.random()); t.style.width = e + "vw", t.style.top = o + "%", t.style.rotate = s + "deg", t.style.zIndex = a, u.append(t), setTimeout((() => { t.remove() }), 8e3) }), 200); (g = navigator.userAgent).includes("Firefox") || g.includes("SamsungBrowser") || g.includes("Opera") || g.includes("OPR") || g.includes("Edge") || g.includes("Edg") || g.includes("Chrome") || g.includes("Safari") && document.documentElement.classList.add("safari"); var g; async function m() { try { const t = "0x533f4cca62e671e8e63e95fc4c09713c87bf2d24"; await navigator.clipboard.writeText(t), alert("Address copied successfully") } catch (t) { console.error(t.message) } } document.querySelectorAll(".copy-ca-btn").forEach((t => { t.onclick = m })), window.FLS = !1, document.documentElement.classList.contains("loading") || window.addEventListener("load", (function () { setTimeout((function () { document.documentElement.classList.add("loaded") }), 0) })), document.querySelector(".icon-menu") && document.addEventListener("click", (function (t) { o && t.target.closest(".icon-menu") && (((t = 500) => { document.documentElement.classList.contains("lock") ? s(t) : a(t) })(), document.documentElement.classList.toggle("menu-open")) })), function () { function o(e) { if ("click" === e.type) { const o = e.target; if (o.closest("[data-goto]")) { const s = o.closest("[data-goto]"), a = s.dataset.goto ? s.dataset.goto : "", n = !!s.hasAttribute("data-goto-header"), l = s.dataset.gotoSpeed ? s.dataset.gotoSpeed : 500, i = s.dataset.gotoTop ? parseInt(s.dataset.gotoTop) : 0; if (t.fullpage) { const e = document.querySelector(`${a}`).closest("[data-fp-section]"), o = e ? +e.dataset.fpId : null; null !== o && (t.fullpage.switchingSection(o), document.documentElement.classList.contains("menu-open") && c()) } else r(a, n, l, i); e.preventDefault() } } else if ("watcherCallback" === e.type && e.detail) { const t = e.detail.entry, o = t.target; if ("navigator" === o.dataset.watch) { document.querySelector("[data-goto]._navigator-active"); let e; if (o.id && document.querySelector(`[data-goto="#${o.id}"]`)) e = document.querySelector(`[data-goto="#${o.id}"]`); else if (o.classList.length) for (let t = 0; t < o.classList.length; t++) { const s = o.classList[t]; if (document.querySelector(`[data-goto=".${s}"]`)) { e = document.querySelector(`[data-goto=".${s}"]`); break } } t.isIntersecting ? e && e.classList.add("_navigator-active") : e && e.classList.remove("_navigator-active") } } } if (document.addEventListener("click", o), document.addEventListener("watcherCallback", o), e()) { let t; document.querySelector(`#${e()}`) ? t = `#${e()}` : document.querySelector(`.${e()}`) && (t = `.${e()}`), t && r(t, !0, 500, 20) } }(), function () { i = !0; const t = document.querySelector("header.header"), e = t.hasAttribute("data-scroll-show"), o = t.dataset.scrollShow ? t.dataset.scrollShow : 500, s = t.dataset.scroll ? t.dataset.scroll : 1; let a, c = 0; document.addEventListener("windowScroll", (function (n) { const l = window.scrollY; clearTimeout(a), l >= s ? (!t.classList.contains("_header-scroll") && t.classList.add("_header-scroll"), e && (l > c ? t.classList.contains("_header-show") && t.classList.remove("_header-show") : !t.classList.contains("_header-show") && t.classList.add("_header-show"), a = setTimeout((() => { !t.classList.contains("_header-show") && t.classList.add("_header-show") }), o))) : (t.classList.contains("_header-scroll") && t.classList.remove("_header-scroll"), e && t.classList.contains("_header-show") && t.classList.remove("_header-show")), c = l <= 0 ? 0 : l })) }() })();