var e,t;"function"==typeof(e=globalThis.define)&&(t=e,e=null),function(t,n,r,o,u){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],f=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,n){if(!f[e]){if(!t[e]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(e,!0);if(l)return l(e,!0);if(a&&"string"==typeof e)return a(e);var u=Error("Cannot find module '"+e+"'");throw u.code="MODULE_NOT_FOUND",u}m.resolve=function(n){var r=t[e][1][n];return null!=r?r:n},m.cache={};var d=f[e]=new c.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return f[e].exports;function m(e){var t=m.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=t,c.cache=f,c.parent=l,c.register=function(e,n){t[e]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return i[o]}}),i[o]=c;for(var d=0;d<n.length;d++)c(n[d]);if(r){var m=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof e&&e.amd?e(function(){return m}):u&&(this[u]=m)}}({dHvHv:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"config",()=>o);let o={matches:["<all_urls>"],run_at:"document_start",all_frames:!0},u="data-market-mate-context-menu-image-url",i="data-market-mate-context-menu-target",l=null;function f(e){let t=e instanceof HTMLImageElement?e:e.querySelector("img");if(t instanceof HTMLImageElement){let e=[t.currentSrc,t.src,t.getAttribute("data-src")||"",t.getAttribute("data-img-src")||""];for(let t of e){let e=c(t);if(e)return e}}if(e instanceof HTMLVideoElement){let t=c(e.getAttribute("poster")||"");if(t)return t}let n=a(window.getComputedStyle(e).backgroundImage);if(n)return n;let r=a(window.getComputedStyle(e,"::before").backgroundImage);return r||a(window.getComputedStyle(e,"::after").backgroundImage)}function a(e){if(!e||"none"===e)return"";let t=e.match(/url\((.*?)\)/i);return c(t?.[1]||"")}function c(e){let t=e.trim().replace(/^['"]|['"]$/g,"");if(!t)return"";try{let e=new URL(t,location.href).toString();return/^(https?:|data:image|blob:)/i.test(e)?e:""}catch{return""}}document.addEventListener("contextmenu",function(e){l?.removeAttribute(i);let t=function(e){let t=e.composedPath?.()[0];return t instanceof Element?t:e.target instanceof Element?e.target:null}(e);t?.setAttribute(i,"true"),l=t;let n=function(e){if(!e)return"";let t=f(e);if(t)return t;let n=e.parentElement;for(let e=0;n&&e<2;e+=1){let e=f(n);if(e)return e;n=n.parentElement}let r=e.parentElement;if(!r)return"";for(let t of Array.from(r.children)){if(t===e)continue;let n=f(t);if(n)return n}return""}(t)||function(e){let{clientX:t,clientY:n}=e;if("number"!=typeof t||"number"!=typeof n)return"";try{let e=document.elementsFromPoint(t,n);for(let t of e.slice(0,8)){let e=f(t);if(e)return e}}catch{}return""}(e);n?document.documentElement.setAttribute(u,n):document.documentElement.removeAttribute(u);try{chrome.runtime.sendMessage({type:"market-mate-context-menu-image-source",imageUrl:n},()=>{chrome.runtime.lastError})}catch{}},!0)},{"@parcel/transformer-js/src/esmodule-helpers.js":"fRZO2"}],fRZO2:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["dHvHv"],"dHvHv","parcelRequireaa81"),globalThis.define=t;