/**
 * 极早初始化：只要 biliindex-core 已加载就写入版本号（便于控制台诊断 tag-slots 主文件是否失败）
 */
(function () {
  "use strict";
  if (window.self !== window.top) return;
  if (typeof BiliIndex === "undefined") return;
  try {
    const v = BiliIndex.getExtensionVersion();
    document.documentElement?.setAttribute?.("data-biliindex-version", v);
    document.documentElement?.setAttribute?.("data-biliindex-tag-slots-init", "1");
    void BiliIndex.needsApiProxy?.();
  } catch (e) {
    console.warn("[BiliIndex] tag-slots-init 失败", e);
  }
})();
