/* global React, ReactDOM */
const { useState, useEffect, useRef } = React;
// ─────────────────────────────────────────────────────────────────
// TWEAKABLES — single source of truth, host can rewrite via __edit_mode_set_keys
// ─────────────────────────────────────────────────────────────────
const DEFAULTS = /*EDITMODE-BEGIN*/{
"accent": "#00B7FF",
"displayFont": "Bai Jamjuree",
"bodyFont": "Montserrat",
"heroVariant": "split",
"showGridBg": false,
"showStats": true,
"density": "comfortable"
}/*EDITMODE-END*/;
// ─────────────────────────────────────────────────────────────────
// PRIMITIVES
// ─────────────────────────────────────────────────────────────────
const Pill = ({ children, dark }) => (
{children}
);
const Counter = ({ to, suffix = "", duration = 1500 }) => {
const [n, setN] = useState(0);
const ref = useRef(null);
const inView = window.useInView(ref);
const ran = useRef(false);
useEffect(() => {
if (!inView || ran.current) return;
ran.current = true;
const start = performance.now();
const tick = (t) => {
const p = Math.min((t - start) / duration, 1);
const eased = 1 - Math.pow(1 - p, 3);
setN(Math.round(to * eased));
if (p < 1) requestAnimationFrame(tick);
};
requestAnimationFrame(tick);
// safety: guarantee the final value even if rAF is throttled
const snap = setTimeout(() => setN(to), duration + 400);
return () => clearTimeout(snap);
}, [inView, to, duration]);
return {n.toLocaleString()}{suffix};
};
// ─────────────────────────────────────────────────────────────────
// I18N
// ─────────────────────────────────────────────────────────────────
function useLang() {
const [lang, setLangState] = useState(() => (window.LABYZLY_I18N ? window.LABYZLY_I18N.getLang() : "en"));
useEffect(() => {
const onChange = (e) => setLangState(e.detail.lang);
window.addEventListener("i18n:changed", onChange);
return () => window.removeEventListener("i18n:changed", onChange);
}, []);
const setLang = (l) => {
// English-only launch: RU/TM buttons stay visible but stay inert.
if (l !== "en") return;
if (window.LABYZLY_I18N) window.LABYZLY_I18N.setLang(l);
setLangState(l);
};
const t = (path) => {
const parts = path.split(".");
const dict = window.__I18N__ || {};
let node = dict[lang] || dict.en || {};
for (const p of parts) node = node && node[p];
if (node === undefined || node === null) {
node = dict.en || {};
for (const p of parts) node = node && node[p];
}
return node;
};
return { lang, setLang, t };
}
// ─────────────────────────────────────────────────────────────────
// TOP UTILITY BAR
// ─────────────────────────────────────────────────────────────────
function TopBar({ lang, setLang }) {
return (
{/*
*/}
);
}
// ─────────────────────────────────────────────────────────────────
// NAV
// ─────────────────────────────────────────────────────────────────
function Nav({ t, lang, setLang }) {
const [scrolled, setScrolled] = useState(false);
const [mobileOpen, setMobileOpen] = useState(false);
useEffect(() => {
const on = () => setScrolled(window.scrollY > 20);
on();
window.addEventListener("scroll", on, { passive: true });
return () => window.removeEventListener("scroll", on);
}, []);
const closeMobile = () => setMobileOpen(false);
return (
);
}
// ─────────────────────────────────────────────────────────────────
// HERO
// ─────────────────────────────────────────────────────────────────
function Hero({ t, showGrid, showStats }) {
const { Gear, ParallaxLayer } = window;
return (
{showGrid && }
{/* ── FAINT POLYGONAL SKYLINE ── */}
{t("home.heroLine1")}
{t("home.heroLine2")}
{t("home.heroLine3")}
{t("home.heroSub")}
{t("home.metaK1")}
{t("home.metaV1")}
{t("home.metaK2")}
{t("home.metaV2")}
{t("home.metaK3")}
{t("home.metaV3")}
{t("home.cardTag")}
{t("home.cardTitle")}
{t("home.cardMini")}
);
}
// ─────────────────────────────────────────────────────────────────
// MARQUEE TRUST STRIP
// ─────────────────────────────────────────────────────────────────
function TrustStrip({ t }) {
const partners = t("home.marquee");
return (
{[...partners, ...partners].map((p, i) => (
{p}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// SCOPE OF SERVICES
// ─────────────────────────────────────────────────────────────────
const SCOPE_ICONS = ["gear", "globe", "wrench", "shield", "construction", "headset"];
function ScopeIcon({ name }) {
const p = { width: 22, height: 22, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.7, strokeLinecap: "round", strokeLinejoin: "round" };
if (name === "gear") return (
);
if (name === "wrench") return (
);
if (name === "globe") return (
);
if (name === "shield") return (
);
if (name === "truck") return (
);
if (name === "headset") return (
);
if (name === "construction") return (
);
return null;
}
function Services({ t }) {
const scope = t("home.scope");
return (
{scope.map((s, i) => (
{s.title}
{s.desc}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// EQUIPMENT TABS
// ─────────────────────────────────────────────────────────────────
const EQUIPMENT_IMGS = ["assets/eq-mechanical.jpg", "assets/eq-electrical.png", "assets/eq-instrumentation.jpg", "assets/eq-chemical.jpg"];
function Equipment({ t }) {
const equipment = t("home.equipment");
return (
{equipment.map((d, i) => (
{d.name}
{d.blurb}
{d.items.map((k) => (
-
{k}
))}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// SAFETY / QUALITY / ENVIRONMENT
// ─────────────────────────────────────────────────────────────────
const PILLAR_FILES = [
{ page: "assets/docs/page-health.png", pdf: "assets/docs/Health-and-Safety-Policy.pdf" },
{ page: "assets/docs/page-environmental.png", pdf: "assets/docs/Environmental-Responsibility-Policy.pdf" },
{ page: "assets/docs/page-quality.png", pdf: "assets/docs/Quality-Policy.pdf" },
{ page: "assets/docs/page-compliance.png", pdf: "assets/docs/Compliance-and-Corporate-Responsibility-Policy.pdf" },
];
function Pillars({ t }) {
const cards = t("hse.cards");
const PILLARS = cards.map((c, i) => ({ k: c.title, desc: c.desc, page: PILLAR_FILES[i].page, pdf: PILLAR_FILES[i].pdf }));
const gridRef = useRef(null);
const cardsRef = useRef([]);
useEffect(() => {
let raf;
const update = () => {
const el = gridRef.current;
if (!el) return;
const r = el.getBoundingClientRect();
const h = window.innerHeight || document.documentElement.clientHeight;
const start = h * 0.96;
const end = h * 0.38;
let p = (start - r.top) / (start - end);
p = Math.max(0, Math.min(1, p));
cardsRef.current.forEach((c, i) => {
if (!c) return;
const stagger = i * 0.14;
let cp = (p - stagger) / (1 - stagger);
cp = Math.max(0, Math.min(1, cp));
const eased = 1 - Math.pow(1 - cp, 3);
c.style.setProperty("--rise", `${(1 - eased) * 96}px`);
c.style.setProperty("--op", (0.25 + 0.75 * eased).toFixed(3));
});
};
const onScroll = () => { cancelAnimationFrame(raf); raf = requestAnimationFrame(update); };
update();
window.addEventListener("scroll", onScroll, { passive: true });
window.addEventListener("resize", onScroll);
return () => {
cancelAnimationFrame(raf);
window.removeEventListener("scroll", onScroll);
window.removeEventListener("resize", onScroll);
};
}, []);
return (
);
}
// ─────────────────────────────────────────────────────────────────
// FEATURED MANUFACTURERS
// ─────────────────────────────────────────────────────────────────
const MANUFACTURER_FILES = [
{ name: "RMT Valvomeccanica S.r.l.", logo: "assets/mfg-rmt.png?v=2" },
{ name: "Pure Aqua, Inc.", logo: "assets/mfg-pureaqua.png?v=2" },
{ name: "FLENDER GmbH", logo: "assets/mfg-flender.png?v=2" },
{ name: "Johnson Screens", logo: "assets/mfg-johnson.webp" },
{ name: "MSNT Co., Ltd.", logo: "assets/mfg-msnt.png?v=3" },
{ name: "Sewon Q.E.C. Co., Ltd.", logo: "assets/mfg-sewon.png" },
];
function Manufacturers({ t }) {
const [openSet, setOpenSet] = useState(() => new Set());
const toggle = (i) =>
setOpenSet((prev) => {
const next = new Set(prev);
next.has(i) ? next.delete(i) : next.add(i);
return next;
});
const mfgText = t("brands.mfg");
const MANUFACTURERS = MANUFACTURER_FILES.map((f, i) => ({ ...f, ...mfgText[i] }));
return (
{MANUFACTURERS.map((m, i) => {
const isOpen = openSet.has(i);
return (
{m.logo
?

:
{m.name}}
{m.short}
{m.status}
{m.country}
);
})}
);
}
// ─────────────────────────────────────────────────────────────────
// COOPERATION CLIENTS
// ─────────────────────────────────────────────────────────────────
function Clients({ t }) {
const { Reveal } = window;
const clients = [
{ name: "The State Concern \u201cTurkmengaz\u201d", logo: "assets/client-turkmengaz.png?v=2" },
{ name: "The State Concern \u201cTurkmennebit\u201d", logo: "assets/client-turkmennebit.png?v=2" },
{ name: "State Concern \u201cTurkmenhimiya\u201d", logo: "assets/client-turkmenhimiya.png?v=2" },
{ name: "\u201cTurkmengeology\u201d State Corporation", logo: "assets/client-turkmengeology.png?v=2" },
{ name: "PETRONAS Carigali (Turkmenistan) Sdn. Bhd.", logo: "assets/client-petronas.png?v=5" },
{ name: "Dragon Oil\n(Turkmenistan) Ltd.", logo: "assets/client-dragonoil.png?v=2" },
{ name: "CNPC International Ltd. (Turkmenistan Branch)", logo: "assets/client-cnpc.png?v=2" },
{ name: "ENI Turkmenistan Limited", logo: "assets/client-eni.png?v=2" },
{ name: "Schlumberger", logo: "assets/client-schlumberger.png?v=2" },
{ name: "Daewoo Engineering & Construction", logo: "assets/client-daewoo.png?v=2" },
{ name: "Ronesans Endustri Tesisleri", logo: "assets/client-ronesans.png?v=2" },
{ name: "PETROFAC", logo: "assets/client-petrofac.png?v=2" },
];
return (
{clients.map((c) => (
{c.name}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// CTA + FOOTER
// ─────────────────────────────────────────────────────────────────
function CTA({ t }) {
const [sent, setSent] = useState(false);
return (
);
}
function Footer({ t }) {
return (
);
}
// ─────────────────────────────────────────────────────────────────
// ICONS
// ─────────────────────────────────────────────────────────────────
function LogoMark({ light }) {
return (
);
}
function PhoneIcon() { return ; }
function MailIcon() { return ; }
function PinIcon() { return ; }
function ArrowIcon() { return ; }
function PlayIcon() { return ; }
function CheckIcon() { return ; }
function CloseIcon() { return ; }
function CheckCircleIcon() { return ; }
function SocialIcon({ name }) {
if (name === "linkedin") return ;
if (name === "facebook") return ;
if (name === "instagram") return ;
if (name === "telegram") return ;
if (name === "whatsapp") return ;
return null;
}
function DotIcon() { return ; }
function ServiceIcon({ name }) {
const common = { width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", stroke: "var(--accent)", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" };
if (name === "wrench") return (
);
if (name === "helmet") return (
);
if (name === "box") return (
);
if (name === "compass") return (
);
return null;
}
// ─────────────────────────────────────────────────────────────────
// APP
// ─────────────────────────────────────────────────────────────────
function App() {
const [tw, setTweak] = window.useTweaks(DEFAULTS);
const { lang, setLang, t } = useLang();
useEffect(() => {
document.documentElement.style.setProperty("--accent", tw.accent);
document.documentElement.style.setProperty("--display-font", `'${tw.displayFont}', sans-serif`);
document.documentElement.style.setProperty("--body-font", `'${tw.bodyFont}', sans-serif`);
document.documentElement.dataset.density = tw.density;
}, [tw.accent, tw.displayFont, tw.bodyFont, tw.density]);
const { TweaksPanel, TweakSection, TweakColor, TweakSelect, TweakToggle } = window;
return (
<>
setTweak("accent", v)}
/>
setTweak("displayFont", v)}
/>
setTweak("bodyFont", v)}
/>
setTweak("showGridBg", v)}
/>
setTweak("density", v)}
/>
>
);
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render();
window.__appMounted = true;
window.dispatchEvent(new Event("app:mounted"));
if (window.location.hash) {
const targetId = window.location.hash.slice(1);
const scrollToTarget = () => {
const target = document.getElementById(targetId);
if (target) target.scrollIntoView({ behavior: "instant", block: "start" });
};
// Scroll as soon as the section exists, then re-apply once every image on
// the page has finished loading — images below the target section shift
// its position as they load, so the first attempt alone can land short.
requestAnimationFrame(scrollToTarget);
if (document.readyState === "complete") {
setTimeout(scrollToTarget, 50);
} else {
window.addEventListener("load", () => setTimeout(scrollToTarget, 50), { once: true });
}
}