var e,r;"function"==typeof(e=globalThis.define)&&(r=e,e=null),function(r,t,n,a,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof l[a]&&l[a],i=s.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,t){if(!i[e]){if(!r[e]){var n="function"==typeof l[a]&&l[a];if(!t&&n)return n(e,!0);if(s)return s(e,!0);if(d&&"string"==typeof e)return d(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(t){var n=r[e][1][t];return null!=n?n:t},f.cache={};var c=i[e]=new u.Module(e);r[e][0].call(c.exports,f,c,c.exports,this)}return i[e].exports;function f(e){var r=f.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=r,u.cache=i,u.parent=s,u.register=function(e,t){r[e]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return l[a]}}),l[a]=u;for(var c=0;c<t.length;c++)u(t[c]);if(n){var f=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof e&&e.amd?e(function(){return f}):o&&(this[o]=f)}}({"9MeLJ":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"config",()=>o);var a=e("@plasmohq/messaging");let o={matches:["<all_urls>"]};(0,a.relayMessage)({name:"hello"}),(0,a.relayMessage)({name:"makeRequest"}),(0,a.relayMessage)({name:"prepareStream"}),(0,a.relayMessage)({name:"openPage"})},{"@plasmohq/messaging":"92GyB","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],"92GyB":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"relay",()=>m),n.export(t,"relayMessage",()=>g),n.export(t,"sendToActiveContentScript",()=>p),n.export(t,"sendToBackground",()=>c),n.export(t,"sendToBackgroundViaRelay",()=>y),n.export(t,"sendToContentScript",()=>f),n.export(t,"sendViaRelay",()=>b);var a=e("nanoid"),o=globalThis.browser?.tabs||globalThis.chrome?.tabs,l=()=>{let e=globalThis.browser?.runtime||globalThis.chrome?.runtime;if(!e)throw Error("Extension runtime is not available");return e},s=()=>{if(!o)throw Error("Extension tabs API is not available");return o},i=async()=>{let e=s(),[r]=await e.query({active:!0,currentWindow:!0});return r},d=(e,r)=>!r.__internal&&e.source===globalThis.window&&e.data.name===r.name&&(void 0===r.relayId||e.data.relayId===r.relayId),u=(e,r,t=globalThis.window)=>{let n=async n=>{if(d(n,e)&&!n.data.relayed){let a={name:e.name,relayId:e.relayId,body:n.data.body},o=await r?.(a);t.postMessage({name:e.name,relayId:e.relayId,instanceId:n.data.instanceId,body:o,relayed:!0},{targetOrigin:e.targetOrigin||"/"})}};return t.addEventListener("message",n),()=>t.removeEventListener("message",n)},c=async e=>l().sendMessage(e.extensionId??null,e),f=async e=>{let r="number"==typeof e.tabId?e.tabId:(await i())?.id;if(!r)throw Error("No active tab found to send message to.");return s().sendMessage(r,e)},p=f,g=e=>u(e,c),m=g,y=(e,r=globalThis.window)=>new Promise((t,n)=>{let o=(0,a.nanoid)(),l=new AbortController;r.addEventListener("message",r=>{d(r,e)&&r.data.relayed&&r.data.instanceId===o&&(t(r.data.body),l.abort())},{signal:l.signal}),r.postMessage({...e,instanceId:o},{targetOrigin:e.targetOrigin||"/"})}),b=y},{nanoid:"g2QpR","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],g2QpR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"urlAlphabet",()=>a.urlAlphabet),n.export(t,"random",()=>o),n.export(t,"customRandom",()=>l),n.export(t,"customAlphabet",()=>s),n.export(t,"nanoid",()=>i);var a=e("./url-alphabet/index.js");let o=e=>crypto.getRandomValues(new Uint8Array(e)),l=(e,r,t)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*n*r/e.length);return (o=r)=>{let l="";for(;;){let r=t(a),s=a;for(;s--;)if((l+=e[r[s]&n]||"").length===o)return l}}},s=(e,r=21)=>l(e,r,o),i=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,r)=>((r&=63)<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),"")},{"./url-alphabet/index.js":!1,"@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],cHUbl:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||r.hasOwnProperty(t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["9MeLJ"],"9MeLJ","parcelRequire1a16"),globalThis.define=r;