!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/dark-mode/follow-system"]=t():e["style/dark-mode/follow-system"]=t()}(globalThis,(()=>(()=>{"use strict";var e,t,o={905:e=>{e.exports=coreApis.settings}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var l=i[e]={exports:{}};return o[e](l,l.exports,r),l.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}var l=Object.create(null);r.r(l);var n={};e=e||[null,t({}),t([]),t(t)];for(var c=2&i&&o;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>n[e]=()=>o[e]));return n.default=()=>o,r.d(l,n),l},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};r.d(l,{component:()=>m});const n=coreApis.componentApis.define,c=coreApis.lifeCycle,m=(0,n.defineComponentMetadata)({name:"darkModeFollowSystem",displayName:"夜间模式跟随系统",entry:()=>{unsafeWindow.addEventListener(c.LifeCycleEventTypes.End,(async()=>{const{getComponentSettings:e}=await Promise.resolve().then(r.t.bind(r,905,23)),t=e("darkMode"),o=matchMedia("(prefers-color-scheme: dark)"),i=e=>{e!==t.enabled&&(t.enabled=e)};i(o.matches),o.addEventListener("change",(e=>{i(e.matches)}))}))},urlExclude:["//member.bilibili.com/v2","//member.bilibili.com/platform","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/","//member.bilibili.com/platform","//live.bilibili.com/p/html/live-lottery/anchor-join.html","//account.bilibili.com/subtitle/edit/#/editor","/york/allowance-charge","//cm.bilibili.com/quests/#/task","//live.bilibili.com/activity/live-activity-full/full-next/index.html","//gf.bilibili.com/","//shop.bilibili.com/"],tags:[componentsTags.style,componentsTags.general],description:{"zh-CN":"\n使夜间模式同步系统设置的亮 / 暗主题, 请勿和 `夜间模式计划时段` 一同使用.\n\n> 注：在某些浏览器 (如 `Microsoft Edge`) 中，夜间模式仅会同步浏览器的亮 / 暗主题.\n    ".trim()},commitHash:"f8d9b5665fc198fe5b2eb39c57dab6d686e5ed74",coreVersion:"2.10.4"});return l=l.component})()));