{"version":3,"file":"app.min.js","sources":["../../src/common/Store.js","../../src/common/WPDarkMode.js","../../src/common/Base.js","../../node_modules/axios/lib/helpers/bind.js","../../node_modules/axios/lib/utils.js","../../node_modules/axios/lib/core/AxiosError.js","../../node_modules/axios/lib/helpers/null.js","../../node_modules/axios/lib/helpers/toFormData.js","../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../node_modules/axios/lib/helpers/buildURL.js","../../node_modules/axios/lib/core/InterceptorManager.js","../../node_modules/axios/lib/defaults/transitional.js","../../node_modules/axios/lib/platform/browser/index.js","../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../node_modules/axios/lib/platform/common/utils.js","../../node_modules/axios/lib/platform/index.js","../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../node_modules/axios/lib/helpers/formDataToJSON.js","../../node_modules/axios/lib/defaults/index.js","../../node_modules/axios/lib/helpers/parseHeaders.js","../../node_modules/axios/lib/core/AxiosHeaders.js","../../node_modules/axios/lib/core/transformData.js","../../node_modules/axios/lib/cancel/isCancel.js","../../node_modules/axios/lib/cancel/CanceledError.js","../../node_modules/axios/lib/core/settle.js","../../node_modules/axios/lib/helpers/cookies.js","../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../node_modules/axios/lib/helpers/combineURLs.js","../../node_modules/axios/lib/core/buildFullPath.js","../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../node_modules/axios/lib/helpers/parseProtocol.js","../../node_modules/axios/lib/helpers/speedometer.js","../../node_modules/axios/lib/adapters/xhr.js","../../node_modules/axios/lib/adapters/adapters.js","../../node_modules/axios/lib/core/dispatchRequest.js","../../node_modules/axios/lib/core/mergeConfig.js","../../node_modules/axios/lib/env/data.js","../../node_modules/axios/lib/helpers/validator.js","../../node_modules/axios/lib/core/Axios.js","../../node_modules/axios/lib/cancel/CancelToken.js","../../node_modules/axios/lib/helpers/spread.js","../../node_modules/axios/lib/helpers/isAxiosError.js","../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../node_modules/axios/lib/axios.js","../../src/common/Ajax.js","../../src/common/Accessibility.js","../../src/common/DarkModeAuto.js","../../src/common/Color.js","../../src/common/Images.js","../../src/common/Videos.js","../../node_modules/suncalc/suncalc.js","../../src/common/app.js","../../src/switches/SVG.js","../../src/switches/switch-1.js","../../src/switches/switch-10.js","../../src/switches/switch-11.js","../../src/switches/switch-12.js","../../src/switches/switch-13.js","../../src/switches/switch-14.js","../../src/switches/switch-15.js","../../src/switches/switch-16.js","../../src/switches/switch-17.js","../../src/switches/switch-18.js","../../src/switches/switch-19.js","../../src/switches/switch-2.js","../../src/switches/switch-20.js","../../src/switches/switch-21.js","../../src/switches/switch-3.js","../../src/switches/switch-4.js","../../src/switches/switch-5.js","../../src/switches/switch-6.js","../../src/switches/switch-7.js","../../src/switches/switch-8.js","../../src/switches/switch-9.js","../../src/common/switch.js","../../src/common/Utility.js","../../src/frontend/main.js"],"sourcesContent":["/**\n * Store class to handle cookies\n * WP Dark Mode\n */\n\nclass Store {\n\tstatic prefix = 'wp-dark-mode-';\n\tstatic set(key, value, daysToExpire = 365) {\n\t\tkey = `${Store.prefix}${key}`;\n\t\tconst expires = daysToExpire ? `expires = ${new Date( Date.now() + daysToExpire * 24 * 60 * 60 * 1000 ).toUTCString()};` : '';\n\t\tdocument.cookie = `${key} = ${encodeURIComponent( value )};${expires}path = / `;\n\n\t\treturn this\n\t}\n\n\tstatic get(key) {\n\t\tkey = `${Store.prefix}${key}`;\n\t\tconst cookies = document.cookie.split( ';' );\n\t\tfor (const cookie of cookies) {\n\t\t\tconst [cookieKey, cookieValue] = cookie.split( '=' ).map( item => item.trim() );\n\t\t\tif (cookieKey === key) {\n\t\t\t\treturn decodeURIComponent( cookieValue );\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tstatic delete(key) {\n\t\tkey = `${Store.prefix}${key}`;\n\t\tdocument.cookie = `${key} = ; expires = Thu, 01 Jan 1970 00:00:00 UTC; path = / ;`;\n\n\t\treturn this\n\t}\n}\n\nexport default Store;","import Store from './Store';\n\nclass DarkMode {\n\tstatic #instance = null;\n\n\t// Singleton: Return the existing instance if available, otherwise create a new one\n\tstatic getInstance() {\n\t\tif ( ! DarkMode.#instance) {\n\t\t\tDarkMode.#instance = new DarkMode();\n\t\t}\n\t\treturn DarkMode.#instance;\n\t}\n\n\t/**\n\t * Callbacks to be executed before and after dark mode is activated or deactivated\n\t */\n\t#callbacks = {\n\t\tonChange: [],\n\t}\n\n\t/**\n\t * Default configuration\n\t */\n\t#config = {\n\t\ttarget: 'html',\n\t\tactiveAttribute: 'data-wp-dark-mode-active',\n\t\tactiveClass: 'wp-dark-mode-active',\n\t\tignoreClass: 'wp-dark-mode-ignore',\n\t}\n\n\t// Register a callback to be executed after dark mode is activated or deactivated\n\tonChange(callback) {\n\t\t// if (typeof callback !== 'object') return;\n\t\tthis.#callbacks.onChange.push(callback);\n\t\treturn this;\n\t}\n\n\t// Check if the system is currently in dark mode\n\tget isDeviceDark() {\n\t\treturn window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\t// Get the target element\n\tget target() {\n\t\treturn document.querySelector(this.#config.target);\n\t}\n\n\t// Check if dark mode is currently active on the page\n\tget isActive() {\n\t\treturn this.target?.hasAttribute(this.#config.activeAttribute);\n\t}\n\n\t// Toggle between activating and deactivating dark mode based on the current state\n\ttoggle() {\n\t\tthis.isActive ? this.deactivate() : this.activate();\n\t\treturn this;\n\t}\n\n\t// Update the class list of the HTML element to activate dark mode\n\tupdateTarget(active) {\n\t\tactive ? this.target.setAttribute(this.#config.activeAttribute, '') : this.target.removeAttribute(this.#config.activeAttribute);\n\t\tactive ? this.target.classList.add(this.#config.activeClass) : this.target.classList.remove(this.#config.activeClass);\n\t\treturn this;\n\t}\n\n\t// Activate dark mode\n\tactivate( config = {} ) {\n\t\t// Merge the default config with the provided config\n\t\tthis.#config = { ...this.#config, ...config };\n\n\t\tthis.updateTarget(true);\n\t\tthis.#callbacks.onChange.forEach(callback => callback({ isActive: this.isActive }));\n\t\treturn this;\n\t}\n\n\t// Deactivate dark mode\n\tdeactivate() {\n\t\tthis.updateTarget(false);\n\t\tthis.#callbacks.onChange.forEach(callback => callback({ isActive: this.isActive }));\n\t\treturn this;\n\t}\n\n\t// Remembers the user's choice of dark mode\n\tremember() {\n\t\tStore.set('choice', this.isActive ? 'dark' : 'light');\n\t\treturn this;\n\t}\n\n\t// Delete any previously stored choice of dark mode\n\tforget() {\n\t\tStore.delete('choice').delete('device').delete('timezone')\n\t\treturn this;\n\t}\n\n}\n\n// Global variable to access the DarkMode class\nconst WPDarkMode = DarkMode.getInstance();\nwindow.WPDarkMode = WPDarkMode;\n\n// Export a single instance of the DarkMode class as a singleton\nexport default WPDarkMode;\n","class Base {\n\n _el = (selector, context = document) => {\n return context.querySelector(selector);\n }\n\n _els = (selector, context = document) => {\n return context.querySelectorAll(selector);\n }\n \n\t/**\n\t * Is true.\n\t *\n\t * @param value\n\t * @return {boolean}\n\t */\n\tisTrue( value ) {\n\t\treturn [ '1', 'true', 'yes', 'on', 1, true ].includes( value );\n\t}\n\n /**\n\t * Determine if the user is premium\n\t */\n\tget isPremium() {\n\t\treturn this.isTrue( wp_dark_mode_json.is_ultimate || wp_dark_mode_json.is_pro ) // is_pro key is Deprecated, will be removed in future.\n\t}\n\n\n\t/**\n\t * Events\n\t */\n\t#events = {}\n\n /**\n * On\n */\n on(event, callback) {\n if (!this.#events[event]) {\n this.#events[event] = [];\n }\n try {\n this.#events[event].push(callback);\n } catch (e) {\n // console.error(e);\n }\n return this;\n }\n\n /**\n * Emit\n */\n emit(event, ...args) {\n if (this.#events[event]) {\n this.#events[event].forEach(callback => {\n callback(...args);\n });\n }\n return this;\n }\n\n // Constructor\n init () {\n this.events();\n // on state ready \n document.addEventListener('DOMContentLoaded', () => {\n // console.log('Document ready');\n this.ready();\n });\n }\n\n // Fires on DOMContentLoaded\n ready() {}\n\n // Events\n events() {}\n\n get html() {\n return document.querySelector('html');\n }\n}\n\nexport default Base;","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from 'axios';\n\nclass Ajax {\n async request(method = 'GET', action = '', data = {}){\n const target = typeof wp_dark_mode_admin_json !== 'undefined' ? wp_dark_mode_admin_json : wp_dark_mode_json\n \n let url = target?.url?.ajax + '?action=' + action + '&_wpnonce=' + target.nonce;\n\n\n const headers = {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'\n }\n\n const args = {\n method,\n headers,\n credentials: 'same-origin',\n }\n\n if ( method !== 'POST' && Object.keys(data).length > 0) {\n url += '&' + this.serialize(data); \n } else { \n args.data = data\n }\n\n // Use axios to make the request\n const response = await axios(url, args)\n\n // Return the response\n return response.data;\n }\n\n async get(action = '', data = {}){\n return await this.request('GET', action, data);\n }\n\n async post(action = '', data = {}){\n return await this.request('POST', action, data);\n }\n\n serialize(obj) {\n var str = [];\n for (var p in obj)\n if (obj.hasOwnProperty(p)) {\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\n }\n return str.join(\"&\");\n }\n}\n\nexport default new Ajax();","import Base from \"./Base\"\nimport Store from \"./Store\"\nimport Ajax from \"./Ajax\"\n\nclass Accessibility extends Base {\n\t/**\n\t * Init\n\t */\n\tready() {\n\t\tthis.trackKeyBoardPress();\n\t\tthis.handleAnimation();\n\t\tsetTimeout( () => {\n\t\t\tthis.updateVisitor();\n\t\t}, 10000)\n\n\t\tif ( ! this.isPremium ) return;\n\t\tthis.initLargeFont();\n\t\tthis.checkLargeFont();\n\t}\n\n\t/**\n\t * Track keyboard press\n\t */\n\ttrackKeyBoardPress() {\n\n\t\t// Bail, if accessibility is disabled.\n\t\tif ( ! wp_dark_mode_json.options.accessibility_enabled_keyboard_shortcut ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.addEventListener('keydown', (e) => {\n\t\t\t// if pressed ctrl + alt + d\n\t\t\tif (e.ctrlKey && e.altKey && e.keyCode === 68) {\n\t\t\t\tWPDarkMode.toggle().remember();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Handle animation\n\t */\n\thandleAnimation() {\n\t\t// Bail if animation_enabled is disabled.\n\t\tif ( ! wp_dark_mode_json.options.animation_enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add animation class.\n\t\tif(WPDarkMode.isActive) {\n\t\t\tdocument.querySelector('html').classList.add('wp-dark-mode-animation');\n\t\t}\n\n\t\tWPDarkMode.onChange(() => {\n\t\t\tif( !WPDarkMode.isActive ) {\n\t\t\t\tdocument.querySelector('html').classList.remove('wp-dark-mode-animation');\n\t\t\t} else {\n\t\t\t\tdocument.querySelector('html').classList.add('wp-dark-mode-animation');\n\t\t\t}\n\t\t})\n\t\t\n\t}\n\n\t/**\n\t * Init large font\n\t */\n\tinitLargeFont = () => {\n\t\tif( !wp_dark_mode_json.options.typography_enabled ) return;\n\n\t\tconst elements = document.querySelectorAll('*:not(.wp-dark-mode-ignore):not(.wp-dark-mode-switch):not(script):not(style):not(link):not(meta):not(title):not(base):not(head):not(.wp-dark-mode-switch)');\n\n\t\tlet desiredSize = wp_dark_mode_json.options.typography_font_size;\n\t\tif( desiredSize === 'custom' ) {\n\t\t\tdesiredSize = wp_dark_mode_json.options.typography_font_size_custom / 100;\n\t\t}\n\n\t\telements.forEach(element => {\n\t\t\t// Bail, if any of parent has wp-dark-mode-ignore class.\n\t\t\tif(element.closest('.wp-dark-mode-ignore')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tconst fontSize = getComputedStyle(element).fontSize;\n\n\t\t\tif (fontSize) {\n\t\t\t\t// Calculate new font size\n\t\t\t\tconst newFontSize = this.calculateFontSize(fontSize, desiredSize);\n\n\t\t\t\t// Set property\n\t\t\t\telement.style.setProperty('--wp-dark-mode-large-font-size', newFontSize);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggle font size\n\t */\n\ttoggleFontSize( element ) {\n\n\t\tif( !wp_dark_mode_json.options.typography_enabled ) return;\n\n\t\tconst html = document.querySelector('html');\n\n\t\t// Is large font is active\n\t\tconst isLargeFont = html.classList.contains('wp-dark-mode-large-font');\n\n\t\t// Toggle large font\n\t\thtml.classList[isLargeFont ? 'remove' : 'add']('wp-dark-mode-large-font');\n\n\t\t// Is element is \n\t\tconst isActive = element.classList.contains('active');\n\n\t\t// Toggle active class\n\t\telement.classList[isActive ? 'remove' : 'add']('active');\n\n\t\t// Remember user choice\n\t\tStore.set('large-font', !isLargeFont ? 'on' : 'off');\n\n\t\t// Reactive other switches\n\t\tconst switches = document.querySelectorAll('.wp-dark-mode-switch ._font');\n\n\t\tif( !switches || !switches.length ) return;\n\n\t\tswitches.forEach( switchEl => {\n\t\t\tswitchEl.classList[isActive ? 'remove' : 'add']('active');\n\t\t} );\n\n\t}\n\n\t\n\tcalculateFontSize = ( size, by = 1 ) => {\n\t\tconst unit = size.replace(/[0-9]/g, '');\n\t\tconst value = parseFloat(size.replace(/[a-z]/g, ''));\n\n\t\tlet newValue = 0;\n\t\tnewValue = value * by;\n\t\treturn `${newValue}${unit}`;\n\t}\n\n\t/**\n\t * Check large font\n\t */\n\tcheckLargeFont = () => {\n\n\t\tconst isLargeFont = Store.get('large-font') === 'on';\n\n\t\tif( isLargeFont ) {\n\t\t\tdocument.querySelector('html').classList.add('wp-dark-mode-large-font');\n\n\t\t\t// On wp-dark-mode-switches-updated event\n\t\t\tdocument.addEventListener('wp-dark-mode-switches-updated', () => {\n\t\t\t\tconst switches = document.querySelectorAll('.wp-dark-mode-switch ._font');\n\t\t\t\tif( !switches || !switches.length ) return;\n\t\t\t\tswitches.forEach( switchEl => {\n\t\t\t\t\tswitchEl.classList.add('active');\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\n\t/**\n\t * Track visitor\n\t */\n\tasync updateVisitor() {\n\t\t// Bail, if analytics is disabled.\n\t\tif ( ! wp_dark_mode_json.analytics_enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail, if user has already visited.\n\t\tif ( localStorage.getItem( 'wp-dark-mode-visitor' ) ) {\n\t\t\t// return;\n\t\t}\n\n\t\t// Set visitor.\n\t\tconst visitor_id = localStorage.getItem( 'wp-dark-mode-visitor' ) || null;\n\t\t// Log('visitor_id', visitor_id);\n\n\t\tconst payload = {\n\t\t\tvisitor_id: visitor_id || false,\n\t\t\tmode: WPDarkMode.isActive ? 'dark' : 'light',\n\t\t\tnonce: wp_dark_mode_json.nonce,\n\t\t};\n\n\t\tif( ! visitor_id ) {\n\n\t\t\t// For new visitors, send meta data.\n\t\t\tpayload.meta = JSON.stringify({\n\t\t\t\tos: navigator.platform,\n\t\t\t\tbrowser: navigator.appCodeName,\n\t\t\t\tbrowser_version: navigator.appVersion,\n\t\t\t\tlanguage: navigator.language,\n\t\t\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone\n\t\t\t})?.replace(';', '');\n\n\t\t\ttry {\n\t\t\t\tpayload.ip = await fetch( 'https://api.ipify.org?format=json' ).then( response => response.json() ).then( data => data.ip );\n\t\t\t} catch (error) { }\n\t\t}\n\n\t\t// Send request.\n\t\tconst result = await Ajax.post( 'wp_dark_mode_update_visitor', payload );\n\t\t\n\t\t// Set visited.\n\t\tif( result && result.success && !visitor_id ) {\n\t\t\tlocalStorage.setItem( 'wp-dark-mode-visitor', result.data.visitor_id );\n\t\t}\n\t}\n}\n\nexport default new Accessibility();","(function (global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\"\n ? factory(exports)\n : typeof define === \"function\" && define.amd\n ? define([\"exports\"], factory)\n : ((global =\n typeof globalThis !== \"undefined\" ? globalThis : global || self),\n factory((global.DarkModeAuto = {})));\n})(this, function (exports) {\n \"use strict\";\n\n var __assign = function () {\n __assign =\n Object.assign ||\n function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P\n ? value\n : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done\n ? resolve(result.value)\n : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n\n function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: [],\n },\n f,\n y,\n t,\n g;\n return (\n (g = {\n next: verb(0),\n throw: verb(1),\n return: verb(2),\n }),\n typeof Symbol === \"function\" &&\n (g[Symbol.iterator] = function () {\n return this;\n }),\n g\n );\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (\n ((f = 1),\n y &&\n (t =\n op[0] & 2\n ? y[\"return\"]\n : op[0]\n ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0)\n : y.next) &&\n !(t = t.call(y, op[1])).done)\n )\n return t;\n if (((y = 0), t)) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (\n !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&\n (op[0] === 6 || op[0] === 2)\n ) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n },\n };\n throw new TypeError(\n s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\"\n );\n }\n\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n } catch (error) {\n e = { error: error };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n }\n\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n\n var userAgent =\n typeof navigator === \"undefined\"\n ? \"some useragent\"\n : navigator.userAgent.toLowerCase();\n var platform =\n typeof navigator === \"undefined\"\n ? \"some platform\"\n : navigator.platform.toLowerCase();\n var isChromium =\n userAgent.includes(\"chrome\") || userAgent.includes(\"chromium\");\n var isFirefox = userAgent.includes(\"firefox\");\n var isVivaldi = userAgent.includes(\"vivaldi\");\n var isYaBrowser = userAgent.includes(\"yabrowser\");\n var isOpera = userAgent.includes(\"opr\") || userAgent.includes(\"opera\");\n var isEdge = userAgent.includes(\"edg\");\n var isSafari = userAgent.includes(\"safari\") && !isChromium;\n var isWindows = platform.startsWith(\"win\");\n var isMacOS = platform.startsWith(\"mac\");\n var isMobile = userAgent.includes(\"mobile\");\n var isShadowDomSupported = typeof ShadowRoot === \"function\";\n var chromiumVersion = (function () {\n var m = userAgent.match(/chrom[e|ium]\\/([^ ]+)/);\n if (m && m[1]) {\n return m[1];\n } else {\n return \"\";\n }\n })();\n var isDefinedSelectorSupported = (function () {\n try {\n document.querySelector(\":defined\");\n return true;\n } catch (err) {\n return false;\n }\n })();\n var isCSSStyleSheetConstructorSupported = (function () {\n try {\n new CSSStyleSheet();\n return true;\n } catch (err) {\n return false;\n }\n })();\n\n function getOKResponse(url, mimeType) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [\n 4,\n fetch(url, {\n cache: \"force-cache\",\n credentials: \"omit\",\n }),\n ];\n case 1:\n response = _a.sent();\n if (\n isFirefox &&\n mimeType === \"text/css\" &&\n url.startsWith(\"moz-extension://\") &&\n url.endsWith(\".css\")\n ) {\n return [2, response];\n }\n if (\n mimeType &&\n !response.headers.get(\"Content-Type\").startsWith(mimeType)\n ) {\n throw new Error(\"Mime type mismatch when loading \" + url);\n }\n if (!response.ok) {\n throw new Error(\n \"Unable to load \" +\n url +\n \" \" +\n response.status +\n \" \" +\n response.statusText\n );\n }\n return [2, response];\n }\n });\n });\n }\n\n function loadAsDataURL(url, mimeType) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, getOKResponse(url, mimeType)];\n case 1:\n response = _a.sent();\n return [4, readResponseAsDataURL(response)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n }\n\n function readResponseAsDataURL(response) {\n return __awaiter(this, void 0, void 0, function () {\n var blob, dataURL;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, response.blob()];\n case 1:\n blob = _a.sent();\n return [\n 4,\n new Promise(function (resolve) {\n var reader = new FileReader();\n reader.onloadend = function () {\n return resolve(reader.result);\n };\n reader.readAsDataURL(blob);\n }),\n ];\n case 2:\n dataURL = _a.sent();\n return [2, dataURL];\n }\n });\n });\n }\n\n var throwCORSError = function (url) {\n return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [\n 2,\n Promise.reject(\n new Error(\n [\n \"Embedded DarkMode cannot access a cross-origin resource\",\n url,\n \"Overview your URLs and CORS policies or use\",\n \"`DarkMode.setFetchMethod(fetch: (url) => Promise))`.\",\n \"See if using `DarkMode.setFetchMethod(window.fetch)`\",\n \"before `DarkMode.enable()` works.\",\n ].join(\" \")\n )\n ),\n ];\n });\n });\n };\n var fetcher = throwCORSError;\n\n function setFetchMethod(fetch) {\n if (fetch) {\n fetcher = fetch;\n } else {\n fetcher = throwCORSError;\n }\n }\n\n function callFetchMethod(url) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, fetcher(url)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n }\n\n if (!window.chrome) {\n window.chrome = {};\n }\n if (!chrome.runtime) {\n chrome.runtime = {};\n }\n var messageListeners = new Set();\n\n function sendMessage() {\n return;\n\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function () {\n var id_1, _a, url, responseType, response, text_1, err_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!(args[0] && args[0].type === \"fetch\")) return [3, 8];\n id_1 = args[0].id;\n _b.label = 1;\n case 1:\n _b.trys.push([1, 7, , 8]);\n (_a = args[0].data),\n (url = _a.url),\n (responseType = _a.responseType);\n return [4, callFetchMethod(url)];\n case 2:\n response = _b.sent();\n if (!(responseType === \"data-url\")) return [3, 4];\n return [4, readResponseAsDataURL(response)];\n case 3:\n text_1 = _b.sent();\n return [3, 6];\n case 4:\n return [4, response.text()];\n case 5:\n text_1 = _b.sent();\n _b.label = 6;\n case 6:\n messageListeners.forEach(function (cb) {\n return cb({\n type: \"fetch-response\",\n data: text_1,\n error: null,\n id: id_1,\n });\n });\n return [3, 8];\n case 7:\n err_1 = _b.sent();\n console.error(err_1);\n messageListeners.forEach(function (cb) {\n return cb({\n type: \"fetch-response\",\n data: null,\n err: err_1,\n id: id_1,\n });\n });\n return [3, 8];\n case 8:\n return [2];\n }\n });\n });\n }\n\n function addMessageListener(callback) {\n messageListeners.add(callback);\n }\n\n if (typeof chrome.runtime.sendMessage === \"function\") {\n var nativeSendMessage_1 = chrome.runtime.sendMessage;\n chrome.runtime.sendMessage = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n sendMessage.apply(void 0, __spread(args));\n nativeSendMessage_1.apply(chrome.runtime, args);\n };\n } else {\n chrome.runtime.sendMessage = sendMessage;\n }\n if (!chrome.runtime.onMessage) {\n chrome.runtime.onMessage = {};\n }\n if (typeof chrome.runtime.onMessage.addListener === \"function\") {\n var nativeAddListener_1 = chrome.runtime.onMessage.addListener;\n chrome.runtime.onMessage.addListener = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n addMessageListener.apply(void 0, __spread(args));\n nativeAddListener_1.apply(chrome.runtime.onMessage, args);\n };\n } else {\n chrome.runtime.onMessage.addListener = addMessageListener;\n }\n\n var ThemeEngines = {\n cssFilter: \"cssFilter\",\n svgFilter: \"svgFilter\",\n staticTheme: \"staticTheme\",\n dynamicTheme: \"dynamicTheme\",\n };\n\n var DEFAULT_COLORS = {\n darkScheme: {\n background: \"#181a1b\",\n text: \"#e8e6e3\",\n },\n lightScheme: {\n background: \"#dcdad7\",\n text: \"#181a1b\",\n },\n };\n var DEFAULT_THEME = {\n mode: 1,\n brightness: 100,\n contrast: 100,\n grayscale: 0,\n sepia: 0,\n useFont: false,\n fontFamily: isMacOS\n ? \"Helvetica Neue\"\n : isWindows\n ? \"Segoe UI\"\n : \"Open Sans\",\n textStroke: 0,\n engine: ThemeEngines.dynamicTheme,\n stylesheet: \"\",\n darkSchemeBackgroundColor: DEFAULT_COLORS.darkScheme.background,\n darkSchemeTextColor: DEFAULT_COLORS.darkScheme.text,\n lightSchemeBackgroundColor: DEFAULT_COLORS.lightScheme.background,\n lightSchemeTextColor: DEFAULT_COLORS.lightScheme.text,\n scrollbarColor: isMacOS ? \"\" : \"auto\",\n selectionColor: \"auto\",\n styleSystemControls: true,\n };\n\n function isArrayLike(items) {\n return items.length != null;\n }\n\n function forEach(items, iterator) {\n var e_1, _a;\n if (isArrayLike(items)) {\n for (var i = 0, len = items.length; i < len; i++) {\n iterator(items[i]);\n }\n } else {\n try {\n for (\n var items_1 = __values(items), items_1_1 = items_1.next();\n !items_1_1.done;\n items_1_1 = items_1.next()\n ) {\n var item = items_1_1.value;\n iterator(item);\n }\n } catch (e_1_1) {\n e_1 = { error: e_1_1 };\n } finally {\n try {\n if (items_1_1 && !items_1_1.done && (_a = items_1.return))\n _a.call(items_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n }\n\n function push(array, addition) {\n forEach(addition, function (a) {\n return array.push(a);\n });\n }\n\n function toArray(items) {\n var results = [];\n for (var i = 0, len = items.length; i < len; i++) {\n results.push(items[i]);\n }\n return results;\n }\n\n var anchor;\n\n function fixBaseURL($url) {\n if (!anchor) {\n anchor = document.createElement(\"a\");\n }\n anchor.href = $url;\n return anchor.href;\n }\n\n function parseURL($url, $base) {\n if ($base === void 0) {\n $base = null;\n }\n if ($base) {\n $base = fixBaseURL($base);\n return new URL($url, $base);\n }\n $url = fixBaseURL($url);\n return new URL($url);\n }\n\n function getAbsoluteURL($base, $relative) {\n if ($relative.match(/^data\\:/)) {\n return $relative;\n }\n var b = parseURL($base);\n var a = parseURL($relative, b.href);\n return a.href;\n }\n\n function getURLHostOrProtocol($url) {\n var url = new URL($url);\n if (url.host) {\n return url.host;\n } else {\n return url.protocol;\n }\n }\n\n function logInfo() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n }\n\n function logWarn() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n }\n\n function iterateCSSRules(rules, iterate) {\n forEach(rules, function (rule) {\n if (rule instanceof CSSMediaRule) {\n var media = Array.from(rule.media);\n if (\n media.includes(\"screen\") ||\n media.includes(\"all\") ||\n !(media.includes(\"print\") || media.includes(\"speech\"))\n ) {\n iterateCSSRules(rule.cssRules, iterate);\n }\n } else if (rule instanceof CSSStyleRule) {\n iterate(rule);\n } else if (rule instanceof CSSImportRule) {\n try {\n iterateCSSRules(rule.styleSheet.cssRules, iterate);\n } catch (err) {\n logWarn(err);\n }\n } else if (rule instanceof CSSSupportsRule) {\n if (CSS.supports(rule.conditionText)) {\n iterateCSSRules(rule.cssRules, iterate);\n }\n } else {\n logWarn(\"CSSRule type not supported\", rule);\n }\n });\n }\n\n function iterateCSSDeclarations(style, iterate) {\n forEach(style, function (property) {\n var value = style.getPropertyValue(property).trim();\n if (!value) {\n return;\n }\n iterate(property, value);\n });\n }\n\n function isCSSVariable(property) {\n return property.startsWith(\"--\") && !property.startsWith(\"--wp-dark-mode\");\n }\n\n function getCSSVariables(rules) {\n var variables = new Map();\n rules &&\n iterateCSSRules(rules, function (rule) {\n rule.style &&\n iterateCSSDeclarations(rule.style, function (property, value) {\n if (isCSSVariable(property)) {\n variables.set(property, value);\n }\n });\n });\n return variables;\n }\n\n function getElementCSSVariables(element) {\n var variables = new Map();\n iterateCSSDeclarations(element.style, function (property, value) {\n if (isCSSVariable(property)) {\n variables.set(property, value);\n }\n });\n return variables;\n }\n\n var cssURLRegex = /url\\((('.+?')|(\".+?\")|([^\\)]*?))\\)/g;\n var cssImportRegex = /@import\\s*(url\\()?(('.+?')|(\".+?\")|([^\\)]*?))\\)?;?/g;\n\n function getCSSURLValue(cssURL) {\n return cssURL\n .replace(/^url\\((.*)\\)$/, \"$1\")\n .replace(/^\"(.*)\"$/, \"$1\")\n .replace(/^'(.*)'$/, \"$1\");\n }\n\n function getCSSBaseBath(url) {\n var cssURL = parseURL(url);\n return (\n \"\" +\n cssURL.origin +\n cssURL.pathname.replace(/\\?.*$/, \"\").replace(/(\\/)([^\\/]+)$/i, \"$1\")\n );\n }\n\n function replaceCSSRelativeURLsWithAbsolute($css, cssBasePath) {\n return $css.replace(cssURLRegex, function (match) {\n var pathValue = getCSSURLValue(match);\n return 'url(\"' + getAbsoluteURL(cssBasePath, pathValue) + '\")';\n });\n }\n\n var cssCommentsRegex = /\\/\\*[\\s\\S]*?\\*\\//g;\n\n function removeCSSComments($css) {\n return $css.replace(cssCommentsRegex, \"\");\n }\n\n var fontFaceRegex = /@font-face\\s*{[^}]*}/g;\n\n function replaceCSSFontFace($css) {\n return $css.replace(fontFaceRegex, \"\");\n }\n\n var varRegex =\n /var\\((--[^\\s,\\(\\)]+),?\\s*([^\\(\\)]*(\\([^\\(\\)]*\\)[^\\(\\)]*)*\\s*)\\)/g;\n\n function replaceCSSVariables(value, variables, stack) {\n if (stack === void 0) {\n stack = new Set();\n }\n var missing = false;\n var unresolvable = new Set();\n var result = value.replace(varRegex, function (match, name, fallback) {\n if (stack.has(name)) {\n logWarn(\"Circular reference to variable \" + name);\n if (fallback) {\n return fallback;\n }\n missing = true;\n return match;\n }\n if (variables.has(name)) {\n var value_1 = variables.get(name);\n if (value_1.match(varRegex)) {\n unresolvable.add(name);\n }\n return value_1;\n } else if (fallback) {\n return fallback;\n } else {\n logWarn(\"Variable \" + name + \" not found\");\n missing = true;\n }\n return match;\n });\n if (missing) {\n return result;\n }\n if (result.match(varRegex)) {\n unresolvable.forEach(function (v) {\n return stack.add(v);\n });\n return replaceCSSVariables(result, variables, stack);\n }\n return result;\n }\n\n function throttle(callback) {\n var pending = false;\n var frameId = null;\n var lastArgs;\n var throttled = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n lastArgs = args;\n if (frameId) {\n pending = true;\n } else {\n callback.apply(void 0, __spread(lastArgs));\n frameId = requestAnimationFrame(function () {\n frameId = null;\n if (pending) {\n callback.apply(void 0, __spread(lastArgs));\n pending = false;\n }\n });\n }\n };\n var cancel = function () {\n cancelAnimationFrame(frameId);\n pending = false;\n frameId = null;\n };\n return Object.assign(throttled, { cancel: cancel });\n }\n\n function createAsyncTasksQueue() {\n var tasks = [];\n var frameId = null;\n\n function runTasks() {\n var task;\n while ((task = tasks.shift())) {\n task();\n }\n frameId = null;\n }\n\n function add(task) {\n tasks.push(task);\n if (!frameId) {\n frameId = requestAnimationFrame(runTasks);\n }\n }\n\n function cancel() {\n tasks.splice(0);\n cancelAnimationFrame(frameId);\n frameId = null;\n }\n\n return { add: add, cancel: cancel };\n }\n\n function getDuration(time) {\n var duration = 0;\n if (time.seconds) {\n duration += time.seconds * 1000;\n }\n if (time.minutes) {\n duration += time.minutes * 60 * 1000;\n }\n if (time.hours) {\n duration += time.hours * 60 * 60 * 1000;\n }\n if (time.days) {\n duration += time.days * 24 * 60 * 60 * 1000;\n }\n return duration;\n }\n\n function removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n }\n\n function watchForNodePosition(node, mode, onRestore) {\n if (onRestore === void 0) {\n onRestore = Function.prototype;\n }\n var MAX_ATTEMPTS_COUNT = 10;\n var RETRY_TIMEOUT = getDuration({ seconds: 2 });\n var ATTEMPTS_INTERVAL = getDuration({ seconds: 10 });\n var prevSibling = node.previousSibling;\n var parent = node.parentNode;\n if (!parent) {\n throw new Error(\n \"Unable to watch for node position: parent element not found\"\n );\n }\n if (mode === \"prev-sibling\" && !prevSibling) {\n throw new Error(\n \"Unable to watch for node position: there is no previous sibling\"\n );\n }\n var attempts = 0;\n var start = null;\n var timeoutId = null;\n var restore = throttle(function () {\n if (timeoutId) {\n return;\n }\n attempts++;\n var now = Date.now();\n if (start == null) {\n start = now;\n } else if (attempts >= MAX_ATTEMPTS_COUNT) {\n if (now - start < ATTEMPTS_INTERVAL) {\n logWarn(\n \"Node position watcher paused: retry in \" + RETRY_TIMEOUT + \"ms\",\n node,\n prevSibling\n );\n timeoutId = setTimeout(function () {\n start = null;\n attempts = 0;\n timeoutId = null;\n restore();\n }, RETRY_TIMEOUT);\n return;\n }\n start = now;\n attempts = 1;\n }\n if (mode === \"parent\") {\n if (prevSibling && prevSibling.parentNode !== parent) {\n logWarn(\n \"Unable to restore node position: sibling parent changed\",\n node,\n prevSibling,\n parent\n );\n stop();\n return;\n }\n }\n if (mode === \"prev-sibling\") {\n if (prevSibling.parentNode == null) {\n logWarn(\n \"Unable to restore node position: sibling was removed\",\n node,\n prevSibling,\n parent\n );\n stop();\n return;\n }\n if (prevSibling.parentNode !== parent) {\n logWarn(\n \"Style was moved to another parent\",\n node,\n prevSibling,\n parent\n );\n updateParent(prevSibling.parentNode);\n }\n }\n logWarn(\"Restoring node position\", node, prevSibling, parent);\n parent.insertBefore(\n node,\n prevSibling ? prevSibling.nextSibling : parent.firstChild\n );\n observer.takeRecords();\n onRestore && onRestore();\n });\n var observer = new MutationObserver(function () {\n if (\n (mode === \"parent\" && node.parentNode !== parent) ||\n (mode === \"prev-sibling\" && node.previousSibling !== prevSibling)\n ) {\n restore();\n }\n });\n var run = function () {\n observer.observe(parent, { childList: true });\n };\n var stop = function () {\n clearTimeout(timeoutId);\n observer.disconnect();\n restore.cancel();\n };\n var skip = function () {\n observer.takeRecords();\n };\n var updateParent = function (parentNode) {\n parent = parentNode;\n stop();\n run();\n };\n run();\n return { run: run, stop: stop, skip: skip };\n }\n\n function iterateShadowHosts(root, iterator) {\n if (root == null) {\n return;\n }\n var walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode: function (node) {\n return node.shadowRoot == null\n ? NodeFilter.FILTER_SKIP\n : NodeFilter.FILTER_ACCEPT;\n },\n });\n for (\n var node = root.shadowRoot ? walker.currentNode : walker.nextNode();\n node != null;\n node = walker.nextNode()\n ) {\n iterator(node);\n iterateShadowHosts(node.shadowRoot, iterator);\n }\n }\n\n function isDOMReady() {\n return (\n document.readyState === \"complete\" ||\n document.readyState === \"interactive\"\n );\n }\n\n var readyStateListeners = new Set();\n\n function addDOMReadyListener(listener) {\n readyStateListeners.add(listener);\n }\n\n function removeDOMReadyListener(listener) {\n readyStateListeners.delete(listener);\n }\n\n if (!isDOMReady()) {\n var onReadyStateChange_1 = function () {\n if (isDOMReady()) {\n document.removeEventListener(\"readystatechange\", onReadyStateChange_1);\n readyStateListeners.forEach(function (listener) {\n return listener();\n });\n readyStateListeners.clear();\n }\n };\n document.addEventListener(\"readystatechange\", onReadyStateChange_1);\n }\n var HUGE_MUTATIONS_COUNT = 1000;\n\n function isHugeMutation(mutations) {\n if (mutations.length > HUGE_MUTATIONS_COUNT) {\n return true;\n }\n var addedNodesCount = 0;\n for (var i = 0; i < mutations.length; i++) {\n addedNodesCount += mutations[i].addedNodes.length;\n if (addedNodesCount > HUGE_MUTATIONS_COUNT) {\n return true;\n }\n }\n return false;\n }\n\n function getElementsTreeOperations(mutations) {\n var additions = new Set();\n var deletions = new Set();\n var moves = new Set();\n mutations.forEach(function (m) {\n forEach(m.addedNodes, function (n) {\n if (n instanceof Element && n.isConnected) {\n additions.add(n);\n }\n });\n forEach(m.removedNodes, function (n) {\n if (n instanceof Element) {\n if (n.isConnected) {\n moves.add(n);\n } else {\n deletions.add(n);\n }\n }\n });\n });\n moves.forEach(function (n) {\n return additions.delete(n);\n });\n var duplicateAdditions = [];\n var duplicateDeletions = [];\n additions.forEach(function (node) {\n if (additions.has(node.parentElement)) {\n duplicateAdditions.push(node);\n }\n });\n deletions.forEach(function (node) {\n if (deletions.has(node.parentElement)) {\n duplicateDeletions.push(node);\n }\n });\n duplicateAdditions.forEach(function (node) {\n return additions.delete(node);\n });\n duplicateDeletions.forEach(function (node) {\n return deletions.delete(node);\n });\n return { additions: additions, moves: moves, deletions: deletions };\n }\n\n var optimizedTreeObservers = new Map();\n var optimizedTreeCallbacks = new WeakMap();\n\n function createOptimizedTreeObserver(root, callbacks) {\n var observer;\n var observerCallbacks;\n var domReadyListener;\n if (optimizedTreeObservers.has(root)) {\n observer = optimizedTreeObservers.get(root);\n observerCallbacks = optimizedTreeCallbacks.get(observer);\n } else {\n var hadHugeMutationsBefore_1 = false;\n var subscribedForReadyState_1 = false;\n observer = new MutationObserver(function (mutations) {\n if (isHugeMutation(mutations)) {\n if (!hadHugeMutationsBefore_1 || isDOMReady()) {\n observerCallbacks.forEach(function (_a) {\n var onHugeMutations = _a.onHugeMutations;\n return onHugeMutations(root);\n });\n } else {\n if (!subscribedForReadyState_1) {\n domReadyListener = function () {\n return observerCallbacks.forEach(function (_a) {\n var onHugeMutations = _a.onHugeMutations;\n return onHugeMutations(root);\n });\n };\n addDOMReadyListener(domReadyListener);\n subscribedForReadyState_1 = true;\n }\n }\n hadHugeMutationsBefore_1 = true;\n } else {\n var elementsOperations_1 = getElementsTreeOperations(mutations);\n observerCallbacks.forEach(function (_a) {\n var onMinorMutations = _a.onMinorMutations;\n return onMinorMutations(elementsOperations_1);\n });\n }\n });\n observer.observe(root, { childList: true, subtree: true });\n optimizedTreeObservers.set(root, observer);\n observerCallbacks = new Set();\n optimizedTreeCallbacks.set(observer, observerCallbacks);\n }\n observerCallbacks.add(callbacks);\n return {\n disconnect: function () {\n observerCallbacks.delete(callbacks);\n if (domReadyListener) {\n removeDOMReadyListener(domReadyListener);\n }\n if (observerCallbacks.size === 0) {\n observer.disconnect();\n optimizedTreeCallbacks.delete(observer);\n optimizedTreeObservers.delete(root);\n }\n },\n };\n }\n\n var tempStyle = null;\n\n function getTempCSSStyleSheet() {\n if (tempStyle) {\n return tempStyle;\n }\n if (isCSSStyleSheetConstructorSupported) {\n tempStyle = new CSSStyleSheet();\n return tempStyle;\n } else {\n var tempStyleElement = document.createElement(\"style\");\n document.head.append(tempStyleElement);\n tempStyle = tempStyleElement.sheet;\n document.head.removeChild(tempStyleElement);\n return tempStyle;\n }\n }\n\n function hslToRGB(_a) {\n var h = _a.h,\n s = _a.s,\n l = _a.l,\n _b = _a.a,\n a = _b === void 0 ? 1 : _b;\n if (s === 0) {\n var _c = __read(\n [l, l, l].map(function (x) {\n return Math.round(x * 255);\n }),\n 3\n ),\n r_1 = _c[0],\n b_1 = _c[1],\n g_1 = _c[2];\n return { r: r_1, g: g_1, b: b_1, a: a };\n }\n var c = (1 - Math.abs(2 * l - 1)) * s;\n var x = c * (1 - Math.abs(((h / 60) % 2) - 1));\n var m = l - c / 2;\n var _d = __read(\n (h < 60\n ? [c, x, 0]\n : h < 120\n ? [x, c, 0]\n : h < 180\n ? [0, c, x]\n : h < 240\n ? [0, x, c]\n : h < 300\n ? [x, 0, c]\n : [c, 0, x]\n ).map(function (n) {\n return Math.round((n + m) * 255);\n }),\n 3\n ),\n r = _d[0],\n g = _d[1],\n b = _d[2];\n return { r: r, g: g, b: b, a: a };\n }\n\n function rgbToHSL(_a) {\n var r255 = _a.r,\n g255 = _a.g,\n b255 = _a.b,\n _b = _a.a,\n a = _b === void 0 ? 1 : _b;\n var r = r255 / 255;\n var g = g255 / 255;\n var b = b255 / 255;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var c = max - min;\n var l = (max + min) / 2;\n if (c === 0) {\n return { h: 0, s: 0, l: l, a: a };\n }\n var h =\n (max === r\n ? ((g - b) / c) % 6\n : max === g\n ? (b - r) / c + 2\n : (r - g) / c + 4) * 60;\n if (h < 0) {\n h += 360;\n }\n var s = c / (1 - Math.abs(2 * l - 1));\n return { h: h, s: s, l: l, a: a };\n }\n\n function toFixed(n, digits) {\n if (digits === void 0) {\n digits = 0;\n }\n var fixed = n.toFixed(digits);\n if (digits === 0) {\n return fixed;\n }\n var dot = fixed.indexOf(\".\");\n if (dot >= 0) {\n var zerosMatch = fixed.match(/0+$/);\n if (zerosMatch) {\n if (zerosMatch.index === dot + 1) {\n return fixed.substring(0, dot);\n }\n return fixed.substring(0, zerosMatch.index);\n }\n }\n return fixed;\n }\n\n function rgbToString(rgb) {\n var r = rgb.r,\n g = rgb.g,\n b = rgb.b,\n a = rgb.a;\n if (a != null && a < 1) {\n return (\n \"rgba(\" +\n toFixed(r) +\n \", \" +\n toFixed(g) +\n \", \" +\n toFixed(b) +\n \", \" +\n toFixed(a, 2) +\n \")\"\n );\n }\n return \"rgb(\" + toFixed(r) + \", \" + toFixed(g) + \", \" + toFixed(b) + \")\";\n }\n\n function rgbToHexString(_a) {\n var r = _a.r,\n g = _a.g,\n b = _a.b,\n a = _a.a;\n return (\n \"#\" +\n (a != null && a < 1 ? [r, g, b, Math.round(a * 255)] : [r, g, b])\n .map(function (x) {\n return \"\" + (x < 16 ? \"0\" : \"\") + x.toString(16);\n })\n .join(\"\")\n );\n }\n\n function hslToString(hsl) {\n var h = hsl.h,\n s = hsl.s,\n l = hsl.l,\n a = hsl.a;\n if (a != null && a < 1) {\n return (\n \"hsla(\" +\n toFixed(h) +\n \", \" +\n toFixed(s * 100) +\n \"%, \" +\n toFixed(l * 100) +\n \"%, \" +\n toFixed(a, 2) +\n \")\"\n );\n }\n return (\n \"hsl(\" +\n toFixed(h) +\n \", \" +\n toFixed(s * 100) +\n \"%, \" +\n toFixed(l * 100) +\n \"%)\"\n );\n }\n\n var rgbMatch = /^rgba?\\([^\\(\\)]+\\)$/;\n var hslMatch = /^hsla?\\([^\\(\\)]+\\)$/;\n var hexMatch = /^#[0-9a-f]+$/i;\n\n function parse($color) {\n var c = $color.trim().toLowerCase();\n if (c.match(rgbMatch)) {\n return parseRGB(c);\n }\n if (c.match(hslMatch)) {\n return parseHSL(c);\n }\n if (c.match(hexMatch)) {\n return parseHex(c);\n }\n if (knownColors.has(c)) {\n return getColorByName(c);\n }\n if (systemColors.has(c)) {\n return getSystemColor(c);\n }\n if ($color === \"transparent\") {\n return { r: 0, g: 0, b: 0, a: 0 };\n }\n throw new Error(\"Unable to parse \" + $color);\n }\n\n function getNumbersFromString(str, splitter, range, units) {\n var raw = str.split(splitter).filter(function (x) {\n return x;\n });\n var unitsList = Object.entries(units);\n var numbers = raw\n .map(function (r) {\n return r.trim();\n })\n .map(function (r, i) {\n var n;\n var unit = unitsList.find(function (_a) {\n var _b = __read(_a, 1),\n u = _b[0];\n return r.endsWith(u);\n });\n if (unit) {\n n =\n (parseFloat(r.substring(0, r.length - unit[0].length)) / unit[1]) *\n range[i];\n } else {\n n = parseFloat(r);\n }\n if (range[i] > 1) {\n return Math.round(n);\n }\n return n;\n });\n return numbers;\n }\n\n var rgbSplitter = /rgba?|\\(|\\)|\\/|,|\\s/gi;\n var rgbRange = [255, 255, 255, 1];\n var rgbUnits = { \"%\": 100 };\n\n function parseRGB($rgb) {\n var _a = __read(\n getNumbersFromString($rgb, rgbSplitter, rgbRange, rgbUnits),\n 4\n ),\n r = _a[0],\n g = _a[1],\n b = _a[2],\n _b = _a[3],\n a = _b === void 0 ? 1 : _b;\n return { r: r, g: g, b: b, a: a };\n }\n\n var hslSplitter = /hsla?|\\(|\\)|\\/|,|\\s/gi;\n var hslRange = [360, 1, 1, 1];\n var hslUnits = { \"%\": 100, deg: 360, rad: 2 * Math.PI, turn: 1 };\n\n function parseHSL($hsl) {\n var _a = __read(\n getNumbersFromString($hsl, hslSplitter, hslRange, hslUnits),\n 4\n ),\n h = _a[0],\n s = _a[1],\n l = _a[2],\n _b = _a[3],\n a = _b === void 0 ? 1 : _b;\n return hslToRGB({ h: h, s: s, l: l, a: a });\n }\n\n function parseHex($hex) {\n var h = $hex.substring(1);\n switch (h.length) {\n case 3:\n case 4: {\n var _a = __read(\n [0, 1, 2].map(function (i) {\n return parseInt(\"\" + h[i] + h[i], 16);\n }),\n 3\n ),\n r = _a[0],\n g = _a[1],\n b = _a[2];\n var a = h.length === 3 ? 1 : parseInt(\"\" + h[3] + h[3], 16) / 255;\n return { r: r, g: g, b: b, a: a };\n }\n case 6:\n case 8: {\n var _b = __read(\n [0, 2, 4].map(function (i) {\n return parseInt(h.substring(i, i + 2), 16);\n }),\n 3\n ),\n r = _b[0],\n g = _b[1],\n b = _b[2];\n var a = h.length === 6 ? 1 : parseInt(h.substring(6, 8), 16) / 255;\n return { r: r, g: g, b: b, a: a };\n }\n }\n throw new Error(\"Unable to parse \" + $hex);\n }\n\n function getColorByName($color) {\n var n = knownColors.get($color);\n return {\n r: (n >> 16) & 255,\n g: (n >> 8) & 255,\n b: (n >> 0) & 255,\n a: 1,\n };\n }\n\n function getSystemColor($color) {\n var n = systemColors.get($color);\n return {\n r: (n >> 16) & 255,\n g: (n >> 8) & 255,\n b: (n >> 0) & 255,\n a: 1,\n };\n }\n\n var knownColors = new Map(\n Object.entries({\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgrey: 0xa9a9a9,\n darkgreen: 0x006400,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n grey: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgrey: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32,\n })\n );\n var systemColors = new Map(\n Object.entries({\n ActiveBorder: 0x3b99fc,\n ActiveCaption: 0x000000,\n AppWorkspace: 0xaaaaaa,\n Background: 0x6363ce,\n ButtonFace: 0xffffff,\n ButtonHighlight: 0xe9e9e9,\n ButtonShadow: 0x9fa09f,\n ButtonText: 0x000000,\n CaptionText: 0x000000,\n GrayText: 0x7f7f7f,\n Highlight: 0xb2d7ff,\n HighlightText: 0x000000,\n InactiveBorder: 0xffffff,\n InactiveCaption: 0xffffff,\n InactiveCaptionText: 0x000000,\n InfoBackground: 0xfbfcc5,\n InfoText: 0x000000,\n Menu: 0xf6f6f6,\n MenuText: 0xffffff,\n Scrollbar: 0xaaaaaa,\n ThreeDDarkShadow: 0x000000,\n ThreeDFace: 0xc0c0c0,\n ThreeDHighlight: 0xffffff,\n ThreeDLightShadow: 0xffffff,\n ThreeDShadow: 0x000000,\n Window: 0xececec,\n WindowFrame: 0xaaaaaa,\n WindowText: 0x000000,\n \"-webkit-focus-ring-color\": 0xe59700,\n }).map(function (_a) {\n var _b = __read(_a, 2),\n key = _b[0],\n value = _b[1];\n return [key.toLowerCase(), value];\n })\n );\n\n function scale(x, inLow, inHigh, outLow, outHigh) {\n return ((x - inLow) * (outHigh - outLow)) / (inHigh - inLow) + outLow;\n }\n\n function clamp(x, min, max) {\n return Math.min(max, Math.max(min, x));\n }\n\n function multiplyMatrices(m1, m2) {\n var result = [];\n for (var i = 0, len = m1.length; i < len; i++) {\n result[i] = [];\n for (var j = 0, len2 = m2[0].length; j < len2; j++) {\n var sum = 0;\n for (var k = 0, len3 = m1[0].length; k < len3; k++) {\n sum += m1[i][k] * m2[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }\n\n function getMatches(regex, input, group) {\n if (group === void 0) {\n group = 0;\n }\n var matches = [];\n var m;\n while ((m = regex.exec(input))) {\n matches.push(m[group]);\n }\n return matches;\n }\n\n function formatCSS(text) {\n function trimLeft(text) {\n return text.replace(/^\\s+/, \"\");\n }\n\n function getIndent(depth) {\n if (depth === 0) {\n return \"\";\n }\n return \" \".repeat(4 * depth);\n }\n\n var emptyRuleRegexp = /[^{}]+{\\s*}/g;\n while (emptyRuleRegexp.test(text)) {\n text = text.replace(emptyRuleRegexp, \"\");\n }\n var css = text\n .replace(/\\s{2,}/g, \" \")\n .replace(/\\{/g, \"{\\n\")\n .replace(/\\}/g, \"\\n}\\n\")\n .replace(/\\;(?![^\\(|\\\"]*(\\)|\\\"))/g, \";\\n\")\n .replace(/\\,(?![^\\(|\\\"]*(\\)|\\\"))/g, \",\\n\")\n .replace(/\\n\\s*\\n/g, \"\\n\")\n .split(\"\\n\");\n var depth = 0;\n var formatted = [];\n for (var x = 0, len = css.length; x < len; x++) {\n var line = css[x] + \"\\n\";\n if (line.match(/\\{/)) {\n formatted.push(getIndent(depth++) + trimLeft(line));\n } else if (line.match(/\\}/)) {\n formatted.push(getIndent(--depth) + trimLeft(line));\n } else {\n formatted.push(getIndent(depth) + trimLeft(line));\n }\n }\n return formatted.join(\"\").trim();\n }\n\n function createFilterMatrix(config) {\n var m = Matrix.identity();\n if (config.sepia !== 0) {\n m = multiplyMatrices(m, Matrix.sepia(config.sepia / 100));\n }\n if (config.grayscale !== 0) {\n m = multiplyMatrices(m, Matrix.grayscale(config.grayscale / 100));\n }\n if (config.contrast !== 100) {\n m = multiplyMatrices(m, Matrix.contrast(config.contrast / 100));\n }\n if (config.brightness !== 100) {\n m = multiplyMatrices(m, Matrix.brightness(config.brightness / 100));\n }\n if (config.mode === 1) {\n m = multiplyMatrices(m, Matrix.invertNHue());\n }\n return m;\n }\n\n function applyColorMatrix(_a, matrix) {\n var _b = __read(_a, 3),\n r = _b[0],\n g = _b[1],\n b = _b[2];\n var rgb = [[r / 255], [g / 255], [b / 255], [1], [1]];\n var result = multiplyMatrices(matrix, rgb);\n return [0, 1, 2].map(function (i) {\n return clamp(Math.round(result[i][0] * 255), 0, 255);\n });\n }\n\n var Matrix = {\n identity: function () {\n return [\n [1, 0, 0, 0, 0],\n [0, 1, 0, 0, 0],\n [0, 0, 1, 0, 0],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n invertNHue: function () {\n return [\n [0.333, -0.667, -0.667, 0, 1],\n [-0.667, 0.333, -0.667, 0, 1],\n [-0.667, -0.667, 0.333, 0, 1],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n brightness: function (v) {\n return [\n [v, 0, 0, 0, 0],\n [0, v, 0, 0, 0],\n [0, 0, v, 0, 0],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n contrast: function (v) {\n var t = (1 - v) / 2;\n return [\n [v, 0, 0, 0, t],\n [0, v, 0, 0, t],\n [0, 0, v, 0, t],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n sepia: function (v) {\n return [\n [\n 0.393 + 0.607 * (1 - v),\n 0.769 - 0.769 * (1 - v),\n 0.189 - 0.189 * (1 - v),\n 0,\n 0,\n ],\n [\n 0.349 - 0.349 * (1 - v),\n 0.686 + 0.314 * (1 - v),\n 0.168 - 0.168 * (1 - v),\n 0,\n 0,\n ],\n [\n 0.272 - 0.272 * (1 - v),\n 0.534 - 0.534 * (1 - v),\n 0.131 + 0.869 * (1 - v),\n 0,\n 0,\n ],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n grayscale: function (v) {\n return [\n [\n 0.2126 + 0.7874 * (1 - v),\n 0.7152 - 0.7152 * (1 - v),\n 0.0722 - 0.0722 * (1 - v),\n 0,\n 0,\n ],\n [\n 0.2126 - 0.2126 * (1 - v),\n 0.7152 + 0.2848 * (1 - v),\n 0.0722 - 0.0722 * (1 - v),\n 0,\n 0,\n ],\n [\n 0.2126 - 0.2126 * (1 - v),\n 0.7152 - 0.7152 * (1 - v),\n 0.0722 + 0.9278 * (1 - v),\n 0,\n 0,\n ],\n [0, 0, 0, 1, 0],\n [0, 0, 0, 0, 1],\n ];\n },\n };\n\n function getBgPole(theme) {\n var isDarkScheme = theme.mode === 1;\n var prop = isDarkScheme\n ? \"darkSchemeBackgroundColor\"\n : \"lightSchemeBackgroundColor\";\n return theme[prop];\n }\n\n function getFgPole(theme) {\n var isDarkScheme = theme.mode === 1;\n var prop = isDarkScheme ? \"darkSchemeTextColor\" : \"lightSchemeTextColor\";\n return theme[prop];\n }\n\n var colorModificationCache = new Map();\n var colorParseCache = new Map();\n\n function parseToHSLWithCache(color) {\n if (colorParseCache.has(color)) {\n return colorParseCache.get(color);\n }\n var rgb = parse(color);\n var hsl = rgbToHSL(rgb);\n colorParseCache.set(color, hsl);\n return hsl;\n }\n\n function clearColorModificationCache() {\n colorModificationCache.clear();\n colorParseCache.clear();\n }\n\n var rgbCacheKeys = [\"r\", \"g\", \"b\", \"a\"];\n var themeCacheKeys = [\n \"mode\",\n \"brightness\",\n \"contrast\",\n \"grayscale\",\n \"sepia\",\n \"darkSchemeBackgroundColor\",\n \"darkSchemeTextColor\",\n \"lightSchemeBackgroundColor\",\n \"lightSchemeTextColor\",\n ];\n\n function getCacheId(rgb, theme) {\n return rgbCacheKeys\n .map(function (k) {\n return rgb[k];\n })\n .concat(\n themeCacheKeys.map(function (k) {\n return theme[k];\n })\n )\n .join(\";\");\n }\n\n function modifyColorWithCache(\n rgb,\n theme,\n modifyHSL,\n poleColor,\n anotherPoleColor\n ) {\n var fnCache;\n if (colorModificationCache.has(modifyHSL)) {\n fnCache = colorModificationCache.get(modifyHSL);\n } else {\n fnCache = new Map();\n colorModificationCache.set(modifyHSL, fnCache);\n }\n var id = getCacheId(rgb, theme);\n if (fnCache.has(id)) {\n return fnCache.get(id);\n }\n var hsl = rgbToHSL(rgb);\n var pole = poleColor == null ? null : parseToHSLWithCache(poleColor);\n var anotherPole =\n anotherPoleColor == null ? null : parseToHSLWithCache(anotherPoleColor);\n var modified = modifyHSL(hsl, pole, anotherPole);\n var _a = hslToRGB(modified),\n r = _a.r,\n g = _a.g,\n b = _a.b,\n a = _a.a;\n var matrix = createFilterMatrix(theme);\n var _b = __read(applyColorMatrix([r, g, b], matrix), 3),\n rf = _b[0],\n gf = _b[1],\n bf = _b[2];\n var color =\n a === 1\n ? rgbToHexString({ r: rf, g: gf, b: bf })\n : rgbToString({ r: rf, g: gf, b: bf, a: a });\n fnCache.set(id, color);\n return color;\n }\n\n function noopHSL(hsl) {\n return hsl;\n }\n\n function modifyColor(rgb, theme) {\n return modifyColorWithCache(rgb, theme, noopHSL);\n }\n\n function modifyLightSchemeColor(rgb, theme) {\n var poleBg = getBgPole(theme);\n var poleFg = getFgPole(theme);\n return modifyColorWithCache(rgb, theme, modifyLightModeHSL, poleFg, poleBg);\n }\n\n function modifyLightModeHSL(_a, poleFg, poleBg) {\n var h = _a.h,\n s = _a.s,\n l = _a.l,\n a = _a.a;\n var isDark = l < 0.5;\n var isNeutral;\n if (isDark) {\n isNeutral = l < 0.2 || s < 0.12;\n } else {\n var isBlue = h > 200 && h < 280;\n isNeutral = s < 0.24 || (l > 0.8 && isBlue);\n }\n var hx = h;\n var sx = l;\n if (isNeutral) {\n if (isDark) {\n hx = poleFg.h;\n sx = poleFg.s;\n } else {\n hx = poleBg.h;\n sx = poleBg.s;\n }\n }\n var lx = scale(l, 0, 1, poleFg.l, poleBg.l);\n return { h: hx, s: sx, l: lx, a: a };\n }\n\n var MAX_BG_LIGHTNESS = 0.4;\n\n function modifyBgHSL(_a, pole) {\n var h = _a.h,\n s = _a.s,\n l = _a.l,\n a = _a.a;\n var isDark = l < 0.5;\n var isBlue = h > 200 && h < 280;\n var isNeutral = s < 0.12 || (l > 0.8 && isBlue);\n if (isDark) {\n var lx_1 = scale(l, 0, 0.5, 0, MAX_BG_LIGHTNESS);\n if (isNeutral) {\n var hx_1 = pole.h;\n var sx = pole.s;\n return { h: hx_1, s: sx, l: lx_1, a: a };\n }\n return { h: h, s: s, l: lx_1, a: a };\n }\n var lx = scale(l, 0.5, 1, MAX_BG_LIGHTNESS, pole.l);\n if (isNeutral) {\n var hx_2 = pole.h;\n var sx = pole.s;\n return { h: hx_2, s: sx, l: lx, a: a };\n }\n var hx = h;\n var isYellow = h > 60 && h < 180;\n if (isYellow) {\n var isCloserToGreen = h > 120;\n if (isCloserToGreen) {\n hx = scale(h, 120, 180, 135, 180);\n } else {\n hx = scale(h, 60, 120, 60, 105);\n }\n }\n return { h: hx, s: s, l: lx, a: a };\n }\n\n function modifyBackgroundColor(rgb, theme) {\n if (theme.mode === 0) {\n return modifyLightSchemeColor(rgb, theme);\n }\n var pole = getBgPole(theme);\n return modifyColorWithCache(\n rgb,\n __assign(__assign({}, theme), { mode: 0 }),\n modifyBgHSL,\n pole\n );\n }\n\n var MIN_FG_LIGHTNESS = 0.55;\n\n function modifyBlueFgHue(hue) {\n return scale(hue, 205, 245, 205, 220);\n }\n\n function modifyFgHSL(_a, pole) {\n var h = _a.h,\n s = _a.s,\n l = _a.l,\n a = _a.a;\n var isLight = l > 0.5;\n var isNeutral = l < 0.2 || s < 0.24;\n var isBlue = !isNeutral && h > 205 && h < 245;\n if (isLight) {\n var lx_2 = scale(l, 0.5, 1, MIN_FG_LIGHTNESS, pole.l);\n if (isNeutral) {\n var hx_3 = pole.h;\n var sx = pole.s;\n return { h: hx_3, s: sx, l: lx_2, a: a };\n }\n var hx_4 = h;\n if (isBlue) {\n hx_4 = modifyBlueFgHue(h);\n }\n return { h: hx_4, s: s, l: lx_2, a: a };\n }\n if (isNeutral) {\n var hx_5 = pole.h;\n var sx = pole.s;\n var lx_3 = scale(l, 0, 0.5, pole.l, MIN_FG_LIGHTNESS);\n return { h: hx_5, s: sx, l: lx_3, a: a };\n }\n var hx = h;\n var lx;\n if (isBlue) {\n hx = modifyBlueFgHue(h);\n lx = scale(l, 0, 0.5, pole.l, Math.min(1, MIN_FG_LIGHTNESS + 0.05));\n } else {\n lx = scale(l, 0, 0.5, pole.l, MIN_FG_LIGHTNESS);\n }\n return { h: hx, s: s, l: lx, a: a };\n }\n\n function modifyForegroundColor(rgb, theme) {\n if (theme.mode === 0) {\n return modifyLightSchemeColor(rgb, theme);\n }\n var pole = getFgPole(theme);\n return modifyColorWithCache(\n rgb,\n __assign(__assign({}, theme), { mode: 0 }),\n modifyFgHSL,\n pole\n );\n }\n\n function modifyBorderHSL(_a, poleFg, poleBg) {\n var h = _a.h,\n s = _a.s,\n l = _a.l,\n a = _a.a;\n var isDark = l < 0.5;\n var isNeutral = l < 0.2 || s < 0.24;\n var hx = h;\n var sx = s;\n if (isNeutral) {\n if (isDark) {\n hx = poleFg.h;\n sx = poleFg.s;\n } else {\n hx = poleBg.h;\n sx = poleBg.s;\n }\n }\n var lx = scale(l, 0, 1, 0.5, 0.2);\n return { h: hx, s: sx, l: lx, a: a };\n }\n\n function modifyBorderColor(rgb, theme) {\n if (theme.mode === 0) {\n return modifyLightSchemeColor(rgb, theme);\n }\n var poleFg = getFgPole(theme);\n var poleBg = getBgPole(theme);\n return modifyColorWithCache(\n rgb,\n __assign(__assign({}, theme), { mode: 0 }),\n modifyBorderHSL,\n poleFg,\n poleBg\n );\n }\n\n function modifyShadowColor(rgb, filter) {\n return modifyBackgroundColor(rgb, filter);\n }\n\n function modifyGradientColor(rgb, filter) {\n return modifyBackgroundColor(rgb, filter);\n }\n\n function createTextStyle(config) {\n var lines = [];\n lines.push(\"*:not(pre) {\");\n if (config.useFont && config.fontFamily) {\n lines.push(\" font-family: \" + config.fontFamily + \" !important;\");\n }\n if (config.textStroke > 0) {\n lines.push(\n \" -webkit-text-stroke: \" + config.textStroke + \"px !important;\"\n );\n lines.push(\" text-stroke: \" + config.textStroke + \"px !important;\");\n }\n lines.push(\"}\");\n return lines.join(\"\\n\");\n }\n\n var FilterMode;\n (function (FilterMode) {\n FilterMode[(FilterMode[\"light\"] = 0)] = \"light\";\n FilterMode[(FilterMode[\"dark\"] = 1)] = \"dark\";\n })(FilterMode || (FilterMode = {}));\n\n function getCSSFilterValue(config) {\n var filters = [];\n if (config.mode === FilterMode.dark) {\n filters.push(\"invert(100%) hue-rotate(180deg)\");\n }\n if (config.brightness !== 100) {\n filters.push(\"brightness(\" + config.brightness + \"%)\");\n }\n if (config.contrast !== 100) {\n filters.push(\"contrast(\" + config.contrast + \"%)\");\n }\n if (config.grayscale !== 0) {\n filters.push(\"grayscale(\" + config.grayscale + \"%)\");\n }\n if (config.sepia !== 0) {\n filters.push(\"sepia(\" + config.sepia + \"%)\");\n }\n if (filters.length === 0) {\n return null;\n }\n return filters.join(\" \");\n }\n\n function toSVGMatrix(matrix) {\n return matrix\n .slice(0, 4)\n .map(function (m) {\n return m\n .map(function (m) {\n return m.toFixed(3);\n })\n .join(\" \");\n })\n .join(\" \");\n }\n\n function getSVGFilterMatrixValue(config) {\n return toSVGMatrix(createFilterMatrix(config));\n }\n\n var counter = 0;\n var resolvers = new Map();\n var rejectors = new Map();\n\n function bgFetch(request) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [\n 2,\n new Promise(function (resolve, reject) {\n var id = ++counter;\n resolvers.set(id, resolve);\n rejectors.set(id, reject);\n chrome.runtime.sendMessage({\n type: \"fetch\",\n data: request,\n id: id,\n });\n }),\n ];\n });\n });\n }\n\n chrome.runtime.onMessage.addListener(function (_a) {\n var type = _a.type,\n data = _a.data,\n error = _a.error,\n id = _a.id;\n if (type === \"fetch-response\") {\n var resolve = resolvers.get(id);\n var reject = rejectors.get(id);\n resolvers.delete(id);\n rejectors.delete(id);\n if (error) {\n reject && reject(error);\n } else {\n resolve && resolve(data);\n }\n }\n });\n\n function getImageDetails(url) {\n return __awaiter(this, void 0, void 0, function () {\n var dataURL, image, info;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!url.startsWith(\"data:\")) return [3, 1];\n dataURL = url;\n return [3, 3];\n case 1:\n return [4, getImageDataURL(url)];\n case 2:\n dataURL = _a.sent();\n _a.label = 3;\n case 3:\n return [4, urlToImage(dataURL)];\n case 4:\n image = _a.sent();\n info = analyzeImage(image);\n return [\n 2,\n __assign(\n {\n src: url,\n dataURL: dataURL,\n width: image.naturalWidth,\n height: image.naturalHeight,\n },\n info\n ),\n ];\n }\n });\n });\n }\n\n function getImageDataURL(url) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (\n !(\n getURLHostOrProtocol(url) ===\n (location.host || location.protocol)\n )\n )\n return [3, 2];\n return [4, loadAsDataURL(url)];\n case 1:\n return [2, _a.sent()];\n case 2:\n return [4, bgFetch({ url: url, responseType: \"data-url\" })];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n }\n\n function urlToImage(url) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [\n 2,\n new Promise(function (resolve, reject) {\n var image = new Image();\n image.onload = function () {\n return resolve(image);\n };\n image.onerror = function () {\n return reject(\"Unable to load image \" + url);\n };\n image.src = url;\n }),\n ];\n });\n });\n }\n\n var MAX_ANALIZE_PIXELS_COUNT = 32 * 32;\n var canvas;\n var context;\n\n function createCanvas() {\n var maxWidth = MAX_ANALIZE_PIXELS_COUNT;\n var maxHeight = MAX_ANALIZE_PIXELS_COUNT;\n canvas = document.createElement(\"canvas\");\n canvas.width = maxWidth;\n canvas.height = maxHeight;\n context = canvas.getContext(\"2d\");\n context.imageSmoothingEnabled = false;\n }\n\n function removeCanvas() {\n canvas = null;\n context = null;\n }\n\n function analyzeImage(image) {\n return null;\n\n if (!canvas) {\n createCanvas();\n }\n var naturalWidth = image.naturalWidth,\n naturalHeight = image.naturalHeight;\n if (naturalHeight === 0 || naturalWidth === 0) {\n logWarn(\"logWarn(Image is empty \" + image.currentSrc + \")\");\n return null;\n }\n var naturalPixelsCount = naturalWidth * naturalHeight;\n var k = Math.min(\n 1,\n Math.sqrt(MAX_ANALIZE_PIXELS_COUNT / naturalPixelsCount)\n );\n var width = Math.ceil(naturalWidth * k);\n var height = Math.ceil(naturalHeight * k);\n context.clearRect(0, 0, width, height);\n context.drawImage(\n image,\n 0,\n 0,\n naturalWidth,\n naturalHeight,\n 0,\n 0,\n width,\n height\n );\n var imageData = context.getImageData(0, 0, width, height);\n var d = imageData.data;\n var TRANSPARENT_ALPHA_THRESHOLD = 0.05;\n var DARK_LIGHTNESS_THRESHOLD = 0.4;\n var LIGHT_LIGHTNESS_THRESHOLD = 0.7;\n var transparentPixelsCount = 0;\n var darkPixelsCount = 0;\n var lightPixelsCount = 0;\n var i, x, y;\n var r, g, b, a;\n var l;\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n i = 4 * (y * width + x);\n r = d[i + 0] / 255;\n g = d[i + 1] / 255;\n b = d[i + 2] / 255;\n a = d[i + 3] / 255;\n if (a < TRANSPARENT_ALPHA_THRESHOLD) {\n transparentPixelsCount++;\n } else {\n l = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n if (l < DARK_LIGHTNESS_THRESHOLD) {\n darkPixelsCount++;\n }\n if (l > LIGHT_LIGHTNESS_THRESHOLD) {\n lightPixelsCount++;\n }\n }\n }\n }\n var totalPixelsCount = width * height;\n var opaquePixelsCount = totalPixelsCount - transparentPixelsCount;\n var DARK_IMAGE_THRESHOLD = 0.7;\n var LIGHT_IMAGE_THRESHOLD = 0.7;\n var TRANSPARENT_IMAGE_THRESHOLD = 0.1;\n var LARGE_IMAGE_PIXELS_COUNT = 800 * 600;\n return {\n isDark: darkPixelsCount / opaquePixelsCount >= DARK_IMAGE_THRESHOLD,\n isLight: lightPixelsCount / opaquePixelsCount >= LIGHT_IMAGE_THRESHOLD,\n isTransparent:\n transparentPixelsCount / totalPixelsCount >=\n TRANSPARENT_IMAGE_THRESHOLD,\n isLarge: naturalPixelsCount >= LARGE_IMAGE_PIXELS_COUNT,\n };\n }\n\n var objectURLs = new Set();\n\n function getFilteredImageDataURL(_a, filter) {\n var dataURL = _a.dataURL,\n width = _a.width,\n height = _a.height;\n var matrix = getSVGFilterMatrixValue(filter);\n var svg = [\n '',\n \"\",\n '',\n '',\n \"\",\n \"\",\n '',\n \"\",\n ].join(\"\");\n var bytes = new Uint8Array(svg.length);\n for (var i = 0; i < svg.length; i++) {\n bytes[i] = svg.charCodeAt(i);\n }\n var blob = new Blob([bytes], { type: \"image/svg+xml\" });\n var objectURL = URL.createObjectURL(blob);\n objectURLs.add(objectURL);\n return objectURL;\n }\n\n function cleanImageProcessingCache() {\n removeCanvas();\n objectURLs.forEach(function (u) {\n return URL.revokeObjectURL(u);\n });\n objectURLs.clear();\n }\n\n function getModifiableCSSDeclaration(\n property,\n value,\n rule,\n ignoreImageSelectors,\n isCancelled\n ) {\n var important = Boolean(\n rule && rule.style && rule.style.getPropertyPriority(property)\n );\n var sourceValue = value;\n if (property.startsWith(\"--\")) {\n return null;\n } else if (\n (property.indexOf(\"color\") >= 0 &&\n property !== \"-webkit-print-color-adjust\") ||\n property === \"fill\" ||\n property === \"stroke\" ||\n property === \"stop-color\"\n ) {\n var modifier = getColorModifier(property, value);\n if (modifier) {\n return {\n property: property,\n value: modifier,\n important: important,\n sourceValue: sourceValue,\n };\n }\n } else if (\n property === \"background-image\" ||\n property === \"list-style-image\"\n ) {\n var modifier = getBgImageModifier(\n value,\n rule,\n ignoreImageSelectors,\n isCancelled\n );\n if (modifier) {\n return {\n property: property,\n value: modifier,\n important: important,\n sourceValue: sourceValue,\n };\n }\n } else if (property.indexOf(\"shadow\") >= 0) {\n var modifier = getShadowModifier(property, value);\n if (modifier) {\n return {\n property: property,\n value: modifier,\n important: important,\n sourceValue: sourceValue,\n };\n }\n }\n return null;\n }\n\n function getModifiedUserAgentStyle(theme, isIFrame, styleSystemControls) {\n var lines = [];\n if (!isIFrame) {\n lines.push(\"html {\");\n lines.push(\n \" background-color: \" +\n modifyBackgroundColor(\n {\n r: 255,\n g: 255,\n b: 255,\n },\n theme\n ) +\n \" !important;\"\n );\n lines.push(\"}\");\n }\n lines.push(\n \"\" +\n (isIFrame ? \"\" : \"html, body, \") +\n (styleSystemControls ? \"input, textarea, select, button\" : \"\") +\n \" {\"\n );\n lines.push(\n \" background-color: \" +\n modifyBackgroundColor({ r: 255, g: 255, b: 255 }, theme) +\n \";\"\n );\n lines.push(\"}\");\n lines.push(\n \"html, body, \" +\n (styleSystemControls ? \"input, textarea, select, button\" : \"\") +\n \" {\"\n );\n lines.push(\n \" border-color: \" +\n modifyBorderColor({ r: 76, g: 76, b: 76 }, theme) +\n \";\"\n );\n lines.push(\n \" color: \" + modifyForegroundColor({ r: 0, g: 0, b: 0 }, theme) + \";\"\n );\n lines.push(\"}\");\n lines.push(\"a {\");\n lines.push(\n \" color: \" +\n modifyForegroundColor({ r: 0, g: 64, b: 255 }, theme) +\n \";\"\n );\n lines.push(\"}\");\n lines.push(\"table {\");\n lines.push(\n \" border-color: \" +\n modifyBorderColor({ r: 128, g: 128, b: 128 }, theme) +\n \";\"\n );\n lines.push(\"}\");\n lines.push(\"::placeholder {\");\n lines.push(\n \" color: \" +\n modifyForegroundColor({ r: 169, g: 169, b: 169 }, theme) +\n \";\"\n );\n lines.push(\"}\");\n lines.push(\"input:-webkit-autofill,\");\n lines.push(\"textarea:-webkit-autofill,\");\n lines.push(\"select:-webkit-autofill {\");\n lines.push(\n \" background-color: \" +\n modifyBackgroundColor({ r: 250, g: 255, b: 189 }, theme) +\n \" !important;\"\n );\n lines.push(\n \" color: \" +\n modifyForegroundColor({ r: 0, g: 0, b: 0 }, theme) +\n \" !important;\"\n );\n lines.push(\"}\");\n if (theme.scrollbarColor) {\n lines.push(getModifiedScrollbarStyle(theme));\n }\n if (theme.selectionColor) {\n lines.push(getModifiedSelectionStyle(theme));\n }\n return lines.join(\"\\n\");\n }\n\n function getSelectionColor(theme) {\n var backgroundColorSelection;\n var foregroundColorSelection;\n if (theme.selectionColor === \"auto\") {\n backgroundColorSelection = modifyBackgroundColor(\n {\n r: 0,\n g: 96,\n b: 212,\n },\n __assign(__assign({}, theme), { grayscale: 0 })\n );\n foregroundColorSelection = modifyForegroundColor(\n {\n r: 255,\n g: 255,\n b: 255,\n },\n __assign(__assign({}, theme), { grayscale: 0 })\n );\n } else {\n var rgb = parse(theme.selectionColor);\n var hsl = rgbToHSL(rgb);\n backgroundColorSelection = theme.selectionColor;\n if (hsl.l < 0.5) {\n foregroundColorSelection = \"#FFF\";\n } else {\n foregroundColorSelection = \"#000\";\n }\n }\n return {\n backgroundColorSelection: backgroundColorSelection,\n foregroundColorSelection: foregroundColorSelection,\n };\n }\n\n function getModifiedSelectionStyle(theme) {\n var lines = [];\n var modifiedSelectionColor = getSelectionColor(theme);\n var backgroundColorSelection =\n modifiedSelectionColor.backgroundColorSelection;\n var foregroundColorSelection =\n modifiedSelectionColor.foregroundColorSelection;\n [\"::selection\", \"::-moz-selection\"].forEach(function (selection) {\n lines.push(selection + \" {\");\n lines.push(\n \" background-color: \" + backgroundColorSelection + \" !important;\"\n );\n lines.push(\" color: \" + foregroundColorSelection + \" !important;\");\n lines.push(\"}\");\n });\n return lines.join(\"\\n\");\n }\n\n function getModifiedScrollbarStyle(theme) {\n var lines = [];\n var colorTrack;\n var colorIcons;\n var colorThumb;\n var colorThumbHover;\n var colorThumbActive;\n var colorCorner;\n if (theme.scrollbarColor === \"auto\") {\n colorTrack = modifyBackgroundColor({ r: 241, g: 241, b: 241 }, theme);\n colorIcons = modifyForegroundColor({ r: 96, g: 96, b: 96 }, theme);\n colorThumb = modifyBackgroundColor({ r: 176, g: 176, b: 176 }, theme);\n colorThumbHover = modifyBackgroundColor(\n { r: 144, g: 144, b: 144 },\n theme\n );\n colorThumbActive = modifyBackgroundColor({ r: 96, g: 96, b: 96 }, theme);\n colorCorner = modifyBackgroundColor({ r: 255, g: 255, b: 255 }, theme);\n } else {\n var rgb = parse(theme.scrollbarColor);\n var hsl_1 = rgbToHSL(rgb);\n var isLight = hsl_1.l > 0.5;\n var lighten = function (lighter) {\n return __assign(__assign({}, hsl_1), {\n l: clamp(hsl_1.l + lighter, 0, 1),\n });\n };\n var darken = function (darker) {\n return __assign(__assign({}, hsl_1), {\n l: clamp(hsl_1.l - darker, 0, 1),\n });\n };\n colorTrack = hslToString(darken(0.4));\n colorIcons = hslToString(isLight ? darken(0.4) : lighten(0.4));\n colorThumb = hslToString(hsl_1);\n colorThumbHover = hslToString(lighten(0.1));\n colorThumbActive = hslToString(lighten(0.2));\n }\n lines.push(\"::-webkit-scrollbar {\");\n lines.push(\" background-color: \" + colorTrack + \";\");\n lines.push(\" color: \" + colorIcons + \";\");\n lines.push(\"}\");\n lines.push(\"::-webkit-scrollbar-thumb {\");\n lines.push(\" background-color: \" + colorThumb + \";\");\n lines.push(\"}\");\n lines.push(\"::-webkit-scrollbar-thumb:hover {\");\n lines.push(\" background-color: \" + colorThumbHover + \";\");\n lines.push(\"}\");\n lines.push(\"::-webkit-scrollbar-thumb:active {\");\n lines.push(\" background-color: \" + colorThumbActive + \";\");\n lines.push(\"}\");\n lines.push(\"::-webkit-scrollbar-corner {\");\n lines.push(\" background-color: \" + colorCorner + \";\");\n lines.push(\"}\");\n lines.push(\"* {\");\n lines.push(\" scrollbar-color: \" + colorTrack + \" \" + colorThumb + \";\");\n lines.push(\"}\");\n return lines.join(\"\\n\");\n }\n\n function getModifiedFallbackStyle(filter, _a) {\n var strict = _a.strict;\n var lines = [];\n lines.push(\n \"html, body, \" +\n (strict ? \"body :not(iframe)\" : \"body > :not(iframe)\") +\n \" {\"\n );\n lines.push(\n \" background-color: \" +\n modifyBackgroundColor({ r: 255, g: 255, b: 255 }, filter) +\n \" !important;\"\n );\n lines.push(\n \" border-color: \" +\n modifyBorderColor({ r: 64, g: 64, b: 64 }, filter) +\n \" !important;\"\n );\n lines.push(\n \" color: \" +\n modifyForegroundColor({ r: 0, g: 0, b: 0 }, filter) +\n \" !important;\"\n );\n lines.push(\"}\");\n\n return \"\";\n return lines.join(\"\\n\");\n }\n\n var unparsableColors = new Set([\n \"inherit\",\n \"transparent\",\n \"initial\",\n \"currentcolor\",\n \"none\",\n \"unset\",\n ]);\n var colorParseCache$1 = new Map();\n\n function parseColorWithCache($color) {\n $color = $color.trim();\n if (colorParseCache$1.has($color)) {\n return colorParseCache$1.get($color);\n }\n var color = parse($color);\n colorParseCache$1.set($color, color);\n return color;\n }\n\n function tryParseColor($color) {\n try {\n return parseColorWithCache($color);\n } catch (err) {\n return null;\n }\n }\n\n function getColorModifier(prop, value) {\n if (unparsableColors.has(value.toLowerCase())) {\n return value;\n }\n try {\n var rgb_1 = parseColorWithCache(value);\n if (prop.indexOf(\"background\") >= 0) {\n return function (filter) {\n return modifyBackgroundColor(rgb_1, filter);\n };\n }\n if (prop.indexOf(\"border\") >= 0 || prop.indexOf(\"outline\") >= 0) {\n return function (filter) {\n return modifyBorderColor(rgb_1, filter);\n };\n }\n return function (filter) {\n return modifyForegroundColor(rgb_1, filter);\n };\n } catch (err) {\n logWarn(\"Color parse error\", err);\n return null;\n }\n }\n\n var gradientRegex =\n /[\\-a-z]+gradient\\(([^\\(\\)]*(\\(([^\\(\\)]*(\\(.*?\\)))*[^\\(\\)]*\\))){0,15}[^\\(\\)]*\\)/g;\n var imageDetailsCache = new Map();\n var awaitingForImageLoading = new Map();\n\n function shouldIgnoreImage(rule, selectors) {\n return false;\n\n if (!rule || selectors.length === 0) {\n return false;\n }\n if (\n selectors.some(function (s) {\n return s === \"*\";\n })\n ) {\n return true;\n }\n var ruleSelectors = rule.selectorText.split(/,\\s*/g);\n var _loop_1 = function (i) {\n var ignoredSelector = selectors[i];\n if (\n ruleSelectors.some(function (s) {\n return s === ignoredSelector;\n })\n ) {\n return { value: true };\n }\n };\n for (var i = 0; i < selectors.length; i++) {\n var state_1 = _loop_1(i);\n if (typeof state_1 === \"object\") return state_1.value;\n }\n return false;\n }\n\n function getBgImageModifier(value, rule, ignoreImageSelectors, isCancelled) {\n return null;\n\n var _this = this;\n try {\n var gradients = getMatches(gradientRegex, value);\n var urls = getMatches(cssURLRegex, value);\n if (urls.length === 0 && gradients.length === 0) {\n return value;\n }\n var getIndices = function (matches) {\n var index = 0;\n return matches.map(function (match) {\n var valueIndex = value.indexOf(match, index);\n index = valueIndex + match.length;\n return { match: match, index: valueIndex };\n });\n };\n var matches_1 = getIndices(urls)\n .map(function (i) {\n return __assign({ type: \"url\" }, i);\n })\n .concat(\n getIndices(gradients).map(function (i) {\n return __assign({ type: \"gradient\" }, i);\n })\n )\n .sort(function (a, b) {\n return a.index - b.index;\n });\n var getGradientModifier_1 = function (gradient) {\n var match = gradient.match(/^(.*-gradient)\\((.*)\\)$/);\n var type = match[1];\n var content = match[2];\n var partsRegex =\n /([^\\(\\),]+(\\([^\\(\\)]*(\\([^\\(\\)]*\\)*[^\\(\\)]*)?\\))?[^\\(\\),]*),?/g;\n var colorStopRegex = /^(from|color-stop|to)\\(([^\\(\\)]*?,\\s*)?(.*?)\\)$/;\n var parts = getMatches(partsRegex, content, 1).map(function (part) {\n part = part.trim();\n var rgb = tryParseColor(part);\n if (rgb) {\n return function (filter) {\n return modifyGradientColor(rgb, filter);\n };\n }\n var space = part.lastIndexOf(\" \");\n rgb = tryParseColor(part.substring(0, space));\n if (rgb) {\n return function (filter) {\n return (\n modifyGradientColor(rgb, filter) +\n \" \" +\n part.substring(space + 1)\n );\n };\n }\n var colorStopMatch = part.match(colorStopRegex);\n if (colorStopMatch) {\n rgb = tryParseColor(colorStopMatch[3]);\n if (rgb) {\n return function (filter) {\n return (\n colorStopMatch[1] +\n \"(\" +\n (colorStopMatch[2] ? colorStopMatch[2] + \", \" : \"\") +\n modifyGradientColor(rgb, filter) +\n \")\"\n );\n };\n }\n }\n return function () {\n return part;\n };\n });\n return function (filter) {\n return (\n type +\n \"(\" +\n parts\n .map(function (modify) {\n return modify(filter);\n })\n .join(\", \") +\n \")\"\n );\n };\n };\n var getURLModifier_1 = function (urlValue) {\n var url = getCSSURLValue(urlValue);\n if (rule.parentStyleSheet.href) {\n var basePath = getCSSBaseBath(rule.parentStyleSheet.href);\n url = getAbsoluteURL(basePath, url);\n } else if (\n rule.parentStyleSheet.ownerNode &&\n rule.parentStyleSheet.ownerNode.baseURI\n ) {\n url = getAbsoluteURL(rule.parentStyleSheet.ownerNode.baseURI, url);\n } else {\n url = getAbsoluteURL(location.origin, url);\n }\n var absoluteValue = 'url(\"' + url + '\")';\n return function (filter) {\n return __awaiter(_this, void 0, void 0, function () {\n var imageDetails, awaiters_1, err_1, bgImageValue;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!imageDetailsCache.has(url)) return [3, 1];\n imageDetails = imageDetailsCache.get(url);\n return [3, 7];\n case 1:\n _a.trys.push([1, 6, , 7]);\n if (shouldIgnoreImage(rule, ignoreImageSelectors)) {\n return [2, null];\n }\n if (!awaitingForImageLoading.has(url)) return [3, 3];\n awaiters_1 = awaitingForImageLoading.get(url);\n return [\n 4,\n new Promise(function (resolve) {\n return awaiters_1.push(resolve);\n }),\n ];\n case 2:\n imageDetails = _a.sent();\n if (!imageDetails) {\n return [2, null];\n }\n return [3, 5];\n case 3:\n awaitingForImageLoading.set(url, []);\n return [4, getImageDetails(url)];\n case 4:\n imageDetails = _a.sent();\n imageDetailsCache.set(url, imageDetails);\n awaitingForImageLoading.get(url).forEach(function (resolve) {\n return resolve(imageDetails);\n });\n awaitingForImageLoading.delete(url);\n _a.label = 5;\n case 5:\n if (isCancelled()) {\n return [2, null];\n }\n return [3, 7];\n case 6:\n err_1 = _a.sent();\n logWarn(err_1);\n if (awaitingForImageLoading.has(url)) {\n awaitingForImageLoading\n .get(url)\n .forEach(function (resolve) {\n return resolve(null);\n });\n awaitingForImageLoading.delete(url);\n }\n return [2, absoluteValue];\n case 7:\n bgImageValue =\n getBgImageValue_1(imageDetails, filter) || absoluteValue;\n return [2, bgImageValue];\n }\n });\n });\n };\n };\n var getBgImageValue_1 = function (imageDetails, filter) {\n var isDark = imageDetails.isDark,\n isLight = imageDetails.isLight,\n isTransparent = imageDetails.isTransparent,\n isLarge = imageDetails.isLarge,\n width = imageDetails.width;\n var result;\n if (\n isDark &&\n isTransparent &&\n filter.mode === 1 &&\n !isLarge &&\n width > 2\n ) {\n logInfo(\"Inverting dark image \" + imageDetails.src);\n var inverted = getFilteredImageDataURL(\n imageDetails,\n __assign(__assign({}, filter), {\n sepia: clamp(filter.sepia + 10, 0, 100),\n })\n );\n result = 'url(\"' + inverted + '\")';\n } else if (isLight && !isTransparent && filter.mode === 1) {\n if (isLarge) {\n result = \"none\";\n } else {\n logInfo(\"Dimming light image \" + imageDetails.src);\n var dimmed = getFilteredImageDataURL(imageDetails, filter);\n result = 'url(\"' + dimmed + '\")';\n }\n } else if (filter.mode === 0 && isLight && !isLarge) {\n logInfo(\"Applying filter to image \" + imageDetails.src);\n var filtered = getFilteredImageDataURL(\n imageDetails,\n __assign(__assign({}, filter), {\n brightness: clamp(filter.brightness - 10, 5, 200),\n sepia: clamp(filter.sepia + 10, 0, 100),\n })\n );\n result = 'url(\"' + filtered + '\")';\n } else {\n result = null;\n }\n return result;\n };\n var modifiers_1 = [];\n var index_1 = 0;\n matches_1.forEach(function (_a, i) {\n var match = _a.match,\n type = _a.type,\n matchStart = _a.index;\n var prefixStart = index_1;\n var matchEnd = matchStart + match.length;\n index_1 = matchEnd;\n modifiers_1.push(function () {\n return value.substring(prefixStart, matchStart);\n });\n modifiers_1.push(\n type === \"url\"\n ? getURLModifier_1(match)\n : getGradientModifier_1(match)\n );\n if (i === matches_1.length - 1) {\n modifiers_1.push(function () {\n return value.substring(matchEnd);\n });\n }\n });\n return function (filter) {\n var results = modifiers_1.map(function (modify) {\n return modify(filter);\n });\n if (\n results.some(function (r) {\n return r instanceof Promise;\n })\n ) {\n return Promise.all(results).then(function (asyncResults) {\n return asyncResults.join(\"\");\n });\n }\n return results.join(\"\");\n };\n } catch (err) {\n logWarn(\"Unable to parse gradient \" + value, err);\n return null;\n }\n }\n\n function getShadowModifier(prop, value) {\n try {\n var index_2 = 0;\n var colorMatches_1 = getMatches(\n /(^|\\s)([a-z]+\\(.+?\\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,\n value,\n 2\n );\n var modifiers_2 = colorMatches_1.map(function (match, i) {\n var prefixIndex = index_2;\n var matchIndex = value.indexOf(match, index_2);\n var matchEnd = matchIndex + match.length;\n index_2 = matchEnd;\n var rgb = tryParseColor(match);\n if (!rgb) {\n return function () {\n return value.substring(prefixIndex, matchEnd);\n };\n }\n return function (filter) {\n return (\n \"\" +\n value.substring(prefixIndex, matchIndex) +\n modifyShadowColor(rgb, filter) +\n (i === colorMatches_1.length - 1 ? value.substring(matchEnd) : \"\")\n );\n };\n });\n return function (filter) {\n return modifiers_2\n .map(function (modify) {\n return modify(filter);\n })\n .join(\"\");\n };\n } catch (err) {\n logWarn(\"Unable to parse shadow \" + value, err);\n return null;\n }\n }\n\n function cleanModificationCache() {\n colorParseCache$1.clear();\n clearColorModificationCache();\n imageDetailsCache.clear();\n cleanImageProcessingCache();\n awaitingForImageLoading.clear();\n }\n\n var overrides = {\n \"background-color\": {\n customProp: \"--wp-dark-mode-inline-bgcolor\",\n cssProp: \"background-color\",\n dataAttr: \"data-darkmoder-inline-bgcolor\",\n },\n \"background-image\": {\n customProp: \"--wp-dark-mode-inline-bgimage\",\n cssProp: \"background-image\",\n dataAttr: \"data-darkmoder-inline-bgimage\",\n },\n \"border-color\": {\n customProp: \"--wp-dark-mode-inline-border\",\n cssProp: \"border-color\",\n dataAttr: \"data-darkmoder-inline-border\",\n },\n \"border-bottom-color\": {\n customProp: \"--wp-dark-mode-inline-border-bottom\",\n cssProp: \"border-bottom-color\",\n dataAttr: \"data-darkmoder-inline-border-bottom\",\n },\n \"border-left-color\": {\n customProp: \"--wp-dark-mode-inline-border-left\",\n cssProp: \"border-left-color\",\n dataAttr: \"data-darkmoder-inline-border-left\",\n },\n \"border-right-color\": {\n customProp: \"--wp-dark-mode-inline-border-right\",\n cssProp: \"border-right-color\",\n dataAttr: \"data-darkmoder-inline-border-right\",\n },\n \"border-top-color\": {\n customProp: \"--wp-dark-mode-inline-border-top\",\n cssProp: \"border-top-color\",\n dataAttr: \"data-darkmoder-inline-border-top\",\n },\n \"box-shadow\": {\n customProp: \"--wp-dark-mode-inline-boxshadow\",\n cssProp: \"box-shadow\",\n dataAttr: \"data-darkmoder-inline-boxshadow\",\n },\n color: {\n customProp: \"--wp-dark-mode-inline-color\",\n cssProp: \"color\",\n dataAttr: \"data-darkmoder-inline-color\",\n },\n fill: {\n customProp: \"--wp-dark-mode-inline-fill\",\n cssProp: \"fill\",\n dataAttr: \"data-darkmoder-inline-fill\",\n },\n stroke: {\n customProp: \"--wp-dark-mode-inline-stroke\",\n cssProp: \"stroke\",\n dataAttr: \"data-darkmoder-inline-stroke\",\n },\n \"outline-color\": {\n customProp: \"--wp-dark-mode-inline-outline\",\n cssProp: \"outline-color\",\n dataAttr: \"data-darkmoder-inline-outline\",\n },\n \"stop-color\": {\n customProp: \"--wp-dark-mode-inline-stopcolor\",\n cssProp: \"stop-color\",\n dataAttr: \"data-darkmoder-inline-stopcolor\",\n },\n };\n var overridesList = Object.values(overrides);\n var INLINE_STYLE_ATTRS = [\n \"style\",\n \"fill\",\n \"stop-color\",\n \"stroke\",\n \"bgcolor\",\n \"color\",\n ];\n var INLINE_STYLE_SELECTOR = INLINE_STYLE_ATTRS.map(function (attr) {\n return \"[\" + attr + \"]\";\n }).join(\", \");\n\n function getInlineOverrideStyle() {\n return overridesList\n .map(function (_a) {\n var dataAttr = _a.dataAttr,\n customProp = _a.customProp,\n cssProp = _a.cssProp;\n return [\n \"[\" + dataAttr + \"] {\",\n \" \" + cssProp + \": var(\" + customProp + \") !important;\",\n \"}\",\n ].join(\"\\n\");\n })\n .join(\"\\n\");\n }\n\n function getInlineStyleElements(root) {\n var results = [];\n if (root instanceof Element && root.matches(INLINE_STYLE_SELECTOR)) {\n results.push(root);\n }\n if (\n root instanceof Element ||\n (isShadowDomSupported && root instanceof ShadowRoot) ||\n root instanceof Document\n ) {\n push(results, root.querySelectorAll(INLINE_STYLE_SELECTOR));\n }\n return results;\n }\n\n var treeObservers = new Map();\n var attrObservers = new Map();\n\n function watchForInlineStyles(elementStyleDidChange, shadowRootDiscovered) {\n deepWatchForInlineStyles(\n document,\n elementStyleDidChange,\n shadowRootDiscovered\n );\n iterateShadowHosts(document.documentElement, function (host) {\n deepWatchForInlineStyles(\n host.shadowRoot,\n elementStyleDidChange,\n shadowRootDiscovered\n );\n });\n }\n\n function deepWatchForInlineStyles(\n root,\n elementStyleDidChange,\n shadowRootDiscovered\n ) {\n if (treeObservers.has(root)) {\n treeObservers.get(root).disconnect();\n attrObservers.get(root).disconnect();\n }\n var discoveredNodes = new WeakSet();\n\n function discoverNodes(node) {\n getInlineStyleElements(node).forEach(function (el) {\n if (discoveredNodes.has(el)) {\n return;\n }\n discoveredNodes.add(el);\n elementStyleDidChange(el);\n });\n iterateShadowHosts(node, function (n) {\n if (discoveredNodes.has(node)) {\n return;\n }\n discoveredNodes.add(node);\n shadowRootDiscovered(n.shadowRoot);\n deepWatchForInlineStyles(\n n.shadowRoot,\n elementStyleDidChange,\n shadowRootDiscovered\n );\n });\n }\n\n var treeObserver = createOptimizedTreeObserver(root, {\n onMinorMutations: function (_a) {\n var additions = _a.additions;\n additions.forEach(function (added) {\n return discoverNodes(added);\n });\n },\n onHugeMutations: function () {\n discoverNodes(root);\n },\n });\n treeObservers.set(root, treeObserver);\n var attemptCount = 0;\n var start = null;\n var ATTEMPTS_INTERVAL = getDuration({ seconds: 10 });\n var RETRY_TIMEOUT = getDuration({ seconds: 2 });\n var MAX_ATTEMPTS_COUNT = 50;\n var cache = [];\n var timeoutId = null;\n var handleAttributeMutations = throttle(function (mutations) {\n mutations.forEach(function (m) {\n if (INLINE_STYLE_ATTRS.includes(m.attributeName)) {\n elementStyleDidChange(m.target);\n }\n });\n });\n var attrObserver = new MutationObserver(function (mutations) {\n if (timeoutId) {\n cache.push.apply(cache, __spread(mutations));\n return;\n }\n attemptCount++;\n var now = Date.now();\n if (start == null) {\n start = now;\n } else if (attemptCount >= MAX_ATTEMPTS_COUNT) {\n if (now - start < ATTEMPTS_INTERVAL) {\n timeoutId = setTimeout(function () {\n start = null;\n attemptCount = 0;\n timeoutId = null;\n var attributeCache = cache;\n cache = [];\n handleAttributeMutations(attributeCache);\n }, RETRY_TIMEOUT);\n cache.push.apply(cache, __spread(mutations));\n return;\n }\n start = now;\n attemptCount = 1;\n }\n handleAttributeMutations(mutations);\n });\n attrObserver.observe(root, {\n attributes: true,\n attributeFilter: INLINE_STYLE_ATTRS.concat(\n overridesList.map(function (_a) {\n var dataAttr = _a.dataAttr;\n return dataAttr;\n })\n ),\n subtree: true,\n });\n attrObservers.set(root, attrObserver);\n }\n\n function stopWatchingForInlineStyles() {\n treeObservers.forEach(function (o) {\n return o.disconnect();\n });\n attrObservers.forEach(function (o) {\n return o.disconnect();\n });\n treeObservers.clear();\n attrObservers.clear();\n }\n\n var inlineStyleCache = new WeakMap();\n var filterProps = [\"brightness\", \"contrast\", \"grayscale\", \"sepia\", \"mode\"];\n\n function getInlineStyleCacheKey(el, theme) {\n return INLINE_STYLE_ATTRS.map(function (attr) {\n return attr + '=\"' + el.getAttribute(attr) + '\"';\n })\n .concat(\n filterProps.map(function (prop) {\n return prop + '=\"' + theme[prop] + '\"';\n })\n )\n .join(\" \");\n }\n\n function shouldIgnoreInlineStyle(element, selectors) {\n for (var i = 0, len = selectors.length; i < len; i++) {\n var ingnoredSelector = selectors[i];\n if (element.matches(ingnoredSelector)) {\n return true;\n }\n }\n return false;\n }\n\n function overrideInlineStyle(\n element,\n theme,\n ignoreInlineSelectors,\n ignoreImageSelectors\n ) {\n var cacheKey = getInlineStyleCacheKey(element, theme);\n if (cacheKey === inlineStyleCache.get(element)) {\n return;\n }\n var unsetProps = new Set(Object.keys(overrides));\n\n function setCustomProp(targetCSSProp, modifierCSSProp, cssVal) {\n var _a = overrides[targetCSSProp],\n customProp = _a.customProp,\n dataAttr = _a.dataAttr;\n var mod = getModifiableCSSDeclaration(\n modifierCSSProp,\n cssVal,\n null,\n ignoreImageSelectors,\n null\n );\n if (!mod) {\n return;\n }\n var value = mod.value;\n if (typeof value === \"function\") {\n value = value(theme);\n }\n element.style.setProperty(customProp, value);\n if (!element.hasAttribute(dataAttr)) {\n element.setAttribute(dataAttr, \"\");\n }\n unsetProps.delete(targetCSSProp);\n }\n\n if (ignoreInlineSelectors.length > 0) {\n if (shouldIgnoreInlineStyle(element, ignoreInlineSelectors)) {\n unsetProps.forEach(function (cssProp) {\n element.removeAttribute(overrides[cssProp].dataAttr);\n });\n return;\n }\n }\n if (element.hasAttribute(\"bgcolor\")) {\n var value = element.getAttribute(\"bgcolor\");\n if (value.match(/^[0-9a-f]{3}$/i) || value.match(/^[0-9a-f]{6}$/i)) {\n value = \"#\" + value;\n }\n setCustomProp(\"background-color\", \"background-color\", value);\n }\n if (element.hasAttribute(\"color\")) {\n var value = element.getAttribute(\"color\");\n if (value.match(/^[0-9a-f]{3}$/i) || value.match(/^[0-9a-f]{6}$/i)) {\n value = \"#\" + value;\n }\n setCustomProp(\"color\", \"color\", value);\n }\n if (element instanceof SVGElement) {\n if (element.hasAttribute(\"fill\")) {\n var SMALL_SVG_LIMIT = 32;\n var value = element.getAttribute(\"fill\");\n var isBg = false;\n if (!(element instanceof SVGTextElement)) {\n var _a = element.getBoundingClientRect(),\n width = _a.width,\n height = _a.height;\n isBg = width > SMALL_SVG_LIMIT || height > SMALL_SVG_LIMIT;\n }\n setCustomProp(\"fill\", isBg ? \"background-color\" : \"color\", value);\n }\n if (element.hasAttribute(\"stop-color\")) {\n setCustomProp(\n \"stop-color\",\n \"background-color\",\n element.getAttribute(\"stop-color\")\n );\n }\n }\n if (element.hasAttribute(\"stroke\")) {\n var value = element.getAttribute(\"stroke\");\n setCustomProp(\n \"stroke\",\n element instanceof SVGLineElement || element instanceof SVGTextElement\n ? \"border-color\"\n : \"color\",\n value\n );\n }\n element.style &&\n iterateCSSDeclarations(element.style, function (property, value) {\n if (property === \"background-image\" && value.indexOf(\"url\") >= 0) {\n return;\n }\n if (overrides.hasOwnProperty(property)) {\n setCustomProp(property, property, value);\n }\n });\n if (\n element.style &&\n element instanceof SVGTextElement &&\n element.style.fill\n ) {\n setCustomProp(\"fill\", \"color\", element.style.getPropertyValue(\"fill\"));\n }\n forEach(unsetProps, function (cssProp) {\n element.removeAttribute(overrides[cssProp].dataAttr);\n });\n inlineStyleCache.set(element, getInlineStyleCacheKey(element, theme));\n }\n\n var metaThemeColorName = \"theme-color\";\n var metaThemeColorSelector = 'meta[name=\"' + metaThemeColorName + '\"]';\n var srcMetaThemeColor = null;\n var observer = null;\n\n function changeMetaThemeColor(meta, theme) {\n srcMetaThemeColor = srcMetaThemeColor || meta.content;\n try {\n var color = parse(srcMetaThemeColor);\n meta.content = modifyBackgroundColor(color, theme);\n } catch (err) {\n logWarn(err);\n }\n }\n\n function changeMetaThemeColorWhenAvailable(theme) {\n var meta = document.querySelector(metaThemeColorSelector);\n if (meta) {\n changeMetaThemeColor(meta, theme);\n } else {\n if (observer) {\n observer.disconnect();\n }\n observer = new MutationObserver(function (mutations) {\n loop: for (var i = 0; i < mutations.length; i++) {\n var addedNodes = mutations[i].addedNodes;\n for (var j = 0; j < addedNodes.length; j++) {\n var node = addedNodes[j];\n if (\n node instanceof HTMLMetaElement &&\n node.name === metaThemeColorName\n ) {\n observer.disconnect();\n observer = null;\n changeMetaThemeColor(node, theme);\n break loop;\n }\n }\n }\n });\n observer.observe(document.head, { childList: true });\n }\n }\n\n function restoreMetaThemeColor() {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n var meta = document.querySelector(metaThemeColorSelector);\n if (meta && srcMetaThemeColor) {\n meta.content = srcMetaThemeColor;\n }\n }\n\n var themeCacheKeys$1 = [\n \"mode\",\n \"brightness\",\n \"contrast\",\n \"grayscale\",\n \"sepia\",\n \"darkSchemeBackgroundColor\",\n \"darkSchemeTextColor\",\n \"lightSchemeBackgroundColor\",\n \"lightSchemeTextColor\",\n ];\n\n function getThemeKey(theme) {\n return themeCacheKeys$1\n .map(function (p) {\n return p + \":\" + theme[p];\n })\n .join(\";\");\n }\n\n var asyncQueue = createAsyncTasksQueue();\n\n function createStyleSheetModifier() {\n var renderId = 0;\n var rulesTextCache = new Map();\n var rulesModCache = new Map();\n var prevFilterKey = null;\n\n function modifySheet(options) {\n var newRules = options.sourceCSSRules;\n\n var theme = options.theme,\n variables = options.variables,\n ignoreImageAnalysis = options.ignoreImageAnalysis,\n force = options.force,\n prepareSheet = options.prepareSheet,\n isAsyncCancelled = options.isAsyncCancelled;\n var rulesChanged = rulesModCache.size === 0;\n var notFoundCacheKeys = new Set(rulesModCache.keys());\n var themeKey = getThemeKey(theme);\n var themeChanged = themeKey !== prevFilterKey;\n var modRules = [];\n iterateCSSRules(newRules, function (rule) {\n if (\n rule.parentStyleSheet.ownerNode && \n \"wp-dark-mode-custom-css\" ===\n rule.parentStyleSheet.ownerNode.getAttribute(\"id\")\n ) {\n return;\n }\n\n var cssText = rule.cssText;\n var textDiffersFromPrev = false;\n notFoundCacheKeys.delete(cssText);\n if (!rulesTextCache.has(cssText)) {\n rulesTextCache.set(cssText, cssText);\n textDiffersFromPrev = true;\n }\n var vars;\n var varsRule = null;\n if (variables.size > 0 || cssText.includes(\"var(\")) {\n var cssTextWithVariables = replaceCSSVariables(cssText, variables);\n if (rulesTextCache.get(cssText) !== cssTextWithVariables) {\n rulesTextCache.set(cssText, cssTextWithVariables);\n textDiffersFromPrev = true;\n vars = getTempCSSStyleSheet();\n vars.insertRule(cssTextWithVariables);\n varsRule = vars.cssRules[0];\n }\n }\n if (textDiffersFromPrev) {\n rulesChanged = true;\n } else {\n modRules.push(rulesModCache.get(cssText));\n return;\n }\n var modDecs = [];\n var targetRule = varsRule || rule;\n targetRule &&\n targetRule.style &&\n iterateCSSDeclarations(targetRule.style, function (property, value) {\n var mod = getModifiableCSSDeclaration(\n property,\n value,\n rule,\n ignoreImageAnalysis,\n isAsyncCancelled\n );\n if (mod) {\n modDecs.push(mod);\n }\n });\n var modRule = null;\n if (modDecs.length > 0) {\n var parentRule = rule.parentRule;\n modRule = {\n selector: rule.selectorText,\n declarations: modDecs,\n parentRule: parentRule,\n };\n modRules.push(modRule);\n }\n rulesModCache.set(cssText, modRule);\n vars && vars.deleteRule(0);\n });\n notFoundCacheKeys.forEach(function (key) {\n rulesTextCache.delete(key);\n rulesModCache.delete(key);\n });\n prevFilterKey = themeKey;\n if (!force && !rulesChanged && !themeChanged) {\n return;\n }\n renderId++;\n\n function setRule(target, index, rule) {\n var selector = rule.selector,\n declarations = rule.declarations;\n\n if (!selector) {\n return;\n }\n\n // const queryCheck = (s) =>\n // document.createDocumentFragment().querySelector(s);\n\n // const isSelectorValid = (selector) => {\n // try {\n // queryCheck(selector);\n // } catch {\n // return false;\n // }\n // return true;\n // };\n\n // //return if the selector is not valid\n // if (!isSelectorValid(selector)) return;\n\n const element = document.querySelector(selector);\n\n if (typeof element === \"undefined\" || !element) {\n return;\n }\n\n // Check if includes section is activated\n if (typeof wp_dark_mode_json !== \"undefined\" && \"\" !== wp_dark_mode_json.options.excludes_elements_includes ) {\n // Return if not included element\n if (!element.classList.contains(\"wp-dark-mode-include\")) {\n return;\n }\n }\n\n // Return if element is excluded\n if (element.classList.contains(\"wp-dark-mode-ignore\")) {\n return;\n }\n\n\n target.insertRule(selector + \" {}\", index);\n var style = target.cssRules[index].style;\n\n declarations.forEach(function (_a) {\n \n var property = _a.property,\n value = _a.value,\n important = _a.important,\n sourceValue = _a.sourceValue;\n\n if (\"background-image\" === property) {\n return;\n }\n\n style.setProperty(\n property,\n value == null ? sourceValue : value,\n important ? \"important\" : \"\"\n );\n });\n }\n\n var asyncDeclarations = new Map();\n var asyncDeclarationCounter = 0;\n var rootReadyGroup = { rule: null, rules: [], isGroup: true };\n var groupRefs = new WeakMap();\n\n function getGroup(rule) {\n if (rule == null) {\n return rootReadyGroup;\n }\n if (groupRefs.has(rule)) {\n return groupRefs.get(rule);\n }\n var group = { rule: rule, rules: [], isGroup: true };\n groupRefs.set(rule, group);\n var parentGroup = getGroup(rule.parentRule);\n parentGroup.rules.push(group);\n return group;\n }\n\n modRules\n .filter(function (r) {\n return r;\n })\n .forEach(function (_a) {\n var selector = _a.selector,\n declarations = _a.declarations,\n parentRule = _a.parentRule;\n var group = getGroup(parentRule);\n var readyStyleRule = {\n selector: selector,\n declarations: [],\n isGroup: false,\n };\n var readyDeclarations = readyStyleRule.declarations;\n group.rules.push(readyStyleRule);\n declarations.forEach(function (_a) {\n var property = _a.property,\n value = _a.value,\n important = _a.important,\n sourceValue = _a.sourceValue;\n if (typeof value === \"function\") {\n var modified = value(theme);\n if (modified instanceof Promise) {\n var asyncKey_1 = asyncDeclarationCounter++;\n var asyncDeclaration_1 = {\n property: property,\n value: null,\n important: important,\n asyncKey: asyncKey_1,\n sourceValue: sourceValue,\n };\n readyDeclarations.push(asyncDeclaration_1);\n var promise = modified;\n var currentRenderId_1 = renderId;\n promise.then(function (asyncValue) {\n if (\n !asyncValue ||\n isAsyncCancelled() ||\n currentRenderId_1 !== renderId\n ) {\n return;\n }\n asyncDeclaration_1.value = asyncValue;\n asyncQueue.add(function () {\n if (isAsyncCancelled() || currentRenderId_1 !== renderId) {\n return;\n }\n rebuildAsyncRule(asyncKey_1);\n });\n });\n } else {\n readyDeclarations.push({\n property: property,\n value: modified,\n important: important,\n sourceValue: sourceValue,\n });\n }\n } else {\n readyDeclarations.push({\n property: property,\n value: value,\n important: important,\n sourceValue: sourceValue,\n });\n }\n });\n });\n var sheet = prepareSheet();\n\n function buildStyleSheet() {\n function createTarget(group, parent) {\n var rule = group.rule;\n\n if (rule instanceof CSSMediaRule) {\n var media = rule.media;\n var index = parent.cssRules.length;\n parent.insertRule(\"@media \" + media.mediaText + \" {}\", index);\n return parent.cssRules[index];\n }\n return parent;\n }\n\n function iterateReadyRules(group, target, styleIterator) {\n group.rules.forEach(function (r) {\n if (r.isGroup) {\n var t = createTarget(r, target);\n iterateReadyRules(r, t, styleIterator);\n } else {\n styleIterator(r, target);\n }\n });\n }\n\n iterateReadyRules(rootReadyGroup, sheet, function (rule, target) {\n var index = target.cssRules.length;\n rule.declarations\n .filter(function (_a) {\n var value = _a.value;\n return value == null;\n })\n .forEach(function (_a) {\n var asyncKey = _a.asyncKey;\n return asyncDeclarations.set(asyncKey, {\n rule: rule,\n target: target,\n index: index,\n });\n });\n setRule(target, index, rule);\n });\n }\n\n function rebuildAsyncRule(key) {\n var _a = asyncDeclarations.get(key);\n\n if (typeof _a === \"undefined\") {\n return;\n }\n\n var rule = _a.rule,\n target = _a.target,\n index = _a.index;\n target.deleteRule(index);\n setRule(target, index, rule);\n asyncDeclarations.delete(key);\n }\n\n buildStyleSheet();\n }\n\n return { modifySheet: modifySheet };\n }\n\n var STYLE_SELECTOR = 'style, link[rel*=\"stylesheet\" i]:not([disabled])';\n\n function shouldManageStyle(element) {\n return (\n (element instanceof HTMLStyleElement ||\n element instanceof SVGStyleElement ||\n (element instanceof HTMLLinkElement &&\n element.rel &&\n element.rel.toLowerCase().includes(\"stylesheet\") &&\n !element.disabled)) &&\n !element.classList.contains(\"darkmoder\") &&\n element.media !== \"print\" &&\n !element.classList.contains(\"stylus\")\n );\n }\n\n function getManageableStyles(node, results, deep) {\n if (results === void 0) {\n results = [];\n }\n if (deep === void 0) {\n deep = true;\n }\n if (shouldManageStyle(node)) {\n results.push(node);\n } else if (\n node instanceof Element ||\n (isShadowDomSupported && node instanceof ShadowRoot) ||\n node === document\n ) {\n forEach(node.querySelectorAll(STYLE_SELECTOR), function (style) {\n return getManageableStyles(style, results, false);\n });\n if (deep) {\n iterateShadowHosts(node, function (host) {\n return getManageableStyles(host.shadowRoot, results, false);\n });\n }\n }\n return results;\n }\n\n var syncStyleSet = new WeakSet();\n var corsStyleSet = new WeakSet();\n var canOptimizeUsingProxy = false;\n document.addEventListener(\"__darkmoder__inlineScriptsAllowed\", function () {\n canOptimizeUsingProxy = true;\n });\n\n function manageStyle(element, _a) {\n var update = _a.update,\n loadingStart = _a.loadingStart,\n loadingEnd = _a.loadingEnd;\n var prevStyles = [];\n var next = element;\n while ((next = next.nextElementSibling) && next.matches(\".darkmoder\")) {\n prevStyles.push(next);\n }\n var corsCopy =\n prevStyles.find(function (el) {\n return el.matches(\".darkmoder--cors\") && !corsStyleSet.has(el);\n }) || null;\n var syncStyle =\n prevStyles.find(function (el) {\n return el.matches(\".darkmoder--sync\") && !syncStyleSet.has(el);\n }) || null;\n var corsCopyPositionWatcher = null;\n var syncStylePositionWatcher = null;\n var cancelAsyncOperations = false;\n var sheetModifier = createStyleSheetModifier();\n var observer = new MutationObserver(function () {\n update();\n });\n var observerOptions = {\n attributes: true,\n childList: true,\n characterData: true,\n };\n\n function containsCSSImport() {\n return (\n element instanceof HTMLStyleElement &&\n element.textContent.trim().match(cssImportRegex)\n );\n }\n\n function getRulesSync() {\n if (corsCopy) {\n return corsCopy.sheet.cssRules;\n }\n if (containsCSSImport()) {\n return null;\n }\n return safeGetSheetRules();\n }\n\n function insertStyle() {\n if (corsCopy) {\n if (element.nextSibling !== corsCopy) {\n element.parentNode.insertBefore(corsCopy, element.nextSibling);\n }\n if (corsCopy.nextSibling !== syncStyle) {\n element.parentNode.insertBefore(syncStyle, corsCopy.nextSibling);\n }\n } else if (element.nextSibling !== syncStyle) {\n element.parentNode.insertBefore(syncStyle, element.nextSibling);\n }\n }\n\n function createSyncStyle() {\n syncStyle =\n element instanceof SVGStyleElement\n ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"style\")\n : document.createElement(\"style\");\n syncStyle.classList.add(\"darkmoder\");\n syncStyle.classList.add(\"darkmoder--sync\");\n syncStyle.media = \"screen\";\n syncStyleSet.add(syncStyle);\n }\n\n var isLoadingRules = false;\n var wasLoadingError = false;\n\n function getRulesAsync() {\n return __awaiter(this, void 0, void 0, function () {\n var cssText,\n cssBasePath,\n _a,\n cssRules,\n accessError,\n err_1,\n fullCSSText,\n err_2;\n var _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (!(element instanceof HTMLLinkElement)) return [3, 7];\n (_a = __read(getRulesOrError(), 2)),\n (cssRules = _a[0]),\n (accessError = _a[1]);\n if (accessError) {\n logWarn(accessError);\n }\n if (\n !(\n (!cssRules && !accessError && !isSafari) ||\n (isSafari && !element.sheet) ||\n isStillLoadingError(accessError)\n )\n )\n return [3, 5];\n _c.label = 1;\n case 1:\n _c.trys.push([1, 3, , 4]);\n return [4, linkLoading(element)];\n case 2:\n _c.sent();\n return [3, 4];\n case 3:\n err_1 = _c.sent();\n logWarn(err_1);\n wasLoadingError = true;\n return [3, 4];\n case 4:\n if (cancelAsyncOperations) {\n return [2, null];\n }\n (_b = __read(getRulesOrError(), 2)),\n (cssRules = _b[0]),\n (accessError = _b[1]);\n if (accessError) {\n logWarn(accessError);\n }\n _c.label = 5;\n case 5:\n if (cssRules != null) {\n return [2, cssRules];\n }\n return [4, loadText(element.href)];\n case 6:\n cssText = _c.sent();\n cssBasePath = getCSSBaseBath(element.href);\n if (cancelAsyncOperations) {\n return [2, null];\n }\n return [3, 8];\n case 7:\n if (containsCSSImport()) {\n cssText = element.textContent.trim();\n cssBasePath = getCSSBaseBath(location.href);\n } else {\n return [2, null];\n }\n _c.label = 8;\n case 8:\n if (!cssText) return [3, 13];\n _c.label = 9;\n case 9:\n _c.trys.push([9, 11, , 12]);\n return [4, replaceCSSImports(cssText, cssBasePath)];\n case 10:\n fullCSSText = _c.sent();\n corsCopy = createCORSCopy(element, fullCSSText);\n return [3, 12];\n case 11:\n err_2 = _c.sent();\n logWarn(err_2);\n return [3, 12];\n case 12:\n if (corsCopy) {\n corsCopyPositionWatcher = watchForNodePosition(\n corsCopy,\n \"prev-sibling\"\n );\n return [2, corsCopy.sheet.cssRules];\n }\n _c.label = 13;\n case 13:\n return [2, null];\n }\n });\n });\n }\n\n function details() {\n var rules = getRulesSync();\n if (!rules) {\n if (isLoadingRules || wasLoadingError) {\n return null;\n }\n isLoadingRules = true;\n loadingStart();\n getRulesAsync()\n .then(function (results) {\n isLoadingRules = false;\n loadingEnd();\n if (results) {\n update();\n }\n })\n .catch(function (err) {\n logWarn(err);\n isLoadingRules = false;\n loadingEnd();\n });\n return null;\n }\n var variables = getCSSVariables(rules);\n return { variables: variables };\n }\n\n var forceRenderStyle = false;\n\n function render(theme, variables, ignoreImageAnalysis) {\n var rules = getRulesSync();\n if (!rules) {\n return;\n }\n cancelAsyncOperations = false;\n\n function prepareOverridesSheet() {\n if (!syncStyle) {\n createSyncStyle();\n }\n syncStylePositionWatcher && syncStylePositionWatcher.stop();\n insertStyle();\n if (syncStyle.sheet == null) {\n syncStyle.textContent = \"\";\n }\n var sheet = syncStyle.sheet;\n for (var i = sheet.cssRules.length - 1; i >= 0; i--) {\n sheet.deleteRule(i);\n }\n if (syncStylePositionWatcher) {\n syncStylePositionWatcher.run();\n } else {\n syncStylePositionWatcher = watchForNodePosition(\n syncStyle,\n \"prev-sibling\",\n function () {\n forceRenderStyle = true;\n buildOverrides();\n }\n );\n }\n return syncStyle.sheet;\n }\n\n function buildOverrides() {\n var force = forceRenderStyle;\n forceRenderStyle = false;\n sheetModifier.modifySheet({\n prepareSheet: prepareOverridesSheet,\n sourceCSSRules: rules,\n theme: theme,\n variables: variables,\n ignoreImageAnalysis: ignoreImageAnalysis,\n force: force,\n isAsyncCancelled: function () {\n return cancelAsyncOperations;\n },\n });\n }\n\n buildOverrides();\n }\n\n function getRulesOrError() {\n try {\n if (element.sheet == null) {\n return [null, null];\n }\n return [element.sheet.cssRules, null];\n } catch (err) {\n return [null, err];\n }\n }\n\n function isStillLoadingError(error) {\n return error && error.message && error.message.includes(\"loading\");\n }\n\n function safeGetSheetRules() {\n var _a = __read(getRulesOrError(), 2),\n cssRules = _a[0],\n err = _a[1];\n if (err) {\n logWarn(err);\n return null;\n }\n return cssRules;\n }\n\n function watchForSheetChanges() {\n watchForSheetChangesUsingProxy();\n if (!(canOptimizeUsingProxy && element.sheet)) {\n watchForSheetChangesUsingRAF();\n }\n }\n\n var rulesChangeKey = null;\n var rulesCheckFrameId = null;\n\n function getRulesChangeKey() {\n var rules = safeGetSheetRules();\n return rules ? rules.length : null;\n }\n\n function didRulesKeyChange() {\n return getRulesChangeKey() !== rulesChangeKey;\n }\n\n function watchForSheetChangesUsingRAF() {\n rulesChangeKey = getRulesChangeKey();\n stopWatchingForSheetChangesUsingRAF();\n var checkForUpdate = function () {\n if (didRulesKeyChange()) {\n rulesChangeKey = getRulesChangeKey();\n update();\n }\n if (canOptimizeUsingProxy && element.sheet) {\n stopWatchingForSheetChangesUsingRAF();\n return;\n }\n rulesCheckFrameId = requestAnimationFrame(checkForUpdate);\n };\n checkForUpdate();\n }\n\n function stopWatchingForSheetChangesUsingRAF() {\n cancelAnimationFrame(rulesCheckFrameId);\n }\n\n var areSheetChangesPending = false;\n\n function onSheetChange() {\n canOptimizeUsingProxy = true;\n stopWatchingForSheetChangesUsingRAF();\n if (areSheetChangesPending) {\n return;\n }\n\n function handleSheetChanges() {\n areSheetChangesPending = false;\n if (cancelAsyncOperations) {\n return;\n }\n update();\n }\n\n areSheetChangesPending = true;\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(handleSheetChanges);\n } else {\n requestAnimationFrame(handleSheetChanges);\n }\n }\n\n function watchForSheetChangesUsingProxy() {\n element.addEventListener(\"__darkmoder__updateSheet\", onSheetChange);\n }\n\n function stopWatchingForSheetChangesUsingProxy() {\n element.removeEventListener(\"__darkmoder__updateSheet\", onSheetChange);\n }\n\n function stopWatchingForSheetChanges() {\n stopWatchingForSheetChangesUsingProxy();\n stopWatchingForSheetChangesUsingRAF();\n }\n\n function pause() {\n observer.disconnect();\n cancelAsyncOperations = true;\n corsCopyPositionWatcher && corsCopyPositionWatcher.stop();\n syncStylePositionWatcher && syncStylePositionWatcher.stop();\n stopWatchingForSheetChanges();\n }\n\n function destroy() {\n pause();\n removeNode(corsCopy);\n removeNode(syncStyle);\n }\n\n function watch() {\n observer.observe(element, observerOptions);\n if (element instanceof HTMLStyleElement) {\n watchForSheetChanges();\n }\n }\n\n var maxMoveCount = 10;\n var moveCount = 0;\n\n function restore() {\n if (!syncStyle) {\n return;\n }\n moveCount++;\n if (moveCount > maxMoveCount) {\n logWarn(\"Style sheet was moved multiple times\", element);\n return;\n }\n logWarn(\"Restore style\", syncStyle, element);\n var shouldForceRender =\n syncStyle.sheet == null || syncStyle.sheet.cssRules.length > 0;\n insertStyle();\n corsCopyPositionWatcher && corsCopyPositionWatcher.skip();\n syncStylePositionWatcher && syncStylePositionWatcher.skip();\n if (shouldForceRender) {\n forceRenderStyle = true;\n update();\n }\n }\n\n return {\n details: details,\n render: render,\n pause: pause,\n destroy: destroy,\n watch: watch,\n restore: restore,\n };\n }\n\n function linkLoading(link) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [\n 2,\n new Promise(function (resolve, reject) {\n var cleanUp = function () {\n link.removeEventListener(\"load\", onLoad);\n link.removeEventListener(\"error\", onError);\n };\n var onLoad = function () {\n cleanUp();\n resolve();\n };\n var onError = function () {\n cleanUp();\n reject(\"Link loading failed \" + link.href);\n };\n link.addEventListener(\"load\", onLoad);\n link.addEventListener(\"error\", onError);\n }),\n ];\n });\n });\n }\n\n function getCSSImportURL(importDeclaration) {\n return getCSSURLValue(importDeclaration.substring(8).replace(/;$/, \"\"));\n }\n\n function loadText(url) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!url.startsWith(\"data:\")) return [3, 3];\n return [4, fetch(url)];\n case 1:\n return [4, _a.sent().text()];\n case 2:\n return [2, _a.sent()];\n case 3:\n return [\n 4,\n bgFetch({ url: url, responseType: \"text\", mimeType: \"text/css\" }),\n ];\n case 4:\n return [2, _a.sent()];\n }\n });\n });\n }\n\n function replaceCSSImports(cssText, basePath, cache) {\n if (cache === void 0) {\n cache = new Map();\n }\n return __awaiter(this, void 0, void 0, function () {\n var importMatches,\n importMatches_1,\n importMatches_1_1,\n match,\n importURL,\n absoluteURL,\n importedCSS,\n err_3,\n e_1_1;\n var e_1, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n cssText = removeCSSComments(cssText);\n cssText = replaceCSSFontFace(cssText);\n cssText = replaceCSSRelativeURLsWithAbsolute(cssText, basePath);\n importMatches = getMatches(cssImportRegex, cssText);\n _b.label = 1;\n case 1:\n _b.trys.push([1, 10, 11, 12]);\n (importMatches_1 = __values(importMatches)),\n (importMatches_1_1 = importMatches_1.next());\n _b.label = 2;\n case 2:\n if (!!importMatches_1_1.done) return [3, 9];\n match = importMatches_1_1.value;\n importURL = getCSSImportURL(match);\n absoluteURL = getAbsoluteURL(basePath, importURL);\n importedCSS = void 0;\n if (!cache.has(absoluteURL)) return [3, 3];\n importedCSS = cache.get(absoluteURL);\n return [3, 7];\n case 3:\n _b.trys.push([3, 6, , 7]);\n return [4, loadText(absoluteURL)];\n case 4:\n importedCSS = _b.sent();\n cache.set(absoluteURL, importedCSS);\n return [\n 4,\n replaceCSSImports(\n importedCSS,\n getCSSBaseBath(absoluteURL),\n cache\n ),\n ];\n case 5:\n importedCSS = _b.sent();\n return [3, 7];\n case 6:\n err_3 = _b.sent();\n logWarn(err_3);\n importedCSS = \"\";\n return [3, 7];\n case 7:\n cssText = cssText.split(match).join(importedCSS);\n _b.label = 8;\n case 8:\n importMatches_1_1 = importMatches_1.next();\n return [3, 2];\n case 9:\n return [3, 12];\n case 10:\n e_1_1 = _b.sent();\n e_1 = { error: e_1_1 };\n return [3, 12];\n case 11:\n try {\n if (\n importMatches_1_1 &&\n !importMatches_1_1.done &&\n (_a = importMatches_1.return)\n )\n _a.call(importMatches_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n return [7];\n case 12:\n cssText = cssText.trim();\n return [2, cssText];\n }\n });\n });\n }\n\n function createCORSCopy(srcElement, cssText) {\n if (!cssText) {\n return null;\n }\n var cors = document.createElement(\"style\");\n cors.classList.add(\"darkmoder\");\n cors.classList.add(\"darkmoder--cors\");\n cors.media = \"screen\";\n cors.textContent = cssText;\n srcElement.parentNode.insertBefore(cors, srcElement.nextSibling);\n cors.sheet.disabled = true;\n corsStyleSet.add(cors);\n return cors;\n }\n\n var observers = [];\n var observedRoots;\n var undefinedGroups = new Map();\n var elementsDefinitionCallback;\n\n function collectUndefinedElements(root) {\n if (!isDefinedSelectorSupported) {\n return;\n }\n forEach(root.querySelectorAll(\":not(:defined)\"), function (el) {\n var tag = el.tagName.toLowerCase();\n if (!undefinedGroups.has(tag)) {\n undefinedGroups.set(tag, new Set());\n customElementsWhenDefined(tag).then(function () {\n if (elementsDefinitionCallback) {\n var elements = undefinedGroups.get(tag);\n undefinedGroups.delete(tag);\n elementsDefinitionCallback(Array.from(elements));\n }\n });\n }\n undefinedGroups.get(tag).add(el);\n });\n }\n\n var canOptimizeUsingProxy$1 = false;\n document.addEventListener(\"__darkmoder__inlineScriptsAllowed\", function () {\n canOptimizeUsingProxy$1 = true;\n });\n var resolvers$1 = new Map();\n\n function handleIsDefined(e) {\n canOptimizeUsingProxy$1 = true;\n if (resolvers$1.has(e.detail.tag)) {\n var resolve = resolvers$1.get(e.detail.tag);\n resolve();\n }\n }\n\n function customElementsWhenDefined(tag) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [\n 2,\n new Promise(function (resolve) {\n if (\n window.customElements &&\n typeof customElements.whenDefined === \"function\"\n ) {\n customElements.whenDefined(tag).then(resolve);\n } else if (canOptimizeUsingProxy$1) {\n resolvers$1.set(tag, resolve);\n document.dispatchEvent(\n new CustomEvent(\"__darkmoder__addUndefinedResolver\", {\n detail: { tag: tag },\n })\n );\n } else {\n var checkIfDefined_1 = function () {\n var elements = undefinedGroups.get(tag);\n if (elements && elements.size > 0) {\n if (elements.values().next().value.matches(\":defined\")) {\n resolve();\n } else {\n requestAnimationFrame(checkIfDefined_1);\n }\n }\n };\n requestAnimationFrame(checkIfDefined_1);\n }\n }),\n ];\n });\n });\n }\n\n function watchWhenCustomElementsDefined(callback) {\n elementsDefinitionCallback = callback;\n }\n\n function unsubscribeFromDefineCustomElements() {\n elementsDefinitionCallback = null;\n undefinedGroups.clear();\n document.removeEventListener(\"__darkmoder__isDefined\", handleIsDefined);\n }\n\n function watchForStyleChanges(currentStyles, update, shadowRootDiscovered) {\n stopWatchingForStyleChanges();\n var prevStyles = new Set(currentStyles);\n var prevStyleSiblings = new WeakMap();\n var nextStyleSiblings = new WeakMap();\n\n function saveStylePosition(style) {\n prevStyleSiblings.set(style, style.previousElementSibling);\n nextStyleSiblings.set(style, style.nextElementSibling);\n }\n\n function forgetStylePosition(style) {\n prevStyleSiblings.delete(style);\n nextStyleSiblings.delete(style);\n }\n\n function didStylePositionChange(style) {\n return (\n style.previousElementSibling !== prevStyleSiblings.get(style) ||\n style.nextElementSibling !== nextStyleSiblings.get(style)\n );\n }\n\n currentStyles.forEach(saveStylePosition);\n\n function handleStyleOperations(operations) {\n var createdStyles = operations.createdStyles,\n removedStyles = operations.removedStyles,\n movedStyles = operations.movedStyles;\n createdStyles.forEach(function (s) {\n return saveStylePosition(s);\n });\n movedStyles.forEach(function (s) {\n return saveStylePosition(s);\n });\n removedStyles.forEach(function (s) {\n return forgetStylePosition(s);\n });\n createdStyles.forEach(function (s) {\n return prevStyles.add(s);\n });\n removedStyles.forEach(function (s) {\n return prevStyles.delete(s);\n });\n if (createdStyles.size + removedStyles.size + movedStyles.size > 0) {\n update({\n created: Array.from(createdStyles),\n removed: Array.from(removedStyles),\n moved: Array.from(movedStyles),\n updated: [],\n });\n }\n }\n\n function handleMinorTreeMutations(_a) {\n var additions = _a.additions,\n moves = _a.moves,\n deletions = _a.deletions;\n var createdStyles = new Set();\n var removedStyles = new Set();\n var movedStyles = new Set();\n additions.forEach(function (node) {\n return getManageableStyles(node).forEach(function (style) {\n return createdStyles.add(style);\n });\n });\n deletions.forEach(function (node) {\n return getManageableStyles(node).forEach(function (style) {\n return removedStyles.add(style);\n });\n });\n moves.forEach(function (node) {\n return getManageableStyles(node).forEach(function (style) {\n return movedStyles.add(style);\n });\n });\n handleStyleOperations({\n createdStyles: createdStyles,\n removedStyles: removedStyles,\n movedStyles: movedStyles,\n });\n additions.forEach(function (n) {\n iterateShadowHosts(n, subscribeForShadowRootChanges);\n collectUndefinedElements(n);\n });\n }\n\n function handleHugeTreeMutations(root) {\n var styles = new Set(getManageableStyles(root));\n var createdStyles = new Set();\n var removedStyles = new Set();\n var movedStyles = new Set();\n styles.forEach(function (s) {\n if (!prevStyles.has(s)) {\n createdStyles.add(s);\n }\n });\n prevStyles.forEach(function (s) {\n if (!styles.has(s)) {\n removedStyles.add(s);\n }\n });\n styles.forEach(function (s) {\n if (\n !createdStyles.has(s) &&\n !removedStyles.has(s) &&\n didStylePositionChange(s)\n ) {\n movedStyles.add(s);\n }\n });\n handleStyleOperations({\n createdStyles: createdStyles,\n removedStyles: removedStyles,\n movedStyles: movedStyles,\n });\n iterateShadowHosts(root, subscribeForShadowRootChanges);\n collectUndefinedElements(root);\n }\n\n function handleAttributeMutations(mutations) {\n var updatedStyles = new Set();\n var removedStyles = new Set();\n mutations.forEach(function (m) {\n var target = m.target;\n if (target.isConnected) {\n if (shouldManageStyle(target)) {\n updatedStyles.add(target);\n } else if (target instanceof HTMLLinkElement && target.disabled) {\n removedStyles.add(target);\n }\n }\n });\n if (updatedStyles.size + removedStyles.size > 0) {\n update({\n updated: Array.from(updatedStyles),\n created: [],\n removed: Array.from(removedStyles),\n moved: [],\n });\n }\n }\n\n function observe(root) {\n var treeObserver = createOptimizedTreeObserver(root, {\n onMinorMutations: handleMinorTreeMutations,\n onHugeMutations: handleHugeTreeMutations,\n });\n var attrObserver = new MutationObserver(handleAttributeMutations);\n attrObserver.observe(root, {\n attributes: true,\n attributeFilter: [\"rel\", \"disabled\", \"media\"],\n subtree: true,\n });\n observers.push(treeObserver, attrObserver);\n observedRoots.add(root);\n }\n\n function subscribeForShadowRootChanges(node) {\n var shadowRoot = node.shadowRoot;\n if (shadowRoot == null || observedRoots.has(shadowRoot)) {\n return;\n }\n observe(shadowRoot);\n shadowRootDiscovered(shadowRoot);\n }\n\n observe(document);\n iterateShadowHosts(document.documentElement, subscribeForShadowRootChanges);\n watchWhenCustomElementsDefined(function (hosts) {\n var newStyles = [];\n hosts.forEach(function (host) {\n return push(newStyles, getManageableStyles(host.shadowRoot));\n });\n update({ created: newStyles, updated: [], removed: [], moved: [] });\n hosts.forEach(function (host) {\n var shadowRoot = host.shadowRoot;\n if (shadowRoot == null) {\n return;\n }\n subscribeForShadowRootChanges(host);\n iterateShadowHosts(shadowRoot, subscribeForShadowRootChanges);\n collectUndefinedElements(shadowRoot);\n });\n });\n document.addEventListener(\"__darkmoder__isDefined\", handleIsDefined);\n collectUndefinedElements(document);\n }\n\n function resetObservers() {\n observers.forEach(function (o) {\n return o.disconnect();\n });\n observers.splice(0, observers.length);\n observedRoots = new WeakSet();\n }\n\n function stopWatchingForStyleChanges() {\n resetObservers();\n unsubscribeFromDefineCustomElements();\n }\n\n function hexify(number) {\n return (number < 16 ? \"0\" : \"\") + number.toString(16);\n }\n\n function generateUID() {\n return Array.from(crypto.getRandomValues(new Uint8Array(16)))\n .map(function (x) {\n return hexify(x);\n })\n .join(\"\");\n }\n\n var adoptedStyleOverrides = new WeakMap();\n var overrideList = new WeakSet();\n\n function createAdoptedStyleSheetOverride(node) {\n var cancelAsyncOperations = false;\n\n function injectSheet(sheet, override) {\n var newSheets = __spread(node.adoptedStyleSheets);\n var sheetIndex = newSheets.indexOf(sheet);\n var existingIndex = newSheets.indexOf(override);\n if (sheetIndex === existingIndex - 1) {\n return;\n }\n if (existingIndex >= 0) {\n newSheets.splice(existingIndex, 1);\n }\n newSheets.splice(sheetIndex + 1, 0, override);\n node.adoptedStyleSheets = newSheets;\n }\n\n function destroy() {\n cancelAsyncOperations = true;\n var newSheets = __spread(node.adoptedStyleSheets);\n node.adoptedStyleSheets.forEach(function (adoptedStyleSheet) {\n if (overrideList.has(adoptedStyleSheet)) {\n var existingIndex = newSheets.indexOf(adoptedStyleSheet);\n if (existingIndex >= 0) {\n newSheets.splice(existingIndex, 1);\n }\n adoptedStyleOverrides.delete(adoptedStyleSheet);\n overrideList.delete(adoptedStyleSheet);\n }\n });\n node.adoptedStyleSheets = newSheets;\n }\n\n function render(theme, globalVariables, ignoreImageAnalysis) {\n node.adoptedStyleSheets.forEach(function (sheet) {\n if (overrideList.has(sheet)) {\n return;\n }\n var rules = sheet.rules;\n var override = new CSSStyleSheet();\n\n function prepareOverridesSheet() {\n for (var i = override.cssRules.length - 1; i >= 0; i--) {\n override.deleteRule(i);\n }\n injectSheet(sheet, override);\n adoptedStyleOverrides.set(sheet, override);\n overrideList.add(override);\n return override;\n }\n\n var variables = globalVariables;\n getCSSVariables(sheet.cssRules).forEach(function (value, key) {\n return variables.set(key, value);\n });\n var sheetModifier = createStyleSheetModifier();\n sheetModifier.modifySheet({\n prepareSheet: prepareOverridesSheet,\n sourceCSSRules: rules,\n theme: theme,\n variables: variables,\n ignoreImageAnalysis: ignoreImageAnalysis,\n force: false,\n isAsyncCancelled: function () {\n return cancelAsyncOperations;\n },\n });\n });\n }\n\n return {\n render: render,\n destroy: destroy,\n };\n }\n\n function injectProxy() {\n document.dispatchEvent(\n new CustomEvent(\"__darkmoder__inlineScriptsAllowed\")\n );\n var addRuleDescriptor = Object.getOwnPropertyDescriptor(\n CSSStyleSheet.prototype,\n \"addRule\"\n );\n var insertRuleDescriptor = Object.getOwnPropertyDescriptor(\n CSSStyleSheet.prototype,\n \"insertRule\"\n );\n var deleteRuleDescriptor = Object.getOwnPropertyDescriptor(\n CSSStyleSheet.prototype,\n \"deleteRule\"\n );\n var removeRuleDescriptor = Object.getOwnPropertyDescriptor(\n CSSStyleSheet.prototype,\n \"removeRule\"\n );\n var cleanUp = function () {\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"addRule\",\n addRuleDescriptor\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"insertRule\",\n insertRuleDescriptor\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"deleteRule\",\n deleteRuleDescriptor\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"removeRule\",\n removeRuleDescriptor\n );\n document.removeEventListener(\"__darkmoder__cleanUp\", cleanUp);\n document.removeEventListener(\n \"__darkmoder__addUndefinedResolver\",\n function (e) {\n return addUndefinedResolver(e);\n }\n );\n };\n var addUndefinedResolver = function (e) {\n customElements.whenDefined(e.detail.tag).then(function () {\n document.dispatchEvent(\n new CustomEvent(\"__darkmoder__isDefined\", {\n detail: { tag: e.detail.tag },\n })\n );\n });\n };\n document.addEventListener(\"__darkmoder__cleanUp\", cleanUp);\n document.addEventListener(\n \"__darkmoder__addUndefinedResolver\",\n function (e) {\n return addUndefinedResolver(e);\n }\n );\n var updateSheetEvent = new Event(\"__darkmoder__updateSheet\");\n\n function proxyAddRule(selector, style, index) {\n addRuleDescriptor.value.call(this, selector, style, index);\n if (this.ownerNode && !this.ownerNode.classList.contains(\"darkmoder\")) {\n this.ownerNode.dispatchEvent(updateSheetEvent);\n }\n return -1;\n }\n\n function proxyInsertRule(rule, index) {\n var returnValue = insertRuleDescriptor.value.call(this, rule, index);\n if (this.ownerNode && !this.ownerNode.classList.contains(\"darkmoder\")) {\n this.ownerNode.dispatchEvent(updateSheetEvent);\n }\n return returnValue;\n }\n\n function proxyDeleteRule(index) {\n try {\n deleteRuleDescriptor.value.call(this, index);\n } catch (e) {}\n if (this.ownerNode && !this.ownerNode.classList.contains(\"darkmoder\")) {\n this.ownerNode.dispatchEvent(updateSheetEvent);\n }\n }\n\n function proxyRemoveRule(index) {\n removeRuleDescriptor.value.call(this, index);\n if (this.ownerNode && !this.ownerNode.classList.contains(\"darkmoder\")) {\n this.ownerNode.dispatchEvent(updateSheetEvent);\n }\n }\n\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"addRule\",\n Object.assign({}, addRuleDescriptor, { value: proxyAddRule })\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"insertRule\",\n Object.assign({}, insertRuleDescriptor, { value: proxyInsertRule })\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"deleteRule\",\n Object.assign({}, deleteRuleDescriptor, { value: proxyDeleteRule })\n );\n Object.defineProperty(\n CSSStyleSheet.prototype,\n \"removeRule\",\n Object.assign({}, removeRuleDescriptor, { value: proxyRemoveRule })\n );\n }\n\n var variables = new Map();\n var INSTANCE_ID = generateUID();\n var styleManagers = new Map();\n var adoptedStyleManagers = [];\n var filter = null;\n var fixes = null;\n var isIFrame = null;\n\n function createOrUpdateStyle(className, root) {\n if (root === void 0) {\n root = document.head || document;\n }\n var element = root.querySelector(\".\" + className);\n if (!element) {\n element = document.createElement(\"style\");\n element.classList.add(\"darkmoder\");\n element.classList.add(className);\n element.media = \"screen\";\n }\n return element;\n }\n\n function createOrUpdateScript(className, root) {\n if (root === void 0) {\n root = document.head || document;\n }\n var element = root.querySelector(\".\" + className);\n if (!element) {\n element = document.createElement(\"script\");\n element.classList.add(\"darkmoder\");\n element.classList.add(className);\n }\n return element;\n }\n\n var nodePositionWatchers = new Map();\n\n function setupNodePositionWatcher(node, alias) {\n nodePositionWatchers.has(alias) && nodePositionWatchers.get(alias).stop();\n nodePositionWatchers.set(alias, watchForNodePosition(node, \"parent\"));\n }\n\n function stopStylePositionWatchers() {\n forEach(nodePositionWatchers.values(), function (watcher) {\n return watcher.stop();\n });\n nodePositionWatchers.clear();\n }\n\n function createStaticStyleOverrides() {\n var fallbackStyle = createOrUpdateStyle(\"darkmoder--fallback\", document);\n fallbackStyle.textContent = getModifiedFallbackStyle(filter, {\n strict: true,\n });\n document.head.insertBefore(fallbackStyle, document.head.firstChild);\n setupNodePositionWatcher(fallbackStyle, \"fallback\");\n var userAgentStyle = createOrUpdateStyle(\"darkmoder--user-agent\");\n userAgentStyle.textContent = getModifiedUserAgentStyle(\n filter,\n isIFrame,\n filter.styleSystemControls\n );\n document.head.insertBefore(userAgentStyle, fallbackStyle.nextSibling);\n setupNodePositionWatcher(userAgentStyle, \"user-agent\");\n var textStyle = createOrUpdateStyle(\"darkmoder--text\");\n if (filter.useFont || filter.textStroke > 0) {\n textStyle.textContent = createTextStyle(filter);\n } else {\n textStyle.textContent = \"\";\n }\n document.head.insertBefore(textStyle, fallbackStyle.nextSibling);\n setupNodePositionWatcher(textStyle, \"text\");\n var invertStyle = createOrUpdateStyle(\"darkmoder--invert\");\n if (fixes && Array.isArray(fixes.invert) && fixes.invert.length > 0) {\n invertStyle.textContent = [\n fixes.invert.join(\", \") + \" {\",\n \" filter: \" +\n getCSSFilterValue(\n __assign(__assign({}, filter), {\n contrast:\n filter.mode === 0\n ? filter.contrast\n : clamp(filter.contrast - 10, 0, 100),\n })\n ) +\n \" !important;\",\n \"}\",\n ].join(\"\\n\");\n } else {\n invertStyle.textContent = \"\";\n }\n document.head.insertBefore(invertStyle, textStyle.nextSibling);\n setupNodePositionWatcher(invertStyle, \"invert\");\n var inlineStyle = createOrUpdateStyle(\"darkmoder--inline\");\n inlineStyle.textContent = getInlineOverrideStyle();\n document.head.insertBefore(inlineStyle, invertStyle.nextSibling);\n setupNodePositionWatcher(inlineStyle, \"inline\");\n var overrideStyle = createOrUpdateStyle(\"darkmoder--override\");\n overrideStyle.textContent =\n fixes && fixes.css ? replaceCSSTemplates(fixes.css) : \"\";\n document.head.appendChild(overrideStyle);\n setupNodePositionWatcher(overrideStyle, \"override\");\n var variableStyle = createOrUpdateStyle(\"darkmoder--variables\");\n var selectionColors = getSelectionColor(filter);\n var darkSchemeBackgroundColor = filter.darkSchemeBackgroundColor,\n darkSchemeTextColor = filter.darkSchemeTextColor,\n lightSchemeBackgroundColor = filter.lightSchemeBackgroundColor,\n lightSchemeTextColor = filter.lightSchemeTextColor,\n mode = filter.mode;\n var schemeBackgroundColor =\n mode === 0 ? lightSchemeBackgroundColor : darkSchemeBackgroundColor;\n var schemeTextColor =\n mode === 0 ? lightSchemeTextColor : darkSchemeTextColor;\n schemeBackgroundColor = modifyBackgroundColor(\n parse(schemeBackgroundColor),\n filter\n );\n schemeTextColor = modifyForegroundColor(parse(schemeTextColor), filter);\n variableStyle.textContent = [\n \":root {\",\n \" --wp-dark-mode-neutral-background: \" + schemeBackgroundColor + \";\",\n \" --wp-dark-mode-neutral-text: \" + schemeTextColor + \";\",\n \" --wp-dark-mode-selection-background: \" +\n selectionColors.backgroundColorSelection +\n \";\",\n \" --wp-dark-mode-selection-text: \" +\n selectionColors.foregroundColorSelection +\n \";\",\n \"}\",\n ].join(\"\\n\");\n document.head.insertBefore(variableStyle, inlineStyle.nextSibling);\n setupNodePositionWatcher(variableStyle, \"variables\");\n var proxyScript = createOrUpdateScript(\"darkmoder--proxy\");\n proxyScript.textContent = \"(\" + injectProxy + \")()\";\n document.head.insertBefore(proxyScript, variableStyle.nextSibling);\n }\n\n var shadowRootsWithOverrides = new Set();\n\n function createShadowStaticStyleOverrides(root) {\n var inlineStyle = createOrUpdateStyle(\"darkmoder--inline\", root);\n inlineStyle.textContent = getInlineOverrideStyle();\n root.insertBefore(inlineStyle, root.firstChild);\n var overrideStyle = createOrUpdateStyle(\"darkmoder--override\", root);\n overrideStyle.textContent =\n fixes && fixes.css ? replaceCSSTemplates(fixes.css) : \"\";\n root.insertBefore(overrideStyle, inlineStyle.nextSibling);\n shadowRootsWithOverrides.add(root);\n }\n\n function replaceCSSTemplates($cssText) {\n return $cssText.replace(/\\${(.+?)}/g, function (m0, $color) {\n try {\n var color = parseColorWithCache($color);\n return modifyColor(color, filter);\n } catch (err) {\n logWarn(err);\n return $color;\n }\n });\n }\n\n function cleanFallbackStyle() {\n var fallback = document.querySelector(\".darkmoder--fallback\");\n if (fallback) {\n fallback.textContent = \"\";\n }\n }\n\n function getIgnoreImageAnalysisSelectors() {\n return fixes && Array.isArray(fixes.ignoreImageAnalysis)\n ? fixes.ignoreImageAnalysis\n : [];\n }\n\n function createDynamicStyleOverrides() {\n cancelRendering();\n updateVariables(getElementCSSVariables(document.documentElement));\n var allStyles = getManageableStyles(document);\n var newManagers = allStyles\n .filter(function (style) {\n return !styleManagers.has(style);\n })\n .map(function (style) {\n return createManager(style);\n });\n var newVariables = newManagers\n .map(function (manager) {\n return manager.details();\n })\n .filter(function (details) {\n return details && details.variables.size > 0;\n })\n .map(function (_a) {\n var variables = _a.variables;\n return variables;\n });\n if (newVariables.length === 0) {\n styleManagers.forEach(function (manager) {\n return manager.render(\n filter,\n variables,\n getIgnoreImageAnalysisSelectors()\n );\n });\n if (loadingStyles.size === 0) {\n cleanFallbackStyle();\n }\n } else {\n newVariables.forEach(function (variables) {\n return updateVariables(variables);\n });\n throttledRenderAllStyles(function () {\n if (loadingStyles.size === 0) {\n cleanFallbackStyle();\n }\n });\n }\n newManagers.forEach(function (manager) {\n return manager.watch();\n });\n var inlineStyleElements = toArray(\n document.querySelectorAll(INLINE_STYLE_SELECTOR)\n );\n iterateShadowHosts(document.documentElement, function (host) {\n createShadowStaticStyleOverrides(host.shadowRoot);\n var elements = host.shadowRoot.querySelectorAll(INLINE_STYLE_SELECTOR);\n if (elements.length > 0) {\n push(inlineStyleElements, elements);\n }\n });\n var ignoredInlineSelectors =\n fixes && Array.isArray(fixes.ignoreInlineStyle)\n ? fixes.ignoreInlineStyle\n : [];\n inlineStyleElements.forEach(function (el) {\n return overrideInlineStyle(\n el,\n filter,\n getIgnoreImageAnalysisSelectors(),\n ignoredInlineSelectors\n );\n });\n handleAdoptedStyleSheets(document);\n }\n\n var loadingStylesCounter = 0;\n var loadingStyles = new Set();\n\n function createManager(element) {\n var loadingStyleId = ++loadingStylesCounter;\n\n function loadingStart() {\n if (!isDOMReady() || !didDocumentShowUp) {\n loadingStyles.add(loadingStyleId);\n var fallbackStyle = document.querySelector(\".darkmoder--fallback\");\n if (!fallbackStyle.textContent) {\n fallbackStyle.textContent = getModifiedFallbackStyle(filter, {\n strict: false,\n });\n }\n }\n }\n\n function loadingEnd() {\n loadingStyles.delete(loadingStyleId);\n if (loadingStyles.size === 0 && isDOMReady()) {\n cleanFallbackStyle();\n }\n }\n\n function update() {\n var details = manager.details();\n if (!details) {\n return;\n }\n if (details.variables.size === 0) {\n manager.render(filter, variables, getIgnoreImageAnalysisSelectors());\n } else {\n updateVariables(details.variables);\n throttledRenderAllStyles();\n }\n }\n\n var manager = manageStyle(element, {\n update: update,\n loadingStart: loadingStart,\n loadingEnd: loadingEnd,\n });\n styleManagers.set(element, manager);\n return manager;\n }\n\n function updateVariables(newVars) {\n if (newVars.size === 0) {\n return;\n }\n newVars.forEach(function (value, key) {\n variables.set(key, value);\n });\n variables.forEach(function (value, key) {\n variables.set(key, replaceCSSVariables(value, variables));\n });\n }\n\n function removeManager(element) {\n var manager = styleManagers.get(element);\n if (manager) {\n manager.destroy();\n styleManagers.delete(element);\n }\n }\n\n var throttledRenderAllStyles = throttle(function (callback) {\n styleManagers.forEach(function (manager) {\n return manager.render(\n filter,\n variables,\n getIgnoreImageAnalysisSelectors()\n );\n });\n adoptedStyleManagers.forEach(function (manager) {\n return manager.render(\n filter,\n variables,\n getIgnoreImageAnalysisSelectors()\n );\n });\n callback && callback();\n });\n var cancelRendering = function () {\n throttledRenderAllStyles.cancel();\n };\n\n function onDOMReady() {\n if (loadingStyles.size === 0) {\n cleanFallbackStyle();\n }\n }\n\n var documentVisibilityListener = null;\n var didDocumentShowUp = !document.hidden;\n\n function watchForDocumentVisibility(callback) {\n var alreadyWatching = Boolean(documentVisibilityListener);\n documentVisibilityListener = function () {\n if (!document.hidden) {\n stopWatchingForDocumentVisibility();\n callback();\n didDocumentShowUp = true;\n }\n };\n if (!alreadyWatching) {\n document.addEventListener(\"visibilitychange\", documentVisibilityListener);\n }\n }\n\n function stopWatchingForDocumentVisibility() {\n document.removeEventListener(\n \"visibilitychange\",\n documentVisibilityListener\n );\n documentVisibilityListener = null;\n }\n\n function createThemeAndWatchForUpdates() {\n createStaticStyleOverrides();\n\n function runDynamicStyle() {\n createDynamicStyleOverrides();\n watchForUpdates();\n }\n\n if (document.hidden) {\n watchForDocumentVisibility(runDynamicStyle);\n } else {\n runDynamicStyle();\n }\n changeMetaThemeColorWhenAvailable(filter);\n }\n\n function handleAdoptedStyleSheets(node) {\n if (Array.isArray(node.adoptedStyleSheets)) {\n if (node.adoptedStyleSheets.length > 0) {\n var newManger = createAdoptedStyleSheetOverride(node);\n adoptedStyleManagers.push(newManger);\n newManger.render(filter, variables, getIgnoreImageAnalysisSelectors());\n }\n }\n }\n\n function watchForUpdates() {\n var managedStyles = Array.from(styleManagers.keys());\n watchForStyleChanges(\n managedStyles,\n function (_a) {\n var created = _a.created,\n updated = _a.updated,\n removed = _a.removed,\n moved = _a.moved;\n var stylesToRemove = removed;\n var stylesToManage = created\n .concat(updated)\n .concat(moved)\n .filter(function (style) {\n return !styleManagers.has(style);\n });\n var stylesToRestore = moved.filter(function (style) {\n return styleManagers.has(style);\n });\n stylesToRemove.forEach(function (style) {\n return removeManager(style);\n });\n var newManagers = stylesToManage.map(function (style) {\n return createManager(style);\n });\n var newVariables = newManagers\n .map(function (manager) {\n return manager.details();\n })\n .filter(function (details) {\n return details && details.variables.size > 0;\n })\n .map(function (_a) {\n var variables = _a.variables;\n return variables;\n });\n if (newVariables.length === 0) {\n newManagers.forEach(function (manager) {\n return manager.render(\n filter,\n variables,\n getIgnoreImageAnalysisSelectors()\n );\n });\n } else {\n newVariables.forEach(function (variables) {\n return updateVariables(variables);\n });\n throttledRenderAllStyles();\n }\n newManagers.forEach(function (manager) {\n return manager.watch();\n });\n stylesToRestore.forEach(function (style) {\n return styleManagers.get(style).restore();\n });\n },\n function (shadowRoot) {\n createShadowStaticStyleOverrides(shadowRoot);\n handleAdoptedStyleSheets(shadowRoot);\n }\n );\n var ignoredInlineSelectors =\n fixes && Array.isArray(fixes.ignoreInlineStyle)\n ? fixes.ignoreInlineStyle\n : [];\n watchForInlineStyles(\n function (element) {\n overrideInlineStyle(\n element,\n filter,\n ignoredInlineSelectors,\n getIgnoreImageAnalysisSelectors()\n );\n if (element === document.documentElement) {\n var rootVariables = getElementCSSVariables(document.documentElement);\n if (rootVariables.size > 0) {\n updateVariables(rootVariables);\n throttledRenderAllStyles();\n }\n }\n },\n function (root) {\n createShadowStaticStyleOverrides(root);\n var inlineStyleElements = root.querySelectorAll(INLINE_STYLE_SELECTOR);\n if (inlineStyleElements.length > 0) {\n forEach(inlineStyleElements, function (el) {\n return overrideInlineStyle(\n el,\n filter,\n getIgnoreImageAnalysisSelectors(),\n ignoredInlineSelectors\n );\n });\n }\n }\n );\n addDOMReadyListener(onDOMReady);\n }\n\n function stopWatchingForUpdates() {\n styleManagers.forEach(function (manager) {\n return manager.pause();\n });\n stopStylePositionWatchers();\n stopWatchingForStyleChanges();\n stopWatchingForInlineStyles();\n removeDOMReadyListener(onDOMReady);\n }\n\n function createDarkModeInstanceMarker() {\n var metaElement = document.createElement(\"meta\");\n metaElement.name = \"darkmoder\";\n metaElement.content = INSTANCE_ID;\n document.head.appendChild(metaElement);\n }\n\n function isAnotherDarkModeInstanceActive() {\n var meta = document.querySelector('meta[name=\"darkmoder\"]');\n if (meta) {\n if (meta.content !== INSTANCE_ID) {\n return true;\n }\n return false;\n } else {\n createDarkModeInstanceMarker();\n return false;\n }\n }\n\n function createOrUpdateDynamicTheme(filterConfig, dynamicThemeFixes, iframe) {\n filter = filterConfig;\n fixes = dynamicThemeFixes;\n isIFrame = iframe;\n if (document.head) {\n if (isAnotherDarkModeInstanceActive()) {\n return;\n }\n createThemeAndWatchForUpdates();\n } else {\n if (!isFirefox) {\n var fallbackStyle = createOrUpdateStyle(\"darkmoder--fallback\");\n document.documentElement.appendChild(fallbackStyle);\n fallbackStyle.textContent = getModifiedFallbackStyle(filter, {\n strict: true,\n });\n }\n var headObserver_1 = new MutationObserver(function () {\n if (document.head) {\n headObserver_1.disconnect();\n if (isAnotherDarkModeInstanceActive()) {\n removeDynamicTheme();\n return;\n }\n createThemeAndWatchForUpdates();\n }\n });\n headObserver_1.observe(document, { childList: true, subtree: true });\n }\n }\n\n function removeProxy() {\n document.dispatchEvent(new CustomEvent(\"__darkmoder__cleanUp\"));\n removeNode(document.head.querySelector(\".darkmoder--proxy\"));\n }\n\n function removeDynamicTheme() {\n cleanDynamicThemeCache();\n removeNode(document.querySelector(\".darkmoder--fallback\"));\n if (document.head) {\n restoreMetaThemeColor();\n removeNode(document.head.querySelector(\".darkmoder--user-agent\"));\n removeNode(document.head.querySelector(\".darkmoder--text\"));\n removeNode(document.head.querySelector(\".darkmoder--invert\"));\n removeNode(document.head.querySelector(\".darkmoder--inline\"));\n removeNode(document.head.querySelector(\".darkmoder--override\"));\n removeNode(document.head.querySelector('meta[name=\"darkmoder\"]'));\n removeProxy();\n }\n shadowRootsWithOverrides.forEach(function (root) {\n removeNode(root.querySelector(\".darkmoder--inline\"));\n removeNode(root.querySelector(\".darkmoder--override\"));\n });\n shadowRootsWithOverrides.clear();\n forEach(styleManagers.keys(), function (el) {\n return removeManager(el);\n });\n forEach(document.querySelectorAll(\".darkmoder\"), removeNode);\n adoptedStyleManagers.forEach(function (manager) {\n manager.destroy();\n });\n adoptedStyleManagers.splice(0);\n }\n\n function cleanDynamicThemeCache() {\n stopWatchingForDocumentVisibility();\n cancelRendering();\n stopWatchingForUpdates();\n cleanModificationCache();\n }\n\n var blobRegex = /url\\(\\\"(blob\\:.*?)\\\"\\)/g;\n\n function replaceBlobs(text) {\n return __awaiter(this, void 0, void 0, function () {\n var promises, data;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n promises = [];\n getMatches(blobRegex, text, 1).forEach(function (url) {\n var promise = loadAsDataURL(url);\n promises.push(promise);\n });\n return [4, Promise.all(promises)];\n case 1:\n data = _a.sent();\n return [\n 2,\n text.replace(blobRegex, function () {\n return 'url(\"' + data.shift() + '\")';\n }),\n ];\n }\n });\n });\n }\n\n var banner =\n '/*\\n _______\\n / \\\\\\n .==. .==.\\n (( ))==(( ))\\n / \"==\" \"==\"\\\\\\n /____|| || ||___\\\\\\n ________ ____ ________ ___ ___\\n | ___ \\\\ / \\\\ | ___ \\\\ | | / /\\n | | \\\\ \\\\ / /\\\\ \\\\ | | \\\\ \\\\| |_/ /\\n | | ) / /__\\\\ \\\\ | |__/ /| ___ \\\\\\n | |__/ / ______ \\\\| ____ \\\\| | \\\\ \\\\\\n_______|_______/__/ ____ \\\\__\\\\__|___\\\\__\\\\__|___\\\\__\\\\____\\n| ___ \\\\ | ____/ / \\\\ | ___ \\\\ | ____| ___ \\\\\\n| | \\\\ \\\\| |___ / /\\\\ \\\\ | | \\\\ \\\\| |___| | \\\\ \\\\\\n| |__/ /| ____/ /__\\\\ \\\\ | | ) | ____| |__/ /\\n| ____ \\\\| |__/ ______ \\\\| |__/ /| |___| ____ \\\\\\n|__| \\\\__\\\\____/__/ \\\\__\\\\_______/ |______|__| \\\\__\\\\\\n https://darkmoder.org\\n*/';\n\n function collectCSS() {\n return __awaiter(this, void 0, void 0, function () {\n function addStaticCSS(selector, comment) {\n var staticStyle = document.querySelector(selector);\n if (staticStyle && staticStyle.textContent) {\n css.push(\"/* \" + comment + \" */\");\n css.push(staticStyle.textContent);\n css.push(\"\");\n }\n }\n\n var css, modifiedCSS, formattedCSS, _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n css = [banner];\n addStaticCSS(\".darkmoder--fallback\", \"Fallback Style\");\n addStaticCSS(\".darkmoder--user-agent\", \"User-Agent Style\");\n addStaticCSS(\".darkmoder--text\", \"Text Style\");\n addStaticCSS(\".darkmoder--invert\", \"Invert Style\");\n addStaticCSS(\".darkmoder--variables\", \"Variables Style\");\n modifiedCSS = [];\n document\n .querySelectorAll(\".darkmoder--sync\")\n .forEach(function (element) {\n forEach(element.sheet.cssRules, function (rule) {\n rule && rule.cssText && modifiedCSS.push(rule.cssText);\n });\n });\n if (!(modifiedCSS.length != 0)) return [3, 2];\n formattedCSS = formatCSS(modifiedCSS.join(\"\\n\"));\n css.push(\"/* Modified CSS */\");\n _b = (_a = css).push;\n return [4, replaceBlobs(formattedCSS)];\n case 1:\n _b.apply(_a, [_c.sent()]);\n css.push(\"\");\n _c.label = 2;\n case 2:\n addStaticCSS(\".darkmoder--override\", \"Override Style\");\n return [2, css.join(\"\\n\")];\n }\n });\n });\n }\n\n var isIFrame$1 = (function () {\n try {\n return window.self !== window.top;\n } catch (err) {\n console.warn(err);\n return true;\n }\n })();\n\n function enable(themeOptions, fixes) {\n if (themeOptions === void 0) {\n themeOptions = {};\n }\n if (fixes === void 0) {\n fixes = null;\n }\n var theme = __assign(__assign({}, DEFAULT_THEME), themeOptions);\n if (theme.engine !== ThemeEngines.dynamicTheme) {\n throw new Error(\"Theme engine is not supported.\");\n }\n createOrUpdateDynamicTheme(theme, fixes, isIFrame$1);\n\n exports.enabled = true;\n }\n\n function disable() {\n removeDynamicTheme();\n\n exports.enabled = false;\n }\n\n var darkScheme = matchMedia(\"(prefers-color-scheme: dark)\");\n var store = {\n themeOptions: null,\n fixes: null,\n };\n\n function handleColorScheme() {\n if (darkScheme.matches) {\n enable(store.themeOptions, store.fixes);\n } else {\n disable();\n }\n }\n\n function auto(themeOptions, fixes) {\n if (themeOptions === void 0) {\n themeOptions = {};\n }\n if (fixes === void 0) {\n fixes = null;\n }\n if (themeOptions) {\n store = { themeOptions: themeOptions, fixes: fixes };\n handleColorScheme();\n darkScheme.addEventListener(\"change\", handleColorScheme);\n } else {\n darkScheme.removeEventListener(\"change\", handleColorScheme);\n disable();\n }\n }\n\n function exportGeneratedCSS() {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, collectCSS()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n }\n\n var setFetchMethod$1 = setFetchMethod;\n\n exports.auto = auto;\n exports.disable = disable;\n exports.enable = enable;\n exports.exportGeneratedCSS = exportGeneratedCSS;\n exports.setFetchMethod = setFetchMethod$1;\n\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});","import Base from './Base';\nimport WPDarkMode from \"./WPDarkMode\";\nimport './DarkModeAuto'\n\nclass Color extends Base {\n\n // Fires when the DOM is ready\n ready() {\n // console.log('Color Ready');\n this.always();\n\n // When automatic mode is enabled\n if ( this.isAutoColor ) {\n const html = document.querySelector('html');\n\n html?.setAttribute('data-wp-dark-mode-loading', true);\n this.applyAutoDark();\n html?.removeAttribute('data-wp-dark-mode-loading');\n } else {\n // Colors need to be fixed when Automatic Mode is disabled\n this.applyPreset();\n }\n }\n\n /**\n * Do always\n */\n always() {\n // Removed loading attribute from html tag\n const html = document.querySelector('html');\n\n html?.removeAttribute('data-wp-dark-mode-loading');\n\n this.handleIncludes();\n this.HandleExcludes();\n }\n\n /**\n * When Automatic Mode is enabled\n *\n * @return {void}\n */\n async applyAutoDark(){\n const FiltersConfig = {\n brightness: wp_dark_mode_json.options.color_filter_brightness || 100,\n contrast: wp_dark_mode_json.options.color_filter_contrast || 90,\n sepia: wp_dark_mode_json.options.color_filter_sepia || 10,\n grayscale: wp_dark_mode_json.options.color_filter_grayscale || 0,\n }\n\n if ( WPDarkMode.isActive ) {\n DarkModeAuto.enable(FiltersConfig, {\n ignoreInlineStyle: '.wp-dark-mode-ignore'\n });\n }\n\n WPDarkMode.onChange(() => {\n // console.log('Dark Mode Changed');\n if ( WPDarkMode.isActive ) {\n DarkModeAuto.enable(FiltersConfig, {\n ignoreInlineStyle: '.wp-dark-mode-ignore'\n });\n } else {\n DarkModeAuto.disable();\n }\n })\n }\n\n\n\n // Get preset id\n get presetId() {\n const target = typeof wp_dark_mode_admin_json !== 'undefined' ? wp_dark_mode_admin_json : wp_dark_mode_json;\n return target?.options?.color_preset_id || false;\n }\n\n /**\n * Is Automatic Color.\n *\n * @return {boolean}\n */\n get isAutoColor() {\n return Number(this.presetId) === 0;\n }\n\n \n /**\n * Apply colors to the elements\n * \n * @param {boolean} isDark \n * @returns \n */\n initHandlers() {\n }\n\n /**\n * Fix colors\n *\n */\n applyPreset(){\n const all = document.querySelectorAll(`body *:not(.wp-dark-mode-ignore), body *:not(.wp-dark-mode-ignore *)`);\n // window.Log('all', all)\n\n if ( ! all || ! all.length) return;\n\n all.forEach(element => {\n\n // Add class .wp-dark-mode-background\n element.classList.add('wp-dark-mode-transparent');\n\n // Is excludable.\n if ( this.shouldIgnore(element) ) {\n\n const backgroundColor = window.getComputedStyle(element).backgroundColor || 'rgba(0, 0, 0, 0)';\n\n // Log('Background Color', backgroundColor) \n\n if ( ! this.isTransparent( backgroundColor ) ) {\n element.classList.add('wp-dark-mode-ignore');\n }\n\n // Log('Should Ignore', element, backgroundColor)\n element.classList.add('wp-dark-mode-transparent');\n\n } else {\n element.classList.remove('wp-dark-mode-transparent');\n }\n })\n }\n\n\t/**\n\t * Handle excludes\n\t */\n\tHandleExcludes() {\n const excludes = (\n wp_dark_mode_json.options.excludes_elements ? wp_dark_mode_json.options.excludes_elements + ',.wp-dark-mode-ignore' : '.wp-dark-mode-ignore'\n ) + ( wp_dark_mode_json.excluded_elements ? ', ' + wp_dark_mode_json.excluded_elements : '' );\n\t\tconst ignorableElements = document.querySelectorAll( excludes );\n\n\t\tif ( ! ignorableElements || ! ignorableElements.length) return;\n\n\t\tignorableElements.forEach(element => {\n\t\t\tconst ignoreRecursively = el => {\n\n\t\t\t\t// Bail, if element is not valid.\n\t\t\t\tif ( ! el ) return;\n\n\t\t\t\t// If el not intance of html.\n\t\t\t\tif ( ! (el instanceof HTMLElement) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n // If element has class .wp-dark-mode-include, return;\n if ( el.classList.contains('wp-dark-mode-include') ) return;\n\n\t\t\t\t// Add class.\n\t\t\t\tel.classList.add('wp-dark-mode-ignore');\n\n\t\t\t\t// if has background color, make it important.\n\t\t\t\tconst { color, borderColor } = window.getComputedStyle(el) || {};\n\n\t\t\t\t// Log('backgroundColor', backgroundColor, color, borderColor);\n\t\t\t\t\n\t\t\t\t// If has color, border color, make it important.\n\t\t\t\tif ( color !== 'rgba(0, 0, 0, 0)' ) {\n\t\t\t\t\tel.style.color = `${color} !important`;\n\t\t\t\t}\n\n\t\t\t\t// If has border color, make it important.\n\t\t\t\tif ( borderColor !== 'rgba(0, 0, 0, 0)' ) {\n\t\t\t\t\tel.style.borderColor = `${borderColor} !important`;\n\t\t\t\t}\n\n\t\t\t\t// if has children, apply recursively.\n\t\t\t\tif ( el.childNodes && el.childNodes.length ) {\n\t\t\t\t\tel.childNodes.forEach(child => {\n\t\t\t\t\t\tignoreRecursively(child);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tignoreRecursively(element);\n\t\t});\n\n\t\treturn this;\n\t}\n\n /**\n * Handle includes\n */\n handleIncludes(){\n const includedElements = document.querySelectorAll( wp_dark_mode_json.options.excludes_elements_includes || '.wp_dark_mode_include' );\n\n\t\tif ( ! includedElements || ! includedElements.length) return;\n\n includedElements.forEach(element => {\n // Add class .wp-dark-mode-include recursively\n const includeRecursively = el => {\n\n // Bail, if element is not valid.\n if ( ! el ) return;\n\n // If el not intance of html.\n if ( ! (el instanceof HTMLElement) ) {\n return;\n }\n\n // Add class.\n el.classList.add('wp-dark-mode-include');\n // Remove class.\n el.classList.remove('wp-dark-mode-ignore');\n\n // if has children, apply recursively.\n if ( el.childNodes && el.childNodes.length ) {\n el.childNodes.forEach(child => {\n includeRecursively(child);\n });\n }\n }\n\n includeRecursively(element);\n });\n }\n\n\n /**\n * isRGB\n *\n * @param {string} color\n * @return {boolean}\n */\n isRGB = color => {\n return color.indexOf('rgb') !== -1;\n }\n\n /**\n * Hex to RGB\n *\n * @param {string} colorString\n * @param {number} alpha\n * @return {string}\n */\n hexToRGB = (colorString, alpha = 1) => {\n\n if ( this.isRGB (colorString) ) return colorString\n\n // Create a temporary div element to apply the color as a style\n const tempDiv = document.createElement(\"div\");\n tempDiv.style.color = colorString;\n\n // Get the computed RGBA value\n const computedColor = window.getComputedStyle(tempDiv).color;\n\n // Parse the RGBA values\n const rgbaValues = computedColor.match(/(\\d+), (\\d+), (\\d+), (\\d+(\\.\\d+)?)\\)/);\n\n if (rgbaValues && rgbaValues.length === 6) {\n const red = parseInt(rgbaValues[1]);\n const green = parseInt(rgbaValues[2]);\n const blue = parseInt(rgbaValues[3]);\n const opacity = alpha !== undefined ? alpha : parseFloat(rgbaValues[4]);\n\n return `rgba(${red}, ${green}, ${blue}, ${opacity})`;\n } else {\n // console.error(`Invalid color string: ${colorString}`);\n return null;\n }\n }\n\n\n /**\n * Get White Percentage\n *\n * @param {string} color\n * @return {boolean}\n */\n luminance = color => {\n // Convert hex to RGB if the color is hex\n if (!this.isRGB(color)) {\n color = this.hexToRgb(color);\n }\n\n // Remove spaces from the color\n color = color.replace(/ /g, '');\n\n // Split the color into array\n color = color.split(',');\n const r = color[0];\n const g = color[1];\n const b = color[2];\n\n // Calculate the luminance\n return (0.299 * r + 0.587 * g + 0.114 * b);\n }\n\n /**\n * Is Dark Color\n * \n *\n * @param {string} color\n * @return {boolean}\n */\n isDarkColor = color => {\n // Log('luminance', this.luminance(color))\n return this.luminance(color) < 190;\n }\n\n /**\n * Get White Percentage\n *\n * @param {string} color\n * @return {number}\n */\n getWhitePercentage = color => {\n // Convert hex to RGB if the color is hex\n if (!this.isRGB(color)) {\n color = this.hexToRgb(color);\n }\n\n // Remove spaces from the color\n color = color.replace(/ /g, '');\n\n // Split the color into array\n color = color.split(',');\n const r = color[0];\n const g = color[1];\n const b = color[2];\n\n // Calculate the white percentage\n return Math.round(((255 - r) + (255 - g) + (255 - b)) / 7.65);\n }\n\n /**\n * Is Transparent\n *\n * @param {string} color\n * @return {boolean}\n */\n isTransparent = color => {\n\n // Bail, if color not set\n if (!color) return true\n\n let rgb = this.hexToRGB(color)\n\n if (!rgb) return true\n\n // Bail, if color is transparent\n if (rgb == 'rgba(0, 0, 0, 0)') return true;\n\n if (rgb == 'rgb(0, 0, 0)') return true;\n\n if (rgb == 'none') return true;\n\n // Remove spaces from the color\n rgb = rgb.replace(/ /g, '');\n\n // Split the color into array\n rgb = rgb.split(',');\n\n // Get the alpha value\n const alpha = parseFloat(rgb[3]);\n\n // Return true if the alpha value is 0\n if (alpha == 0) return true;\n \n\n return false\n }\n\n /**\n * Should Ignore.\n *\n * @param element \n * @return bool\n */\n shouldIgnore = element => {\n // Return true is element is null\n if (!element) return true;\n\n const backgroundColor = window.getComputedStyle(element).backgroundColor || 'rgba(0, 0, 0, 0)';\n\n // Return true if the element has class wp-dark-mode-ignore\n if (element.classList.contains('wp-dark-mode-ignore')) return true;\n\n // Return true if the element has class wp-dark-mode-switch\n if (element.classList.contains('wp-dark-mode-switch')) return true;\n\n // Return true if the element has class wp-dark-mode-background\n if (element.classList.contains('wp-dark-mode-background')) return true;\n\n // Return true if the background color is transparent\n if (this.isTransparent(backgroundColor)) {\n element.classList.add('wp-dark-mode-transparent');\n return true;\n }\n\n // Has background image.\n if (window.getComputedStyle(element).backgroundImage !== 'none') return true;\n\n // Is color darkish, return true.\n if (this.isDarkColor(backgroundColor)) return true;\n\n return false;\n }\n\n}\n\nexport default new Color();","import Base from './Base.js';\n\nclass Images extends Base {\n\t/**\n\t * Init\n\t */\n\tready() {\n\t\tthis.initImages();\n\t}\n\t/**\n\t * Replace images\n\t */\n\tinitImages() {\n\t\t// Set global CSS img opacity inherit\n\t\tdocument.body.style.setProperty('--wp-dark-mode-img-opacity', 1);\n\n\t\tthis.replaceImages();\n\t\tthis.replaceBackgroundImages();\n\t\tthis.excludeFilterImages();\n\n\t\tWPDarkMode.onChange(() => {\n\t\t\tthis.replaceImages();\n\t\t\tthis.replaceBackgroundImages();\n\t\t\tthis.excludeFilterImages();\n\t\t});\n\t}\n\n\treplaceImages() {\n\t\tconst images = document.querySelectorAll('img');\n\t\tif (!images || !images.length) return;\n\n\t\t// Replace images.\n\t\timages.forEach((image) => {\n\t\t\t// Bail, if image src is not set.\n\t\t\tif (!image.src) return;\n\n\t\t\tlet currentSrc = image.dataset.lightSrc || image.src;\n\n\t\t\tif (WPDarkMode.isActive) {\n\t\t\t\tconst darkSrc = this.getDarkSrc(currentSrc);\n\t\t\t\tif (darkSrc) {\n\t\t\t\t\timage.dataset.lightSrc = currentSrc;\n\t\t\t\t\timage.dataset.darkSrc = darkSrc;\n\t\t\t\t\timage.src = darkSrc;\n\t\t\t\t\timage.srcset = darkSrc;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lightSrc = image.dataset.lightSrc;\n\t\t\t\tif (lightSrc) {\n\t\t\t\t\timage.src = lightSrc;\n\t\t\t\t\timage.srcset = lightSrc;\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}\n\n\t// Background images\n\treplaceBackgroundImages() {\n\t\t// element having background image.\n\t\tvar elementsWithBackground = document.querySelectorAll('*');\n\n\t\t// Iterate through the selected elements\n\t\telementsWithBackground.forEach((element) => {\n\t\t\t// Check if the element has a background image\n\t\t\tvar backgroundImage = window.getComputedStyle(element).getPropertyValue('background-image');\n\t\t\t\n\t\t\tif (backgroundImage !== 'none') {\n\n\t\t\t\tbackgroundImage = backgroundImage.replace(/url\\((['\"])?(.*?)\\1\\)/gi, '$2').split(',')[0];\n\t\t\t\t// console.log(\"Found backgroundImage\", element);\n\n\t\t\t\t// Add wp-dark-mode-ignore class.\n\t\t\t\telement.classList.add('wp-dark-mode-ignore');\n\n\t\t\t\t// Log('backgroundImage', backgroundImage)\n\t\t\t\t// change the background image to dark mode if dark mode is enabled\n\t\t\t\tif (WPDarkMode.isActive) {\n\t\t\t\t\tconst darkSrc = this.getDarkSrc(backgroundImage);\n\n\t\t\t\t\t// console.log('darkSrc', darkSrc);\n\n\t\t\t\t\tif (darkSrc) {\n\t\t\t\t\t\telement.style.background = `url(${darkSrc})`;\n\t\t\t\t\t\telement.style.backgroundImage = `url(${darkSrc})`;\n\n\t\t\t\t\t\t// Set light src.\n\t\t\t\t\t\telement.dataset.lightSrc = backgroundImage;\n\t\t\t\t\t\telement.dataset.darkSrc = darkSrc;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// change the background image to light mode if dark mode is disabled\n\t\t\t\t\tconst lightSrc = element.dataset.lightSrc;\n\t\t\t\t\tif (lightSrc) {\n\t\t\t\t\t\telement.style.background = `url(${lightSrc})`;\n\t\t\t\t\t\telement.style.backgroundImage = `url(${lightSrc})`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Get dark src\n\t * \n\t * @param {string} src \n\t * @returns \n\t */\n\tgetDarkSrc(src) {\n\t\t// Bail, if src is not set.\n\t\tif (!src) return;\n\n\t\tconst replaceable_images = wp_dark_mode_json.options.image_replaces || false;\n\t\tif (!replaceable_images) return false\n\n\t\tconst imagePair = replaceable_images.find((img) => {\n\t\t\t// remove query string from image src\n\t\t\tconst srcWithoutQuery = src.split('?')[0];\n\n\t\t\treturn img.light === srcWithoutQuery\n\t\t});\n\n\t\tif (!imagePair) return false\n\n\t\treturn imagePair.dark;\n\t}\n\n\t/**\n\t * Exclude low brightness images\n\t */\n\texcludeFilterImages() {\n\t\tconst lowBrightnessExcludes = wp_dark_mode_json.options.image_enabled_low_brightness ? wp_dark_mode_json.options.image_low_brightness_excludes : false;\n\t\tconst lowGrayscaleExcludes = wp_dark_mode_json.options.image_enabled_low_grayscale ? wp_dark_mode_json.options.image_low_grayscale_excludes : false\n\n\t\tconst images = document.querySelectorAll('img');\n\n\t\tif( images && images.length ) {\n\t\t\timages.forEach((image) => {\n\t\t\t\tconst src = image.src;\n\t\n\t\t\t\tif( lowBrightnessExcludes && lowBrightnessExcludes.includes(src) ) {\n\t\t\t\t\t// Set filter to 0.\n\t\t\t\t\timage.style.setProperty('--wp-dark-mode-img-brightness', '100%');\n\t\t\t\t}\n\t\n\t\t\t\tif( lowGrayscaleExcludes && lowGrayscaleExcludes.includes(src) ) {\n\t\t\t\t\t// Set filter to 0.\n\t\t\t\t\timage.style.setProperty('--wp-dark-mode-img-grayscale', '0%');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t}\n\n}\n\nexport default new Images();","import Base from './Base';\n\nclass Videos extends Base {\n\t/**\n\t * Init\n\t */\n\tready() {\n\t\tthis.initVideos();\n\t}\n\n\t// Detect video host\n\tgetVideoHost = url => {\n\t\t// Regular expression for YouTube URLs\n\t\tconst youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com\\/(watch\\?v=|embed\\/)|youtu\\.be\\/)[\\w-]+/;\n\t\t// Regular expression for Vimeo URLs\n\t\tconst vimeoRegex = /^(https?:\\/\\/)?(www\\.)?(player\\.)?vimeo\\.com\\/(video\\/)?\\d+/;\n\t\t// Regular expression for common video file extensions\n\t\tconst videoFileRegex = /\\.(mp4|avi|mov|flv|wmv|webm|m4v|mkv|mpg|mpeg|vob|asf|divx|ogv|3gp)$/i;\n\n\n\t\tif (youtubeRegex.test(url)) {\n\t\t\treturn 'youtube';\n\t\t} else if (vimeoRegex.test(url)) {\n\t\t\treturn 'vimeo';\n\t\t} else if (videoFileRegex.test(url)) {\n\t\t\treturn 'file';\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t * Get YouTube video ID\n\t*/\n\tgetYouTubeVideoID = url => {\n\t\t// Regular expression for extracting the YouTube video ID\n\t\tconst regex = /(?:youtube\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/\\s]{11})/i;\n\n\t\tconst match = url.match(regex);\n\t\treturn match ? match[1] : null;\n\t}\n\n\t// Get Vimeo video ID\n\tgetVimeoVideoID = url => {\n\t\t// Regular expression for extracting the Vimeo video ID\n\t\tconst regex = /(?:vimeo\\.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/[^\\/]+\\/videos\\/|album\\/\\d+\\/video\\/|video\\/|)(\\d+)|vimeo\\.com\\/(?:\\w*\\/)?(\\d+))/i;\n\n\t\tconst match = url.match(regex);\n\t\treturn match ? match[1] || match[2] : null;\n\t}\n\n\t/**\n\t * Replace videos\n\t */\n\tinitVideos() {\n\t\t// Bail, if no videos are replaceable.\n\t\tif (!wp_dark_mode_json.options.video_replaces) return false\n\n\t\t// Manipulate wp_dark_mode_json.options.video_replaces\n\t\twp_dark_mode_json.options.video_replaces = wp_dark_mode_json.options.video_replaces.map((vid) => {\n\n\t\t\t['light', 'dark'].forEach((mode) => {\n\t\t\t\t// Get video host.\n\t\t\t\tconst host = this.getVideoHost(vid[mode]);\n\n\t\t\t\t// If YouTube, get video ID and construct dark mode video src correctly.\n\t\t\t\tif ('youtube' === host) {\n\t\t\t\t\tconst videoID = this.getYouTubeVideoID(vid[mode]);\n\t\t\t\t\tif (!videoID) return;\n\n\t\t\t\t\tvid[mode] = `https://www.youtube.com/embed/${videoID}`;\n\t\t\t\t}\n\n\t\t\t\t// If Vimeo, get video ID and construct dark mode video src correctly.\n\t\t\t\tif ('vimeo' === host) {\n\t\t\t\t\tconst videoID = this.getVimeoVideoID(vid[mode]);\n\t\t\t\t\tif (!videoID) return;\n\n\t\t\t\t\tvid[mode] = `https://player.vimeo.com/video/${videoID}`;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn vid;\n\t\t});\n\n\t\t// Set global CSS vid opacity inherit\n\t\tdocument.body.style.setProperty('--wp-dark-mode-vid-opacity', 1);\n\n\t\t// Get all embedded video files.\n\t\tthis.replaceVideos();\n\t\tthis.adjustEmbeds();\n\t\tthis.setVideoFilters();\n\n\t\t// Replace external hosted videos.\n\t\t// this.\n\n\n\t\tWPDarkMode.onChange(() => {\n\t\t\tthis.replaceVideos();\n\t\t\tthis.setVideoFilters();\n\t\t});\n\t}\n\n\t/**\n\t * Replaces Direct Videos from URL\n\t */\n\treplaceVideos() {\n\t\tconst videos = document.querySelectorAll('video, iframe, video source');\n\n\t\t// Bail, if videos are not set.\n\t\tif (!videos || !videos.length) return;\n\n\t\t// Replace videos.\n\t\tvideos.forEach((video) => {\n\t\t\t// Bail, if video src is not set.\n\t\t\tif (!video.src) return;\n\n\t\t\tlet currentSrc = video.dataset.lightSrc || video.src;\n\n\n\t\t\t// Add wp-dark-mode-ignore class.\n\t\t\tvideo.classList.add('wp-dark-mode-ignore');\n\n\t\t\tif (WPDarkMode.isActive) {\n\t\t\t\tconst darkSrc = this.getDarkSrc(currentSrc);\n\t\t\t\tif (darkSrc) {\n\t\t\t\t\tvideo.dataset.lightSrc = currentSrc;\n\t\t\t\t\tvideo.dataset.darkSrc = darkSrc;\n\t\t\t\t\tvideo.src = darkSrc;\n\t\t\t\t\tvideo.srcset = darkSrc;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lightSrc = video.dataset.lightSrc;\n\t\t\t\tif (lightSrc) {\n\t\t\t\t\tvideo.src = lightSrc;\n\t\t\t\t\tvideo.srcset = lightSrc;\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}\n\n\t/**\n\t * Get dark src\n\t * \n\t * @param {string} src \n\t * @returns \n\t */\n\tgetDarkSrc(src = null) {\n\t\t// Bail, if src is not set.\n\t\tif (!src) return;\n\n\t\tconst replaceable_videos = wp_dark_mode_json.options.video_replaces || false;\n\t\tif (!replaceable_videos) return false\n\n\t\tconst videoPair = replaceable_videos.find((vid) => {\n\t\t\t// remove query string from video src\n\t\t\tconst srcWithoutQuery = src.split('?')[0];\n\n\t\t\treturn vid.light === srcWithoutQuery\n\t\t});\n\n\t\tif (!videoPair) return false\n\n\t\treturn videoPair.dark;\n\t}\n\n\t/**\n\t * Adjust embeds\n\t * \n\t */\n\tadjustEmbeds(){\n\t\t// detect all the embeds iframe videos from YouTube and Vimeo\n\t\tconst embeds = document.querySelectorAll('iframe');\n\n\t\t// Bail, if embeds are not set.\n\t\tif (!embeds || !embeds.length) return;\n\n\t\t// Filter embeds.\n\t\tconst embeddedVideos = Array.from(embeds).filter((embed) => {\n\t\t\t// Bail, if embed src is not set.\n\t\t\tif (!embed.src) return false;\n\n\t\t\t// Get video host.\n\t\t\tconst host = this.getVideoHost(embed.src);\n\n\t\t\t// If YouTube or Vimeo, return embed.\n\t\t\tif ('youtube' === host || 'vimeo' === host || 'file' === host) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t});\n\n\t\t// Bail, if no embeds are found.\n\t\tif (!embeddedVideos || !embeddedVideos.length) return;\n\n\t\tembeddedVideos.forEach((embed) => {\n\t\t\tif ( !embed || !embed.style ) return;\n\t\t\tembed.style.filter = 'brightness(var(--wp-dark-mode-video-brightness, 100%)) grayscale(var(--wp-dark-mode-video-grayscale, 0%))';\n\t\t});\n\t}\n\n\n\t/**\n\t * Exclude low brightness videos\n\t */\n\tsetVideoFilters() {\n\t\t// Log('Filtering');\n\t\tconst lowBrightnessExcludes = wp_dark_mode_json.options.video_enabled_low_brightness ? wp_dark_mode_json.options.video_low_brightness_excludes : [];\n\t\tconst lowGrayscaleExcludes = wp_dark_mode_json.options.video_enabled_low_grayscale ? wp_dark_mode_json.options.video_low_grayscale_excludes : []\n\n\t\tconst videos = document.querySelectorAll('video, iframe, video source');\n\n\t\tif(videos && videos.length) {\n\t\t\tvideos.forEach((video) => {\n\t\t\t\tconst src = video.src;\n\n\t\t\t\t// Log('video src', src);\n\t\n\t\t\t\tif( lowBrightnessExcludes && lowBrightnessExcludes.includes(src) ) {\n\t\t\t\t\tvideo?.style.setProperty('--wp-dark-mode-video-brightness', '100%');\n\t\t\t\t}\n\t\n\t\t\t\tif( lowGrayscaleExcludes && lowGrayscaleExcludes.includes(src) ) {\n\t\t\t\t\tvideo?.style.setProperty('--wp-dark-mode-video-grayscale', '0');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t}\n\n}\n\nexport default new Videos();","/*\n (c) 2011-2015, Vladimir Agafonkin\n SunCalc is a JavaScript library for calculating sun/moon position and light phases.\n https://github.com/mourner/suncalc\n*/\n\n(function () { 'use strict';\n\n// shortcuts for easier to read formulas\n\nvar PI = Math.PI,\n sin = Math.sin,\n cos = Math.cos,\n tan = Math.tan,\n asin = Math.asin,\n atan = Math.atan2,\n acos = Math.acos,\n rad = PI / 180;\n\n// sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas\n\n\n// date/time constants and conversions\n\nvar dayMs = 1000 * 60 * 60 * 24,\n J1970 = 2440588,\n J2000 = 2451545;\n\nfunction toJulian(date) { return date.valueOf() / dayMs - 0.5 + J1970; }\nfunction fromJulian(j) { return new Date((j + 0.5 - J1970) * dayMs); }\nfunction toDays(date) { return toJulian(date) - J2000; }\n\n\n// general calculations for position\n\nvar e = rad * 23.4397; // obliquity of the Earth\n\nfunction rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }\nfunction declination(l, b) { return asin(sin(b) * cos(e) + cos(b) * sin(e) * sin(l)); }\n\nfunction azimuth(H, phi, dec) { return atan(sin(H), cos(H) * sin(phi) - tan(dec) * cos(phi)); }\nfunction altitude(H, phi, dec) { return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H)); }\n\nfunction siderealTime(d, lw) { return rad * (280.16 + 360.9856235 * d) - lw; }\n\nfunction astroRefraction(h) {\n if (h < 0) // the following formula works for positive altitudes only.\n h = 0; // if h = -0.08901179 a div/0 would occur.\n\n // formula 16.4 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n // 1.02 / tan(h + 10.26 / (h + 5.10)) h in degrees, result in arc minutes -> converted to rad:\n return 0.0002967 / Math.tan(h + 0.00312536 / (h + 0.08901179));\n}\n\n// general sun calculations\n\nfunction solarMeanAnomaly(d) { return rad * (357.5291 + 0.98560028 * d); }\n\nfunction eclipticLongitude(M) {\n\n var C = rad * (1.9148 * sin(M) + 0.02 * sin(2 * M) + 0.0003 * sin(3 * M)), // equation of center\n P = rad * 102.9372; // perihelion of the Earth\n\n return M + C + P + PI;\n}\n\nfunction sunCoords(d) {\n\n var M = solarMeanAnomaly(d),\n L = eclipticLongitude(M);\n\n return {\n dec: declination(L, 0),\n ra: rightAscension(L, 0)\n };\n}\n\n\nvar SunCalc = {};\n\n\n// calculates sun position for a given date and latitude/longitude\n\nSunCalc.getPosition = function (date, lat, lng) {\n\n var lw = rad * -lng,\n phi = rad * lat,\n d = toDays(date),\n\n c = sunCoords(d),\n H = siderealTime(d, lw) - c.ra;\n\n return {\n azimuth: azimuth(H, phi, c.dec),\n altitude: altitude(H, phi, c.dec)\n };\n};\n\n\n// sun times configuration (angle, morning name, evening name)\n\nvar times = SunCalc.times = [\n [-0.833, 'sunrise', 'sunset' ],\n [ -0.3, 'sunriseEnd', 'sunsetStart' ],\n [ -6, 'dawn', 'dusk' ],\n [ -12, 'nauticalDawn', 'nauticalDusk'],\n [ -18, 'nightEnd', 'night' ],\n [ 6, 'goldenHourEnd', 'goldenHour' ]\n];\n\n// adds a custom time to the times config\n\nSunCalc.addTime = function (angle, riseName, setName) {\n times.push([angle, riseName, setName]);\n};\n\n\n// calculations for sun times\n\nvar J0 = 0.0009;\n\nfunction julianCycle(d, lw) { return Math.round(d - J0 - lw / (2 * PI)); }\n\nfunction approxTransit(Ht, lw, n) { return J0 + (Ht + lw) / (2 * PI) + n; }\nfunction solarTransitJ(ds, M, L) { return J2000 + ds + 0.0053 * sin(M) - 0.0069 * sin(2 * L); }\n\nfunction hourAngle(h, phi, d) { return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d))); }\nfunction observerAngle(height) { return -2.076 * Math.sqrt(height) / 60; }\n\n// returns set time for the given sun altitude\nfunction getSetJ(h, lw, phi, dec, n, M, L) {\n\n var w = hourAngle(h, phi, dec),\n a = approxTransit(w, lw, n);\n return solarTransitJ(a, M, L);\n}\n\n\n// calculates sun times for a given date, latitude/longitude, and, optionally,\n// the observer height (in meters) relative to the horizon\n\nSunCalc.getTimes = function (date, lat, lng, height) {\n\n height = height || 0;\n\n var lw = rad * -lng,\n phi = rad * lat,\n\n dh = observerAngle(height),\n\n d = toDays(date),\n n = julianCycle(d, lw),\n ds = approxTransit(0, lw, n),\n\n M = solarMeanAnomaly(ds),\n L = eclipticLongitude(M),\n dec = declination(L, 0),\n\n Jnoon = solarTransitJ(ds, M, L),\n\n i, len, time, h0, Jset, Jrise;\n\n\n var result = {\n solarNoon: fromJulian(Jnoon),\n nadir: fromJulian(Jnoon - 0.5)\n };\n\n for (i = 0, len = times.length; i < len; i += 1) {\n time = times[i];\n h0 = (time[0] + dh) * rad;\n\n Jset = getSetJ(h0, lw, phi, dec, n, M, L);\n Jrise = Jnoon - (Jset - Jnoon);\n\n result[time[1]] = fromJulian(Jrise);\n result[time[2]] = fromJulian(Jset);\n }\n\n return result;\n};\n\n\n// moon calculations, based on http://aa.quae.nl/en/reken/hemelpositie.html formulas\n\nfunction moonCoords(d) { // geocentric ecliptic coordinates of the moon\n\n var L = rad * (218.316 + 13.176396 * d), // ecliptic longitude\n M = rad * (134.963 + 13.064993 * d), // mean anomaly\n F = rad * (93.272 + 13.229350 * d), // mean distance\n\n l = L + rad * 6.289 * sin(M), // longitude\n b = rad * 5.128 * sin(F), // latitude\n dt = 385001 - 20905 * cos(M); // distance to the moon in km\n\n return {\n ra: rightAscension(l, b),\n dec: declination(l, b),\n dist: dt\n };\n}\n\nSunCalc.getMoonPosition = function (date, lat, lng) {\n\n var lw = rad * -lng,\n phi = rad * lat,\n d = toDays(date),\n\n c = moonCoords(d),\n H = siderealTime(d, lw) - c.ra,\n h = altitude(H, phi, c.dec),\n // formula 14.1 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n pa = atan(sin(H), tan(phi) * cos(c.dec) - sin(c.dec) * cos(H));\n\n h = h + astroRefraction(h); // altitude correction for refraction\n\n return {\n azimuth: azimuth(H, phi, c.dec),\n altitude: h,\n distance: c.dist,\n parallacticAngle: pa\n };\n};\n\n\n// calculations for illumination parameters of the moon,\n// based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and\n// Chapter 48 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n\nSunCalc.getMoonIllumination = function (date) {\n\n var d = toDays(date || new Date()),\n s = sunCoords(d),\n m = moonCoords(d),\n\n sdist = 149598000, // distance from Earth to Sun in km\n\n phi = acos(sin(s.dec) * sin(m.dec) + cos(s.dec) * cos(m.dec) * cos(s.ra - m.ra)),\n inc = atan(sdist * sin(phi), m.dist - sdist * cos(phi)),\n angle = atan(cos(s.dec) * sin(s.ra - m.ra), sin(s.dec) * cos(m.dec) -\n cos(s.dec) * sin(m.dec) * cos(s.ra - m.ra));\n\n return {\n fraction: (1 + cos(inc)) / 2,\n phase: 0.5 + 0.5 * inc * (angle < 0 ? -1 : 1) / Math.PI,\n angle: angle\n };\n};\n\n\nfunction hoursLater(date, h) {\n return new Date(date.valueOf() + h * dayMs / 24);\n}\n\n// calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article\n\nSunCalc.getMoonTimes = function (date, lat, lng, inUTC) {\n var t = new Date(date);\n if (inUTC) t.setUTCHours(0, 0, 0, 0);\n else t.setHours(0, 0, 0, 0);\n\n var hc = 0.133 * rad,\n h0 = SunCalc.getMoonPosition(t, lat, lng).altitude - hc,\n h1, h2, rise, set, a, b, xe, ye, d, roots, x1, x2, dx;\n\n // go in 2-hour chunks, each time seeing if a 3-point quadratic curve crosses zero (which means rise or set)\n for (var i = 1; i <= 24; i += 2) {\n h1 = SunCalc.getMoonPosition(hoursLater(t, i), lat, lng).altitude - hc;\n h2 = SunCalc.getMoonPosition(hoursLater(t, i + 1), lat, lng).altitude - hc;\n\n a = (h0 + h2) / 2 - h1;\n b = (h2 - h0) / 2;\n xe = -b / (2 * a);\n ye = (a * xe + b) * xe + h1;\n d = b * b - 4 * a * h1;\n roots = 0;\n\n if (d >= 0) {\n dx = Math.sqrt(d) / (Math.abs(a) * 2);\n x1 = xe - dx;\n x2 = xe + dx;\n if (Math.abs(x1) <= 1) roots++;\n if (Math.abs(x2) <= 1) roots++;\n if (x1 < -1) x1 = x2;\n }\n\n if (roots === 1) {\n if (h0 < 0) rise = i + x1;\n else set = i + x1;\n\n } else if (roots === 2) {\n rise = i + (ye < 0 ? x2 : x1);\n set = i + (ye < 0 ? x1 : x2);\n }\n\n if (rise && set) break;\n\n h0 = h2;\n }\n\n var result = {};\n\n if (rise) result.rise = hoursLater(t, rise);\n if (set) result.set = hoursLater(t, set);\n\n if (!rise && !set) result[ye > 0 ? 'alwaysUp' : 'alwaysDown'] = true;\n\n return result;\n};\n\n\n// export as Node module / AMD module / browser variable\nif (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;\nelse if (typeof define === 'function' && define.amd) define(SunCalc);\nelse window.SunCalc = SunCalc;\n\n}());\n","import WPDarkMode from \"./WPDarkMode\";\nimport Store from \"./Store\";\nimport Accessibility from \"./Accessibility\";\nimport Color from \"./Color\";\nimport Base from \"./Base\";\nimport Image from \"./Images\";\nimport Video from \"./Videos\";\nimport SunCalc from \"suncalc\";\n\nclass DarkModeApp extends Base {\n\n\t/**\n\t * Events\n\t */\n\tasync events() {\n\t\t// Sync storages.\n\t\tthis.syncStorage();\n\n\t\t// Try applying dark mode.\n\t\tthis.tryApplyingDarkMode();\n\n\t\t// Register event listeners.\n\t\tthis.registerEvents();\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get user choice.\n\t *\n\t * @return {string}\n\t */\n\tget hasUserChoice() {\n\t\treturn null !== Store.get('choice');\n\t}\n\n\t/**\n\t * Sync storages\n\t */\n\tsyncStorage() {\n\t\t/**\n\t\t * Device preference for dark mode\n\t\t */\n\t\tStore.set('device', WPDarkMode.isDeviceDark ? 'dark' : 'light');\n\n\t\t/**\n\t\t * These are premium features\n\t\t */\n\t\tif (!this.isPremium) return;\n\n\t\t/**\n\t\t * Timezone of device, used for Time based dark mode\n\t\t */\n\t\tlet timeZoneOffset = (new Date().getTimezoneOffset() / 60);\n\n\t\t// Add + sign if offset is negative. Add - sign if offset is positive.\n\t\tif (timeZoneOffset > 0) {\n\t\t\ttimeZoneOffset = '-' + timeZoneOffset;\n\t\t} else {\n\t\t\ttimeZoneOffset = '+' + Math.abs(Number(timeZoneOffset));\n\t\t}\n\n\t\tStore.set('timezone', timeZoneOffset);\n\n\t\t/**\n\t\t * Location of device, used for sunset based dark mode\n\t\t * Ask, only if sunset mode is enabled.\n\t\t */\n\t\tif (wp_dark_mode_json.options.frontend_mode === 'sunset') {\n\t\t\tthis.syncDeviceLocation()\n\t\t}\n\t}\n\n\t/**\n\t * Update device location\n\t */\n\tasync syncDeviceLocation() {\n\n\t\t// Check if location was updated in last 24 hours.\n\t\tconst locationUpdated = Store.get('location-updated');\n\n\t\t// Bail if location was updated in last 24 hours.\n\t\tif (locationUpdated) {\n\t\t\tif (((new Date()) - (new Date().setTime(locationUpdated))) < (24 * 60 * 60 * 1000)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Bail, if navigator is not available or geolocation is not supported.\n\t\tif (!navigator || !navigator.geolocation) {\n\t\t\treturn;\n\t\t}\n\n\t\tnavigator.geolocation.getCurrentPosition((position) => {\n\t\t\t// Save location for dark mode.\n\t\t\tStore.set('location', position.coords.latitude + ',' + position.coords.longitude);\n\n\t\t\t// Save location update time.\n\t\t\tStore.set('location-updated', new Date().getTime());\n\n\t\t\t// Apply sunset mode if it is enabled.\n\t\t\tif ( wp_dark_mode_json.options.frontend_mode === 'sunset' && this.isPremium ) {\n\t\t\t\tthis.applySunsetMode();\n\t\t\t}\n\t\t});\n\n\t}\n\n\t/**\n\t * Register event listeners\n\t */\n\tregisterEvents() {\n\n\t\t// Adjust presets, colors, exclude elements, etc.\n\t\tColor.init();\n\n\t\tAccessibility.init();\n\n\t\t// Replace images.\n\t\tImage.init();\n\n\t\t// Replace videos.\n\t\tVideo.init();\n\n\t\t// Track device settings.\n\t\tthis.followDevice();\n\t}\n\n\t/**\n\t * Listen for device dark mode change\n\t */\n\tfollowDevice() {\n\t\t// Bail, if dark mode is not following device mode.\n\t\tif (wp_dark_mode_json.options.frontend_mode !== 'device') return;\n\n\t\t// Bail, if device mode change is not supported.\n\t\tif (!window || !window.matchMedia) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaQuery = matchMedia('(prefers-color-scheme: dark)');\n\n\t\tif (!mediaQuery) return false;\n\n\t\tconst checkSystemMode = () => {\n\t\t\t// React to device preference change.\n\t\t\tif (mediaQuery.matches) {\n\t\t\t\tWPDarkMode.activate();\n\t\t\t} else {\n\t\t\t\tWPDarkMode.deactivate();\n\t\t\t}\n\t\t}\n\n\t\tmediaQuery.addEventListener('change', function () {\n\n\t\t\t// Update user device preference.\n\t\t\tStore.set('device', mediaQuery.matches ? 'dark' : 'light');\n\n\t\t\t// React to device preference change.\n\n\t\t\t// Bail, if user choice is set.\n\t\t\tif (Store.get('choice') !== null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcheckSystemMode()\n\t\t});\n\n\t\t// Check system mode on load.\n\t\tif (!WPDarkMode.isActive && !this.hasUserChoice) {\n\t\t\tcheckSystemMode()\n\t\t}\n\t}\n\n\t/**\n\t * Try applying dark mode.\n\t *\n\t * @return {Promise}\n\t * @private\n\t */\n\tasync tryApplyingDarkMode() {\n\n\t\treturn new Promise(async (resolve) => {\n\n\t\t\tif ( this.isPremium ) {\n\t\t\t\t// Bail, if caching is not excluded.\n\t\t\t\tconst res = await fetch( wp_dark_mode_json.url.ajax + '?action=wp_dark_mode_options&nonce=' + wp_dark_mode_json.nonce)\n\t\t\t\tconst data = await res.json()\n\n\t\t\t\tif ( ! this.isTrue( data.data.performance_exclude_cache ) ) {\n\t\t\t\t\tresolve(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bail, if current page is excluded from dark mode.\n\t\t\tif ( ! this.isTrue( wp_dark_mode_json.options.frontend_enabled ) ) {\n\t\t\t\tresolve(true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Apply dark mode, if user choice is set.\n\t\t\tif (this.hasUserChoice) {\n\t\t\t\tif ( 'dark' == Store.get('choice') ) {\n\t\t\t\t\tWPDarkMode.activate();\n\t\t\t\t} else {\n\t\t\t\t\tWPDarkMode.deactivate();\n\t\t\t\t}\n\n\t\t\t\tresolve(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check and apply selected mode.\n\t\t\tswitch (wp_dark_mode_json.options.frontend_mode) {\n\t\t\t\tcase 'default_light':\n\t\t\t\t\tWPDarkMode.deactivate();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tcase 'default':\n\t\t\t\t\tWPDarkMode.activate();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'device':\n\n\t\t\t\t\tif (WPDarkMode.isDeviceDark) {\n\t\t\t\t\t\tWPDarkMode.activate();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWPDarkMode.deactivate();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'time':\n\n\t\t\t\t\t// Bail, if user is not premium.\n\t\t\t\t\tif (!this.isPremium) {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst starts = wp_dark_mode_json.options.frontend_time_starts;\n\t\t\t\t\tconst ends = wp_dark_mode_json.options.frontend_time_ends;\n\n\t\t\t\t\t// Helper function to convert \"hh:mm AA\" format to minutes since midnight\n\t\t\t\t\tfunction timeToMinutes(time) {\n\t\t\t\t\t\tconst [timePart, period] = time.split(' ');\n\t\t\t\t\t\tlet [hours, minutes] = timePart.split(':').map(Number);\n\n\t\t\t\t\t\t// Convert to 24-hour format\n\t\t\t\t\t\tif (period === 'PM' && hours !== 12) {\n\t\t\t\t\t\t\thours += 12;\n\t\t\t\t\t\t} else if (period === 'AM' && hours === 12) {\n\t\t\t\t\t\t\thours = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn hours * 60 + minutes;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the current time in minutes since midnight\n\t\t\t\t\tconst now = new Date();\n\t\t\t\t\tconst currentMinutes = now.getHours() * 60 + now.getMinutes();\n\n\t\t\t\t\tconst startMinutes = timeToMinutes(starts);\n\t\t\t\t\tconst endMinutes = timeToMinutes(ends);\n\n\t\t\t\t\tlet isDarkMode = false;\n\n\t\t\t\t\t// Check if current time is between start and end time\n\t\t\t\t\tif (startMinutes < endMinutes) {\n\t\t\t\t\t\t// Time range is within the same day\n\t\t\t\t\t\tif (currentMinutes >= startMinutes && currentMinutes < endMinutes) {\n\t\t\t\t\t\t\tisDarkMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Time range spans across midnight\n\t\t\t\t\t\tif (currentMinutes >= startMinutes || currentMinutes < endMinutes) {\n\t\t\t\t\t\t\tisDarkMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDarkMode) {\n\t\t\t\t\t\tWPDarkMode.activate();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWPDarkMode.deactivate();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sunset':\n\n\t\t\t\t\t// Bail, if user is not premium.\n\t\t\t\t\tif (!this.isPremium) {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait this.applySunsetMode();\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tresolve(true)\n\n\t\t});\n\t}\n\n\tasync applySunsetMode() {\n\t\t// Get sunset time.\n\t\tconst loc = Store.get('location').split(',').map(Number);\n\t\tlet { sunrise, sunset } = SunCalc.getTimes(new Date(), loc[0], loc[1]);\n\t\t\n\t\t// Get current time.\n\t\tconst now = new Date();\n\n\t\t// Check if it is night time.\n\t\tconst isNight = now > sunset || now < sunrise;\n\n\t\t// Apply dark mode, if it is night time.\n\t\tif (isNight) {\n\t\t\tWPDarkMode.activate();\n\t\t} else {\n\t\t\tWPDarkMode.deactivate();\n\t\t}\n\t}\n\n}\n\nexport default new DarkModeApp();","export const HalfMoonFilled = ``\n\nexport const HalfMoonOutlined = `\n\n`\n\nexport const StarMoonFilled = `\n\n`\n\nexport const StarMoonOutlined = `\n\n\n\n\n`\n\nexport const FullMoonFilled = `\n\n`\n\nexport const RichSunOutlined = ` `\n\nexport const RichSunFilled = `\n\n`\n\nexport const RichMoonFilled = `\n\n`\n\nexport const CurvedMoonOutlined = ` `\n\nexport const SunFilled = `\n\n\n\n\n\n\n\n\n\n`\n\nexport const SunOutlined = `\n\n`\n\n\nexport const DoubleUpperT = `\n\n`\n\nexport const LowerA = ``\n\nexport const DoubleT = `\n\n`\n\nexport const UpperA = `\n\n\n`\n\nexport const Stars = `\n \n `\n\nexport default {}","import { HalfMoonFilled } from \"./SVG\"; \nexport default (config = {}) => { \n \nLog('Found Icons', config.iconLight, config.iconDark);\n return `
${config.iconLight || HalfMoonFilled}
${config.iconDark || HalfMoonFilled}
` }","import { SunFilled, StarMoonFilled } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || SunFilled}
${config.iconLight || SunFilled}
${config.iconDark || StarMoonFilled}
` })","import { SunFilled, HalfMoonFilled } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || SunFilled}
${config.iconDark || HalfMoonFilled}
` })","import { SunFilled, HalfMoonFilled } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || SunFilled}
${config.iconDark || HalfMoonFilled}
` })","import { SunOutlined } from \"./SVG\"; export default (config = {}) => { return `
${ config.iconLight || SunOutlined }
${ config.iconDark || SunOutlined }
` }","import { FullMoonFilled, DoubleUpperT } from './SVG'; export default (config = {}) => { return `
${ config.iconLight || FullMoonFilled }
${config.iconDark || FullMoonFilled}
${config.fontIcon || DoubleUpperT }
${config.fontIconActive || DoubleUpperT}
` }","import { SunFilled, HalfMoonFilled } from './SVG'; export default (config = {}) => { const fontIcon = config.fontIcon ? `` : `a`; const fontIconActive = config.fontIconActive ? `` : 'A'; return `
${ config.iconLight || SunFilled }
${config.iconDark || HalfMoonFilled }
${fontIcon}
${fontIconActive}
` }","import { SunOutlined, StarMoonOutlined, DoubleT } from './SVG'; export default (config = {}) => { return `
${ config.iconLight || SunOutlined }
${ config.iconDark || StarMoonOutlined }
${config.fontIcon ? `` : DoubleT}
${config.fontIconActive ? `` : DoubleT}
` }","import { RichSunFilled, RichMoonFilled, UpperA } from './SVG'; export default (config = {}) => { return `
${ config.iconLight || RichSunFilled }
${ config.iconDark || RichMoonFilled }
${ config.fontIcon || UpperA}
${ config.fontIconActive || UpperA}
` }","import { FullMoonFilled, UpperA } from './SVG'; export default (config = {}) => { return `
${ config.fontIcon || UpperA }
${ config.fontIconActive || UpperA }
${ config.iconLight || FullMoonFilled }
${ config.iconDark || FullMoonFilled }
` }","import { SunOutlined, StarMoonFilled, UpperA } from './SVG'; export default (config = {}) => { return `
${ config.fontIcon || UpperA }
${ config.fontIconActive || UpperA }
${ config.iconLight || SunOutlined }
${ config.iconDark || StarMoonFilled }
` }","export default (config = {}) => { return `
${config.textLight || 'Light'}
${config.textDark || 'Dark'}
` }","export default (config = {}) => {\n return `
`;\n};\n","import { Stars } from './SVG'; \n\nexport default ((config = {}) => { \n return `\n\n `; \n});\n","import { SunOutlined, HalfMoonOutlined } from \"./SVG\"; export default ((config = {}) => { return `
${config.iconLight || SunOutlined}
${config.iconDark || HalfMoonOutlined}
` })","import { SunOutlined, HalfMoonOutlined } from \"./SVG\"; export default ((config = {}) => { return `
${config.iconLight || SunOutlined}
${config.iconDark || HalfMoonOutlined}
` })","import { RichSunOutlined, CurvedMoonOutlined } from './SVG'\n\nexport default (config = {}) => {\n\treturn `
${config.iconLight || RichSunOutlined}
${config.iconDark || CurvedMoonOutlined}
`\n}","import { RichSunOutlined, CurvedMoonOutlined } from './SVG'\n\nexport default ((config = {}) => {\n\treturn `${config.textLight || 'Light'}
${config.iconLight || RichSunOutlined}
${config.iconDark || CurvedMoonOutlined}
${config.textDark || 'Dark'}`\n})","import { RichSunOutlined, CurvedMoonOutlined } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || RichSunOutlined}
${config.iconDark || CurvedMoonOutlined}
`; })","import { SunOutlined, HalfMoonOutlined } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || SunOutlined}
${config.iconDark || HalfMoonOutlined}
`; })","import { SunOutlined } from './SVG'; export default ((config = {}) => { return `
${config.iconLight || SunOutlined}
`; })","import Base from './Base'\nimport WPDarkMode from './WPDarkMode'\nimport * as Switches from '../switches';\nimport Accessibility from './Accessibility'\n\nclass DarkModeSwitch extends Base {\n\n\t/**\n\t * Get switch elements\n\t */\n\tgetSwitches(exclude = '') {\n\n\t\tif (exclude !== '') {\n\t\t\treturn document.querySelectorAll(`.wp-dark-mode-switch:not(${exclude})`);\n\t\t}\n\n\t\treturn document.querySelectorAll('.wp-dark-mode-switch');\n\t}\n\n\t/**\n\t * init\n\t */\n\tready() {\n\n\t\tconst source = typeof window.wp_dark_mode_admin_json !== 'undefined' ? window.wp_dark_mode_admin_json : window.wp_dark_mode_json;\n\n\t\t// Bail, if not enabled.\n\t\tif (source && source.is_excluded) return;\n\n\t\tthis.injectSwitches();\n\n\t\tthis.listenSwitches();\n\t\tthis.reactiveSwitches();\n\n\t\tthis.throttle = false;\n\n\t\tif (source.options.performance_track_dynamic_content) {\n\t\t\tthis.dynamicSwitches()\n\t\t}\n\n\t\twindow.addEventListener('elementor/frontend/init', () => {\n\t\t\tthis.dynamicSwitches()\n\t\t});\n\n\t}\n\n\tdynamicSwitches() {\n\n\t\t// Bail if already initialized.\n\t\tif (this.dynamicSwitchesInitialized) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dynamicSwitchesInitialized = true;\n\n\t\t// Inject switches when mutation occurs in BODY.\n\t\tconst observer = new MutationObserver((mutations) => {\n\t\t\tmutations.forEach((mutation) => {\n\t\t\t\tif (this.throttle) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Log('ClassList changed!');\n\n\t\t\t\tthis.throttle = true;\n\t\t\t\tsetTimeout(this.injectSwitches, 200);\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.throttle = false;\n\t\t\t\t}, 500);\n\t\t\t});\n\t\t});\n\n\t\tobserver.observe(document.body, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t\tattributes: false,\n\t\t});\n\t}\n\n\t/**\n\t * Inject switches to DOM\n\t */\n\tinjectSwitches = () => {\n\t\tconst switches = this.getSwitches('.ignore');\n\n\t\tif (!switches || !switches.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst THIS = this;\n\t\t// Log('injectSwitches', switches);\n\n\t\tswitches.forEach((switchEl) => {\n\n\t\t\t// Bail, if already injected.\n\t\t\tif (switchEl.querySelector('.wp-dark-mode-switch-styled')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst data_keys = ['style', 'size', 'reactive', 'textLight', 'textDark', 'iconLight', 'iconDark'];\n\n\t\t\tconst config = {}\n\t\t\tdata_keys.forEach((key) => {\n\t\t\t\tconfig[key] = switchEl.dataset[key] || null;\n\t\t\t})\n\n\t\t\t// Return if style is not defined.\n\t\t\tif (!config.style) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Log('config', config);\n\t\t\tconst switchHtml = THIS.buildSwitch(config);\n\t\t\tswitchEl.innerHTML = switchHtml;\n\t\t});\n\n\t\t// Event to update switches.\n\t\t// this.emit('injected');\n\t}\n\n\t/**\n\t * Listen switch clicks\n\t */\n\tlistenSwitches() {\n\t\twindow?.addEventListener('click', (event) => {\n\n\n\t\t\t// Check if the clicked element is a Dark Mode switch\n\t\t\tconst isSwitch = event.target.closest('.wp-dark-mode-switch') || event.target.matches('.wp-dark-mode-switch');\n\t\t\t// Bail, if not a Dark Mode switch\n\t\t\tif (!isSwitch) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Bail, if element contains .dummy class.\n\t\t\tif (event.target.closest('.dummy')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// this.emit('click', event);\n\n\t\t\t// Prevent default action\n\t\t\tevent.preventDefault();\n\n\t\t\t// Log('event.target', event.target);\n\t\t\t// if target has _font in parent or self\n\t\t\tif (event.target.closest('._font') || event.target.matches('._font')) {\n\t\t\t\t// Log('font toggle');\n\t\t\t\tAccessibility.toggleFontSize(event.target.closest('.wp-dark-mode-switch ._font'));\n\n\t\t\t\tthis.emit('font-toggled', event);\n\t\t\t} else {\n\t\t\t\tWPDarkMode.toggle().remember();\n\n\t\t\t\t// this.emit('toggled', event);\n\t\t\t}\n\n\t\t});\n\n\t\t// On press Enter key\n\t\twindow?.addEventListener('keydown', (event) => {\n\t\t\tif (event.key === 'Enter') {\n\t\t\t\tconst isSwitch = event.target.closest('.wp-dark-mode-switch') || event.target.matches('.wp-dark-mode-switch');\n\t\t\t\tif (isSwitch) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.target.click();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Reactive switches\n\t */\n\treactiveSwitches() {\n\n\t\t// Initial update switches.\n\t\tthis.updateSwitches();\n\n\t\t// Update switches on change dark mode.\n\t\tWPDarkMode.onChange(this.updateSwitches);\n\t}\n\n\t/**\n\t * Update Switches\n\t */\n\tupdateSwitches = () => {\n\t\tconst switches = this.getSwitches('.dummy');\n\n\t\tif (!switches || !switches.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitches.forEach((switchEl) => {\n\t\t\tconst _scheme = switchEl.querySelector('._scheme')\n\t\t\tif (_scheme) {\n\t\t\t\t// for Accessibility \n\t\t\t\t_scheme.classList[WPDarkMode.isActive ? 'add' : 'remove']('active');\n\t\t\t} else if (switchEl.querySelector('.switch')) {\n\t\t\t\t// For admin\n\t\t\t\tconst switchChild = switchEl.querySelector('.switch')\n\t\t\t\tswitchChild.classList[WPDarkMode.isActive ? 'add' : 'remove']('active');\n\t\t\t} else {\n\t\t\t\t// for normal \n\t\t\t\tlet instantChild = switchEl.querySelector('div:not(.light):not(.dark)');\n\t\t\t\tif (!instantChild) instantChild = switchEl\n\t\t\t\tinstantChild.classList[WPDarkMode.isActive ? 'add' : 'remove']('active');\n\t\t\t}\n\t\t});\n\n\t\t// Event to update switches.\n\t\t// this.emit('updated');\n\t}\n\n\t/**\n\t * Build switch\n\t *\n\t * @param {string} style\n\t * @param {string} size \n\t * @returns {string}\n\t */\n\tbuildSwitch(config = {}) {\n\t\tconst isActive = WPDarkMode.isActive;\n\t\tconst isReactive = config.reactive !== false;\n\n\t\tlet html = `
`;\n\n\t\t// Adjust switch style.\n\t\tconst switchStyle = 'Switch_' + (config.style || 1);\n\n\t\t// Wrap iconLight and iconDark inside img if exists.\n\t\tconfig.iconLight = config.iconLight ? `` : null\n\t\tconfig.iconDark = config.iconDark ? `` : null\n\n\t\thtml += Switches[switchStyle](config);\n\n\t\thtml += `
`;\n\n\t\treturn html;\n\t}\n\n\t// developer events \n\t// clicked = (callback) => {\n\t// \tthis.on('click', callback);\n\t// }\n\n}\n\nexport default new DarkModeSwitch();","export const Log = (...args) => {\n if (!wp_dark_mode_json.debug) return;\n console.log('%cWPDarkMode', 'background: #2663eb; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: 500;', ...args);\n};\n","import DarkModeApp from '@common/app.js';\nimport DarkModeSwitch from '@common/Switch.js';\nimport { Log } from '@common/Utility.js'; \n/**\n * Initialize the app\n *\n * These classes can be initialized only once to avoid conflicts\n */\n\n(() => {\n window.Log = Log;\n\n window.WPDarkModeApp = DarkModeApp.init();\n\n // Initialize the switch.\n DarkModeSwitch.init();\n})()"],"names":["_Store","key","value","daysToExpire","expires","cookies","cookie","cookieKey","cookieValue","item","__publicField","Store","_DarkMode","__privateAdd","_callbacks","_config","__privateGet","_instance","__privateSet","callback","_a","active","config","DarkMode","WPDarkMode","Base","selector","context","_events","event","args","bind","fn","thisArg","toString","getPrototypeOf","kindOf","cache","thing","str","kindOfTest","type","typeOfTest","isArray","isUndefined","isBuffer","val","isFunction","isArrayBuffer","isArrayBufferView","result","isString","isNumber","isObject","isBoolean","isPlainObject","prototype","isDate","isFile","isBlob","isFileList","isStream","isFormData","kind","isURLSearchParams","trim","forEach","obj","allOwnKeys","l","keys","len","findKey","_key","_global","isContextDefined","merge","caseless","assignValue","targetKey","extend","a","b","stripBOM","content","inherits","constructor","superConstructor","props","descriptors","toFlatObject","sourceObj","destObj","filter","propFilter","i","prop","merged","endsWith","searchString","position","lastIndex","toArray","arr","isTypedArray","TypedArray","forEachEntry","iterator","pair","matchAll","regExp","matches","isHTMLForm","toCamelCase","m","p1","p2","hasOwnProperty","isRegExp","reduceDescriptors","reducer","reducedDescriptors","descriptor","name","ret","freezeMethods","toObjectSet","arrayOrString","delimiter","define","noop","toFiniteNumber","defaultValue","ALPHA","DIGIT","ALPHABET","generateString","size","alphabet","length","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","utils$1","AxiosError","message","code","request","response","utils","error","customProps","axiosError","httpAdapter","isVisitable","removeBrackets","renderKey","path","dots","token","isFlatArray","predicates","toFormData","formData","options","option","metaTokens","visitor","defaultVisitor","indexes","useBlob","convertValue","el","index","exposedHelpers","build","encode","charMap","match","AxiosURLSearchParams","params","encoder","_encode","buildURL","url","serializeFn","serializedParams","hashmarkIndex","InterceptorManager","fulfilled","rejected","id","h","InterceptorManager$1","transitionalDefaults","platform$1","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","platform","toURLEncodedForm","data","helpers","parsePropPath","arrayToObject","formDataToJSON","buildPath","isNumericKey","isLast","stringifySafely","rawValue","parser","e","defaults","headers","contentType","hasJSONContentType","isObjectPayload","_FormData","transitional","forcedJSONParsing","JSONRequested","strictJSONParsing","status","method","defaults$1","ignoreDuplicateOf","parseHeaders","rawHeaders","parsed","line","$internals","normalizeHeader","header","normalizeValue","parseTokens","tokens","tokensRE","isValidHeaderName","matchHeaderValue","isHeaderNameFilter","formatHeader","w","char","buildAccessors","accessorName","methodName","arg1","arg2","arg3","AxiosHeaders","valueOrRewrite","rewrite","self","setHeader","_value","_header","_rewrite","lHeader","setHeaders","matcher","deleted","deleteHeader","format","normalized","targets","asStrings","first","computed","accessors","defineAccessor","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","CanceledError","settle","resolve","reject","validateStatus","domain","secure","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","isURLSameOrigin","msie","urlParsingNode","originURL","resolveURL","href","requestURL","parseProtocol","speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","now","startedAt","bytesCount","passed","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","progressBytes","rate","inRange","knownAdapters","requestData","requestHeaders","responseType","withXSRFToken","onCanceled","done","username","password","fullPath","onloadend","responseHeaders","err","timeoutErrorMessage","xsrfValue","cancel","protocol","renderReason","reason","isResolvedHandle","adapter","adapters","nameOrAdapter","rejectedReasons","reasons","state","s","throwIfCancellationRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","configValue","VERSION","validators","deprecatedWarnings","validators$1","validator","version","formatMessage","opt","desc","opts","assertOptions","schema","allowUnknown","Axios","instanceConfig","configOrUrl","dummy","paramsSerializer","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","generateHTTPMethod","isForm","Axios$1","CancelToken","executor","resolvePromise","onfulfilled","_resolve","c","CancelToken$1","spread","isAxiosError","payload","HttpStatusCode","HttpStatusCode$1","createInstance","defaultConfig","instance","axios","promises","axios$1","Ajax","action","p","Ajax$1","Accessibility","elements","desiredSize","element","fontSize","newFontSize","by","unit","newValue","switches","switchEl","html","isLargeFont","isActive","visitor_id","Accessibility$1","global","factory","this","exports","__assign","t","n","__awaiter","_arguments","P","generator","adopt","step","__generator","body","_","f","y","g","verb","v","op","__values","o","__read","r","ar","__spread","userAgent","isChromium","isFirefox","isSafari","isWindows","isMacOS","isShadowDomSupported","isDefinedSelectorSupported","isCSSStyleSheetConstructorSupported","getOKResponse","mimeType","loadAsDataURL","readResponseAsDataURL","blob","dataURL","reader","setFetchMethod","fetch","messageListeners","sendMessage","addMessageListener","nativeSendMessage_1","_i","nativeAddListener_1","ThemeEngines","DEFAULT_COLORS","DEFAULT_THEME","isArrayLike","items","e_1","items_1","items_1_1","e_1_1","push","array","addition","results","anchor","fixBaseURL","$url","parseURL","$base","getAbsoluteURL","$relative","logWarn","iterateCSSRules","rules","iterate","rule","media","iterateCSSDeclarations","style","property","isCSSVariable","getCSSVariables","variables","getElementCSSVariables","cssURLRegex","cssImportRegex","getCSSURLValue","cssURL","getCSSBaseBath","replaceCSSRelativeURLsWithAbsolute","$css","cssBasePath","pathValue","cssCommentsRegex","removeCSSComments","fontFaceRegex","replaceCSSFontFace","varRegex","replaceCSSVariables","missing","unresolvable","fallback","value_1","throttle","pending","frameId","lastArgs","throttled","createAsyncTasksQueue","tasks","runTasks","task","add","getDuration","time","duration","removeNode","node","watchForNodePosition","mode","onRestore","MAX_ATTEMPTS_COUNT","RETRY_TIMEOUT","ATTEMPTS_INTERVAL","prevSibling","parent","attempts","start","timeoutId","restore","stop","updateParent","observer","run","skip","parentNode","iterateShadowHosts","root","walker","isDOMReady","readyStateListeners","addDOMReadyListener","removeDOMReadyListener","onReadyStateChange_1","HUGE_MUTATIONS_COUNT","isHugeMutation","mutations","addedNodesCount","getElementsTreeOperations","additions","deletions","moves","duplicateAdditions","duplicateDeletions","optimizedTreeObservers","optimizedTreeCallbacks","createOptimizedTreeObserver","callbacks","observerCallbacks","domReadyListener","hadHugeMutationsBefore_1","subscribedForReadyState_1","onHugeMutations","elementsOperations_1","onMinorMutations","tempStyle","getTempCSSStyleSheet","tempStyleElement","hslToRGB","_b","_c","x","r_1","b_1","g_1","_d","rgbToHSL","r255","g255","b255","max","toFixed","digits","fixed","dot","zerosMatch","rgbToString","rgb","rgbToHexString","hslToString","hsl","rgbMatch","hslMatch","hexMatch","parse","$color","parseRGB","parseHSL","parseHex","knownColors","getColorByName","systemColors","getSystemColor","getNumbersFromString","splitter","range","units","raw","unitsList","numbers","u","rgbSplitter","rgbRange","rgbUnits","$rgb","hslSplitter","hslRange","hslUnits","$hsl","$hex","scale","inLow","inHigh","outLow","outHigh","clamp","multiplyMatrices","m1","m2","j","len2","sum","k","len3","getMatches","regex","input","group","formatCSS","text","trimLeft","getIndent","depth","emptyRuleRegexp","css","formatted","createFilterMatrix","Matrix","applyColorMatrix","matrix","getBgPole","theme","isDarkScheme","getFgPole","colorModificationCache","colorParseCache","parseToHSLWithCache","color","clearColorModificationCache","rgbCacheKeys","themeCacheKeys","getCacheId","modifyColorWithCache","modifyHSL","poleColor","anotherPoleColor","fnCache","pole","anotherPole","modified","rf","gf","bf","noopHSL","modifyColor","modifyLightSchemeColor","poleBg","poleFg","modifyLightModeHSL","isDark","isNeutral","isBlue","hx","sx","lx","MAX_BG_LIGHTNESS","modifyBgHSL","lx_1","hx_1","hx_2","isYellow","isCloserToGreen","modifyBackgroundColor","MIN_FG_LIGHTNESS","modifyBlueFgHue","hue","modifyFgHSL","isLight","lx_2","hx_3","hx_4","hx_5","lx_3","modifyForegroundColor","modifyBorderHSL","modifyBorderColor","modifyShadowColor","createTextStyle","lines","FilterMode","getCSSFilterValue","filters","counter","resolvers","rejectors","bgFetch","objectURLs","cleanImageProcessingCache","getModifiableCSSDeclaration","ignoreImageSelectors","isCancelled","important","sourceValue","modifier","getColorModifier","getBgImageModifier","getShadowModifier","getModifiedUserAgentStyle","isIFrame","styleSystemControls","getModifiedScrollbarStyle","getModifiedSelectionStyle","getSelectionColor","backgroundColorSelection","foregroundColorSelection","modifiedSelectionColor","selection","colorTrack","colorIcons","colorThumb","colorThumbHover","colorThumbActive","colorCorner","hsl_1","lighten","lighter","darken","darker","getModifiedFallbackStyle","strict","unparsableColors","colorParseCache$1","parseColorWithCache","tryParseColor","rgb_1","imageDetailsCache","awaitingForImageLoading","index_2","colorMatches_1","modifiers_2","prefixIndex","matchIndex","matchEnd","modify","cleanModificationCache","overrides","overridesList","INLINE_STYLE_ATTRS","INLINE_STYLE_SELECTOR","attr","getInlineOverrideStyle","dataAttr","customProp","cssProp","getInlineStyleElements","treeObservers","attrObservers","watchForInlineStyles","elementStyleDidChange","shadowRootDiscovered","deepWatchForInlineStyles","host","discoveredNodes","discoverNodes","treeObserver","added","attemptCount","handleAttributeMutations","attrObserver","attributeCache","stopWatchingForInlineStyles","inlineStyleCache","filterProps","getInlineStyleCacheKey","shouldIgnoreInlineStyle","selectors","ingnoredSelector","overrideInlineStyle","ignoreInlineSelectors","cacheKey","unsetProps","setCustomProp","targetCSSProp","modifierCSSProp","cssVal","mod","SMALL_SVG_LIMIT","isBg","width","height","metaThemeColorName","metaThemeColorSelector","srcMetaThemeColor","changeMetaThemeColor","meta","changeMetaThemeColorWhenAvailable","loop","addedNodes","restoreMetaThemeColor","themeCacheKeys$1","getThemeKey","asyncQueue","createStyleSheetModifier","renderId","rulesTextCache","rulesModCache","prevFilterKey","modifySheet","newRules","force","prepareSheet","isAsyncCancelled","rulesChanged","notFoundCacheKeys","themeKey","themeChanged","modRules","cssText","textDiffersFromPrev","vars","varsRule","cssTextWithVariables","modDecs","targetRule","modRule","parentRule","setRule","declarations","asyncDeclarations","asyncDeclarationCounter","rootReadyGroup","groupRefs","getGroup","parentGroup","readyStyleRule","readyDeclarations","asyncKey_1","asyncDeclaration_1","currentRenderId_1","asyncValue","rebuildAsyncRule","sheet","buildStyleSheet","createTarget","iterateReadyRules","styleIterator","asyncKey","STYLE_SELECTOR","shouldManageStyle","getManageableStyles","deep","syncStyleSet","corsStyleSet","canOptimizeUsingProxy","manageStyle","update","loadingStart","loadingEnd","prevStyles","next","corsCopy","syncStyle","corsCopyPositionWatcher","syncStylePositionWatcher","cancelAsyncOperations","sheetModifier","observerOptions","containsCSSImport","getRulesSync","safeGetSheetRules","insertStyle","createSyncStyle","isLoadingRules","wasLoadingError","getRulesAsync","cssRules","accessError","fullCSSText","getRulesOrError","isStillLoadingError","linkLoading","loadText","replaceCSSImports","createCORSCopy","details","forceRenderStyle","render","ignoreImageAnalysis","prepareOverridesSheet","buildOverrides","watchForSheetChanges","watchForSheetChangesUsingProxy","watchForSheetChangesUsingRAF","rulesChangeKey","rulesCheckFrameId","getRulesChangeKey","didRulesKeyChange","stopWatchingForSheetChangesUsingRAF","checkForUpdate","areSheetChangesPending","onSheetChange","handleSheetChanges","stopWatchingForSheetChangesUsingProxy","stopWatchingForSheetChanges","pause","destroy","watch","maxMoveCount","moveCount","shouldForceRender","link","cleanUp","onLoad","onError","getCSSImportURL","importDeclaration","basePath","importMatches","importMatches_1","importMatches_1_1","importURL","absoluteURL","importedCSS","srcElement","cors","observers","observedRoots","undefinedGroups","elementsDefinitionCallback","collectUndefinedElements","tag","customElementsWhenDefined","canOptimizeUsingProxy$1","resolvers$1","handleIsDefined","checkIfDefined_1","watchWhenCustomElementsDefined","unsubscribeFromDefineCustomElements","watchForStyleChanges","currentStyles","stopWatchingForStyleChanges","prevStyleSiblings","nextStyleSiblings","saveStylePosition","forgetStylePosition","didStylePositionChange","handleStyleOperations","operations","createdStyles","removedStyles","movedStyles","handleMinorTreeMutations","subscribeForShadowRootChanges","handleHugeTreeMutations","styles","updatedStyles","observe","shadowRoot","hosts","newStyles","resetObservers","hexify","number","generateUID","adoptedStyleOverrides","overrideList","createAdoptedStyleSheetOverride","injectSheet","override","newSheets","sheetIndex","existingIndex","adoptedStyleSheet","globalVariables","injectProxy","addRuleDescriptor","insertRuleDescriptor","deleteRuleDescriptor","removeRuleDescriptor","addUndefinedResolver","updateSheetEvent","proxyAddRule","proxyInsertRule","returnValue","proxyDeleteRule","proxyRemoveRule","INSTANCE_ID","styleManagers","adoptedStyleManagers","fixes","createOrUpdateStyle","className","createOrUpdateScript","nodePositionWatchers","setupNodePositionWatcher","alias","stopStylePositionWatchers","watcher","createStaticStyleOverrides","fallbackStyle","userAgentStyle","textStyle","invertStyle","inlineStyle","overrideStyle","replaceCSSTemplates","variableStyle","selectionColors","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor","schemeBackgroundColor","schemeTextColor","proxyScript","shadowRootsWithOverrides","createShadowStaticStyleOverrides","$cssText","m0","cleanFallbackStyle","getIgnoreImageAnalysisSelectors","createDynamicStyleOverrides","cancelRendering","updateVariables","allStyles","newManagers","createManager","newVariables","manager","loadingStyles","throttledRenderAllStyles","inlineStyleElements","handleAdoptedStyleSheets","loadingStylesCounter","loadingStyleId","didDocumentShowUp","newVars","removeManager","onDOMReady","documentVisibilityListener","watchForDocumentVisibility","alreadyWatching","stopWatchingForDocumentVisibility","createThemeAndWatchForUpdates","runDynamicStyle","watchForUpdates","newManger","managedStyles","created","updated","removed","moved","stylesToRemove","stylesToManage","stylesToRestore","ignoredInlineSelectors","rootVariables","stopWatchingForUpdates","createDarkModeInstanceMarker","metaElement","isAnotherDarkModeInstanceActive","createOrUpdateDynamicTheme","filterConfig","dynamicThemeFixes","iframe","headObserver_1","removeDynamicTheme","removeProxy","cleanDynamicThemeCache","blobRegex","replaceBlobs","banner","collectCSS","addStaticCSS","comment","staticStyle","modifiedCSS","formattedCSS","isIFrame$1","enable","themeOptions","disable","darkScheme","store","handleColorScheme","auto","exportGeneratedCSS","setFetchMethod$1","Color","colorString","alpha","tempDiv","rgbaValues","red","green","blue","opacity","backgroundColor","FiltersConfig","all","excludes","ignorableElements","ignoreRecursively","borderColor","child","includedElements","includeRecursively","Color$1","Images","images","image","currentSrc","darkSrc","lightSrc","elementsWithBackground","backgroundImage","src","replaceable_images","imagePair","img","srcWithoutQuery","lowBrightnessExcludes","lowGrayscaleExcludes","Image","Videos","youtubeRegex","vimeoRegex","videoFileRegex","vid","videoID","videos","video","replaceable_videos","videoPair","embeds","embeddedVideos","embed","Video","PI","sin","cos","tan","asin","atan","acos","rad","dayMs","J1970","J2000","toJulian","date","fromJulian","toDays","rightAscension","declination","azimuth","H","phi","dec","altitude","siderealTime","d","lw","astroRefraction","solarMeanAnomaly","eclipticLongitude","M","C","sunCoords","L","SunCalc","lat","lng","times","angle","riseName","setName","J0","julianCycle","approxTransit","Ht","solarTransitJ","ds","hourAngle","observerAngle","getSetJ","dh","Jnoon","h0","Jset","Jrise","moonCoords","F","dt","pa","sdist","inc","hoursLater","inUTC","hc","h1","h2","rise","set","xe","ye","roots","x1","x2","dx","module","DarkModeApp","timeZoneOffset","locationUpdated","mediaQuery","checkSystemMode","timeToMinutes","timePart","period","hours","minutes","starts","ends","currentMinutes","startMinutes","endMinutes","isDarkMode","loc","sunrise","sunset","DarkModeApp$1","HalfMoonFilled","HalfMoonOutlined","StarMoonFilled","StarMoonOutlined","FullMoonFilled","RichSunOutlined","RichSunFilled","RichMoonFilled","CurvedMoonOutlined","SunFilled","SunOutlined","DoubleUpperT","DoubleT","UpperA","Stars","fontIcon","fontIconActive","DarkModeSwitch","THIS","data_keys","switchHtml","_scheme","instantChild","exclude","mutation","isReactive","switchStyle","Switches","DarkModeSwitch$1","Log"],"mappings":"8iBAKA,MAAMA,GAAN,MAAMA,EAAM,CAEX,OAAO,IAAIC,EAAKC,EAAOC,EAAe,IAAK,CAC1CF,EAAgB,GAAGD,GAAM,MAAM,GAAGC,CAAG,GACrC,MAAMG,EAAUD,EAAe,aAAa,IAAI,KAAM,KAAK,MAAQA,EAAe,GAAK,GAAK,GAAK,GAAI,EAAG,aAAa,IAAM,GAC3H,gBAAS,OAAS,GAAGF,CAAG,MAAM,mBAAoBC,EAAO,IAAIE,CAAO,YAE7D,IACP,CAED,OAAO,IAAIH,EAAK,CACfA,EAAgB,GAAGD,GAAM,MAAM,GAAGC,CAAG,GACrC,MAAMI,EAAU,SAAS,OAAO,MAAO,GAAG,EAC1C,UAAWC,KAAUD,EAAS,CAC7B,KAAM,CAACE,EAAWC,CAAW,EAAIF,EAAO,MAAO,GAAK,EAAC,IAAKG,GAAQA,EAAK,KAAM,CAAA,EAC7E,GAAIF,IAAcN,EACjB,OAAO,mBAAoBO,EAE5B,CACD,OAAO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