text: (()=>{return(e,t)=>{function i(e=true){const t=document.title.replace("_番剧_bilibili_哔哩哔哩","").replace("_电影_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(" - 哔哩哔哩直播，二次元弹幕直播平台","").replace(/[\/\\:\*\?"<>\|]/g,"").trim();if(!e||document.URL.indexOf("/bangumi")!==-1){return t}else{const e=document.querySelector("#multi_page .cur-list>ul li.on a");if(e===null){return t}else{const i=e.getAttribute("title");return t+" - "+i}}}function l(e,t=true){const i=new Date;const l={title:document.title.replace(t?/：([^：]+?)_番剧_bilibili_哔哩哔哩/:"_番剧_bilibili_哔哩哔哩","").replace(t?/：([^：]+?)_电影_bilibili_哔哩哔哩/:"_电影_bilibili_哔哩哔哩","").replace(t?/：([^：]+?)_纪录片_bilibili_哔哩哔哩/:"_纪录片_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(/(.*?) - (.*?) - 哔哩哔哩直播，二次元弹幕直播平台/,"$1").trim(),ep:(()=>{if(!t){return null}const e=dq("#eplist_module li.cursor .ep-title");if(e!==null){return e.innerText}const i=document.querySelector("#multi_page .cur-list>ul li.on a");if(i!==null){return i.getAttribute("title")}return null})(),aid:unsafeWindow.aid,cid:unsafeWindow.cid,lid:document.URL.replace(/https:\/\/live\.bilibili\.com\/(\d+).*/,"$1"),y:i.getFullYear().toString(),M:(i.getMonth()+1).toString().padStart(2,"0"),d:i.getDate().toString().padStart(2,"0"),h:i.getHours().toString().padStart(2,"0"),m:i.getMinutes().toString().padStart(2,"0"),s:i.getSeconds().toString().padStart(2,"0"),ms:i.getMilliseconds().toString().substr(0,3)};const r=Object.keys(l).reduce((e,t)=>{return e.replace(new RegExp(`\\[([^\\[\\]]*?)${t}([^\\[\\]]*?)\\]`,"g"),l[t]?`$1${l[t]}$2`:"")},e);return r.replace(/[\/\\:\*\?"<>\|]/g,"")}function r(t=true){if(e.filenameFormat===undefined){return i(t)}return l(e.filenameFormat,t)}return{export:{getFriendlyTitle:r,formatTitle:l}}}})();