var e = new class {
	get #e() {
		return globalThis.document.querySelector("[type=speculationrules]");
	}
	get #t() {
		return globalThis.document.documentElement.getAttribute("nve-transition");
	}
	#n;
	enable() {
		globalThis.document && (this.#n?.disconnect(), this.#r(), this.#n = new MutationObserver(() => this.#r()), this.#n.observe(globalThis.document.documentElement, { attributeFilter: ["nve-transition"] }));
	}
	disable() {
		this.#a(), this.#n?.disconnect();
	}
	#r() {
		globalThis.document && this.#t === "auto" ? this.#e || this.#i() : this.#a();
	}
	#i() {
		let e = globalThis.document.createElement("script");
		e.id = "nve-speculationrules", e.type = "speculationrules", e.textContent = JSON.stringify({ prerender: [{
			where: { href_matches: "/*" },
			eagerness: "moderate"
		}] }), globalThis.document.head.appendChild(e);
	}
	#a() {
		globalThis.document?.querySelector("#nve-speculationrules")?.remove();
	}
}();
//#endregion
export { e as TransitionService };

//# sourceMappingURL=transition.service.js.map