forked from insightbrowser/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
invert_colors.js
42 lines (38 loc) · 62.5 KB
/
invert_colors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Minified by jsDelivr using Terser v5.3.5.
* Original file: /npm/[email protected]/darkreader.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).DarkReader={})}(this,(function(e){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var r=function(){return(r=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function t(e,r,t,n){return new(t||(t=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,u)}c((n=n.apply(e,r||[])).next())}))}function n(e,r){var t,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(e,i)}catch(e){a=[6,e],n=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function o(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,a=t.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return i}function i(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(a(arguments[r]));return e}var u,c="undefined"==typeof navigator?"some useragent":navigator.userAgent.toLowerCase(),s="undefined"==typeof navigator?"some platform":navigator.platform.toLowerCase(),l=(c.includes("chrome")||c.includes("chromium"),c.includes("firefox")),d=(c.includes("vivaldi"),c.includes("yabrowser"),c.includes("opr")||c.includes("opera"),c.includes("edg"),s.startsWith("win")),f=s.startsWith("mac"),h=(c.includes("mobile"),"function"==typeof ShadowRoot),p=((u=c.match(/chrom[e|ium]\/([^ ]+)/))&&u[1]&&u[1],function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}}()),m=function(){try{return new CSSStyleSheet,!0}catch(e){return!1}}();function v(e,r){return t(this,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,fetch(e,{cache:"force-cache",credentials:"omit"})];case 1:if(t=n.sent(),l&&"text/css"===r&&e.startsWith("moz-extension://")&&e.endsWith(".css"))return[2,t];if(r&&!t.headers.get("Content-Type").startsWith(r))throw new Error("Mime type mismatch when loading "+e);if(!t.ok)throw new Error("Unable to load "+e+" "+t.status+" "+t.statusText);return[2,t]}}))}))}function g(e,r){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,v(e,r)];case 1:return[4,b(t.sent())];case 2:return[2,t.sent()]}}))}))}function b(e){return t(this,void 0,void 0,(function(){var r;return n(this,(function(t){switch(t.label){case 0:return[4,e.blob()];case 1:return r=t.sent(),[4,new Promise((function(e){var t=new FileReader;t.onloadend=function(){return e(t.result)},t.readAsDataURL(r)}))];case 2:return[2,t.sent()]}}))}))}var y=function(e){return t(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,Promise.reject(new Error(["Embedded Dark Reader cannot access a cross-origin resource",e,"Overview your URLs and CORS policies or use","`DarkReader.setFetchMethod(fetch: (url) => Promise<Response>))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},w=y;function S(e){return t(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return[4,w(e)];case 1:return[2,r.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var k=new Set;function _(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t(this,void 0,void 0,(function(){var r,t,o,a,i,u,c;return n(this,(function(n){switch(n.label){case 0:if(!e[0]||"fetch"!==e[0].type)return[3,8];r=e[0].id,n.label=1;case 1:return n.trys.push([1,7,,8]),t=e[0].data,o=t.url,a=t.responseType,[4,S(o)];case 2:return i=n.sent(),"data-url"!==a?[3,4]:[4,b(i)];case 3:return u=n.sent(),[3,6];case 4:return[4,i.text()];case 5:u=n.sent(),n.label=6;case 6:return k.forEach((function(e){return e({type:"fetch-response",data:u,error:null,id:r})})),[3,8];case 7:return c=n.sent(),console.error(c),k.forEach((function(e){return e({type:"fetch-response",data:null,error:c,id:r})})),[3,8];case 8:return[2]}}))}))}function x(e){k.add(e)}if("function"==typeof chrome.runtime.sendMessage){var E=chrome.runtime.sendMessage;chrome.runtime.sendMessage=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];_.apply(void 0,i(e)),E.apply(chrome.runtime,e)}}else chrome.runtime.sendMessage=_;if(chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener){var C=chrome.runtime.onMessage.addListener;chrome.runtime.onMessage.addListener=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];x.apply(void 0,i(e)),C.apply(chrome.runtime.onMessage,e)}}else chrome.runtime.onMessage.addListener=x;var M,A="dynamicTheme",R={background:"#181a1b",text:"#e8e6e3"},L={background:"#dcdad7",text:"#181a1b"},T={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!1,fontFamily:f?"Helvetica Neue":d?"Segoe UI":"Open Sans",textStroke:0,engine:A,stylesheet:"",darkSchemeBackgroundColor:R.background,darkSchemeTextColor:R.text,lightSchemeBackgroundColor:L.background,lightSchemeTextColor:L.text,scrollbarColor:f?"":"auto",selectionColor:"auto",styleSystemControls:!0};function P(e,r){var t,n;if(function(e){return null!=e.length}(e))for(var a=0,i=e.length;a<i;a++)r(e[a]);else try{for(var u=o(e),c=u.next();!c.done;c=u.next()){r(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}function j(e,r){P(r,(function(r){return e.push(r)}))}function W(e){return M||(M=document.createElement("a")),M.href=e,M.href}function O(e,r){return void 0===r&&(r=null),r?(r=W(r),new URL(e,r)):(e=W(e),new URL(e))}function q(e,r){if(r.match(/^data\:/))return r;var t=O(e);return O(r,t.href).href}function F(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r]}function B(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r]}function N(e,r){P(e,(function(e){if(e instanceof CSSMediaRule){var t=Array.from(e.media);(t.includes("screen")||t.includes("all")||!t.includes("print")&&!t.includes("speech"))&&N(e.cssRules,r)}else if(e instanceof CSSStyleRule)r(e);else if(e instanceof CSSImportRule)try{N(e.styleSheet.cssRules,r)}catch(e){B(e)}else e instanceof CSSSupportsRule?CSS.supports(e.conditionText)&&N(e.cssRules,r):B("CSSRule type not supported",e)}))}function I(e,r){P(e,(function(t){var n=e.getPropertyValue(t).trim();n&&r(t,n)}))}function U(e){return e.startsWith("--")&&!e.startsWith("--darkreader")}function z(e){var r=new Map;return e&&N(e,(function(e){e.style&&I(e.style,(function(e,t){U(e)&&r.set(e,t)}))})),r}function D(e){var r=new Map;return I(e.style,(function(e,t){U(e)&&r.set(e,t)})),r}var $=/url\((('.+?')|(".+?")|([^\)]*?))\)/g,H=/@import (url\()?(('.+?')|(".+?")|([^\)]*?))\)?;?/g;function V(e){return e.replace(/^url\((.*)\)$/,"$1").replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")}function G(e){var r=O(e);return""+r.origin+r.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1")}var K=/\/\*[\s\S]*?\*\//g;var J=/@font-face\s*{[^}]*}/g;var Q=/var\((--[^\s,\(\)]+),?\s*([^\(\)]*(\([^\(\)]*\)[^\(\)]*)*\s*)\)/g;function X(e,r,t){void 0===t&&(t=new Set);var n=!1,o=new Set,a=e.replace(Q,(function(e,a,i){if(t.has(a))return B("Circular reference to variable "+a),i||(n=!0,e);if(r.has(a)){var u=r.get(a);return u.match(Q)&&o.add(a),u}return i||(B("Variable "+a+" not found"),n=!0,e)}));return n?a:a.match(Q)?(o.forEach((function(e){return t.add(e)})),X(a,r,t)):a}function Y(e){var r,t=!1,n=null;return Object.assign((function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r=o,n?t=!0:(e.apply(void 0,i(r)),n=requestAnimationFrame((function(){n=null,t&&(e.apply(void 0,i(r)),t=!1)})))}),{cancel:function(){cancelAnimationFrame(n),t=!1,n=null}})}function Z(e){var r=0;return e.seconds&&(r+=1e3*e.seconds),e.minutes&&(r+=60*e.minutes*1e3),e.hours&&(r+=60*e.hours*60*1e3),e.days&&(r+=24*e.days*60*60*1e3),r}function ee(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,r,t){void 0===t&&(t=Function.prototype);var n=Z({seconds:2}),o=Z({seconds:10}),a=e.previousSibling,i=e.parentNode;if(!i)throw new Error("Unable to watch for node position: parent element not found");if("prev-sibling"===r&&!a)throw new Error("Unable to watch for node position: there is no previous sibling");var u=0,c=null,s=null,l=Y((function(){if(!s){u++;var f=Date.now();if(null==c)c=f;else if(u>=10){if(f-c<o)return B("Node position watcher paused: retry in "+n+"ms",e,a),void(s=setTimeout((function(){c=null,u=0,s=null,l()}),n));c=f,u=1}if("parent"===r&&a&&a.parentNode!==i)return B("Unable to restore node position: sibling parent changed",e,a,i),void h();if("prev-sibling"===r){if(null==a.parentNode)return B("Unable to restore node position: sibling was removed",e,a,i),void h();a.parentNode!==i&&(B("Style was moved to another parent",e,a,i),p(a.parentNode))}B("Restoring node position",e,a,i),i.insertBefore(e,a?a.nextSibling:i.firstChild),d.takeRecords(),t&&t()}})),d=new MutationObserver((function(){("parent"===r&&e.parentNode!==i||"prev-sibling"===r&&e.previousSibling!==a)&&l()})),f=function(){d.observe(i,{childList:!0})},h=function(){clearTimeout(s),d.disconnect(),l.cancel()},p=function(e){i=e,h(),f()};return f(),{run:f,stop:h,skip:function(){d.takeRecords()}}}function te(e,r){if(null!=e)for(var t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),n=e.shadowRoot?t.currentNode:t.nextNode();null!=n;n=t.nextNode())r(n),te(n.shadowRoot,r)}function ne(){return"complete"===document.readyState||"interactive"===document.readyState}var oe=new Set;function ae(e){oe.add(e)}function ie(e){oe.delete(e)}if(!ne()){var ue=function(){ne()&&(document.removeEventListener("readystatechange",ue),oe.forEach((function(e){return e()})),oe.clear())};document.addEventListener("readystatechange",ue)}var ce=new Map,se=new WeakMap;function le(e,r){var t,n,o;if(ce.has(e))t=ce.get(e),n=se.get(t);else{var a=!1,i=!1;(t=new MutationObserver((function(r){if(function(e){if(e.length>1e3)return!0;for(var r=0,t=0;t<e.length;t++)if((r+=e[t].addedNodes.length)>1e3)return!0;return!1}(r))!a||ne()?n.forEach((function(r){return(0,r.onHugeMutations)(e)})):i||(ae(o=function(){return n.forEach((function(r){return(0,r.onHugeMutations)(e)}))}),i=!0),a=!0;else{var t=function(e){var r=new Set,t=new Set,n=new Set;e.forEach((function(e){P(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&r.add(e)})),P(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?n.add(e):t.add(e))}))})),n.forEach((function(e){return r.delete(e)}));var o=[],a=[];return r.forEach((function(e){r.has(e.parentElement)&&o.push(e)})),t.forEach((function(e){t.has(e.parentElement)&&a.push(e)})),o.forEach((function(e){return r.delete(e)})),a.forEach((function(e){return t.delete(e)})),{additions:r,moves:n,deletions:t}}(r);n.forEach((function(e){return(0,e.onMinorMutations)(t)}))}}))).observe(e,{childList:!0,subtree:!0}),ce.set(e,t),n=new Set,se.set(t,n)}return n.add(r),{disconnect:function(){n.delete(r),o&&ie(o),0===n.size&&(t.disconnect(),se.delete(t),ce.delete(e))}}}function de(e){var r=e.h,t=e.s,n=e.l,o=e.a,i=void 0===o?1:o;if(0===t){var u=a([n,n,n].map((function(e){return Math.round(255*e)})),3),c=u[0],s=u[1];return{r:c,g:u[2],b:s,a:i}}var l=(1-Math.abs(2*n-1))*t,d=l*(1-Math.abs(r/60%2-1)),f=n-l/2,h=a((r<60?[l,d,0]:r<120?[d,l,0]:r<180?[0,l,d]:r<240?[0,d,l]:r<300?[d,0,l]:[l,0,d]).map((function(e){return Math.round(255*(e+f))})),3);return{r:h[0],g:h[1],b:h[2],a:i}}function fe(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=void 0===o?1:o,i=r/255,u=t/255,c=n/255,s=Math.max(i,u,c),l=Math.min(i,u,c),d=s-l,f=(s+l)/2;if(0===d)return{h:0,s:0,l:f,a:a};var h=60*(s===i?(u-c)/d%6:s===u?(c-i)/d+2:(i-u)/d+4);return h<0&&(h+=360),{h:h,s:d/(1-Math.abs(2*f-1)),l:f,a:a}}function he(e,r){void 0===r&&(r=0);var t=e.toFixed(r);if(0===r)return t;var n=t.indexOf(".");if(n>=0){var o=t.match(/0+$/);if(o)return o.index===n+1?t.substring(0,n):t.substring(0,o.index)}return t}function pe(e){var r=e.h,t=e.s,n=e.l,o=e.a;return null!=o&&o<1?"hsla("+he(r)+", "+he(100*t)+"%, "+he(100*n)+"%, "+he(o,2)+")":"hsl("+he(r)+", "+he(100*t)+"%, "+he(100*n)+"%)"}var me=/^rgba?\([^\(\)]+\)$/,ve=/^hsla?\([^\(\)]+\)$/,ge=/^#[0-9a-f]+$/i;function be(e){var r,t,n,o,i,u=e.trim().toLowerCase();if(u.match(me))return r=a(ye(u,we,Se,ke),4),t=r[0],n=r[1],o=r[2],i=r[3],{r:t,g:n,b:o,a:void 0===i?1:i};if(u.match(ve))return function(e){var r=a(ye(e,_e,xe,Ee),4),t=r[0],n=r[1],o=r[2],i=r[3];return de({h:t,s:n,l:o,a:void 0===i?1:i})}(u);if(u.match(ge))return function(e){var r=e.substring(1);switch(r.length){case 3:case 4:var t=a([0,1,2].map((function(e){return parseInt(""+r[e]+r[e],16)})),3);return{r:t[0],g:t[1],b:t[2],a:3===r.length?1:parseInt(""+r[3]+r[3],16)/255};case 6:case 8:var n=a([0,2,4].map((function(e){return parseInt(r.substring(e,e+2),16)})),3);return{r:n[0],g:n[1],b:n[2],a:6===r.length?1:parseInt(r.substring(6,8),16)/255}}throw new Error("Unable to parse "+e)}(u);if(Ce.has(u))return function(e){var r=Ce.get(e);return{r:r>>16&255,g:r>>8&255,b:r>>0&255,a:1}}(u);if(Me.has(u))return function(e){var r=Me.get(e);return{r:r>>16&255,g:r>>8&255,b:r>>0&255,a:1}}(u);if("transparent"===e)return{r:0,g:0,b:0,a:0};throw new Error("Unable to parse "+e)}function ye(e,r,t,n){var o=e.split(r).filter((function(e){return e})),i=Object.entries(n);return o.map((function(e){return e.trim()})).map((function(e,r){var n,o=i.find((function(r){var t=a(r,1)[0];return e.endsWith(t)}));return n=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*t[r]:parseFloat(e),t[r]>1?Math.round(n):n}))}var we=/rgba?|\(|\)|\/|,|\s/gi,Se=[255,255,255,1],ke={"%":100};var _e=/hsla?|\(|\)|\/|,|\s/gi,xe=[360,1,1,1],Ee={"%":100,deg:360,rad:2*Math.PI,turn:1};var Ce=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),Me=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var r=a(e,2),t=r[0],n=r[1];return[t.toLowerCase(),n]})));function Ae(e,r,t,n,o){return(e-r)*(o-n)/(t-r)+n}function Re(e,r,t){return Math.min(t,Math.max(r,e))}function Le(e,r){for(var t=[],n=0,o=e.length;n<o;n++){t[n]=[];for(var a=0,i=r[0].length;a<i;a++){for(var u=0,c=0,s=e[0].length;c<s;c++)u+=e[n][c]*r[c][a];t[n][a]=u}}return t}function Te(e,r,t){void 0===t&&(t=0);for(var n,o=[];n=e.exec(r);)o.push(n[t]);return o}function Pe(e){var r=je.identity();return 0!==e.sepia&&(r=Le(r,je.sepia(e.sepia/100))),0!==e.grayscale&&(r=Le(r,je.grayscale(e.grayscale/100))),100!==e.contrast&&(r=Le(r,je.contrast(e.contrast/100))),100!==e.brightness&&(r=Le(r,je.brightness(e.brightness/100))),1===e.mode&&(r=Le(r,je.invertNHue())),r}var je={identity:function(){return[[1,0,0,0,0],[0,1,0,0,0],[0,0,1,0,0],[0,0,0,1,0],[0,0,0,0,1]]},invertNHue:function(){return[[.333,-.667,-.667,0,1],[-.667,.333,-.667,0,1],[-.667,-.667,.333,0,1],[0,0,0,1,0],[0,0,0,0,1]]},brightness:function(e){return[[e,0,0,0,0],[0,e,0,0,0],[0,0,e,0,0],[0,0,0,1,0],[0,0,0,0,1]]},contrast:function(e){var r=(1-e)/2;return[[e,0,0,0,r],[0,e,0,0,r],[0,0,e,0,r],[0,0,0,1,0],[0,0,0,0,1]]},sepia:function(e){return[[.393+.607*(1-e),.769-.769*(1-e),.189-.189*(1-e),0,0],[.349-.349*(1-e),.686+.314*(1-e),.168-.168*(1-e),0,0],[.272-.272*(1-e),.534-.534*(1-e),.131+.869*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]},grayscale:function(e){return[[.2126+.7874*(1-e),.7152-.7152*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]}};function We(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function Oe(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}var qe=new Map,Fe=new Map;function Be(e){if(Fe.has(e))return Fe.get(e);var r=fe(be(e));return Fe.set(e,r),r}var Ne=["r","g","b","a"],Ie=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function Ue(e,r,t,n,o){var i;qe.has(t)?i=qe.get(t):(i=new Map,qe.set(t,i));var u=function(e,r){return Ne.map((function(r){return e[r]})).concat(Ie.map((function(e){return r[e]}))).join(";")}(e,r);if(i.has(u))return i.get(u);var c=de(t(fe(e),null==n?null:Be(n),null==o?null:Be(o))),s=c.r,l=c.g,d=c.b,f=c.a,h=a(function(e,r){var t=a(e,3),n=Le(r,[[t[0]/255],[t[1]/255],[t[2]/255],[1],[1]]);return[0,1,2].map((function(e){return Re(Math.round(255*n[e][0]),0,255)}))}([s,l,d],Pe(r)),3),p=h[0],m=h[1],v=h[2],g=1===f?function(e){var r=e.r,t=e.g,n=e.b,o=e.a;return"#"+(null!=o&&o<1?[r,t,n,Math.round(255*o)]:[r,t,n]).map((function(e){return(e<16?"0":"")+e.toString(16)})).join("")}({r:p,g:m,b:v}):function(e){var r=e.r,t=e.g,n=e.b,o=e.a;return null!=o&&o<1?"rgba("+he(r)+", "+he(t)+", "+he(n)+", "+he(o,2)+")":"rgb("+he(r)+", "+he(t)+", "+he(n)+")"}({r:p,g:m,b:v,a:f});return i.set(u,g),g}function ze(e){return e}function De(e,r){var t=We(r);return Ue(e,r,$e,Oe(r),t)}function $e(e,r,t){var n,o=e.h,a=e.s,i=e.l,u=e.a,c=i<.5;c?n=i<.2||a<.12:n=a<.24||i>.8&&(o>200&&o<280);var s=o,l=i;return n&&(c?(s=r.h,l=r.s):(s=t.h,l=t.s)),{h:s,s:l,l:Ae(i,0,1,r.l,t.l),a:u}}function He(e,r){var t=e.h,n=e.s,o=e.l,a=e.a,i=n<.12||o>.8&&(t>200&&t<280);if(o<.5){var u=Ae(o,0,.5,0,.4);return i?{h:r.h,s:r.s,l:u,a:a}:{h:t,s:n,l:u,a:a}}var c=Ae(o,.5,1,.4,r.l);if(i)return{h:r.h,s:r.s,l:c,a:a};var s=t;t>60&&t<180&&(s=t>120?Ae(t,120,180,135,180):Ae(t,60,120,60,105));return{h:s,s:n,l:c,a:a}}function Ve(e,t){if(0===t.mode)return De(e,t);var n=We(t);return Ue(e,r(r({},t),{mode:0}),He,n)}var Ge,Ke=.55;function Je(e){return Ae(e,205,245,205,220)}function Qe(e,r){var t=e.h,n=e.s,o=e.l,a=e.a,i=o<.2||n<.24,u=!i&&t>205&&t<245;if(o>.5){var c=Ae(o,.5,1,Ke,r.l);if(i)return{h:r.h,s:r.s,l:c,a:a};var s=t;return u&&(s=Je(t)),{h:s,s:n,l:c,a:a}}if(i)return{h:r.h,s:r.s,l:Ae(o,0,.5,r.l,Ke),a:a};var l,d=t;return u?(d=Je(t),l=Ae(o,0,.5,r.l,Math.min(1,.6000000000000001))):l=Ae(o,0,.5,r.l,Ke),{h:d,s:n,l:l,a:a}}function Xe(e,t){if(0===t.mode)return De(e,t);var n=Oe(t);return Ue(e,r(r({},t),{mode:0}),Qe,n)}function Ye(e,r,t){var n=e.h,o=e.s,a=e.l,i=e.a,u=n,c=o;return(a<.2||o<.24)&&(a<.5?(u=r.h,c=r.s):(u=t.h,c=t.s)),{h:u,s:c,l:Ae(a,0,1,.5,.2),a:i}}function Ze(e,t){if(0===t.mode)return De(e,t);var n=Oe(t),o=We(t);return Ue(e,r(r({},t),{mode:0}),Ye,n,o)}function er(e,r){return Ve(e,r)}function rr(e){var r=[];return e.mode===Ge.dark&&r.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&r.push("brightness("+e.brightness+"%)"),100!==e.contrast&&r.push("contrast("+e.contrast+"%)"),0!==e.grayscale&&r.push("grayscale("+e.grayscale+"%)"),0!==e.sepia&&r.push("sepia("+e.sepia+"%)"),0===r.length?null:r.join(" ")}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(Ge||(Ge={}));var tr=0,nr=new Map,or=new Map;function ar(e){return new Promise((function(r,t){var n=++tr;nr.set(n,r),or.set(n,t),chrome.runtime.sendMessage({type:"fetch",data:e,id:n})}))}function ir(e){return t(this,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return e.startsWith("data:")?(t=e,[3,3]):[3,1];case 1:return[4,ur(e)];case 2:t=n.sent(),n.label=3;case 3:return[4,cr(t)];case 4:return o=n.sent(),a=function(e){sr||(r=dr,t=dr,(sr=document.createElement("canvas")).width=r,sr.height=t,(lr=sr.getContext("2d")).imageSmoothingEnabled=!1);var r,t;var n=e.naturalWidth,o=e.naturalHeight;if(0===o||0===n)return B("logWarn(Image is empty "+e.currentSrc+")"),null;var a=n*o,i=Math.min(1,Math.sqrt(dr/a)),u=Math.ceil(n*i),c=Math.ceil(o*i);lr.clearRect(0,0,u,c),lr.drawImage(e,0,0,n,o,0,0,u,c);var s,l,d,f,h,p,m,v=lr.getImageData(0,0,u,c).data,g=.05,b=.4,y=.7,w=0,S=0,k=0;for(d=0;d<c;d++)for(l=0;l<u;l++)f=v[(s=4*(d*u+l))+0]/255,h=v[s+1]/255,p=v[s+2]/255,v[s+3]/255<g?w++:((m=.2126*f+.7152*h+.0722*p)<b&&S++,m>y&&k++);var _=u*c,x=_-w;return{isDark:S/x>=.7,isLight:k/x>=.7,isTransparent:w/_>=.1,isLarge:a>=48e4}}(o),[2,r({src:e,dataURL:t,width:o.naturalWidth,height:o.naturalHeight},a)]}}))}))}function ur(e){return t(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return function(e){var r=new URL(e);return r.host?r.host:r.protocol}(e)!==(location.host||location.protocol)?[3,2]:[4,g(e)];case 1:return[2,r.sent()];case 2:return[4,ar({url:e,responseType:"data-url"})];case 3:return[2,r.sent()]}}))}))}function cr(e){return t(this,void 0,void 0,(function(){return n(this,(function(r){return[2,new Promise((function(r,t){var n=new Image;n.onload=function(){return r(n)},n.onerror=function(){return t("Unable to load image "+e)},n.src=e}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var r=e.type,t=e.data,n=e.error,o=e.id;if("fetch-response"===r){var a=nr.get(o),i=or.get(o);nr.delete(o),or.delete(o),n?i&&i(n):a&&a(t)}}));var sr,lr,dr=1024;var fr=new Set;function hr(e,r){for(var t=e.dataURL,n=e.width,o=e.height,a=['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+n+'" height="'+o+'">',"<defs>",'<filter id="darkreader-image-filter">','<feColorMatrix type="matrix" values="'+Pe(r).slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" ")+'" />',"</filter>","</defs>",'<image width="'+n+'" height="'+o+'" filter="url(#darkreader-image-filter)" xlink:href="'+t+'" />',"</svg>"].join(""),i=new Uint8Array(a.length),u=0;u<a.length;u++)i[u]=a.charCodeAt(u);var c=new Blob([i],{type:"image/svg+xml"}),s=URL.createObjectURL(c);return fr.add(s),s}function pr(){sr=null,lr=null,fr.forEach((function(e){return URL.revokeObjectURL(e)})),fr.clear()}function mr(e,o,a,i,u){var c=Boolean(a&&a.style&&a.style.getPropertyPriority(e)),s=o;if(e.startsWith("--"))return null;if(e.indexOf("color")>=0&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e){if(l=function(e,r){if(yr.has(r.toLowerCase()))return r;try{var t=Sr(r);return e.indexOf("background")>=0?function(e){return Ve(t,e)}:e.indexOf("border")>=0||e.indexOf("outline")>=0?function(e){return Ze(t,e)}:function(e){return Xe(t,e)}}catch(e){return B("Color parse error",e),null}}(e,o))return{property:e,value:l,important:c,sourceValue:s}}else if("background-image"===e||"list-style-image"===e){if(l=function(e,o,a,i){var u=this;try{var c=Te(_r,e),s=Te($,e);if(0===s.length&&0===c.length)return e;var l=function(r){var t=0;return r.map((function(r){var n=e.indexOf(r,t);return t=n+r.length,{match:r,index:n}}))},d=l(s).map((function(e){return r({type:"url"},e)})).concat(l(c).map((function(e){return r({type:"gradient"},e)}))).sort((function(e,r){return e.index-r.index})),f=function(e){var r=e.match(/^(.*-gradient)\((.*)\)$/),t=r[1],n=r[2],o=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,a=Te(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?[^\(\),]*),?/g,n,1).map((function(e){var r=kr(e=e.trim());if(r)return function(e){return er(r,e)};var t=e.lastIndexOf(" ");if(r=kr(e.substring(0,t)))return function(n){return er(r,n)+" "+e.substring(t+1)};var n=e.match(o);return n&&(r=kr(n[3]))?function(e){return n[1]+"("+(n[2]?n[2]+", ":"")+er(r,e)+")"}:function(){return e}}));return function(e){return t+"("+a.map((function(r){return r(e)})).join(", ")+")"}},h=function(e){var r=V(e);if(o.parentStyleSheet.href){var c=G(o.parentStyleSheet.href);r=q(c,r)}else r=o.parentStyleSheet.ownerNode&&o.parentStyleSheet.ownerNode.baseURI?q(o.parentStyleSheet.ownerNode.baseURI,r):q(location.origin,r);var s='url("'+r+'")';return function(e){return t(u,void 0,void 0,(function(){var t,u;return n(this,(function(n){switch(n.label){case 0:return xr.has(r)?(t=xr.get(r),[3,7]):[3,1];case 1:return n.trys.push([1,6,,7]),function(e,r){if(!e||0===r.length)return!1;if(r.some((function(e){return"*"===e})))return!0;for(var t=e.selectorText.split(/,\s*/g),n=function(e){var n=r[e];if(t.some((function(e){return e===n})))return{value:!0}},o=0;o<r.length;o++){var a=n(o);if("object"==typeof a)return a.value}return!1}(o,a)?[2,null]:Er.has(r)?(u=Er.get(r),[4,new Promise((function(e){return u.push(e)}))]):[3,3];case 2:return(t=n.sent())?[3,5]:[2,null];case 3:return Er.set(r,[]),[4,ir(r)];case 4:t=n.sent(),xr.set(r,t),Er.get(r).forEach((function(e){return e(t)})),Er.delete(r),n.label=5;case 5:return i()?[2,null]:[3,7];case 6:return B(n.sent()),Er.has(r)&&(Er.get(r).forEach((function(e){return e(null)})),Er.delete(r)),[2,s];case 7:return[2,p(t,e)||s]}}))}))}},p=function(e,t){var n,o=e.isDark,a=e.isLight,i=e.isTransparent,u=e.isLarge,c=e.width;if(o&&i&&1===t.mode&&!u&&c>2)F("Inverting dark image "+e.src),n='url("'+hr(e,r(r({},t),{sepia:Re(t.sepia+10,0,100)}))+'")';else if(a&&!i&&1===t.mode){if(u)n="none";else F("Dimming light image "+e.src),n='url("'+hr(e,t)+'")'}else if(0===t.mode&&a&&!u){F("Applying filter to image "+e.src),n='url("'+hr(e,r(r({},t),{brightness:Re(t.brightness-10,5,200),sepia:Re(t.sepia+10,0,100)}))+'")'}else n=null;return n},m=[],v=0;return d.forEach((function(r,t){var n=r.match,o=r.type,a=r.index,i=v,u=a+n.length;v=u,m.push((function(){return e.substring(i,a)})),m.push("url"===o?h(n):f(n)),t===d.length-1&&m.push((function(){return e.substring(u)}))})),function(e){var r=m.map((function(r){return r(e)}));return r.some((function(e){return e instanceof Promise}))?Promise.all(r).then((function(e){return e.join("")})):r.join("")}}catch(r){return B("Unable to parse gradient "+e,r),null}}(o,a,i,u))return{property:e,value:l,important:c,sourceValue:s}}else if(e.indexOf("shadow")>=0){var l;if(l=function(e,r){try{var t=0,n=Te(/(^|\s)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,r,2),o=n.map((function(e,o){var a=t,i=r.indexOf(e,t),u=i+e.length;t=u;var c=kr(e);return c?function(e){return""+r.substring(a,i)+function(e,r){return Ve(e,r)}(c,e)+(o===n.length-1?r.substring(u):"")}:function(){return r.substring(a,u)}}));return function(e){return o.map((function(r){return r(e)})).join("")}}catch(e){return B("Unable to parse shadow "+r,e),null}}(0,o))return{property:e,value:l,important:c,sourceValue:s}}return null}function vr(e,t,n){var o=[];return t||(o.push("html {"),o.push(" background-color: "+Ve({r:255,g:255,b:255},e)+" !important;"),o.push("}")),o.push((t?"":"html, body, ")+(n?"input, textarea, select, button":"")+" {"),o.push(" background-color: "+Ve({r:255,g:255,b:255},e)+";"),o.push("}"),o.push("html, body, "+(n?"input, textarea, select, button":"")+" {"),o.push(" border-color: "+Ze({r:76,g:76,b:76},e)+";"),o.push(" color: "+Xe({r:0,g:0,b:0},e)+";"),o.push("}"),o.push("a {"),o.push(" color: "+Xe({r:0,g:64,b:255},e)+";"),o.push("}"),o.push("table {"),o.push(" border-color: "+Ze({r:128,g:128,b:128},e)+";"),o.push("}"),o.push("::placeholder {"),o.push(" color: "+Xe({r:169,g:169,b:169},e)+";"),o.push("}"),o.push("input:-webkit-autofill,"),o.push("textarea:-webkit-autofill,"),o.push("select:-webkit-autofill {"),o.push(" background-color: "+Ve({r:250,g:255,b:189},e)+" !important;"),o.push(" color: "+Xe({r:0,g:0,b:0},e)+" !important;"),o.push("}"),e.scrollbarColor&&o.push(function(e){var t,n,o,a,i,u,c=[];if("auto"===e.scrollbarColor)t=Ve({r:241,g:241,b:241},e),n=Xe({r:96,g:96,b:96},e),o=Ve({r:176,g:176,b:176},e),a=Ve({r:144,g:144,b:144},e),i=Ve({r:96,g:96,b:96},e),u=Ve({r:255,g:255,b:255},e);else{var s=fe(be(e.scrollbarColor)),l=s.l>.5,d=function(e){return r(r({},s),{l:Re(s.l+e,0,1)})},f=function(e){return r(r({},s),{l:Re(s.l-e,0,1)})};t=pe(f(.4)),n=pe(l?f(.4):d(.4)),o=pe(s),a=pe(d(.1)),i=pe(d(.2))}return c.push("::-webkit-scrollbar {"),c.push(" background-color: "+t+";"),c.push(" color: "+n+";"),c.push("}"),c.push("::-webkit-scrollbar-thumb {"),c.push(" background-color: "+o+";"),c.push("}"),c.push("::-webkit-scrollbar-thumb:hover {"),c.push(" background-color: "+a+";"),c.push("}"),c.push("::-webkit-scrollbar-thumb:active {"),c.push(" background-color: "+i+";"),c.push("}"),c.push("::-webkit-scrollbar-corner {"),c.push(" background-color: "+u+";"),c.push("}"),c.push("* {"),c.push(" scrollbar-color: "+t+" "+o+";"),c.push("}"),c.join("\n")}(e)),e.selectionColor&&o.push(function(e){var r=[],t=gr(e),n=t.backgroundColorSelection,o=t.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((function(e){r.push(e+" {"),r.push(" background-color: "+n+" !important;"),r.push(" color: "+o+" !important;"),r.push("}")})),r.join("\n")}(e)),o.join("\n")}function gr(e){var t,n;if("auto"===e.selectionColor)t=Ve({r:0,g:96,b:212},r(r({},e),{grayscale:0})),n=Xe({r:255,g:255,b:255},r(r({},e),{grayscale:0}));else{var o=fe(be(e.selectionColor));t=e.selectionColor,n=o.l<.5?"#FFF":"#000"}return{backgroundColorSelection:t,foregroundColorSelection:n}}function br(e,r){var t=r.strict,n=[];return n.push("html, body, "+(t?"body :not(iframe)":"body > :not(iframe)")+" {"),n.push(" background-color: "+Ve({r:255,g:255,b:255},e)+" !important;"),n.push(" border-color: "+Ze({r:64,g:64,b:64},e)+" !important;"),n.push(" color: "+Xe({r:0,g:0,b:0},e)+" !important;"),n.push("}"),n.join("\n")}var yr=new Set(["inherit","transparent","initial","currentcolor","none","unset"]),wr=new Map;function Sr(e){if(e=e.trim(),wr.has(e))return wr.get(e);var r=be(e);return wr.set(e,r),r}function kr(e){try{return Sr(e)}catch(e){return null}}var _r=/[\-a-z]+gradient\(([^\(\)]*(\(([^\(\)]*(\(.*?\)))*[^\(\)]*\))){0,15}[^\(\)]*\)/g,xr=new Map,Er=new Map;function Cr(){wr.clear(),qe.clear(),Fe.clear(),xr.clear(),pr(),Er.clear()}var Mr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor",store:new WeakSet},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage",store:new WeakSet},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border",store:new WeakSet},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom",store:new WeakSet},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left",store:new WeakSet},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right",store:new WeakSet},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top",store:new WeakSet},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow",store:new WeakSet},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color",store:new WeakSet},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill",store:new WeakSet},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke",store:new WeakSet},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline",store:new WeakSet}},Ar=Object.values(Mr),Rr=["style","fill","stroke","bgcolor","color"],Lr=Rr.map((function(e){return"["+e+"]"})).join(", ");function Tr(){return Ar.map((function(e){var r=e.dataAttr,t=e.customProp;return["["+r+"] {"," "+e.cssProp+": var("+t+") !important;","}"].join("\n")})).join("\n")}var Pr=new Map,jr=new Map;function Wr(e,r,t){Pr.has(e)&&(Pr.get(e).disconnect(),jr.get(e).disconnect());var n=new WeakSet;function o(e){(function(e){var r=[];return e instanceof Element&&e.matches(Lr)&&r.push(e),(e instanceof Element||h&&e instanceof ShadowRoot||e instanceof Document)&&j(r,e.querySelectorAll(Lr)),r})(e).forEach((function(e){n.has(e)||(n.add(e),r(e))})),te(e,(function(o){n.has(e)||(n.add(e),t(o.shadowRoot),Wr(o.shadowRoot,r,t))}))}var a=le(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return o(e)}))},onHugeMutations:function(){o(e)}});Pr.set(e,a);var u=0,c=null,s=Z({seconds:10}),l=Z({seconds:2}),d=[],f=null,p=Y((function(e){e.forEach((function(e){Rr.includes(e.attributeName)&&r(e.target),Ar.filter((function(r){var t=r.store,n=r.dataAttr;return t.has(e.target)&&!e.target.hasAttribute(n)})).forEach((function(r){var t=r.dataAttr;return e.target.setAttribute(t,"")}))}))})),m=new MutationObserver((function(e){if(f)d.push.apply(d,i(e));else{u++;var r=Date.now();if(null==c)c=r;else if(u>=50){if(r-c<s)return f=setTimeout((function(){c=null,u=0,f=null;var e=d;d=[],p(e)}),l),void d.push.apply(d,i(e));c=r,u=1}p(e)}}));m.observe(e,{attributes:!0,attributeFilter:Rr.concat(Ar.map((function(e){return e.dataAttr}))),subtree:!0}),jr.set(e,m)}var Or=new WeakMap,qr=["brightness","contrast","grayscale","sepia","mode"];function Fr(e,r){return Rr.map((function(r){return r+'="'+e.getAttribute(r)+'"'})).concat(qr.map((function(e){return e+'="'+r[e]+'"'}))).join(" ")}function Br(e,r,t,n){if(Fr(e,r)!==Or.get(e)){var o=new Set(Object.keys(Mr));if(t.length>0&&function(e,r){for(var t=0,n=r.length;t<n;t++){var o=r[t];if(e.matches(o))return!0}return!1}(e,t))o.forEach((function(r){var t=Mr[r],n=t.store,o=t.dataAttr;n.delete(e),e.removeAttribute(o)}));else{if(e.hasAttribute("bgcolor"))((a=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||a.match(/^[0-9a-f]{6}$/i))&&(a="#"+a),l("background-color","background-color",a);if(e.hasAttribute("color"))((a=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||a.match(/^[0-9a-f]{6}$/i))&&(a="#"+a),l("color","color",a);if(e.hasAttribute("fill")&&e instanceof SVGElement){var a=e.getAttribute("fill"),i=!1;if(!(e instanceof SVGTextElement)){var u=e.getBoundingClientRect(),c=u.width,s=u.height;i=c>32||s>32}l("fill",i?"background-color":"color",a)}if(e.hasAttribute("stroke")){a=e.getAttribute("stroke");l("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",a)}e.style&&I(e.style,(function(e,r){"background-image"===e&&r.indexOf("url")>=0||Mr.hasOwnProperty(e)&&l(e,e,r)})),e.style&&e instanceof SVGTextElement&&e.style.fill&&l("fill","color",e.style.getPropertyValue("fill")),P(o,(function(r){var t=Mr[r],n=t.store,o=t.dataAttr;n.delete(e),e.removeAttribute(o)})),Or.set(e,Fr(e,r))}}function l(t,a,i){var u=Mr[t],c=u.customProp,s=u.dataAttr,l=mr(a,i,null,n,null);if(l){var d=l.value;"function"==typeof d&&(d=d(r)),e.style.setProperty(c,d),e.hasAttribute(s)||e.setAttribute(s,""),o.delete(t)}}}var Nr="theme-color",Ir='meta[name="theme-color"]',Ur=null,zr=null;function Dr(e,r){Ur=Ur||e.content;try{var t=be(Ur);e.content=Ve(t,r)}catch(e){B(e)}}var $r=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var Hr=null;var Vr=function(){var e=[],r=null;function t(){for(var t;t=e.shift();)t();r=null}return{add:function(n){e.push(n),r||(r=requestAnimationFrame(t))},cancel:function(){e.splice(0),cancelAnimationFrame(r),r=null}}}();function Gr(){var e=0,r=new Map,t=new Map,n=null;return{modifySheet:function(o){var a=o.sourceCSSRules,i=o.theme,u=o.variables,c=o.ignoreImageAnalysis,s=o.force,l=o.prepareSheet,d=o.isAsyncCancelled,f=0===t.size,h=new Set(t.keys()),p=function(e){return $r.map((function(r){return r+":"+e[r]})).join(";")}(i),v=p!==n,g=[];if(N(a,(function(e){var n,o=e.cssText,a=!1;h.delete(o),r.has(o)||(r.set(o,o),a=!0);var i=null;if(u.size>0||o.includes("var(")){var s=X(o,u);r.get(o)!==s&&(r.set(o,s),a=!0,(n=function(){if(Hr)return Hr;if(m)return Hr=new CSSStyleSheet;var e=document.createElement("style");return document.head.append(e),Hr=e.sheet,document.head.removeChild(e),Hr}()).insertRule(s),i=n.cssRules[0])}if(a){f=!0;var l=[],p=i||e;p&&p.style&&I(p.style,(function(r,t){var n=mr(r,t,e,c,d);n&&l.push(n)}));var v=null;if(l.length>0){var b=e.parentRule;v={selector:e.selectorText,declarations:l,parentRule:b},g.push(v)}t.set(o,v),n&&n.deleteRule(0)}else g.push(t.get(o))})),h.forEach((function(e){r.delete(e),t.delete(e)})),n=p,s||f||v){e++;var b=new Map,y=0,w={rule:null,rules:[],isGroup:!0},S=new WeakMap;g.filter((function(e){return e})).forEach((function(r){var t=r.selector,n=r.declarations,o=x(r.parentRule),a={selector:t,declarations:[],isGroup:!1},u=a.declarations;o.rules.push(a),n.forEach((function(r){var t=r.property,n=r.value,o=r.important,a=r.sourceValue;if("function"==typeof n){var c=n(i);if(c instanceof Promise){var s=y++,l={property:t,value:null,important:o,asyncKey:s,sourceValue:a};u.push(l);var f=e;c.then((function(r){r&&!d()&&f===e&&(l.value=r,Vr.add((function(){d()||f!==e||function(e){var r=b.get(e),t=r.rule,n=r.target,o=r.index;n.deleteRule(o),_(n,o,t),b.delete(e)}(s)})))}))}else u.push({property:t,value:c,important:o,sourceValue:a})}else u.push({property:t,value:n,important:o,sourceValue:a})}))}));var k=l();!function e(r,t,n){r.rules.forEach((function(r){r.isGroup?e(r,function(e,r){var t=e.rule;if(t instanceof CSSMediaRule){var n=t.media,o=r.cssRules.length;return r.insertRule("@media "+n+" {}",o),r.cssRules[o]}return r}(r,t),n):n(r,t)}))}(w,k,(function(e,r){var t=r.cssRules.length;e.declarations.filter((function(e){return null==e.value})).forEach((function(n){var o=n.asyncKey;return b.set(o,{rule:e,target:r,index:t})})),_(r,t,e)}))}function _(e,r,t){var n=t.selector,o=t.declarations;e.insertRule(n+" {}",r);var a=e.cssRules[r].style;o.forEach((function(e){var r=e.property,t=e.value,n=e.important,o=e.sourceValue;a.setProperty(r,null==t?o:t,n?"important":"")}))}function x(e){if(null==e)return w;if(S.has(e))return S.get(e);var r={rule:e,rules:[],isGroup:!0};return S.set(e,r),x(e.parentRule).rules.push(r),r}}}}function Kr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&!e.disabled)&&!e.classList.contains("darkreader")&&"print"!==e.media&&!e.classList.contains("stylus")}function Jr(e,r,t){return void 0===r&&(r=[]),void 0===t&&(t=!0),Kr(e)?r.push(e):(e instanceof Element||h&&e instanceof ShadowRoot||e===document)&&(P(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return Jr(e,r,!1)})),t&&te(e,(function(e){return Jr(e.shadowRoot,r,!1)}))),r}var Qr=new WeakSet,Xr=new WeakSet;function Yr(e,r){for(var o=r.update,i=r.loadingStart,u=r.loadingEnd,c=[],s=e;(s=s.nextElementSibling)&&s.matches(".darkreader");)c.push(s);var l=c.find((function(e){return e.matches(".darkreader--cors")&&!Xr.has(e)}))||null,d=c.find((function(e){return e.matches(".darkreader--sync")&&!Qr.has(e)}))||null,f=null,h=null,p=!1,m=Gr(),v=new MutationObserver((function(){o()})),g={attributes:!0,childList:!0,characterData:!0};function b(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(H)}function y(){return l?l.sheet.cssRules:b()?null:C()}function w(){l?(e.nextSibling!==l&&e.parentNode.insertBefore(l,e.nextSibling),l.nextSibling!==d&&e.parentNode.insertBefore(d,l.nextSibling)):e.nextSibling!==d&&e.parentNode.insertBefore(d,e.nextSibling)}var S=!1,k=!1;function _(){return t(this,void 0,void 0,(function(){var r,t,o,i,u,c,s;return n(this,(function(n){switch(n.label){case 0:if(!(e instanceof HTMLLinkElement))return[3,7];if(o=a(E(),2),i=o[0],(u=o[1])&&B(u),!(i&&!u||(h=u,h&&h.message&&h.message.includes("loading"))))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(d=e,new Promise((function(e,r){var t=function(){d.removeEventListener("load",n),d.removeEventListener("error",o)},n=function(){t(),e()},o=function(){t(),r("Link loading failed "+d.href)};d.addEventListener("load",n),d.addEventListener("error",o)})))];case 2:return n.sent(),[3,4];case 3:return B(n.sent()),k=!0,[3,4];case 4:if(p)return[2,null];s=a(E(),2),i=s[0],(u=s[1])&&B(u),n.label=5;case 5:return null!=i?[2,i]:[4,Zr(e.href)];case 6:return r=n.sent(),t=G(e.href),p?[2,null]:[3,8];case 7:if(!b())return[2,null];r=e.textContent.trim(),t=G(location.href),n.label=8;case 8:if(!r)return[3,13];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,et(r,t)];case 10:return c=n.sent(),l=function(e,r){if(!r)return null;var t=document.createElement("style");return t.classList.add("darkreader"),t.classList.add("darkreader--cors"),t.media="screen",t.textContent=r,e.parentNode.insertBefore(t,e.nextSibling),t.sheet.disabled=!0,Xr.add(t),t}(e,c),[3,12];case 11:return B(n.sent()),[3,12];case 12:if(l)return f=re(l,"prev-sibling"),[2,l.sheet.cssRules];n.label=13;case 13:return[2,null]}var d,h}))}))}var x=!1;function E(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(e){return[null,e]}}function C(){var e=a(E(),2),r=e[0],t=e[1];return t?(B(t),null):r}var M=null,A=null;function R(){var e=C();e&&(M=e.length)}function L(){R(),T();var e=function(){var r;(r=C())&&r.length!==M&&(R(),o()),A=requestAnimationFrame(e)};e()}function T(){cancelAnimationFrame(A)}function P(){v.disconnect(),p=!0,f&&f.stop(),h&&h.stop(),T()}var j=0;return{details:function(){var e=y();return e?{variables:z(e)}:(S||k||(S=!0,i(),_().then((function(e){S=!1,u(),e&&o()})).catch((function(e){B(e),S=!1,u()}))),null)},render:function(r,t,n){var o=y();function a(){d||((d=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),d.classList.add("darkreader--sync"),d.media="screen",Qr.add(d)),h&&h.stop(),null==d.sheet&&(d.textContent=""),w();for(var r=d.sheet,t=r.cssRules.length-1;t>=0;t--)r.deleteRule(t);return h?h.run():h=re(d,"prev-sibling",(function(){x=!0,i()})),d.sheet}function i(){var e=x;x=!1,m.modifySheet({prepareSheet:a,sourceCSSRules:o,theme:r,variables:t,ignoreImageAnalysis:n,force:e,isAsyncCancelled:function(){return p}})}o&&(p=!1,i())},pause:P,destroy:function(){P(),ee(l),ee(d)},watch:function(){v.observe(e,g),e instanceof HTMLStyleElement&&L()},restore:function(){if(d)if(++j>10)B("Style sheet was moved multiple times",e);else{B("Restore style",d,e);var r=null==d.sheet||d.sheet.cssRules.length>0;w(),f&&f.skip(),h&&h.skip(),r&&(x=!0,R(),o())}}}}function Zr(e){return t(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,r.sent().text()];case 2:return[2,r.sent()];case 3:return[4,ar({url:e,responseType:"text",mimeType:"text/css"})];case 4:return[2,r.sent()]}}))}))}function et(e,r,a){return void 0===a&&(a=new Map),t(this,void 0,void 0,(function(){var t,i,u,c,s,l,d,f,h,p;return n(this,(function(n){switch(n.label){case 0:e=function(e,r){return e.replace($,(function(e){var t=V(e);return'url("'+q(r,t)+'")'}))}(e=function(e){return e.replace(J,"")}(e=e.replace(K,"")),r),t=Te(H,e),n.label=1;case 1:n.trys.push([1,10,11,12]),i=o(t),u=i.next(),n.label=2;case 2:return u.done?[3,9]:(c=u.value,s=V(c.substring(8).replace(/;$/,"")),l=q(r,s),d=void 0,a.has(l)?(d=a.get(l),[3,7]):[3,3]);case 3:return n.trys.push([3,6,,7]),[4,Zr(l)];case 4:return d=n.sent(),a.set(l,d),[4,et(d,G(l),a)];case 5:return d=n.sent(),[3,7];case 6:return B(n.sent()),d="",[3,7];case 7:e=e.split(c).join(d),n.label=8;case 8:return u=i.next(),[3,2];case 9:return[3,12];case 10:return f=n.sent(),h={error:f},[3,12];case 11:try{u&&!u.done&&(p=i.return)&&p.call(i)}finally{if(h)throw h.error}return[7];case 12:return[2,e=e.trim()]}}))}))}var rt,tt,nt=[],ot=new Map;function at(e){p&&P(e.querySelectorAll(":not(:defined)"),(function(e){var r=e.tagName.toLowerCase();ot.has(r)||(ot.set(r,new Set),function(e){return new Promise((function(r){if(window.customElements&&"function"==typeof window.customElements.whenDefined)customElements.whenDefined(e).then(r);else{var t=function(){var n=ot.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?r():requestAnimationFrame(t))};requestAnimationFrame(t)}}))}(r).then((function(){if(tt){var e=ot.get(r);ot.delete(r),tt(Array.from(e))}}))),ot.get(r).add(e)}))}function it(e,r,t){ut();var n=new Set(e),o=new WeakMap,a=new WeakMap;function i(e){o.set(e,e.previousElementSibling),a.set(e,e.nextElementSibling)}function u(e){var t=e.createdStyles,u=e.removedStyles,c=e.movedStyles;t.forEach((function(e){return i(e)})),c.forEach((function(e){return i(e)})),u.forEach((function(e){return r=e,o.delete(r),void a.delete(r);var r})),t.forEach((function(e){return n.add(e)})),u.forEach((function(e){return n.delete(e)})),t.size+u.size+c.size>0&&r({created:Array.from(t),removed:Array.from(u),moved:Array.from(c),updated:[]})}function c(e){var r=e.additions,t=e.moves,n=e.deletions,o=new Set,a=new Set,i=new Set;r.forEach((function(e){return Jr(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return Jr(e).forEach((function(e){return a.add(e)}))})),t.forEach((function(e){return Jr(e).forEach((function(e){return i.add(e)}))})),u({createdStyles:o,removedStyles:a,movedStyles:i}),r.forEach((function(e){te(e,f),at(e)}))}function s(e){var r=new Set(Jr(e)),t=new Set,i=new Set,c=new Set;r.forEach((function(e){n.has(e)||t.add(e)})),n.forEach((function(e){r.has(e)||i.add(e)})),r.forEach((function(e){var r;t.has(e)||i.has(e)||(r=e).previousElementSibling===o.get(r)&&r.nextElementSibling===a.get(r)||c.add(e)})),u({createdStyles:t,removedStyles:i,movedStyles:c}),te(e,f),at(e)}function l(e){var t=new Set;e.forEach((function(e){Kr(e.target)&&e.target.isConnected&&t.add(e.target)})),t.size>0&&r({updated:Array.from(t),created:[],removed:[],moved:[]})}function d(e){var r=le(e,{onMinorMutations:c,onHugeMutations:s}),t=new MutationObserver(l);t.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media"],subtree:!0}),nt.push(r,t),rt.add(e)}function f(e){var r=e.shadowRoot;null==r||rt.has(r)||(d(r),t(r))}e.forEach(i),d(document),te(document.documentElement,f),tt=function(e){var t=[];e.forEach((function(e){return j(t,Jr(e.shadowRoot))})),r({created:t,updated:[],removed:[],moved:[]}),e.forEach((function(e){var r=e.shadowRoot;null!=r&&(f(e),te(r,f),at(r))}))},at(document)}function ut(){nt.forEach((function(e){return e.disconnect()})),nt.splice(0,nt.length),rt=new WeakSet,tt=null,ot.clear()}var ct=new WeakMap,st=new WeakSet;function lt(e){var r=!1;return{render:function(t,n,o){e.adoptedStyleSheets.forEach((function(a){if(!st.has(a)){var u=a.rules,c=new CSSStyleSheet,s=n;z(a.cssRules).forEach((function(e,r){return s.set(r,e)})),Gr().modifySheet({prepareSheet:function(){for(var r=c.cssRules.length-1;r>=0;r--)c.deleteRule(r);return function(r,t){var n=i(e.adoptedStyleSheets),o=n.indexOf(r),a=n.indexOf(t);o!==a-1&&(a>=0&&n.splice(a,1),n.splice(o+1,0,t),e.adoptedStyleSheets=n)}(a,c),ct.set(a,c),st.add(c),c},sourceCSSRules:u,theme:t,variables:s,ignoreImageAnalysis:o,force:!1,isAsyncCancelled:function(){return r}})}}))},destroy:function(){r=!0;var t=i(e.adoptedStyleSheets);e.adoptedStyleSheets.forEach((function(e){if(st.has(e)){var r=t.indexOf(e);r>=0&&t.splice(r,1),ct.delete(e),st.delete(e)}})),e.adoptedStyleSheets=t}}}var dt=new Map,ft=Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return((r=e)<16?"0":"")+r.toString(16);var r})).join(""),ht=new Map,pt=[],mt=null,vt=null,gt=null;function bt(e,r){void 0===r&&(r=document.head||document);var t=r.querySelector("."+e);return t||((t=document.createElement("style")).classList.add("darkreader"),t.classList.add(e),t.media="screen"),t}var yt=new Map;function wt(e,r){yt.has(r)&&yt.get(r).stop(),yt.set(r,re(e,"parent"))}var St=new Set;function kt(e){var r=bt("darkreader--inline",e);r.textContent=Tr(),e.insertBefore(r,e.firstChild);var t=bt("darkreader--override",e);t.textContent=vt&&vt.css?_t(vt.css):"",e.insertBefore(t,r.nextSibling),St.add(e)}function _t(e){return e.replace(/\${(.+?)}/g,(function(e,r){try{var t=Sr(r);return Ue(t,mt,ze)}catch(e){return B(e),r}}))}function xt(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}function Et(){return vt&&Array.isArray(vt.ignoreImageAnalysis)?vt.ignoreImageAnalysis:[]}var Ct=0,Mt=new Set;function At(e){var r=++Ct;var t=Yr(e,{update:function(){var e=t.details();e&&(0===e.variables.size?t.render(mt,dt,Et()):(Rt(e.variables),Tt()))},loadingStart:function(){if(!ne()||!Ot){Mt.add(r);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=br(mt,{strict:!1}))}},loadingEnd:function(){Mt.delete(r),0===Mt.size&&ne()&&xt()}});return ht.set(e,t),t}function Rt(e){0!==e.size&&(e.forEach((function(e,r){dt.set(r,e)})),dt.forEach((function(e,r){dt.set(r,X(e,dt))})))}function Lt(e){var r=ht.get(e);r&&(r.destroy(),ht.delete(e))}var Tt=Y((function(e){ht.forEach((function(e){return e.render(mt,dt,Et())})),pt.forEach((function(e){return e.render(mt,dt,Et())})),e&&e()})),Pt=function(){Tt.cancel()};function jt(){0===Mt.size&&xt()}var Wt=null,Ot=!document.hidden;function qt(){document.removeEventListener("visibilitychange",Wt),Wt=null}function Ft(){function e(){!function(){Pt(),Rt(D(document.documentElement));var e=Jr(document).filter((function(e){return!ht.has(e)})).map((function(e){return At(e)})),r=e.map((function(e){return e.details()})).filter((function(e){return e&&e.variables.size>0})).map((function(e){return e.variables}));0===r.length?(ht.forEach((function(e){return e.render(mt,dt,Et())})),0===Mt.size&&xt()):(r.forEach((function(e){return Rt(e)})),Tt((function(){0===Mt.size&&xt()}))),e.forEach((function(e){return e.watch()}));var t=function(e){for(var r=[],t=0,n=e.length;t<n;t++)r.push(e[t]);return r}(document.querySelectorAll(Lr));te(document.documentElement,(function(e){var r=e.shadowRoot.querySelectorAll(Lr);r.length>0&&(kt(e.shadowRoot),j(t,r))}));var n=vt&&Array.isArray(vt.ignoreInlineStyle)?vt.ignoreInlineStyle:[];t.forEach((function(e){return Br(e,mt,Et(),n)})),Bt(document)}(),function(){it(Array.from(ht.keys()),(function(e){var r=e.created,t=e.updated,n=e.removed,o=e.moved,a=n,i=r.concat(t).concat(o).filter((function(e){return!ht.has(e)})),u=o.filter((function(e){return ht.has(e)}));a.forEach((function(e){return Lt(e)}));var c=i.map((function(e){return At(e)})),s=c.map((function(e){return e.details()})).filter((function(e){return e&&e.variables.size>0})).map((function(e){return e.variables}));0===s.length?c.forEach((function(e){return e.render(mt,dt,Et())})):(s.forEach((function(e){return Rt(e)})),Tt()),c.forEach((function(e){return e.watch()})),u.forEach((function(e){return ht.get(e).restore()}))}),(function(e){kt(e),Bt(e)}));var e=vt&&Array.isArray(vt.ignoreInlineStyle)?vt.ignoreInlineStyle:[];r=function(r){if(Br(r,mt,e,Et()),r===document.documentElement){var t=D(document.documentElement);t.size>0&&(Rt(t),Tt())}},t=function(r){var t=r.querySelectorAll(Lr);t.length>0&&(kt(r),P(t,(function(r){return Br(r,mt,Et(),e)})))},Wr(document,r,t),te(document.documentElement,(function(e){Wr(e.shadowRoot,r,t)})),ae(jt);var r,t}()}var t,n,o,a;!function(){var e=bt("darkreader--fallback",document);e.textContent=br(mt,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),wt(e,"fallback");var t=bt("darkreader--user-agent");t.textContent=vr(mt,gt,mt.styleSystemControls),document.head.insertBefore(t,e.nextSibling),wt(t,"user-agent");var n,o,a=bt("darkreader--text");mt.useFont||mt.textStroke>0?a.textContent=(n=mt,(o=[]).push("*:not(pre) {"),n.useFont&&n.fontFamily&&o.push(" font-family: "+n.fontFamily+" !important;"),n.textStroke>0&&(o.push(" -webkit-text-stroke: "+n.textStroke+"px !important;"),o.push(" text-stroke: "+n.textStroke+"px !important;")),o.push("}"),o.join("\n")):a.textContent="",document.head.insertBefore(a,e.nextSibling),wt(a,"text");var i=bt("darkreader--invert");vt&&Array.isArray(vt.invert)&&vt.invert.length>0?i.textContent=[vt.invert.join(", ")+" {"," filter: "+rr(r(r({},mt),{contrast:0===mt.mode?mt.contrast:Re(mt.contrast-10,0,100)}))+" !important;","}"].join("\n"):i.textContent="",document.head.insertBefore(i,a.nextSibling),wt(i,"invert");var u=bt("darkreader--inline");u.textContent=Tr(),document.head.insertBefore(u,i.nextSibling),wt(u,"inline");var c=bt("darkreader--override");c.textContent=vt&&vt.css?_t(vt.css):"",document.head.appendChild(c),wt(c,"override");var s=bt("darkreader--variables"),l=gr(mt),d=mt.darkSchemeBackgroundColor,f=mt.darkSchemeTextColor,h=mt.lightSchemeBackgroundColor,p=mt.lightSchemeTextColor;s.textContent=[":root {"," --darkreader-neutral-background: "+(0===mt.mode?h:d)+";"," --darkreader-neutral-text: "+(0===mt.mode?p:f)+";"," --darkreader-selection-background: "+l.backgroundColorSelection+";"," --darkreader-selection-text: "+l.foregroundColorSelection+";","}"].join("\n"),document.head.insertBefore(s,u.nextSibling),wt(s,"variables")}(),document.hidden?(t=e,n=Boolean(Wt),Wt=function(){document.hidden||(qt(),t(),Ot=!0)},n||document.addEventListener("visibilitychange",Wt)):e(),o=mt,(a=document.querySelector(Ir))?Dr(a,o):(zr&&zr.disconnect(),(zr=new MutationObserver((function(e){e:for(var r=0;r<e.length;r++)for(var t=e[r].addedNodes,n=0;n<t.length;n++){var a=t[n];if(a instanceof HTMLMetaElement&&a.name===Nr){zr.disconnect(),zr=null,Dr(a,o);break e}}}))).observe(document.head,{childList:!0}))}function Bt(e){if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var r=lt(e);pt.push(r),r.render(mt,dt,Et())}}function Nt(){ht.forEach((function(e){return e.pause()})),P(yt.values(),(function(e){return e.stop()})),yt.clear(),ut(),Pr.forEach((function(e){return e.disconnect()})),jr.forEach((function(e){return e.disconnect()})),Pr.clear(),jr.clear(),ie(jt)}function It(){var e,r=document.querySelector('meta[name="darkreader"]');return r?r.content!==ft:((e=document.createElement("meta")).name="darkreader",e.content=ft,document.head.appendChild(e),!1)}function Ut(e,r,t){if(mt=e,vt=r,gt=t,document.head){if(It())return;Ft()}else{if(!l){var n=bt("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=br(mt,{strict:!0})}var o=new MutationObserver((function(){if(document.head){if(o.disconnect(),It())return void zt();Ft()}}));o.observe(document,{childList:!0,subtree:!0})}}function zt(){qt(),Pt(),Nt(),Cr(),ee(document.querySelector(".darkreader--fallback")),document.head&&(!function(){zr&&(zr.disconnect(),zr=null);var e=document.querySelector(Ir);e&&Ur&&(e.content=Ur)}(),ee(document.head.querySelector(".darkreader--user-agent")),ee(document.head.querySelector(".darkreader--text")),ee(document.head.querySelector(".darkreader--invert")),ee(document.head.querySelector(".darkreader--inline")),ee(document.head.querySelector(".darkreader--override")),ee(document.head.querySelector('meta[name="darkreader"]'))),St.forEach((function(e){ee(e.querySelector(".darkreader--inline")),ee(e.querySelector(".darkreader--override"))})),St.clear(),P(ht.keys(),(function(e){return Lt(e)})),P(document.querySelectorAll(".darkreader"),ee),pt.forEach((function(e){e.destroy()})),pt.splice(0)}var Dt=/url\(\"(blob\:.*?)\"\)/g;function $t(e){return t(this,void 0,void 0,(function(){var r,t;return n(this,(function(n){switch(n.label){case 0:return r=[],Te(Dt,e,1).forEach((function(e){var t=g(e);r.push(t)})),[4,Promise.all(r)];case 1:return t=n.sent(),[2,e.replace(Dt,(function(){return'url("'+t.shift()+'")'}))]}}))}))}function Ht(){return t(this,void 0,void 0,(function(){function e(e,t){var n=document.querySelector(e);n&&n.textContent&&(r.push("/* "+t+" */"),r.push(n.textContent),r.push(""))}var r,t,o,a,i;return n(this,(function(n){switch(n.label){case 0:return r=['/*\n _______\n / \\\n .==. .==.\n (( ))==(( ))\n / "==" "=="\\\n /____|| || ||___\\\n ________ ____ ________ ___ ___\n | ___ \\ / \\ | ___ \\ | | / /\n | | \\ \\ / /\\ \\ | | \\ \\| |_/ /\n | | ) / /__\\ \\ | |__/ /| ___ \\\n | |__/ / ______ \\| ____ \\| | \\ \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n| ___ \\ | ____/ / \\ | ___ \\ | ____| ___ \\\n| | \\ \\| |___ / /\\ \\ | | \\ \\| |___| | \\ \\\n| |__/ /| ____/ /__\\ \\ | | ) | ____| |__/ /\n| ____ \\| |__/ ______ \\| |__/ /| |___| ____ \\\n|__| \\__\\____/__/ \\__\\_______/ |______|__| \\__\\\n https://darkreader.org\n*/'],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),t=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){P(e.sheet.cssRules,(function(e){e&&e.cssText&&t.push(e.cssText)}))})),0==t.length?[3,2]:(o=function(e){function r(e){return e.replace(/^\s+/,"")}function t(e){return 0===e?"":" ".repeat(4*e)}for(var n=/[^{}]+{\s*}/g;n.test(e);)e=e.replace(n,"");for(var o=e.replace(/\s{2,}/g," ").replace(/\{/g,"{\n").replace(/\}/g,"\n}\n").replace(/\;(?![^\(|\"]*(\)|\"))/g,";\n").replace(/\,(?![^\(|\"]*(\)|\"))/g,",\n").replace(/\n\s*\n/g,"\n").split("\n"),a=0,i=[],u=0,c=o.length;u<c;u++){var s=o[u]+"\n";s.match(/\{/)?i.push(t(a++)+r(s)):s.match(/\}/)?i.push(t(--a)+r(s)):i.push(t(a)+r(s))}return i.join("").trim()}(t.join("\n")),r.push("/* Modified CSS */"),i=(a=r).push,[4,$t(o)]);case 1:i.apply(a,[n.sent()]),r.push(""),n.label=2;case 2:return e(".darkreader--override","Override Style"),[2,r.join("\n")]}}))}))}var Vt=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function Gt(e,t){void 0===e&&(e={}),void 0===t&&(t=null);var n=r(r({},T),e);if(n.engine!==A)throw new Error("Theme engine is not supported.");Ut(n,t,Vt)}function Kt(){zt()}var Jt=matchMedia("(prefers-color-scheme: dark)"),Qt={themeOptions:null,fixes:null};function Xt(){Jt.matches?Gt(Qt.themeOptions,Qt.fixes):Kt()}var Yt=function(e){w=e||y};e.auto=function(e,r){void 0===e&&(e={}),void 0===r&&(r=null),e?(Qt={themeOptions:e,fixes:r},Xt(),Jt.addListener(Xt)):(Jt.removeListener(Xt),Kt())},e.disable=Kt,e.enable=Gt,e.exportGeneratedCSS=function(){return t(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ht()];case 1:return[2,e.sent()]}}))}))},e.setFetchMethod=Yt,Object.defineProperty(e,"__esModule",{value:!0})}));
(() => {
const applyDark = () => {
DarkReader.setFetchMethod(window.fetch)
DarkReader.auto({
brightness: 100,
contrast: 90,
sepia: 10
});
};
if (document.readyState === 'complete' || document.readyState === 'interactive') {
applyDark();
} else {
document.addEventListener(
'DOMContentLoaded',
applyDark,
false,
);
}
})();