(function () { "use strict"; var root = document.querySelector("[data-two-rivers]"); if (!root) return; var button = root.querySelector("[data-tr-age-confirm]"); var ageScreen = root.querySelector("[data-tr-age]"); var loading = root.querySelector("[data-tr-loading]"); var loadingCopy = root.querySelector("[data-tr-loading-copy]"); var AGE_KEY = "zxh_two_rivers_age_gate_v1"; if (!button || !ageScreen || !loading) return; button.addEventListener("click", function () { root.dataset.ageConfirmed = "true"; try { localStorage.setItem(AGE_KEY, "true"); } catch (_error) { // The module bootstrap can still use the in-page marker when storage is unavailable. } ageScreen.hidden = true; loading.hidden = false; if (loadingCopy) loadingCopy.textContent = "Opening the festival…"; window.setTimeout(function () { if (!loading.hidden && !root.querySelector("[data-tr-menu]:not([hidden])")) { loading.innerHTML = "
The festival files did not finish loading.

Refresh once to fetch the latest game files. If the problem continues, the deployment is incomplete.

Return to the playroom
"; var retry = loading.querySelector("[data-tr-gate-retry]"); if (retry) retry.addEventListener("click", function () { location.reload(); }); } }, 12000); }, {once: true}); }());