var version=(function(){"use strict";function f(t){return t}const l=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome;function u(){const t=document.createElement("div"),e=l.runtime.getManifest();t.dataset.id="09429509-0b45-4961-b46d-c15269e0b08b",t.dataset.name="yiketu-extension",t.dataset.version=e.version,document.body.appendChild(t)}const h={matches:["<all_urls>"],runAt:"document_end",main(){u()}};function s(t,...e){}const g={debug:(...t)=>s(console.debug,...t),log:(...t)=>s(console.log,...t),warn:(...t)=>s(console.warn,...t),error:(...t)=>s(console.error,...t)};class c extends Event{constructor(e,n){super(c.EVENT_NAME,{}),this.newUrl=e,this.oldUrl=n}static EVENT_NAME=d("wxt:locationchange")}function d(t){return`${l?.runtime?.id}:version:${t}`}function v(t){let e,n;return{run(){e==null&&(n=new URL(location.href),e=t.setInterval(()=>{let i=new URL(location.href);i.href!==n.href&&(window.dispatchEvent(new c(i,n)),n=i)},1e3))}}}class o{constructor(e,n){this.contentScriptName=e,this.options=n,this.abortController=new AbortController,this.isTopFrame?(this.listenForNewerScripts({ignoreFirstEvent:!0}),this.stopOldScripts()):this.listenForNewerScripts()}static SCRIPT_STARTED_MESSAGE_TYPE=d("wxt:content-script-started");isTopFrame=window.self===window.top;abortController;locationWatcher=v(this);receivedMessageIds=new Set;get signal(){return this.abortController.signal}abort(e){return this.abortController.abort(e)}get isInvalid(){return l.runtime.id==null&&this.notifyInvalidated(),this.signal.aborted}get isValid(){return!this.isInvalid}onInvalidated(e){return this.signal.addEventListener("abort",e),()=>this.signal.removeEventListener("abort",e)}block(){return new Promise(()=>{})}setInterval(e,n){const i=setInterval(()=>{this.isValid&&e()},n);return this.onInvalidated(()=>clearInterval(i)),i}setTimeout(e,n){const i=setTimeout(()=>{this.isValid&&e()},n);return this.onInvalidated(()=>clearTimeout(i)),i}requestAnimationFrame(e){const n=requestAnimationFrame((...i)=>{this.isValid&&e(...i)});return this.onInvalidated(()=>cancelAnimationFrame(n)),n}requestIdleCallback(e,n){const i=requestIdleCallback((...r)=>{this.signal.aborted||e(...r)},n);return this.onInvalidated(()=>cancelIdleCallback(i)),i}addEventListener(e,n,i,r){n==="wxt:locationchange"&&this.isValid&&this.locationWatcher.run(),e.addEventListener?.(n.startsWith("wxt:")?d(n):n,i,{...r,signal:this.signal})}notifyInvalidated(){this.abort("Content script context invalidated"),g.debug(`Content script "${this.contentScriptName}" context invalidated`)}stopOldScripts(){window.postMessage({type:o.SCRIPT_STARTED_MESSAGE_TYPE,contentScriptName:this.contentScriptName,messageId:Math.random().toString(36).slice(2)},"*")}verifyScriptStartedEvent(e){const n=e.data?.type===o.SCRIPT_STARTED_MESSAGE_TYPE,i=e.data?.contentScriptName===this.contentScriptName,r=!this.receivedMessageIds.has(e.data?.messageId);return n&&i&&r}listenForNewerScripts(e){let n=!0;const i=r=>{if(this.verifyScriptStartedEvent(r)){this.receivedMessageIds.add(r.data.messageId);const w=n;if(n=!1,w&&e?.ignoreFirstEvent)return;this.notifyInvalidated()}};addEventListener("message",i),this.onInvalidated(()=>removeEventListener("message",i))}}function p(){}function a(t,...e){}const m={debug:(...t)=>a(console.debug,...t),log:(...t)=>a(console.log,...t),warn:(...t)=>a(console.warn,...t),error:(...t)=>a(console.error,...t)};return(async()=>{try{const{main:t,...e}=h,n=new o("version",e);return await t(n)}catch(t){throw m.error('The content script "version" crashed on startup!',t),t}})()})();
version;