MediaWiki:DarkReader.js

From Galaxypedia
Revision as of 20:15, 13 January 2022 by imported>Smallketchup82

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((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 t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))}function n(e,t){var r,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(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=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=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=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 t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.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(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function i(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var u="bg-fetch-response",s="cs-fetch",c="undefined"==typeof navigator?"some useragent":navigator.userAgent.toLowerCase(),l="undefined"==typeof navigator?"some platform":navigator.platform.toLowerCase(),d=c.includes("chrome")||c.includes("chromium"),f=c.includes("thunderbird"),h=c.includes("firefox")||f;c.includes("vivaldi"),c.includes("yabrowser"),c.includes("opr")||c.includes("opera"),c.includes("edg");var p=c.includes("safari")&&!d,v=l.startsWith("win"),m=l.startsWith("mac");c.includes("mobile");var g,b="function"==typeof ShadowRoot,y="function"==typeof MediaQueryList&&"function"==typeof MediaQueryList.prototype.addEventListener;(g=c.match(/chrom[e|ium]\/([^ ]+)/))&&g[1]&&g[1];var k=function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}}();function S(e,t,o){return r(this,void 0,void 0,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return[4,fetch(e,{cache:"force-cache",credentials:"omit",referrer:o})];case 1:if(r=n.sent(),h&&"text/css"===t&&e.startsWith("moz-extension://")&&e.endsWith(".css"))return[2,r];if(t&&!r.headers.get("Content-Type").startsWith(t))throw new Error("Mime type mismatch when loading "+e);if(!r.ok)throw new Error("Unable to load "+e+" "+r.status+" "+r.statusText);return[2,r]}}))}))}function w(e,t){return r(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return[4,S(e,t)];case 1:return[4,_(r.sent())];case 2:return[2,r.sent()]}}))}))}function _(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,e.blob()];case 1:return t=r.sent(),[4,new Promise((function(e){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.readAsDataURL(t)}))];case 2:return[2,r.sent()]}}))}))}globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.getManifest&&globalThis.chrome.runtime.getManifest().manifest_version;var E=function(e){return r(void 0,void 0,void 0,(function(){return n(this,(function(t){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(" ")))]}))}))},x=E;function C(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,x(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var V=new Set;function R(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(this,void 0,void 0,(function(){var t,r,o,a,i,c,l;return n(this,(function(n){switch(n.label){case 0:if(!e[0]||e[0].type!==s)return[3,8];t=e[0].id,n.label=1;case 1:return n.trys.push([1,7,,8]),r=e[0].data,o=r.url,a=r.responseType,[4,C(o)];case 2:return i=n.sent(),"data-url"!==a?[3,4]:[4,_(i)];case 3:return c=n.sent(),[3,6];case 4:return[4,i.text()];case 5:c=n.sent(),n.label=6;case 6:return V.forEach((function(e){return e({type:u,data:c,error:null,id:t})})),[3,8];case 7:return l=n.sent(),console.error(l),V.forEach((function(e){return e({type:u,data:null,error:l,id:t})})),[3,8];case 8:return[2]}}))}))}function T(e){V.add(e)}if("function"==typeof chrome.runtime.sendMessage){var M=chrome.runtime.sendMessage;chrome.runtime.sendMessage=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];R.apply(void 0,i([],a(e),!1)),M.apply(chrome.runtime,e)}}else chrome.runtime.sendMessage=R;if(chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener){var A=chrome.runtime.onMessage.addListener;chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];T(e[0]),A.apply(chrome.runtime.onMessage,e)}}else chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return T(e[0])};var L="dynamicTheme",P={background:"#181a1b",text:"#e8e6e3"},O={background:"#dcdad7",text:"#181a1b"},j={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!1,fontFamily:m?"Helvetica Neue":v?"Segoe UI":"Open Sans",textStroke:0,engine:L,stylesheet:"",darkSchemeBackgroundColor:P.background,darkSchemeTextColor:P.text,lightSchemeBackgroundColor:O.background,lightSchemeTextColor:O.text,scrollbarColor:m?"":"auto",selectionColor:"auto",styleSystemControls:!0,lightColorScheme:"Default",darkColorScheme:"Default"};function D(e,t){var r,n;if(function(e){return null!=e.length}(e))for(var a=0,i=e.length;a<i;a++)t(e[a]);else try{for(var u=o(e),s=u.next();!s.done;s=u.next()){t(s.value)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}function F(e,t){D(t,(function(t){return e.push(t)}))}function q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function N(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function B(e){var t,r=!1,n=null;return Object.assign((function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];t=o,n?r=!0:(e.apply(void 0,i([],a(t),!1)),n=requestAnimationFrame((function(){n=null,r&&(e.apply(void 0,i([],a(t),!1)),r=!1)})))}),{cancel:function(){cancelAnimationFrame(n),r=!1,n=null}})}function I(e){var t=0;return e.seconds&&(t+=1e3*e.seconds),e.minutes&&(t+=60*e.minutes*1e3),e.hours&&(t+=60*e.hours*60*1e3),e.days&&(t+=24*e.days*60*60*1e3),t}function W(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function U(e,t,r){void 0===r&&(r=Function.prototype);var n=I({seconds:2}),o=I({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"===t&&!a)throw new Error("Unable to watch for node position: there is no previous sibling");var u=0,s=null,c=null,l=B((function(){if(!c){u++;var f=Date.now();if(null==s)s=f;else if(u>=10){if(f-s<o)return N("Node position watcher paused: retry in "+n+"ms",e,a),void(c=setTimeout((function(){s=null,u=0,c=null,l()}),n));s=f,u=1}if("parent"===t&&a&&a.parentNode!==i)return N("Unable to restore node position: sibling parent changed",e,a,i),void h();if("prev-sibling"===t){if(null==a.parentNode)return N("Unable to restore node position: sibling was removed",e,a,i),void h();a.parentNode!==i&&(N("Style was moved to another parent",e,a,i),p(a.parentNode))}N("Restoring node position",e,a,i),i.insertBefore(e,a?a.nextSibling:i.firstChild),d.takeRecords(),r&&r()}})),d=new MutationObserver((function(){("parent"===t&&e.parentNode!==i||"prev-sibling"===t&&e.previousSibling!==a)&&l()})),f=function(){d.observe(i,{childList:!0})},h=function(){clearTimeout(c),d.disconnect(),l.cancel()},p=function(e){i=e,h(),f()};return f(),{run:f,stop:h,skip:function(){d.takeRecords()}}}function z(e,t){if(null!=e)for(var r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),n=e.shadowRoot?r.currentNode:r.nextNode();null!=n;n=r.nextNode())t(n),z(n.shadowRoot,t)}function H(){return"complete"===document.readyState||"interactive"===document.readyState}var $=new Set;function G(e){$.add(e)}function Q(e){$.delete(e)}function K(){return"complete"===document.readyState}var J=new Set;function X(e){J.add(e)}if(!H()){var Y=function(){H()&&($.forEach((function(e){return e()})),$.clear(),K()&&(document.removeEventListener("readystatechange",Y),J.forEach((function(e){return e()})),J.clear()))};document.addEventListener("readystatechange",Y)}var Z,ee=new Map,te=new WeakMap;function re(e,t){var r,n,o;if(ee.has(e))r=ee.get(e),n=te.get(r);else{var a=!1,i=!1;(r=new MutationObserver((function(t){if(function(e){if(e.length>1e3)return!0;for(var t=0,r=0;r<e.length;r++)if((t+=e[r].addedNodes.length)>1e3)return!0;return!1}(t))!a||H()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):i||(G(o=function(){return n.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),i=!0),a=!0;else{var r=function(e){var t=new Set,r=new Set,n=new Set;e.forEach((function(e){D(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),D(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(n.add(e),t.delete(e)):r.add(e))}))}));var o=[],a=[];return t.forEach((function(e){t.has(e.parentElement)&&o.push(e)})),r.forEach((function(e){r.has(e.parentElement)&&a.push(e)})),o.forEach((function(e){return t.delete(e)})),a.forEach((function(e){return r.delete(e)})),{additions:t,moves:n,deletions:r}}(t);n.forEach((function(e){return(0,e.onMinorMutations)(r)}))}}))).observe(e,{childList:!0,subtree:!0}),ee.set(e,r),n=new Set,te.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),o&&Q(o),0===n.size&&(r.disconnect(),te.delete(r),ee.delete(e))}}}var ne=new Map;function oe(e){return Z||(Z=document.createElement("a")),Z.href=e,Z.href}function ae(e,t){void 0===t&&(t=null);var r=e+(t?";"+t:"");if(ne.has(r))return ne.get(r);if(t){var n=new URL(e,oe(t));return ne.set(r,n),n}var o=new URL(oe(e));return ne.set(e,o),o}function ie(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return""+location.protocol+t;var r=ae(e);return ae(t,r.href).href}function ue(e){if(e.startsWith("data:"))return!0;var t=ae(e),r=ae(location.href);return t.protocol===r.protocol&&(t.hostname===r.hostname&&(t.port===r.port&&/.*\//.exec(t.pathname)[0]===/.*\//.exec(r.pathname)[0]))}function se(e,t,r){D(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{se(e.styleSheet.cssRules,t,r)}catch(e){q("Found a non-loaded link."),r&&r()}else if(e.media){var n=Array.from(e.media),o=n.some((function(e){return e.startsWith("screen")||e.startsWith("all")})),a=n.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!o&&a||se(e.cssRules,t,r)}else e.conditionText?CSS.supports(e.conditionText)&&se(e.cssRules,t,r):N("CSSRule type not supported",e)}))}var ce=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],le=p?ce.map((function(e){return[e,new RegExp(e+":\\s*(.*?)\\s*;")]})):null;function de(e,t){D(e,(function(r){var n=e.getPropertyValue(r).trim();n&&t(r,n)}));var r=e.cssText;r.includes("var(")&&(p?le.forEach((function(e){var n=a(e,2),o=n[0],i=n[1],u=r.match(i);if(u&&u[1]){var s=u[1].trim();t(o,s)}})):ce.forEach((function(r){var n=e.getPropertyValue(r);n&&n.includes("var(")&&t(r,n)})))}var fe=/url\((('.+?')|(".+?")|([^\)]*?))\)/g,he=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)?;?/g;function pe(e){return e.replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")}function ve(e){var t=ae(e);return""+t.origin+t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1")}var me=/\/\*[\s\S]*?\*\//g;var ge=/@font-face\s*{[^}]*}/g;function be(e){var t=e.h,r=e.s,n=e.l,o=e.a,i=void 0===o?1:o;if(0===r){var u=a([n,n,n].map((function(e){return Math.round(255*e)})),3),s=u[0],c=u[1];return{r:s,g:u[2],b:c,a:i}}var l=(1-Math.abs(2*n-1))*r,d=l*(1-Math.abs(t/60%2-1)),f=n-l/2,h=a((t<60?[l,d,0]:t<120?[d,l,0]:t<180?[0,l,d]:t<240?[0,d,l]:t<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 ye(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=void 0===o?1:o,i=t/255,u=r/255,s=n/255,c=Math.max(i,u,s),l=Math.min(i,u,s),d=c-l,f=(c+l)/2;if(0===d)return{h:0,s:0,l:f,a:a};var h=60*(c===i?(u-s)/d%6:c===u?(s-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 ke(e,t){void 0===t&&(t=0);var r=e.toFixed(t);if(0===t)return r;var n=r.indexOf(".");if(n>=0){var o=r.match(/0+$/);if(o)return o.index===n+1?r.substring(0,n):r.substring(0,o.index)}return r}function Se(e){var t=e.h,r=e.s,n=e.l,o=e.a;return null!=o&&o<1?"hsla("+ke(t)+", "+ke(100*r)+"%, "+ke(100*n)+"%, "+ke(o,2)+")":"hsl("+ke(t)+", "+ke(100*r)+"%, "+ke(100*n)+"%)"}var we=/^rgba?\([^\(\)]+\)$/,_e=/^hsla?\([^\(\)]+\)$/,Ee=/^#[0-9a-f]+$/i;function xe(e){var t,r,n,o,i,u=e.trim().toLowerCase();if(u.match(we))return t=a(Ce(u,Ve,Re),4),r=t[0],n=t[1],o=t[2],i=t[3],{r:r,g:n,b:o,a:void 0===i?1:i};if(u.match(_e))return function(e){var t=a(Ce(e,Te,Me),4),r=t[0],n=t[1],o=t[2],i=t[3];return be({h:r,s:n,l:o,a:void 0===i?1:i})}(u);if(u.match(Ee))return function(e){var t=e.substring(1);switch(t.length){case 3:case 4:var r=a([0,1,2].map((function(e){return parseInt(""+t[e]+t[e],16)})),3);return{r:r[0],g:r[1],b:r[2],a:3===t.length?1:parseInt(""+t[3]+t[3],16)/255};case 6:case 8:var n=a([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return{r:n[0],g:n[1],b:n[2],a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}throw new Error("Unable to parse "+e)}(u);if(Pe.has(u))return function(e){var t=Pe.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(u);if(Oe.has(u))return function(e){var t=Oe.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>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 Ce(e,t,r){var n=function(e){var t=[],r=0,n=!1,o=e.indexOf("(");e=e.substring(o+1,e.length-1);for(var a=0;a<e.length;a++){var i=e[a];i>="0"&&i<="9"||"."===i||"+"===i||"-"===i?n=!0:!n||" "!==i&&","!==i?n||(r=a+1):(t.push(e.substring(r,a)),n=!1,r=a+1)}return n&&t.push(e.substring(r,e.length)),t}(e),o=Object.entries(r);return n.map((function(e){return e.trim()})).map((function(e,r){var n,i=o.find((function(t){var r=a(t,1)[0];return e.endsWith(r)}));return n=i?parseFloat(e.substring(0,e.length-i[0].length))/i[1]*t[r]:parseFloat(e),t[r]>1?Math.round(n):n}))}var Ve=[255,255,255,1],Re={"%":100};var Te=[360,1,1,1],Me={"%":100,deg:360,rad:2*Math.PI,turn:1};var Ae=function(e){return e>="0"&&e<="9"};function Le(e){for(var t=0,r=function(t,r,n){e=e.substring(0,t)+n+e.substring(r)},n=function(){for(var r=0,n=1;n<4;n++){var o=e[t+n];if(" "===o)break;if(!Ae(o))break;r*=10,r+=Number(o)}var a,i=(a=r,Math.floor(Math.log10(a))+1);if("%"===e[(t+=i)+1])return t++,r};0!==(t=e.indexOf("calc("));){var o=t;t+=4;var a=n();if(!a)break;if(" "!==e[t+1])break;t++;var i=e[t+1];if("+"!==i&&"-"!==i)break;if(t++," "!==e[t+1])break;t++;var u=n();if(!u)break;r(o,t+2,"+"===i?a+u+"%":a-u+"%")}return e}var Pe=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})),Oe=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 t=a(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})));function je(e,t,r,n,o){return(e-t)*(o-n)/(r-t)+n}function De(e,t,r){return Math.min(r,Math.max(t,e))}function Fe(e,t){for(var r=[],n=0,o=e.length;n<o;n++){r[n]=[];for(var a=0,i=t[0].length;a<i;a++){for(var u=0,s=0,c=e[0].length;s<c;s++)u+=e[n][s]*t[s][a];r[n][a]=u}}return r}function qe(e,t,r){void 0===r&&(r=0);for(var n,o=[];n=e.exec(t);)o.push(n[r]);return o}function Ne(e){var t=Be.identity();return 0!==e.sepia&&(t=Fe(t,Be.sepia(e.sepia/100))),0!==e.grayscale&&(t=Fe(t,Be.grayscale(e.grayscale/100))),100!==e.contrast&&(t=Fe(t,Be.contrast(e.contrast/100))),100!==e.brightness&&(t=Fe(t,Be.brightness(e.brightness/100))),1===e.mode&&(t=Fe(t,Be.invertNHue())),t}var Be={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 t=(1-e)/2;return[[e,0,0,0,t],[0,e,0,0,t],[0,0,e,0,t],[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 Ie(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function We(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}var Ue=new Map,ze=new Map;function He(e){if(ze.has(e))return ze.get(e);var t=ye(xe(e));return ze.set(e,t),t}var $e=["r","g","b","a"],Ge=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function Qe(e,t,r,n,o){var i;Ue.has(r)?i=Ue.get(r):(i=new Map,Ue.set(r,i));var u=function(e,t){var r="";return $e.forEach((function(t){r+=e[t]+";"})),Ge.forEach((function(e){r+=t[e]+";"})),r}(e,t);if(i.has(u))return i.get(u);var s=be(r(ye(e),null==n?null:He(n),null==o?null:He(o))),c=s.r,l=s.g,d=s.b,f=s.a,h=a(function(e,t){var r=a(e,3),n=Fe(t,[[r[0]/255],[r[1]/255],[r[2]/255],[1],[1]]);return[0,1,2].map((function(e){return De(Math.round(255*n[e][0]),0,255)}))}([c,l,d],Ne(t)),3),p=h[0],v=h[1],m=h[2],g=1===f?function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return"#"+(null!=o&&o<1?[t,r,n,Math.round(255*o)]:[t,r,n]).map((function(e){return(e<16?"0":"")+e.toString(16)})).join("")}({r:p,g:v,b:m}):function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return null!=o&&o<1?"rgba("+ke(t)+", "+ke(r)+", "+ke(n)+", "+ke(o,2)+")":"rgb("+ke(t)+", "+ke(r)+", "+ke(n)+")"}({r:p,g:v,b:m,a:f});return i.set(u,g),g}function Ke(e){return e}function Je(e,t){var r=Ie(t);return Qe(e,t,Xe,We(t),r)}function Xe(e,t,r){var n,o=e.h,a=e.s,i=e.l,u=e.a,s=i<.5;s?n=i<.2||a<.12:n=a<.24||i>.8&&(o>200&&o<280);var c=o,l=i;return n&&(s?(c=t.h,l=t.s):(c=r.h,l=r.s)),{h:c,s:l,l:je(i,0,1,t.l,r.l),a:u}}function Ye(e,t){var r=e.h,n=e.s,o=e.l,a=e.a,i=n<.12||o>.8&&(r>200&&r<280);if(o<.5){var u=je(o,0,.5,0,.4);return i?{h:t.h,s:t.s,l:u,a:a}:{h:r,s:n,l:u,a:a}}var s=je(o,.5,1,.4,t.l);if(i)return{h:t.h,s:t.s,l:s,a:a};var c=r;r>60&&r<180&&(c=r>120?je(r,120,180,135,180):je(r,60,120,60,105));return{h:c,s:n,l:s,a:a}}function Ze(e,r){if(0===r.mode)return Je(e,r);var n=Ie(r);return Qe(e,t(t({},r),{mode:0}),Ye,n)}var et,tt=.55;function rt(e){return je(e,205,245,205,220)}function nt(e,t){var r=e.h,n=e.s,o=e.l,a=e.a,i=o<.2||n<.24,u=!i&&r>205&&r<245;if(o>.5){var s=je(o,.5,1,tt,t.l);if(i)return{h:t.h,s:t.s,l:s,a:a};var c=r;return u&&(c=rt(r)),{h:c,s:n,l:s,a:a}}if(i)return{h:t.h,s:t.s,l:je(o,0,.5,t.l,tt),a:a};var l,d=r;return u?(d=rt(r),l=je(o,0,.5,t.l,Math.min(1,.6000000000000001))):l=je(o,0,.5,t.l,tt),{h:d,s:n,l:l,a:a}}function ot(e,r){if(0===r.mode)return Je(e,r);var n=We(r);return Qe(e,t(t({},r),{mode:0}),nt,n)}function at(e,t,r){var n=e.h,o=e.s,a=e.l,i=e.a,u=n,s=o;return(a<.2||o<.24)&&(a<.5?(u=t.h,s=t.s):(u=r.h,s=r.s)),{h:u,s:s,l:je(a,0,1,.5,.2),a:i}}function it(e,r){if(0===r.mode)return Je(e,r);var n=We(r),o=Ie(r);return Qe(e,t(t({},r),{mode:0}),at,n,o)}function ut(e,t){return Ze(e,t)}function st(e){var t=[];return e.mode===et.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness("+e.brightness+"%)"),100!==e.contrast&&t.push("contrast("+e.contrast+"%)"),0!==e.grayscale&&t.push("grayscale("+e.grayscale+"%)"),0!==e.sepia&&t.push("sepia("+e.sepia+"%)"),0===t.length?null:t.join(" ")}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(et||(et={}));var ct=0,lt=new Map,dt=new Map;function ft(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,r){var n=++ct;lt.set(n,t),dt.set(n,r),chrome.runtime.sendMessage({type:s,data:e,id:n})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var t=e.type,r=e.data,n=e.error,o=e.id;if(t===u){var a=lt.get(o),i=dt.get(o);lt.delete(o),dt.delete(o),n?i&&i(n):a&&a(r)}}));var ht=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,r=Date.now();t=e.queue.shift();)if(t(),Date.now()-r>=e.frameDuration){e.startQueue();break}})))},e}());function pt(e){return r(this,void 0,void 0,(function(){var o=this;return n(this,(function(a){return[2,new Promise((function(a,i){return r(o,void 0,void 0,(function(){var r,o,u,s;return n(this,(function(n){switch(n.label){case 0:return e.startsWith("data:")?(r=e,[3,4]):[3,1];case 1:return n.trys.push([1,3,,4]),[4,vt(e)];case 2:return r=n.sent(),[3,4];case 3:return o=n.sent(),i(o),[2];case 4:return n.trys.push([4,6,,7]),[4,mt(r)];case 5:return u=n.sent(),ht.addToQueue((function(){a(t({src:e,dataURL:r,width:u.naturalWidth,height:u.naturalHeight},function(e){gt||(t=yt,r=yt,(gt=document.createElement("canvas")).width=t,gt.height=r,(bt=gt.getContext("2d")).imageSmoothingEnabled=!1);var t,r;var n=e.naturalWidth,o=e.naturalHeight;if(0===o||0===n)return N("logWarn(Image is empty "+e.currentSrc+")"),null;if(n*o*4>kt)return q("Skipped large image analyzing(Larger than 5mb in memory)"),{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var a=n*o,i=Math.min(1,Math.sqrt(yt/a)),u=Math.ceil(n*i),s=Math.ceil(o*i);bt.clearRect(0,0,u,s),bt.drawImage(e,0,0,n,o,0,0,u,s);var c,l,d,f,h,p,v,m=bt.getImageData(0,0,u,s).data,g=.05,b=.4,y=.7,k=0,S=0,w=0;for(d=0;d<s;d++)for(l=0;l<u;l++)f=m[(c=4*(d*u+l))+0]/255,h=m[c+1]/255,p=m[c+2]/255,m[c+3]/255<g?k++:((v=.2126*f+.7152*h+.0722*p)<b&&S++,v>y&&w++);var _=u*s,E=_-k;return{isDark:S/E>=.7,isLight:w/E>=.7,isTransparent:k/_>=.1,isLarge:a>=48e4,isTooLarge:!1}}(u)))})),[3,7];case 6:return s=n.sent(),i(s),[3,7];case 7:return[2]}}))}))}))]}))}))}function vt(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,w(e)];case 1:return[2,t.sent()];case 2:return[4,ft({url:e,responseType:"data-url"})];case 3:return[2,t.sent()]}}))}))}function mt(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return r("Unable to load image "+e)},n.src=e}))]}))}))}var gt,bt,yt=1024;var kt=5242880;function St(e,t){var r=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="'+Ne(t).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="'+r+'" />',"</svg>"].join("");return"data:image/svg+xml;base64,"+btoa(a)}function wt(){ht&&ht.stopQueue(),gt=null,bt=null}function _t(e,t){return Boolean(e&&e.getPropertyPriority(t))}function Et(e,t,r,n,o,a){if(e.startsWith("--")){if(i=function(e,t,r,n,o,a){return e.getModifierForVariable({varName:t,sourceValue:r,rule:n,ignoredImgSelectors:o,isCancelled:a})}(n,e,t,r,o,a))return{property:e,value:i,important:_t(r.style,e),sourceValue:t}}else if(t.includes("var(")){if(i=function(e,t,r){return e.getModifierForVarDependant(t,r)}(n,e,t))return{property:e,value:i,important:_t(r.style,e),sourceValue:t}}else if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){if(i=function(e,t){if(Rt.has(t.toLowerCase()))return t;try{var r=Mt(t);return e.includes("background")?function(e){return Ze(r,e)}:e.includes("border")||e.includes("outline")?function(e){return it(r,e)}:function(e){return ot(r,e)}}catch(e){return N("Color parse error",e),null}}(e,t))return{property:e,value:i,important:_t(r.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=jt(t,r,o,a))return{property:e,value:i,important:_t(r.style,e),sourceValue:t}}else if(e.includes("shadow")){var i;if(i=function(e){var t=Dt(e);if(!t)return null;return function(e){return t(e).result}}(t))return{property:e,value:i,important:_t(r.style,e),sourceValue:t}}return null}function xt(e,r,n){var o=[];return r||(o.push("html {"),o.push("    background-color: "+Ze({r:255,g:255,b:255},e)+" !important;"),o.push("}")),o.push((r?"":"html, body, ")+(n?"input, textarea, select, button":"")+" {"),o.push("    background-color: "+Ze({r:255,g:255,b:255},e)+";"),o.push("}"),o.push("html, body, "+(n?"input, textarea, select, button":"")+" {"),o.push("    border-color: "+it({r:76,g:76,b:76},e)+";"),o.push("    color: "+ot({r:0,g:0,b:0},e)+";"),o.push("}"),o.push("a {"),o.push("    color: "+ot({r:0,g:64,b:255},e)+";"),o.push("}"),o.push("table {"),o.push("    border-color: "+it({r:128,g:128,b:128},e)+";"),o.push("}"),o.push("::placeholder {"),o.push("    color: "+ot({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: "+Ze({r:250,g:255,b:189},e)+" !important;"),o.push("    color: "+ot({r:0,g:0,b:0},e)+" !important;"),o.push("}"),e.scrollbarColor&&o.push(function(e){var r,n,o,a,i,u,s=[];if("auto"===e.scrollbarColor)r=Ze({r:241,g:241,b:241},e),n=ot({r:96,g:96,b:96},e),o=Ze({r:176,g:176,b:176},e),a=Ze({r:144,g:144,b:144},e),i=Ze({r:96,g:96,b:96},e),u=Ze({r:255,g:255,b:255},e);else{var c=ye(xe(e.scrollbarColor)),l=c.l>.5,d=function(e){return t(t({},c),{l:De(c.l+e,0,1)})},f=function(e){return t(t({},c),{l:De(c.l-e,0,1)})};r=Se(f(.4)),n=Se(l?f(.4):d(.4)),o=Se(c),a=Se(d(.1)),i=Se(d(.2))}s.push("::-webkit-scrollbar {"),s.push("    background-color: "+r+";"),s.push("    color: "+n+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb {"),s.push("    background-color: "+o+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb:hover {"),s.push("    background-color: "+a+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb:active {"),s.push("    background-color: "+i+";"),s.push("}"),s.push("::-webkit-scrollbar-corner {"),s.push("    background-color: "+u+";"),s.push("}"),h&&(s.push("* {"),s.push("    scrollbar-color: "+o+" "+r+";"),s.push("}"));return s.join("\n")}(e)),e.selectionColor&&o.push(function(e){var t=[],r=Ct(e),n=r.backgroundColorSelection,o=r.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((function(e){t.push(e+" {"),t.push("    background-color: "+n+" !important;"),t.push("    color: "+o+" !important;"),t.push("}")})),t.join("\n")}(e)),o.join("\n")}function Ct(e){var r,n;if("auto"===e.selectionColor)r=Ze({r:0,g:96,b:212},t(t({},e),{grayscale:0})),n=ot({r:255,g:255,b:255},t(t({},e),{grayscale:0}));else{var o=ye(xe(e.selectionColor));r=e.selectionColor,n=o.l<.5?"#FFF":"#000"}return{backgroundColorSelection:r,foregroundColorSelection:n}}function Vt(e,t){var r=t.strict,n=[];return n.push("html, body, "+(r?'body :not(iframe):not(div[style^="position:absolute;top:0;left:-"]':"body > :not(iframe)")+" {"),n.push("    background-color: "+Ze({r:255,g:255,b:255},e)+" !important;"),n.push("    border-color: "+it({r:64,g:64,b:64},e)+" !important;"),n.push("    color: "+ot({r:0,g:0,b:0},e)+" !important;"),n.push("}"),n.join("\n")}var Rt=new Set(["inherit","transparent","initial","currentcolor","none","unset"]),Tt=new Map;function Mt(e){if(e=e.trim(),Tt.has(e))return Tt.get(e);e.includes("calc(")&&(e=Le(e));var t=xe(e);return Tt.set(e,t),t}function At(e){try{return Mt(e)}catch(e){return null}}var Lt=/[\-a-z]+gradient\(([^\(\)]*(\(([^\(\)]*(\(.*?\)))*[^\(\)]*\))){0,15}[^\(\)]*\)/g,Pt=new Map,Ot=new Map;function jt(e,o,a,i){var u=this;try{var s=qe(Lt,e),c=qe(fe,e);if(0===c.length&&0===s.length)return e;var l=function(t){var r=0;return t.map((function(t){var n=e.indexOf(t,r);return r=n+t.length,{match:t,index:n}}))},d=l(c).map((function(e){return t({type:"url"},e)})).concat(l(s).map((function(e){return t({type:"gradient"},e)}))).sort((function(e,t){return e.index-t.index})),f=function(e,r){var n,o=e.isDark,a=e.isLight,i=e.isTransparent,u=e.isLarge,s=e.isTooLarge,c=e.width;if(s)n='url("'+e.src+'")';else if(o&&i&&1===r.mode&&!u&&c>2){q("Inverting dark image "+e.src),n='url("'+St(e,t(t({},r),{sepia:De(r.sepia+10,0,100)}))+'")'}else if(a&&!i&&1===r.mode){if(u)n="none";else q("Dimming light image "+e.src),n='url("'+St(e,r)+'")'}else if(0===r.mode&&a&&!u){q("Applying filter to image "+e.src),n='url("'+St(e,t(t({},r),{brightness:De(r.brightness-10,5,200),sepia:De(r.sepia+10,0,100)}))+'")'}else n=null;return n},h=[],p=0;return d.forEach((function(t,s){var c=t.match,l=t.type,v=t.index,m=p,g=v+c.length;p=g,h.push((function(){return e.substring(m,v)})),h.push("url"===l?function(e){var t;if(function(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var r=e.split(/,\s*/g),n=function(e){var n=t[e];if(r.some((function(e){return e===n})))return{value:!0}},o=0;o<t.length;o++){var a=n(o);if("object"==typeof a)return a.value}return!1}(o.selectorText,a))return null;var s=pe(e),c=o.parentStyleSheet,l=c&&c.href?ve(c.href):(null===(t=c.ownerNode)||void 0===t?void 0:t.baseURI)||location.origin,d='url("'+(s=ie(l,s))+'")';return function(e){return r(u,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return Pt.has(s)?(t=Pt.get(s),[3,7]):[3,1];case 1:return n.trys.push([1,6,,7]),Ot.has(s)?(r=Ot.get(s),[4,new Promise((function(e){return r.push(e)}))]):[3,3];case 2:return(t=n.sent())?[3,5]:[2,null];case 3:return Ot.set(s,[]),[4,pt(s)];case 4:t=n.sent(),Pt.set(s,t),Ot.get(s).forEach((function(e){return e(t)})),Ot.delete(s),n.label=5;case 5:return i()?[2,null]:[3,7];case 6:return N(n.sent()),Ot.has(s)&&(Ot.get(s).forEach((function(e){return e(null)})),Ot.delete(s)),[2,d];case 7:return[2,f(t,e)||d]}}))}))}}(c):function(e){var t=e.match(/^(.*-gradient)\((.*)\)$/),r=t[1],n=t[2],o=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,a=qe(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?[^\(\),]*),?/g,n,1).map((function(e){var t=At(e=e.trim());if(t)return function(e){return ut(t,e)};var r=e.lastIndexOf(" ");if(t=At(e.substring(0,r)))return function(n){return ut(t,n)+" "+e.substring(r+1)};var n=e.match(o);return n&&(t=At(n[3]))?function(e){return n[1]+"("+(n[2]?n[2]+", ":"")+ut(t,e)+")"}:function(){return e}}));return function(e){return r+"("+a.map((function(t){return t(e)})).join(", ")+")"}}(c)),s===d.length-1&&h.push((function(){return e.substring(g)}))})),function(e){var t=h.filter(Boolean).map((function(t){return t(e)}));return t.some((function(e){return e instanceof Promise}))?Promise.all(t).then((function(e){return e.join("")})):t.join("")}}catch(t){return N("Unable to parse gradient "+e,t),null}}function Dt(e){try{var t=0,r=qe(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2),n=0,o=r.map((function(o,a){var i=t,u=e.indexOf(o,t),s=u+o.length;t=s;var c=At(o);return c?function(t){return""+e.substring(i,u)+function(e,t){return Ze(e,t)}(c,t)+(a===r.length-1?e.substring(s):"")}:(n++,function(){return e.substring(i,s)})}));return function(e){var t=o.map((function(t){return t(e)})).join("");return{matchesLength:r.length,unparseableMatchesLength:n,result:t}}}catch(t){return N("Unable to parse shadow "+e,t),null}}function Ft(){Tt.clear(),Ue.clear(),ze.clear(),Pt.clear(),wt(),Ot.clear()}var qt=new(function(){function e(){this.varTypes=new Map,this.rulesQueue=[],this.definedVars=new Set,this.varRefs=new Map,this.unknownColorVars=new Set,this.unknownBgVars=new Set,this.undefinedVars=new Set,this.initialVarTypes=new Map,this.changedTypeVars=new Set,this.typeChangeSubscriptions=new Map,this.unstableVarValues=new Map}return e.prototype.clear=function(){this.varTypes.clear(),this.rulesQueue.splice(0),this.definedVars.clear(),this.varRefs.clear(),this.unknownColorVars.clear(),this.unknownBgVars.clear(),this.undefinedVars.clear(),this.initialVarTypes.clear(),this.changedTypeVars.clear(),this.typeChangeSubscriptions.clear(),this.unstableVarValues.clear()},e.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,r){t.forEach((function(t){e.varTypes.has(r)&&e.resolveVariableType(t,e.varTypes.get(r))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,1)):e.isVarType(t,7)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,6)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,1)})):e.isVarType(t,9)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(r){var n=e.varName,o=e.sourceValue,a=e.rule,i=e.ignoredImgSelectors,u=e.isCancelled,s=function(){var e=[],s=function(a,i,u){if(t.isVarType(n,a)){var s,c=i(n);if(Qt(o))if(Kt(o)){var l=Zt(o,t.unstableVarValues);l||(l=1===a?"#ffffff":"#000000"),s=u(l,r)}else s=Wt(o,(function(e){return i(e)}),(function(e){return u(e,r)}));else s=u(o,r);e.push({property:c,value:s})}};if(s(1,Ut,Jt),s(2,zt,Xt),s(4,Ht,Yt),t.isVarType(n,8)){var c=$t(n),l=o;Qt(o)&&(l=Wt(o,(function(e){return Ut(e)}),(function(e){return Jt(e,r)})));var d=jt(l,a,i,u);l="function"==typeof d?d(r):d,e.push({property:c,value:l})}return e},c=new Set;return{declarations:s(),onTypeChange:{addListener:function(e){var r=function(){var t=s();e(t)};c.add(r),t.subscribeForVarTypeChange(n,r)},removeListeners:function(){c.forEach((function(e){t.unsubscribeFromVariableTypeChanges(n,e)}))}}}}},e.prototype.getModifierForVarDependant=function(e,t){var r=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var n=e.startsWith("background"),o="color"===e||"caret-color"===e;return function(e){var a=Zt(t,r.unstableVarValues);return a||(a=n?"#ffffff":"#000000"),(n?Jt:o?Xt:Yt)(a,e)}}if("background-color"===e)return function(e){return Wt(t,(function(e){return Ut(e)}),(function(t){return Jt(t,e)}))};if("color"===e||"caret-color"===e)return function(e){return Wt(t,(function(e){return zt(e)}),(function(t){return Xt(t,e)}))};if("background"===e||"background-image"===e||"box-shadow"===e)return function(n){var o=new Set,a=function(){var a=Wt(t,(function(e){return r.isVarType(e,1)?Ut(e):r.isVarType(e,8)?$t(e):(o.add(e),e)}),(function(e){return Jt(e,n)}));if("box-shadow"===e){var i=Dt(a)(n);if(i.unparseableMatchesLength!==i.matchesLength)return i.result}return a},i=a();return o.size>0?new Promise((function(e){var t=o.values().next().value,n=function(){r.unsubscribeFromVariableTypeChanges(t,n);var o=a();e(o)};r.subscribeForVarTypeChange(t,n)})):i};if(e.startsWith("border")||e.startsWith("outline")){if(t.endsWith(")")){var a=t.match(/((rgb|hsl)a?)\(/);if(a){var i=a.index;return function(e){return Zt(t,r.unstableVarValues)?""+t.substring(0,i)+Yt(Zt(t.substring(i,t.length),r.unstableVarValues),e):t}}}return function(e){return Wt(t,(function(e){return Ht(e)}),(function(t){return Xt(t,e)}))}}return null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var r=this.typeChangeSubscriptions.get(e);r.has(t)||r.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){se(e,(function(e){e.style&&de(e.style,(function(e,r){Gt(e)&&t.inspectVariable(e,r),Qt(r)&&t.inspectVarDependant(e,r)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;de(document.documentElement.style,(function(t,r){Gt(t)&&e.inspectVariable(t,r)}))},e.prototype.inspectVariable=function(e,t){(this.unstableVarValues.set(e,t),Qt(t)&&Kt(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))||(this.definedVars.add(e),At(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8))},e.prototype.resolveVariableType=function(e,t){var r=this.initialVarTypes.get(e)||0,n=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,n),(n!==r||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;de(document.documentElement.style,(function(t,r){Qt(r)&&e.inspectVarDependant(t,r)}))},e.prototype.inspectVarDependant=function(e,t){var r=this;Gt(e)?this.iterateVarDeps(t,(function(t){r.varRefs.has(e)||r.varRefs.set(e,new Set),r.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,1)})):"color"===e||"caret-color"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,2)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,4)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!r.isVarType(e,9)){var t=null!=r.findVarRef(e,(function(e){return r.unknownColorVars.has(e)||r.isVarType(e,6)}));r.itarateVarRefs(e,(function(e){t?r.resolveVariableType(e,1):r.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var r=new Set;!function(e,t){Wt(e,(function(e){return t(e),e}))}(e,(function(e){return r.add(e)})),r.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,r){var n,a;if(void 0===r&&(r=new Set),r.has(e))return null;if(r.add(e),t(e))return e;var i=this.varRefs.get(e);if(!i||0===i.size)return null;try{for(var u=o(i),s=u.next();!s.done;s=u.next()){var c=s.value,l=this.findVarRef(c,t,r);if(l)return l}}catch(e){n={error:e}}finally{try{s&&!s.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var r,n,i=this,u=e.sheet;u.cssRules.length>0&&u.deleteRule(0);var s=new Map;de(document.documentElement.style,(function(e,r){Gt(e)&&(i.isVarType(e,1)&&s.set(Ut(e),Jt(r,t)),i.isVarType(e,2)&&s.set(zt(e),Xt(r,t)),i.isVarType(e,4)&&s.set(Ht(e),Yt(r,t)),i.subscribeForVarTypeChange(e,i.onRootVariableDefined))}));var c=[];c.push(":root {");try{for(var l=o(s),d=l.next();!d.done;d=l.next()){var f=a(d.value,2),h=f[0],p=f[1];c.push("    "+h+": "+p+";")}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}c.push("}");var v=c.join("\n");u.insertRule(v)},e}());function Nt(e,t){void 0===t&&(t=0);var r=e.indexOf("var(",t);if(r>=0){var n=function(e,t){void 0===t&&(t=0);for(var r=e.length,n=0,o=-1,a=t;a<r;a++)if(0===n){if((i=e.indexOf("(",a))<0)break;o=i,n++,a=i}else{var i,u=e.indexOf(")",a);if(u<0)break;if((i=e.indexOf("(",a))<0||u<i){if(0==--n)return{start:o,end:u+1};a=u}else n++,a=i}return null}(e,r+3);return n?{start:r,end:n.end}:null}}function Bt(e,t){var r=function(e){for(var t,r=[],n=0;t=Nt(e,n);){var o=t.start,a=t.end;r.push({start:o,end:a,value:e.substring(o,a)}),n=t.end+1}return r}(e),n=r.length;if(0===n)return e;var o=e.length,a=r.map((function(e){return t(e.value)})),i=[];i.push(e.substring(0,r[0].start));for(var u=0;u<n;u++){i.push(a[u]);var s=r[u].end,c=u<n-1?r[u+1].start:o;i.push(e.substring(s,c))}return i.join("")}function It(e){var t,r,n=e.indexOf(",");return n>=0?(t=e.substring(4,n).trim(),r=e.substring(n+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),r=""),{name:t,fallback:r}}function Wt(e,t,r){return Bt(e,(function(e){var n=It(e),o=n.name,a=n.fallback,i=t(o);return a?"var("+i+", "+(Qt(a)?Wt(a,t,r):r?r(a):a)+")":"var("+i+")"}))}function Ut(e){return"--darkreader-bg"+e}function zt(e){return"--darkreader-text"+e}function Ht(e){return"--darkreader-border"+e}function $t(e){return"--darkreader-bgimg"+e}function Gt(e){return e.startsWith("--")}function Qt(e){return e.includes("var(")}function Kt(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function Jt(e,t){var r=At(e);return r?Ze(r,t):e}function Xt(e,t){var r=At(e);return r?ot(r,t):e}function Yt(e,t){var r=At(e);return r?it(r,t):e}function Zt(e,t,r){void 0===r&&(r=new Set);var n=!1,o=Bt(e,(function(e){var o=It(e),a=o.name,i=o.fallback;if(r.has(a))return n=!0,null;r.add(a);var u=t.get(a)||i,s=null;return u&&(s=Qt(u)?Zt(u,t,r):u),s||(n=!0,null)}));return n?null:o}var er={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},tr=Object.values(er),rr={};tr.forEach((function(e){var t=e.cssProp,r=e.customProp;return rr[r]=t}));var nr=["style","fill","stop-color","stroke","bgcolor","color"],or=nr.map((function(e){return"["+e+"]"})).join(", ");function ar(){return tr.map((function(e){var t=e.dataAttr,r=e.customProp;return["["+t+"] {","  "+e.cssProp+": var("+r+") !important;","}"].join("\n")})).join("\n")}var ir=new Map,ur=new Map;function sr(e,t,r){ir.has(e)&&(ir.get(e).disconnect(),ur.get(e).disconnect());var n=new WeakSet;function o(e){(function(e){var t=[];return e instanceof Element&&e.matches(or)&&t.push(e),(e instanceof Element||b&&e instanceof ShadowRoot||e instanceof Document)&&F(t,e.querySelectorAll(or)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),z(e,(function(o){n.has(e)||(n.add(e),r(o.shadowRoot),sr(o.shadowRoot,t,r))}))}var u=re(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return o(e)}))},onHugeMutations:function(){o(e)}});ir.set(e,u);var s=0,c=null,l=I({seconds:10}),d=I({seconds:2}),f=[],h=null,p=B((function(e){e.forEach((function(e){nr.includes(e.attributeName)&&t(e.target)}))})),v=new MutationObserver((function(e){if(h)f.push.apply(f,i([],a(e),!1));else{s++;var t=Date.now();if(null==c)c=t;else if(s>=50){if(t-c<l)return h=setTimeout((function(){c=null,s=0,h=null;var e=f;f=[],p(e)}),d),void f.push.apply(f,i([],a(e),!1));c=t,s=1}p(e)}}));v.observe(e,{attributes:!0,attributeFilter:nr.concat(tr.map((function(e){return e.dataAttr}))),subtree:!0}),ur.set(e,v)}var cr=new WeakMap,lr=["brightness","contrast","grayscale","sepia","mode"];function dr(e,t){return nr.map((function(t){return t+'="'+e.getAttribute(t)+'"'})).concat(lr.map((function(e){return e+'="'+t[e]+'"'}))).join(" ")}function fr(e,t,r,n){if(dr(e,t)!==cr.get(e)){var o=new Set(Object.keys(er));if(r.length>0&&function(e,t){for(var r=0,n=t.length;r<n;r++){var o=t[r];if(e.matches(o))return!0}return!1}(e,r))o.forEach((function(t){e.removeAttribute(er[t].dataAttr)}));else{if(e.hasAttribute("bgcolor"))((u=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#"+u),s("background-color","background-color",u);if(e.hasAttribute("color")&&"mask-icon"!==e.rel)((u=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#"+u),s("color","color",u);if(e instanceof SVGElement){if(e.hasAttribute("fill")){var a=e.getAttribute("fill");if("none"!==a)if(e instanceof SVGTextElement)s("fill","color",a);else{var i=function(){var t=e.getBoundingClientRect(),r=t.width,n=t.height;s("fill",r>32||n>32?"background-color":"color",a)};K()?i():X(i)}}e.hasAttribute("stop-color")&&s("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var u=e.getAttribute("stroke");s("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",u)}e.style&&de(e.style,(function(t,r){if("background-image"!==t||!r.includes("url"))if(er.hasOwnProperty(t))s(t,t,r);else{var n=rr[t];if(n&&!e.style.getPropertyValue(n)&&!e.hasAttribute(n)){if("background-color"===n&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&s("fill","color",e.style.getPropertyValue("fill")),D(o,(function(t){e.removeAttribute(er[t].dataAttr)})),cr.set(e,dr(e,t))}}function s(r,a,i){var u=er[r],s=u.customProp,c=u.dataAttr,l=Et(a,i,{},qt,n,null);if(l){var d=l.value;"function"==typeof d&&(d=d(t)),e.style.setProperty(s,d),e.hasAttribute(c)||e.setAttribute(c,""),o.delete(r)}}}var hr="theme-color",pr='meta[name="theme-color"]',vr=null,mr=null;function gr(e,t){vr=vr||e.content;try{var r=xe(vr);e.content=Ze(r,t)}catch(e){N(e)}}var br=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var yr=function(){var e=[],t=null;function r(){for(var r;r=e.shift();)r();t=null}return{add:function(n){e.push(n),t||(t=requestAnimationFrame(r))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function kr(){var e=0,t=new Set,r=new Map,n=new Set,o=null,u=!1,s=!1;return{modifySheet:function(c){var l=c.sourceCSSRules,d=c.theme,f=c.ignoreImageAnalysis,h=c.force,p=c.prepareSheet,v=c.isAsyncCancelled,m=0===r.size,g=new Set(r.keys()),b=function(e){return br.map((function(t){return t+":"+e[t]})).join(";")}(d),y=b!==o;u&&(s=!0);var k=[];if(se(l,(function(e){var n=e.cssText,o=!1;if(g.delete(n),e.parentRule instanceof CSSMediaRule&&(n+=";"+e.parentRule.media.mediaText),t.has(n)||(t.add(n),o=!0),o){m=!0;var a=[];e.style&&de(e.style,(function(t,r){var n=Et(t,r,e,qt,f,v);n&&a.push(n)}));var i=null;if(a.length>0){var u=e.parentRule;i={selector:e.selectorText,declarations:a,parentRule:u},k.push(i)}r.set(n,i)}else k.push(r.get(n))}),(function(){u=!0})),g.forEach((function(e){t.delete(e),r.delete(e)})),o=b,h||m||y){e++;var S=new Map,w=new Map,_=0,E=0,x={rule:null,rules:[],isGroup:!0},C=new WeakMap;n.forEach((function(e){return e()})),n.clear(),k.filter((function(e){return e})).forEach((function(t){var r=t.selector,o=t.declarations,u=T(t.parentRule),s={selector:r,declarations:[],isGroup:!1},c=s.declarations;function l(t,r,n,o){var a=++_,i={property:t,value:null,important:n,asyncKey:a,sourceValue:o};c.push(i);var u=e;r.then((function(t){t&&!v()&&u===e&&(i.value=t,yr.add((function(){v()||u!==e||function(e){var t=S.get(e),r=t.rule,n=t.target,o=t.index;n.deleteRule(o),R(n,o,r),S.delete(e)}(a)})))}))}function f(t,r,o,u){var s=r,d=s.declarations,f=s.onTypeChange,h=++E,p=e,m=c.length,g=[];if(0===d.length){var b={property:t,value:u,important:o,sourceValue:u,varKey:h};c.push(b),g=[b]}d.forEach((function(e){if(e.value instanceof Promise)l(e.property,e.value,o,u);else{var t={property:e.property,value:e.value,important:o,sourceValue:u,varKey:h};c.push(t),g.push(t)}})),f.addListener((function(t){if(!v()&&p===e){var r=t.map((function(e){return{property:e.property,value:e.value,important:o,sourceValue:u,varKey:h}})),n=c.indexOf(g[0],m);c.splice.apply(c,i([n,g.length],a(r),!1)),g=r,function(e){var t=w.get(e),r=t.rule,n=t.target,o=t.index;n.deleteRule(o),R(n,o,r)}(h)}})),n.add((function(){return f.removeListeners()}))}u.rules.push(s),o.forEach((function(e){var t=e.property,r=e.value,n=e.important,o=e.sourceValue;if("function"==typeof r){var a=r(d);a instanceof Promise?l(t,a,n,o):t.startsWith("--")?f(t,a,n,o):c.push({property:t,value:a,important:n,sourceValue:o})}else c.push({property:t,value:r,important:n,sourceValue:o})}))}));var V=p();!function e(t,r,n){t.rules.forEach((function(t){t.isGroup?e(t,function(e,t){var r=e.rule;if(r instanceof CSSMediaRule){var n=r.media,o=t.cssRules.length;return t.insertRule("@media "+n.mediaText+" {}",o),t.cssRules[o]}return t}(t,r),n):n(t,r)}))}(x,V,(function(e,t){var r=t.cssRules.length;e.declarations.forEach((function(n){var o=n.asyncKey,a=n.varKey;null!=o&&S.set(o,{rule:e,target:t,index:r}),null!=a&&w.set(a,{rule:e,target:t,index:r})})),R(t,r,e)}))}function R(e,t,r){var n=r.selector+" { "+r.declarations.map((function(e){var t=e.property,r=e.value,n=e.important,o=e.sourceValue;return t+": "+(null==r?o:r)+(n?" !important":"")+";"})).join(" ")+" }";e.insertRule(n,t)}function T(e){if(null==e)return x;if(C.has(e))return C.get(e);var t={rule:e,rules:[],isGroup:!0};return C.set(e,t),T(e.parentRule).rules.push(t),t}},shouldRebuildStyle:function(){return u&&!s}}}function Sr(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.toLowerCase()&&!e.classList.contains("stylus")}function wr(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=!0),Sr(e)?t.push(e):(e instanceof Element||b&&e instanceof ShadowRoot||e===document)&&(D(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return wr(e,t,!1)})),r&&z(e,(function(e){return wr(e.shadowRoot,t,!1)}))),t}var _r=new WeakSet,Er=new WeakSet,xr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){xr=!0}));var Cr=0,Vr=new Map;function Rr(e,t){for(var o=t.update,i=t.loadingStart,u=t.loadingEnd,s=[],c=e;(c=c.nextElementSibling)&&c.matches(".darkreader");)s.push(c);var l=s.find((function(e){return e.matches(".darkreader--cors")&&!Er.has(e)}))||null,h=s.find((function(e){return e.matches(".darkreader--sync")&&!_r.has(e)}))||null,v=null,m=null,g=!1,b=!0,y=kr(),k=new MutationObserver((function(){o()})),S={attributes:!0,childList:!0,subtree:!0,characterData:!0};function w(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(he)}function _(e,t){var r=!1;if(e){var n=void 0;e:for(var o=0,a=e.length;o<a;o++)if((n=e[o]).href){if(!t){r=!0;break e}if(n.href.startsWith("http")&&!n.href.startsWith(location.origin)){r=!0;break e}}}return r}function E(){if(l)return q("[getRulesSync] Using cors-copy."),l.sheet.cssRules;if(w())return q("[getRulesSync] CSSImport detected."),null;var t=L();return e instanceof HTMLLinkElement&&!ue(e.href)&&_(t,!1)?(q("[getRulesSync] CSSImportRule detected on non-local href."),null):_(t,!0)?(q("[getRulesSync] Cross-Origin CSSImportRule detected."),null):(q("[getRulesSync] Using cssRules."),!t&&N("[getRulesSync] cssRules is null, trying again."),t)}function x(){l?(e.nextSibling!==l&&e.parentNode.insertBefore(l,e.nextSibling),l.nextSibling!==h&&e.parentNode.insertBefore(h,l.nextSibling)):e.nextSibling!==h&&e.parentNode.insertBefore(h,e.nextSibling)}var C=!1,V=!1,R=++Cr;function T(){return r(this,void 0,void 0,(function(){var t,r,o,i,u,s,c;return n(this,(function(n){switch(n.label){case 0:if(!(e instanceof HTMLLinkElement))return[3,7];if(o=a(A(),2),i=o[0],(u=o[1])&&N(u),!(!i&&!u&&!p||p&&!e.sheet||(d=u,d&&d.message&&d.message.includes("loading"))))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),q("Linkelement "+R+" is not loaded yet and thus will be await for",e),[4,Tr(e,R)];case 2:return n.sent(),[3,4];case 3:return N(n.sent()),V=!0,[3,4];case 4:if(g)return[2,null];c=a(A(),2),i=c[0],(u=c[1])&&N(u),n.label=5;case 5:if(i){if(ue(e.href))return[2,i];if(!_(i,!1))return[2,i]}return[4,Mr(e.href)];case 6:return t=n.sent(),r=ve(e.href),g?[2,null]:[3,8];case 7:if(!w())return[2,null];t=e.textContent.trim(),r=ve(location.href),n.label=8;case 8:if(!t)return[3,13];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,Ar(t,r)];case 10:return s=n.sent(),l=function(e,t){if(!t)return null;var r=document.createElement("style");return r.classList.add("darkreader"),r.classList.add("darkreader--cors"),r.media="screen",r.textContent=t,e.parentNode.insertBefore(r,e.nextSibling),r.sheet.disabled=!0,Er.add(r),r}(e,s),[3,12];case 11:return N(n.sent()),[3,12];case 12:if(l)return v=U(l,"prev-sibling"),[2,l.sheet.cssRules];n.label=13;case 13:return[2,null]}var d}))}))}var M=!1;function A(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(e){return[null,e]}}function L(){var e=a(A(),2),t=e[0],r=e[1];return r?(N(r),null):t}function P(){e.addEventListener("__darkreader__updateSheet",I),f||xr&&e.sheet||function(){O=D(),F();var t=function(){D()!==O&&(O=D(),o()),xr&&e.sheet?F():j=requestAnimationFrame(t)};t()}()}var O=null,j=null;function D(){var e=L();return e?e.length:null}function F(){cancelAnimationFrame(j)}var B=!1;function I(){function e(){B=!1,g||o()}xr=!0,F(),B||(B=!0,"function"==typeof queueMicrotask?queueMicrotask(e):requestAnimationFrame(e))}function z(){e.removeEventListener("__darkreader__updateSheet",I),F()}function H(){k.disconnect(),g=!0,v&&v.stop(),m&&m.stop(),z()}var $=0;return{details:function(){var e=E();return e?{rules:e}:(C||V||(C=!0,i(),T().then((function(e){C=!1,u(),e&&o()})).catch((function(e){N(e),C=!1,u()}))),null)},render:function(t,r){var n=E();function a(){return h||((h=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),h.classList.add("darkreader--sync"),h.media="screen",!d&&e.title&&(h.title=e.title),_r.add(h)),m&&m.stop(),x(),null==h.sheet&&(h.textContent=""),function(e){try{if(e.replaceSync)return void e.replaceSync("")}catch(e){N("Could not use fastpath for removing rules from stylesheet",e)}for(var t=e.cssRules.length-1;t>=0;t--)e.deleteRule(t)}(h.sheet),m?m.run():m=U(h,"prev-sibling",(function(){M=!0,i()})),h.sheet}function i(){var e=M;M=!1,y.modifySheet({prepareSheet:a,sourceCSSRules:n,theme:t,ignoreImageAnalysis:r,force:e,isAsyncCancelled:function(){return g}}),b=0===h.sheet.cssRules.length,y.shouldRebuildStyle()&&X((function(){return o()}))}n&&(g=!1,i())},pause:H,destroy:function(){if(H(),W(l),W(h),u(),Vr.has(R)){var e=Vr.get(R);Vr.delete(R),e&&e()}},watch:function(){k.observe(e,S),e instanceof HTMLStyleElement&&P()},restore:function(){h&&(++$>10?N("Style sheet was moved multiple times",e):(N("Restore style",h,e),x(),v&&v.skip(),m&&m.skip(),b||(M=!0,o())))}}}function Tr(e,t){return r(this,void 0,void 0,(function(){return n(this,(function(r){return[2,new Promise((function(r,n){var o=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),Vr.delete(t)},a=function(){o(),q("Linkelement "+t+" has been loaded"),r()},i=function(){o(),n("Linkelement "+t+" couldn't be loaded. "+e.href)};Vr.set(t,(function(){o(),n()})),e.addEventListener("load",a),e.addEventListener("error",i),e.href||i()}))]}))}))}function Mr(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:return[2,t.sent()];case 3:return[4,ft({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})];case 4:return[2,t.sent()]}}))}))}function Ar(e,t,a){return void 0===a&&(a=new Map),r(this,void 0,void 0,(function(){var r,i,u,s,c,l,d,f,h,p;return n(this,(function(n){switch(n.label){case 0:e=function(e,t){return e.replace(fe,(function(e){var r=pe(e);return'url("'+ie(t,r)+'")'}))}(e=function(e){return e.replace(ge,"")}(e=e.replace(me,"")),t),r=qe(he,e),n.label=1;case 1:n.trys.push([1,10,11,12]),i=o(r),u=i.next(),n.label=2;case 2:return u.done?[3,9]:(s=u.value,c=pe(s.substring(7).trim().replace(/;$/,"")),l=ie(t,c),d=void 0,a.has(l)?(d=a.get(l),[3,7]):[3,3]);case 3:return n.trys.push([3,6,,7]),[4,Mr(l)];case 4:return d=n.sent(),a.set(l,d),[4,Ar(d,ve(l),a)];case 5:return d=n.sent(),[3,7];case 6:return N(n.sent()),d="",[3,7];case 7:e=e.split(s).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 Lr,Pr,Or=[],jr=new Map;function Dr(e){k&&D(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var o=e.getAttribute("is");if(!o)return;t=o}jr.has(t)||(jr.set(t,new Set),function(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t){if(window.customElements&&"function"==typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(Fr)qr.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var r=function(){var n=jr.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))};requestAnimationFrame(r)}}))]}))}))}(t).then((function(){if(Pr){var e=jr.get(t);jr.delete(t),Pr(Array.from(e))}}))),jr.get(t).add(e)}))}var Fr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Fr=!0}));var qr=new Map;function Nr(e){(Fr=!0,qr.has(e.detail.tag))&&qr.get(e.detail.tag)()}function Br(e,t,r){Ir();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 r=e.createdStyles,u=e.removedStyles,s=e.movedStyles;r.forEach((function(e){return i(e)})),s.forEach((function(e){return i(e)})),u.forEach((function(e){return t=e,o.delete(t),void a.delete(t);var t})),r.forEach((function(e){return n.add(e)})),u.forEach((function(e){return n.delete(e)})),r.size+u.size+s.size>0&&t({created:Array.from(r),removed:Array.from(u),moved:Array.from(s),updated:[]})}function s(e){var t=e.additions,r=e.moves,n=e.deletions,o=new Set,a=new Set,i=new Set;t.forEach((function(e){return wr(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return wr(e).forEach((function(e){return a.add(e)}))})),r.forEach((function(e){return wr(e).forEach((function(e){return i.add(e)}))})),u({createdStyles:o,removedStyles:a,movedStyles:i}),t.forEach((function(e){z(e,f),Dr(e)}))}function c(e){var t=new Set(wr(e)),r=new Set,i=new Set,s=new Set;t.forEach((function(e){n.has(e)||r.add(e)})),n.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){var t;r.has(e)||i.has(e)||(t=e).previousElementSibling===o.get(t)&&t.nextElementSibling===a.get(t)||s.add(e)})),u({createdStyles:r,removedStyles:i,movedStyles:s}),z(e,f),Dr(e)}function l(e){var r=new Set,n=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Sr(t)?r.add(t):t instanceof HTMLLinkElement&&t.disabled&&n.add(t))})),r.size+n.size>0&&t({updated:Array.from(r),created:[],removed:Array.from(n),moved:[]})}function d(e){var t=re(e,{onMinorMutations:s,onHugeMutations:c}),r=new MutationObserver(l);r.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media"],subtree:!0}),Or.push(t,r),Lr.add(e)}function f(e){var t=e.shadowRoot;null==t||Lr.has(t)||(d(t),r(t))}e.forEach(i),d(document),z(document.documentElement,f),Pr=function(e){var r=[];e.forEach((function(e){return F(r,wr(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(f(e),z(t,f),Dr(t))}))},document.addEventListener("__darkreader__isDefined",Nr),Dr(document)}function Ir(){Or.forEach((function(e){return e.disconnect()})),Or.splice(0,Or.length),Lr=new WeakSet,Pr=null,jr.clear(),document.removeEventListener("__darkreader__isDefined",Nr)}var Wr=new WeakMap,Ur=new WeakSet;function zr(e){var t=!1;return{render:function(r,n){e.adoptedStyleSheets.forEach((function(o){if(!Ur.has(o)){var u=o.rules,s=new CSSStyleSheet;kr().modifySheet({prepareSheet:function(){for(var t=s.cssRules.length-1;t>=0;t--)s.deleteRule(t);return function(t,r){var n=i([],a(e.adoptedStyleSheets),!1),o=n.indexOf(t),u=n.indexOf(r);o!==u-1&&(u>=0&&n.splice(u,1),n.splice(o+1,0,r),e.adoptedStyleSheets=n)}(o,s),Wr.set(o,s),Ur.add(s),s},sourceCSSRules:u,theme:r,ignoreImageAnalysis:n,force:!1,isAsyncCancelled:function(){return t}})}}))},destroy:function(){t=!0;var r=i([],a(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if(Ur.has(e)){var t=r.indexOf(e);t>=0&&r.splice(t,1),Wr.delete(e),Ur.delete(e)}})),e.adoptedStyleSheets=r}}}function Hr(){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var e=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),t=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),o=Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"),u=location.hostname.endsWith("baidu.com"),s=u?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,c=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",e),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",t),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",r),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",n),document.removeEventListener("__darkreader__cleanUp",c),document.removeEventListener("__darkreader__addUndefinedResolver",l),Object.defineProperty(Document.prototype,"styleSheets",o),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",s)},l=function(e){customElements.whenDefined(e.detail.tag).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))}))};document.addEventListener("__darkreader__cleanUp",c),document.addEventListener("__darkreader__addUndefinedResolver",l);var d=new Event("__darkreader__updateSheet");Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},e,{value:function(t,r,n){return e.value.call(this,t,r,n),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(d),-1}})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},t,{value:function(e,r){var n=t.value.call(this,e,r);return this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(d),n}})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},r,{value:function(e){r.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(d)}})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},n,{value:function(e){n.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(d)}})),Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},o,{get:function(){var e=i([],a(o.get.call(this)),!1).filter((function(e){return!e.ownerNode.classList.contains("darkreader")}));return Object.setPrototypeOf(e,StyleSheetList.prototype)}})),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},s,{value:function(e){var t=this,r=function(){var r=s.value.call(t,e);return"style"===e&&(r=Object.setPrototypeOf(i([],a(r),!1).filter((function(e){return!e.classList.contains("darkreader")})),NodeList.prototype)),r},n=r();return new Proxy(n,{get:function(e,t){return r()[Number(t)]}})}}))}var $r=function(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return((t=e)<16?"0":"")+t.toString(16);var t})).join("")}(),Gr=new Map,Qr=[],Kr=null,Jr=null,Xr=null,Yr=null,Zr=null;function en(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector("."+e);return r||((r=document.createElement("style")).classList.add("darkreader"),r.classList.add(e),r.media="screen",r.textContent=""),r}var tn=new Map;function rn(e,t){tn.has(t)&&tn.get(t).stop(),tn.set(t,U(e,"parent"))}function nn(){var e=en("darkreader--fallback",document);e.textContent=Vt(Kr,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),rn(e,"fallback");var r=en("darkreader--user-agent");r.textContent=xt(Kr,Xr,Kr.styleSystemControls),document.head.insertBefore(r,e.nextSibling),rn(r,"user-agent");var n,o,a=en("darkreader--text");Kr.useFont||Kr.textStroke>0?a.textContent=(n=Kr,(o=[]).push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),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),rn(a,"text");var i=en("darkreader--invert");Jr&&Array.isArray(Jr.invert)&&Jr.invert.length>0?i.textContent=[Jr.invert.join(", ")+" {","    filter: "+st(t(t({},Kr),{contrast:0===Kr.mode?Kr.contrast:De(Kr.contrast-10,0,100)}))+" !important;","}"].join("\n"):i.textContent="",document.head.insertBefore(i,a.nextSibling),rn(i,"invert");var u=en("darkreader--inline");u.textContent=ar(),document.head.insertBefore(u,i.nextSibling),rn(u,"inline");var s=en("darkreader--override");s.textContent=Jr&&Jr.css?un(Jr.css):"",document.head.appendChild(s),rn(s,"override");var c=en("darkreader--variables"),l=Ct(Kr),d=Kr.darkSchemeBackgroundColor,f=Kr.darkSchemeTextColor,h=Kr.lightSchemeBackgroundColor,p=Kr.lightSchemeTextColor,v=Kr.mode,m=0===v?h:d,g=0===v?p:f;m=Ze(xe(m),Kr),g=ot(xe(g),Kr),c.textContent=[":root {","   --darkreader-neutral-background: "+m+";","   --darkreader-neutral-text: "+g+";","   --darkreader-selection-background: "+l.backgroundColorSelection+";","   --darkreader-selection-text: "+l.foregroundColorSelection+";","}"].join("\n"),document.head.insertBefore(c,u.nextSibling),rn(c,"variables");var b=en("darkreader--root-vars");document.head.insertBefore(b,c.nextSibling);var y=function(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector("."+e);return r||((r=document.createElement("script")).classList.add("darkreader"),r.classList.add(e)),r}("darkreader--proxy");y.append("("+Hr+")()"),document.head.insertBefore(y,b.nextSibling),y.remove()}var on=new Set;function an(e){var r=en("darkreader--inline",e);r.textContent=ar(),e.insertBefore(r,e.firstChild);var n=en("darkreader--override",e);n.textContent=Jr&&Jr.css?un(Jr.css):"",e.insertBefore(n,r.nextSibling);var o=en("darkreader--invert",e);Jr&&Array.isArray(Jr.invert)&&Jr.invert.length>0?o.textContent=[Jr.invert.join(", ")+" {","    filter: "+st(t(t({},Kr),{contrast:0===Kr.mode?Kr.contrast:De(Kr.contrast-10,0,100)}))+" !important;","}"].join("\n"):o.textContent="",e.insertBefore(o,n.nextSibling),on.add(e)}function un(e){return e.replace(/\${(.+?)}/g,(function(e,t){var r=At(t);return r?Qe(r,Kr,Ke):(N("Couldn't parse CSSTemplate's color."),t)}))}function sn(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}var cn=0,ln=new Set;function dn(e){var t=++cn;q("New manager for element, with loadingStyleID "+t,e);var r=Rr(e,{update:function(){var e=r.details();e&&(qt.addRulesForMatching(e.rules),qt.matchVariablesAndDependants(),r.render(Kr,Yr))},loadingStart:function(){if(!H()||!gn){ln.add(t),q("Current amount of styles loading: "+ln.size);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=Vt(Kr,{strict:!1}))}},loadingEnd:function(){ln.delete(t),q("Removed loadingStyle "+t+", now awaiting: "+ln.size),q("To-do to be loaded",ln),0===ln.size&&H()&&sn()}});return Gr.set(e,r),r}function fn(e){var t=Gr.get(e);t&&(t.destroy(),Gr.delete(e))}var hn=B((function(e){Gr.forEach((function(e){return e.render(Kr,Yr)})),Qr.forEach((function(e){return e.render(Kr,Yr)})),e&&e()})),pn=function(){hn.cancel()};function vn(){0!==ln.size?N("DOM is ready, but still have styles being loaded.",ln):sn()}var mn=null,gn=!document.hidden;function bn(){document.removeEventListener("visibilitychange",mn),mn=null}function yn(){function e(){var e,t;!function(){pn();var e=wr(document).filter((function(e){return!Gr.has(e)})).map((function(e){return dn(e)}));e.map((function(e){return e.details()})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){qt.addRulesForMatching(e.rules)})),qt.matchVariablesAndDependants(),qt.setOnRootVariableChange((function(){qt.putRootVars(document.head.querySelector(".darkreader--root-vars"),Kr)})),qt.putRootVars(document.head.querySelector(".darkreader--root-vars"),Kr),Gr.forEach((function(e){return e.render(Kr,Yr)})),0===ln.size&&sn(),e.forEach((function(e){return e.watch()}));var t=function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(e[r]);return t}(document.querySelectorAll(or));z(document.documentElement,(function(e){an(e.shadowRoot);var r=e.shadowRoot.querySelectorAll(or);r.length>0&&F(t,r)})),t.forEach((function(e){return fr(e,Kr,Zr,Yr)})),kn(document)}(),Br(Array.from(Gr.keys()),(function(e){var t=e.created,r=e.updated,n=e.removed,o=e.moved,a=n,i=t.concat(r).concat(o).filter((function(e){return!Gr.has(e)})),u=o.filter((function(e){return Gr.has(e)}));q("Styles to be removed:",a),a.forEach((function(e){return fn(e)}));var s=i.map((function(e){return dn(e)}));s.map((function(e){return e.details()})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){qt.addRulesForMatching(e.rules)})),qt.matchVariablesAndDependants(),s.forEach((function(e){return e.render(Kr,Yr)})),s.forEach((function(e){return e.watch()})),u.forEach((function(e){return Gr.get(e).restore()}))}),(function(e){an(e),kn(e)})),e=function(e){fr(e,Kr,Zr,Yr),e===document.documentElement&&e.getAttribute("style").includes("--")&&(qt.matchVariablesAndDependants(),qt.putRootVars(document.head.querySelector(".darkreader--root-vars"),Kr))},t=function(e){an(e);var t=e.querySelectorAll(or);t.length>0&&D(t,(function(e){return fr(e,Kr,Zr,Yr)}))},sr(document,e,t),z(document.documentElement,(function(r){sr(r.shadowRoot,e,t)})),G(vn)}var t,r,n,o;nn(),document.hidden?(t=e,r=Boolean(mn),mn=function(){document.hidden||(bn(),t(),gn=!0)},r||document.addEventListener("visibilitychange",mn)):e(),n=Kr,(o=document.querySelector(pr))?gr(o,n):(mr&&mr.disconnect(),(mr=new MutationObserver((function(e){e:for(var t=0;t<e.length;t++)for(var r=e[t].addedNodes,o=0;o<r.length;o++){var a=r[o];if(a instanceof HTMLMetaElement&&a.name===hr){mr.disconnect(),mr=null,gr(a,n);break e}}}))).observe(document.head,{childList:!0}))}function kn(e){if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var t=zr(e);Qr.push(t),t.render(Kr,Yr)}}function Sn(){Gr.forEach((function(e){return e.pause()})),D(tn.values(),(function(e){return e.stop()})),tn.clear(),Ir(),ir.forEach((function(e){return e.disconnect()})),ur.forEach((function(e){return e.disconnect()})),ir.clear(),ur.clear(),Q(vn),J.clear()}function wn(){var e,t=document.querySelector('meta[name="darkreader"]');return t?t.content!==$r:((e=document.createElement("meta")).name="darkreader",e.content=$r,document.head.appendChild(e),!1)}function _n(e,t,r){if(Kr=e,(Jr=t)?(Yr=Array.isArray(Jr.ignoreImageAnalysis)?Jr.ignoreImageAnalysis:[],Zr=Array.isArray(Jr.ignoreInlineStyle)?Jr.ignoreInlineStyle:[]):(Yr=[],Zr=[]),Xr=r,document.head){if(wn())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",Kr.mode?"dark":"dimmed"),yn()}else{if(!h){var n=en("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=Vt(Kr,{strict:!0})}var o=new MutationObserver((function(){if(document.head){if(o.disconnect(),wn())return void En();yn()}}));o.observe(document,{childList:!0,subtree:!0})}}function En(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),qt.clear(),ne.clear(),bn(),pn(),Sn(),Ft(),W(document.querySelector(".darkreader--fallback")),document.head&&(!function(){mr&&(mr.disconnect(),mr=null);var e=document.querySelector(pr);e&&vr&&(e.content=vr)}(),W(document.head.querySelector(".darkreader--user-agent")),W(document.head.querySelector(".darkreader--text")),W(document.head.querySelector(".darkreader--invert")),W(document.head.querySelector(".darkreader--inline")),W(document.head.querySelector(".darkreader--override")),W(document.head.querySelector(".darkreader--variables")),W(document.head.querySelector(".darkreader--root-vars")),W(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),W(document.head.querySelector(".darkreader--proxy"))),on.forEach((function(e){W(e.querySelector(".darkreader--inline")),W(e.querySelector(".darkreader--override"))})),on.clear(),D(Gr.keys(),(function(e){return fn(e)})),ln.clear(),Vr.clear(),D(document.querySelectorAll(".darkreader"),W),Qr.forEach((function(e){e.destroy()})),Qr.splice(0)}var xn=/url\(\"(blob\:.*?)\"\)/g;function Cn(e){return r(this,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return t=[],qe(xn,e,1).forEach((function(e){var r=w(e);t.push(r)})),[4,Promise.all(t)];case 1:return r=n.sent(),[2,e.replace(xn,(function(){return'url("'+r.shift()+'")'}))]}}))}))}function Vn(){return r(this,void 0,void 0,(function(){function e(e,r){var n=document.querySelector(e);n&&n.textContent&&(t.push("/* "+r+" */"),t.push(n.textContent),t.push(""))}var t,r,o,a,i;return n(this,(function(n){switch(n.label){case 0:return t=['/*\n                        _______\n                       /       \\\n                      .==.    .==.\n                     ((  ))==((  ))\n                    / "=="    "=="\\\n                   /____|| || ||___\\\n       ________     ____    ________  ___    ___\n       |  ___  \\   /    \\   |  ___  \\ |  |  /  /\n       |  |  \\  \\ /  /\\  \\  |  |  \\  \\|  |_/  /\n       |  |   )  /  /__\\  \\ |  |__/  /|  ___  \\\n       |  |__/  /  ______  \\|  ____  \\|  |  \\  \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n|  ___  \\ |  ____/ /    \\   |  ___  \\ |  ____|  ___  \\\n|  |  \\  \\|  |___ /  /\\  \\  |  |  \\  \\|  |___|  |  \\  \\\n|  |__/  /|  ____/  /__\\  \\ |  |   )  |  ____|  |__/  /\n|  ____  \\|  |__/  ______  \\|  |__/  /|  |___|  ____  \\\n|__|   \\__\\____/__/      \\__\\_______/ |______|__|   \\__\\\n                https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/master/LICENSE */\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"),r=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){D(e.sheet.cssRules,(function(e){e&&e.cssText&&r.push(e.cssText)}))})),r.length?(o=function(e){function t(e){return e.replace(/^\s+/,"")}function r(e){return 0===e?"":" ".repeat(4*e)}if(e.length<5e4)for(var n=/[^{}]+{\s*}/;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,s=o.length;u<s;u++){var c=o[u]+"\n";c.includes("{")?i.push(r(a++)+t(c)):c.includes("}")?i.push(r(--a)+t(c)):i.push(r(a)+t(c))}return i.join("").trim()}(r.join("\n")),t.push("/* Modified CSS */"),i=(a=t).push,[4,Cn(o)]):[3,2];case 1:i.apply(a,[n.sent()]),t.push(""),n.label=2;case 2:return e(".darkreader--override","Override Style"),[2,t.join("\n")]}}))}))}var Rn=!1,Tn=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function Mn(e,r){void 0===e&&(e={}),void 0===r&&(r=null);var n=t(t({},j),e);if(n.engine!==L)throw new Error("Theme engine is not supported.");_n(n,r,Tn),Rn=!0}function An(){En(),Rn=!1}var Ln=matchMedia("(prefers-color-scheme: dark)"),Pn={themeOptions:null,fixes:null};function On(){Ln.matches?Mn(Pn.themeOptions,Pn.fixes):An()}var jn=function(e){x=e||E};e.auto=function(e,t){void 0===e&&(e={}),void 0===t&&(t=null),e?(Pn={themeOptions:e,fixes:t},On(),y?Ln.addEventListener("change",On):Ln.addListener(On)):(y?Ln.removeEventListener("change",On):Ln.removeListener(On),An())},e.disable=An,e.enable=Mn,e.exportGeneratedCSS=function(){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Vn()];case 1:return[2,e.sent()]}}))}))},e.isEnabled=function(){return Rn},e.setFetchMethod=jn,Object.defineProperty(e,"__esModule",{value:!0})}));

DarkReader.setFetchMethod(window.fetch);
DarkReader.enable({}, {
	url: ['*'], ignoreInlineStyle: ['.mediaContainer', '.mediaContainer *', '.TemplateRevision', '.TemplateRevision *'],
	css: '',
	ignoreImageAnalysis: null,
	invert: []
});
console.log("Darkreader Enabled!");