EhSyringe

E 站注射器,将中文翻译注入到 E 站体内。

Versione datata 01/08/2020. Vedi la nuova versione l'ultima versione.

// ==UserScript==
// @name        EhSyringe
// @version     2.0.6
// @author      EhTagTranslation
// @description E 站注射器,将中文翻译注入到 E 站体内。
// @homepage    https://github.com/EhTagTranslation/EhSyringe
// @supportURL  https://github.com/EhTagTranslation/EhSyringe/issues
// @match       *://e-hentai.org/*
// @match       *://*.e-hentai.org/*
// @match       *://exhentai.org/*
// @match       *://*.exhentai.org/*
// @namespace   https://github.com/EhTagTranslation/EhSyringe
// @license     MIT
// @compatible  firefox >= 60
// @compatible  edge >= 16
// @compatible  chrome >= 61
// @compatible  safari >= 11
// @compatible  opera >= 48
// @icon        https://cdn.jsdelivr.net/gh/EhTagTranslation/EhSyringe@369f9f6da87a07a4eef2a7c443b31f2b4140c68c/src/assets/logo.svg
// @run-at      document-start
// @require     https://unpkg.com/core-js-bundle@^3.6.5/minified.js
// @require     https://unpkg.com/rxjs@^6.6.2/bundles/rxjs.umd.min.js
// @grant       unsafeWindow
// @grant       GM_deleteValue
// @grant       GM_listValues
// @grant       GM_setValue
// @grant       GM_getValue
// @grant       GM_addValueChangeListener
// @grant       GM_removeValueChangeListener
// @grant       GM_openInTab
// @grant       GM_notification
// ==/UserScript==

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 24);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

function __extends(d, b) {
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
}

function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

function __awaiter(thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

var __createBinding = Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
});

function __exportStar(m, exports) {
    for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}

function __values(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}

function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

function __spreadArrays() {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
};

function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}

function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

var __setModuleDefault = Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
};

function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
}

function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}

function __classPrivateFieldGet(receiver, privateMap) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to get private field on non-instance");
    }
    return privateMap.get(receiver);
}

function __classPrivateFieldSet(receiver, privateMap, value) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to set private field on non-instance");
    }
    privateMap.set(receiver, value);
    return value;
}


/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.merge = exports.dataMaps = exports.HOST = exports.REGEX = void 0;
exports.REGEX = Symbol('location regex');
exports.HOST = Symbol('host string');
exports.dataMaps = new Array();
function merge(regex, host, data) {
    const hosts = host ? [...new Set(Array.isArray(host) ? host : [host])].sort() : undefined;
    let map = exports.dataMaps.find((d) => JSON.stringify(d[exports.HOST]) === JSON.stringify(hosts) && d[exports.REGEX].source === regex.source);
    if (!map) {
        map = {
            [exports.REGEX]: regex,
            [exports.HOST]: hosts,
        };
        exports.dataMaps.push(map);
    }
    Object.assign(map, data);
}
exports.merge = merge;


/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Container = void 0;
const typedi_1 = __webpack_require__(4);
var typedi_2 = __webpack_require__(4);
Object.defineProperty(exports, "Service", { enumerable: true, get: function () { return typedi_2.Service; } });
Object.defineProperty(exports, "Inject", { enumerable: true, get: function () { return typedi_2.Inject; } });
Object.defineProperty(exports, "InjectMany", { enumerable: true, get: function () { return typedi_2.InjectMany; } });
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return typedi_2.Token; } });
exports.Container = typedi_1.Container.of('default');


/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
const tslib_1 = __webpack_require__(0);
const services_1 = __webpack_require__(2);
let Logger = class Logger {
    constructor() {
        this.prefix = '💉 插件 ';
        this.log = console.log.bind(console, this.prefix);
        this.info = console.info.bind(console, this.prefix);
        this.warn = console.warn.bind(console, this.prefix);
        this.error = console.error.bind(console, this.prefix);
        this.debug = console.debug.bind(console, this.prefix);
        this.time = (label) => {
            const pLabel = `${this.prefix} ${label}`;
            console.time(pLabel);
            return {
                label,
                log: (console.timeLog || console.log).bind(console, pLabel),
                end: console.timeEnd.bind(console, pLabel),
            };
        };
    }
};
Logger = tslib_1.__decorate([
    services_1.Service()
], Logger);
exports.Logger = Logger;


/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var Container_1 = __webpack_require__(8);
__export(__webpack_require__(27));
__export(__webpack_require__(28));
__export(__webpack_require__(29));
var Container_2 = __webpack_require__(8);
exports.Container = Container_2.Container;
var ContainerInstance_1 = __webpack_require__(15);
exports.ContainerInstance = ContainerInstance_1.ContainerInstance;
var Token_1 = __webpack_require__(9);
exports.Token = Token_1.Token;
exports.default = Container_1.Container;

//# sourceMappingURL=index.js.map


/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
// eslint-disable-next-line func-names
module.exports = function (useSourceMap) {
  var list = []; // return the list of modules as css string

  list.toString = function toString() {
    return this.map(function (item) {
      var content = cssWithMappingToString(item, useSourceMap);

      if (item[2]) {
        return "@media ".concat(item[2], " {").concat(content, "}");
      }

      return content;
    }).join('');
  }; // import a list of modules into the list
  // eslint-disable-next-line func-names


  list.i = function (modules, mediaQuery, dedupe) {
    if (typeof modules === 'string') {
      // eslint-disable-next-line no-param-reassign
      modules = [[null, modules, '']];
    }

    var alreadyImportedModules = {};

    if (dedupe) {
      for (var i = 0; i < this.length; i++) {
        // eslint-disable-next-line prefer-destructuring
        var id = this[i][0];

        if (id != null) {
          alreadyImportedModules[id] = true;
        }
      }
    }

    for (var _i = 0; _i < modules.length; _i++) {
      var item = [].concat(modules[_i]);

      if (dedupe && alreadyImportedModules[item[0]]) {
        // eslint-disable-next-line no-continue
        continue;
      }

      if (mediaQuery) {
        if (!item[2]) {
          item[2] = mediaQuery;
        } else {
          item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
        }
      }

      list.push(item);
    }
  };

  return list;
};

function cssWithMappingToString(item, useSourceMap) {
  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring

  var cssMapping = item[3];

  if (!cssMapping) {
    return content;
  }

  if (useSourceMap && typeof btoa === 'function') {
    var sourceMapping = toComment(cssMapping);
    var sourceURLs = cssMapping.sources.map(function (source) {
      return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
    });
    return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  }

  return [content].join('\n');
} // Adapted from convert-source-map (MIT)


function toComment(sourceMap) {
  // eslint-disable-next-line no-undef
  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  return "/*# ".concat(data, " */");
}

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Messaging = void 0;
const tslib_1 = __webpack_require__(0);
const typedi_1 = __webpack_require__(4);
const logger_1 = __webpack_require__(3);
const messaging_1 = __webpack_require__(31);
let Messaging = class Messaging {
    constructor(logger) {
        this.logger = logger;
    }
    on(key, listener) {
        this.logger.log(`注册事件`, key);
        return messaging_1.messaging.on(key, listener);
    }
    off(listener) {
        return messaging_1.messaging.off(listener);
    }
    emit(key, args, broadcast = false) {
        return messaging_1.messaging.emit(key, args, broadcast);
    }
};
Messaging = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger])
], Messaging);
exports.Messaging = Messaging;


/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Storage = void 0;
const tslib_1 = __webpack_require__(0);
const _1 = __webpack_require__(2);
const storage_1 = __webpack_require__(17);
const logger_1 = __webpack_require__(3);
let Storage = class Storage {
    constructor(logger) {
        this.logger = logger;
        this.defaults = {
            extensionCheck: 0,
            config: {
                translateUi: true,
                translateTag: true,
                showIntroduce: true,
                showIcon: true,
                introduceImageLevel: 3,
                autoUpdate: true,
                tagTip: true,
            },
            database: undefined,
            databaseInfo: undefined,
            release: undefined,
        };
        Object.defineProperty(globalThis, 'storage', {
            value: () => {
                (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
                    const keys = yield this.keys();
                    for (const key of keys) {
                        console.log(key, yield this.get(key));
                    }
                }))().catch(logger.error);
            },
        });
        this.migrate().catch(logger.error);
    }
    get(key) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const value = yield storage_1.storage.get(key);
            if (value == null)
                return this.defaults[key];
            return value;
        });
    }
    set(key, value) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            if (value == null)
                return this.delete(key);
            return storage_1.storage.set(key, value);
        });
    }
    delete(key) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            return yield storage_1.storage.delete(key);
        });
    }
    keys() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            return (yield storage_1.storage.keys());
        });
    }
    on(key, listener) {
        return storage_1.storage.on(key, listener);
    }
    off(key, listener) {
        return storage_1.storage.off(key, listener);
    }
    migrate() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const keys = yield this.keys();
            const keysInCurrentVersion = Object.keys(this.defaults);
            const deletes = keys.filter((k) => !keysInCurrentVersion.includes(k));
            if (deletes.length === 0)
                return;
            this.logger.log(`迁移存储版本,删除 `, deletes);
            for (const key of deletes) {
                yield this.delete(key);
            }
        });
    }
};
Storage = tslib_1.__decorate([
    _1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger])
], Storage);
exports.Storage = Storage;


/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ContainerInstance_1 = __webpack_require__(15);
/**
 * Service container.
 */
var Container = /** @class */ (function () {
    function Container() {
    }
    // -------------------------------------------------------------------------
    // Public Static Methods
    // -------------------------------------------------------------------------
    /**
     * Gets a separate container instance for the given instance id.
     */
    Container.of = function (instanceId) {
        if (instanceId === undefined)
            return this.globalInstance;
        var container = this.instances.find(function (instance) { return instance.id === instanceId; });
        if (!container) {
            container = new ContainerInstance_1.ContainerInstance(instanceId);
            this.instances.push(container);
        }
        return container;
    };
    /**
     * Checks if the service with given name or type is registered service container.
     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
     */
    Container.has = function (identifier) {
        return this.globalInstance.has(identifier);
    };
    /**
     * Retrieves the service with given name or type from the service container.
     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
     */
    Container.get = function (identifier) {
        return this.globalInstance.get(identifier);
    };
    /**
     * Gets all instances registered in the container of the given service identifier.
     * Used when service defined with multiple: true flag.
     */
    Container.getMany = function (id) {
        return this.globalInstance.getMany(id);
    };
    /**
     * Sets a value for the given type or service name in the container.
     */
    Container.set = function (identifierOrServiceMetadata, value) {
        this.globalInstance.set(identifierOrServiceMetadata, value);
        return this;
    };
    /**
     * Removes services with a given service identifiers (tokens or types).
     */
    Container.remove = function () {
        var _a;
        var ids = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            ids[_i] = arguments[_i];
        }
        (_a = this.globalInstance).remove.apply(_a, ids);
        return this;
    };
    /**
     * Completely resets the container by removing all previously registered services and handlers from it.
     */
    Container.reset = function (containerId) {
        if (containerId) {
            var instance = this.instances.find(function (instance) { return instance.id === containerId; });
            if (instance) {
                instance.reset();
                this.instances.splice(this.instances.indexOf(instance), 1);
            }
        }
        else {
            this.globalInstance.reset();
            this.instances.forEach(function (instance) { return instance.reset(); });
        }
        return this;
    };
    /**
     * Registers a new handler.
     */
    Container.registerHandler = function (handler) {
        this.handlers.push(handler);
        return this;
    };
    /**
     * Helper method that imports given services.
     */
    Container.import = function (services) {
        return this;
    };
    // -------------------------------------------------------------------------
    // Private Static Properties
    // -------------------------------------------------------------------------
    /**
     * Global container instance.
     */
    Container.globalInstance = new ContainerInstance_1.ContainerInstance(undefined);
    /**
     * Other containers created using Container.of method.
     */
    Container.instances = [];
    /**
     * All registered handlers.
     */
    Container.handlers = [];
    return Container;
}());
exports.Container = Container;

//# sourceMappingURL=Container.js.map


/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Used to create unique typed service identifier.
 * Useful when service has only interface, but don't have a class.
 */
var Token = /** @class */ (function () {
    /**
     * @param name Token name, optional and only used for debugging purposes.
     */
    function Token(name) {
        this.name = name;
    }
    return Token;
}());
exports.Token = Token;

//# sourceMappingURL=Token.js.map


/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Tagging = void 0;
const tslib_1 = __webpack_require__(0);
const typedi_1 = __webpack_require__(4);
const escape_html_1 = tslib_1.__importDefault(__webpack_require__(35));
const emoji_regex_1 = tslib_1.__importDefault(__webpack_require__(36));
const emojiReg = emoji_regex_1.default();
let Tagging = class Tagging {
    constructor() {
        this.nsDic = {
            '': 'misc',
            misc: 'misc',
            miscellaneous: 'misc',
            r: 'reclass',
            reclass: 'reclass',
            l: 'language',
            language: 'language',
            lang: 'language',
            p: 'parody',
            parody: 'parody',
            series: 'parody',
            c: 'character',
            char: 'character',
            character: 'character',
            g: 'group',
            group: 'group',
            creator: 'group',
            circle: 'group',
            a: 'artist',
            artist: 'artist',
            m: 'male',
            male: 'male',
            f: 'female',
            female: 'female',
        };
        this.namespaceTranslate = {
            rows: '行名',
            artist: '艺术家',
            parody: '原作',
            character: '角色',
            group: '团队',
            language: '语言',
            female: '女',
            male: '男',
            reclass: '重新分类',
            misc: '杂项',
        };
    }
    namespace(ns) {
        if (!ns)
            return 'misc';
        if (ns in this.nsDic)
            return this.nsDic[ns];
        ns = ns.toLowerCase();
        if (ns in this.nsDic)
            return this.nsDic[ns];
        ns = ns.trim();
        if (ns in this.nsDic)
            return this.nsDic[ns];
        ns = ns[0];
        if (ns in this.nsDic)
            return this.nsDic[ns];
        return 'misc';
    }
    ns(ns) {
        const fns = this.namespace(ns);
        if (fns === 'misc')
            return '';
        return fns[0];
    }
    removePara(name) {
        return name.replace(/^<p>(.+?)<\/p>$/, '$1').trim();
    }
    markImagesAndEmoji(name) {
        return name.replace(emojiReg, `<span ehs-emoji>$&</span>`).replace(/<img(.*?)>/gi, `<img ehs-icon $1>`);
    }
    removeImagesAndEmoji(name) {
        return name
            .replace(emojiReg, '')
            .replace(/<img.*?>/gi, '')
            .trim();
    }
    fullKey(tag) {
        const ns = 'namespace' in tag ? this.ns(tag.namespace) : tag.ns;
        const key = tag.key.toLowerCase();
        return ns ? `${ns}:${key}` : key;
    }
    searchTerm(tag) {
        const ns = 'namespace' in tag ? this.ns(tag.namespace) : tag.ns;
        const key = tag.key.toLowerCase();
        const nsP = ns ? `${ns}:` : '';
        const search = key.includes(' ') ? `"${key}$"` : `${key}$`;
        return nsP + search;
    }
    editorUrl(tag) {
        const namespace = 'namespace' in tag ? this.namespace(tag.namespace) : this.namespace(tag.ns);
        const key = tag.key.toLowerCase();
        return `https://ehtt.now.sh/edit/${namespace}/${encodeURIComponent(key)}`;
    }
    makeTagMatchHtml(suggestion, markTag = 'mark') {
        const tag = suggestion.tag;
        const cnNamespace = this.namespaceTranslate[this.namespace(tag.ns)];
        let cnNameHtml = '';
        let enNameHtml;
        if (tag.ns) {
            cnNameHtml += escape_html_1.default(cnNamespace) + ':';
        }
        if (suggestion.match.cn) {
            const range = suggestion.match.cn;
            cnNameHtml += `${escape_html_1.default(tag.cn.slice(0, range.start))}<${markTag}>${escape_html_1.default(tag.cn.slice(range.start, range.end))}</${markTag}>${escape_html_1.default(tag.cn.slice(range.end))}`;
        }
        else {
            cnNameHtml += escape_html_1.default(tag.cn);
        }
        if (suggestion.match.key) {
            const range = suggestion.match.key;
            enNameHtml = `${escape_html_1.default(tag.key.slice(0, range.start))}<${markTag}>${escape_html_1.default(tag.key.slice(range.start, range.end))}</${markTag}>${escape_html_1.default(tag.key.slice(range.end))}`;
        }
        else {
            enNameHtml = escape_html_1.default(tag.key);
        }
        return {
            cn: cnNameHtml,
            en: enNameHtml,
        };
    }
};
Tagging = tslib_1.__decorate([
    typedi_1.Service()
], Tagging);
exports.Tagging = Tagging;


/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var isOldIE = function isOldIE() {
  var memo;
  return function memorize() {
    if (typeof memo === 'undefined') {
      // Test for IE <= 9 as proposed by Browserhacks
      // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
      // Tests for existence of standard globals is to allow style-loader
      // to operate correctly into non-standard environments
      // @see https://github.com/webpack-contrib/style-loader/issues/177
      memo = Boolean(window && document && document.all && !window.atob);
    }

    return memo;
  };
}();

var getTarget = function getTarget() {
  var memo = {};
  return function memorize(target) {
    if (typeof memo[target] === 'undefined') {
      var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself

      if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
        try {
          // This will throw an exception if access to iframe is blocked
          // due to cross-origin restrictions
          styleTarget = styleTarget.contentDocument.head;
        } catch (e) {
          // istanbul ignore next
          styleTarget = null;
        }
      }

      memo[target] = styleTarget;
    }

    return memo[target];
  };
}();

var stylesInDom = [];

function getIndexByIdentifier(identifier) {
  var result = -1;

  for (var i = 0; i < stylesInDom.length; i++) {
    if (stylesInDom[i].identifier === identifier) {
      result = i;
      break;
    }
  }

  return result;
}

function modulesToDom(list, options) {
  var idCountMap = {};
  var identifiers = [];

  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var id = options.base ? item[0] + options.base : item[0];
    var count = idCountMap[id] || 0;
    var identifier = "".concat(id, " ").concat(count);
    idCountMap[id] = count + 1;
    var index = getIndexByIdentifier(identifier);
    var obj = {
      css: item[1],
      media: item[2],
      sourceMap: item[3]
    };

    if (index !== -1) {
      stylesInDom[index].references++;
      stylesInDom[index].updater(obj);
    } else {
      stylesInDom.push({
        identifier: identifier,
        updater: addStyle(obj, options),
        references: 1
      });
    }

    identifiers.push(identifier);
  }

  return identifiers;
}

function insertStyleElement(options) {
  var style = document.createElement('style');
  var attributes = options.attributes || {};

  if (typeof attributes.nonce === 'undefined') {
    var nonce =  true ? __webpack_require__.nc : undefined;

    if (nonce) {
      attributes.nonce = nonce;
    }
  }

  Object.keys(attributes).forEach(function (key) {
    style.setAttribute(key, attributes[key]);
  });

  if (typeof options.insert === 'function') {
    options.insert(style);
  } else {
    var target = getTarget(options.insert || 'head');

    if (!target) {
      throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
    }

    target.appendChild(style);
  }

  return style;
}

function removeStyleElement(style) {
  // istanbul ignore if
  if (style.parentNode === null) {
    return false;
  }

  style.parentNode.removeChild(style);
}
/* istanbul ignore next  */


var replaceText = function replaceText() {
  var textStore = [];
  return function replace(index, replacement) {
    textStore[index] = replacement;
    return textStore.filter(Boolean).join('\n');
  };
}();

function applyToSingletonTag(style, index, remove, obj) {
  var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE

  /* istanbul ignore if  */

  if (style.styleSheet) {
    style.styleSheet.cssText = replaceText(index, css);
  } else {
    var cssNode = document.createTextNode(css);
    var childNodes = style.childNodes;

    if (childNodes[index]) {
      style.removeChild(childNodes[index]);
    }

    if (childNodes.length) {
      style.insertBefore(cssNode, childNodes[index]);
    } else {
      style.appendChild(cssNode);
    }
  }
}

function applyToTag(style, options, obj) {
  var css = obj.css;
  var media = obj.media;
  var sourceMap = obj.sourceMap;

  if (media) {
    style.setAttribute('media', media);
  } else {
    style.removeAttribute('media');
  }

  if (sourceMap && btoa) {
    css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  } // For old IE

  /* istanbul ignore if  */


  if (style.styleSheet) {
    style.styleSheet.cssText = css;
  } else {
    while (style.firstChild) {
      style.removeChild(style.firstChild);
    }

    style.appendChild(document.createTextNode(css));
  }
}

var singleton = null;
var singletonCounter = 0;

function addStyle(obj, options) {
  var style;
  var update;
  var remove;

  if (options.singleton) {
    var styleIndex = singletonCounter++;
    style = singleton || (singleton = insertStyleElement(options));
    update = applyToSingletonTag.bind(null, style, styleIndex, false);
    remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  } else {
    style = insertStyleElement(options);
    update = applyToTag.bind(null, style, options);

    remove = function remove() {
      removeStyleElement(style);
    };
  }

  update(obj);
  return function updateStyle(newObj) {
    if (newObj) {
      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
        return;
      }

      update(obj = newObj);
    } else {
      remove();
    }
  };
}

module.exports = function (list, options) {
  options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  // tags it will allow on a page

  if (!options.singleton && typeof options.singleton !== 'boolean') {
    options.singleton = isOldIE();
  }

  list = list || [];
  var lastIdentifiers = modulesToDom(list, options);
  return function update(newList) {
    newList = newList || [];

    if (Object.prototype.toString.call(newList) !== '[object Array]') {
      return;
    }

    for (var i = 0; i < lastIdentifiers.length; i++) {
      var identifier = lastIdentifiers[i];
      var index = getIndexByIdentifier(identifier);
      stylesInDom[index].references--;
    }

    var newLastIdentifiers = modulesToDom(newList, options);

    for (var _i = 0; _i < lastIdentifiers.length; _i++) {
      var _identifier = lastIdentifiers[_i];

      var _index = getIndexByIdentifier(_identifier);

      if (stylesInDom[_index].references === 0) {
        stylesInDom[_index].updater();

        stylesInDom.splice(_index, 1);
      }
    }

    lastIdentifiers = newLastIdentifiers;
  };
};

/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.setBadge = exports.sendNotification = exports.openInTab = void 0;
function openInTab(url) {
    GM_openInTab(url, { active: true, insert: true, setParent: true });
}
exports.openInTab = openInTab;
function sendNotification(info) {
    GM_notification({ text: info.message, title: info.title, onclick: info.action });
}
exports.sendNotification = sendNotification;
function setBadge(info) {
    const badge = document.getElementById('eh-syringe-popup-badge');
    if (badge) {
        if (info.text != null) {
            badge.innerText = info.text;
            badge.style.visibility = info.text ? 'visible' : 'hidden';
        }
        if (info.background != null) {
            badge.style.background = info.background;
        }
    }
}
exports.setBadge = setBadge;


/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.packageJson = void 0;
const tslib_1 = __webpack_require__(0);
const package_json_1 = tslib_1.__importDefault(__webpack_require__(60));
exports.packageJson = package_json_1.default;


/***/ }),
/* 14 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTI4cHgiIGhlaWdodD0iMTI4cHgiIHZpZXdCb3g9IjAgMCAxMjggMTI4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1NS4yICg3ODE4MSkgLSBodHRwczovL3NrZXRjaGFwcC5jb20gLS0+CiAgICA8dGl0bGU+bG9nbzwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxnIGlkPSJsb2dvIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgZmlsbD0iI0ZGRkZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTcuMjMxMzAzLCA3MS42NDQ5MzkpIHJvdGF0ZSgtNDUuMDAwMDAwKSB0cmFuc2xhdGUoLTU3LjIzMTMwMywgLTcxLjY0NDkzOSkgIiB4PSIxOS43MzEzMDI3IiB5PSI1OS44OTQ5Mzk0IiB3aWR0aD0iNzUiIGhlaWdodD0iMjMuNSI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0i55+p5b2iIiBmaWxsPSIjRkZGRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4OC4xMzEzNTQsIDQwLjI0NTY4OSkgcm90YXRlKC00NS4wMDAwMDApIHRyYW5zbGF0ZSgtODguMTMxMzU0LCAtNDAuMjQ1Njg5KSAiIHg9IjgyLjYzMTM1NDUiIHk9IjE0LjI0NTY4OSIgd2lkdGg9IjExIiBoZWlnaHQ9IjUyIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIGZpbGw9IiNGRkZGRkYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwOS40ODk1OTIsIDE4LjUyNDAyOCkgcm90YXRlKC00NS4wMDAwMDApIHRyYW5zbGF0ZSgtMTA5LjQ4OTU5MiwgLTE4LjUyNDAyOCkgIiB4PSIxMDMuOTg5NTkyIiB5PSIxLjAyNDAyODIxIiB3aWR0aD0iMTEiIGhlaWdodD0iMzUiPjwvcmVjdD4KICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgZmlsbD0iI0ZGRkZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTkuNzk4NjE2LCAyOS4xOTY5NTYpIHJvdGF0ZSgtNDUuMDAwMDAwKSB0cmFuc2xhdGUoLTk5Ljc5ODYxNiwgLTI5LjE5Njk1NikgIiB4PSI4OS41NDg2MTY0IiB5PSIyMi45NDY5NTU1IiB3aWR0aD0iMjAuNSIgaGVpZ2h0PSIxMi41Ij48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIGZpbGw9IiNGREJERjEiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0Ljg2MTY0NywgMTAyLjk4MjQxMSkgcm90YXRlKC00NS4wMDAwMDApIHRyYW5zbGF0ZSgtMjQuODYxNjQ3LCAtMTAyLjk4MjQxMSkgIiB4PSIxOS4zNjE2NDY3IiB5PSI5Ny40ODI0MTEiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxMSI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNMjcuNDI2MjQ4LDg2LjM1OTg4MjEgQzI3LjQyNjI0OCw4Ni4zNTk4ODIxIDMzLjA3NjUyMjUsODYuMzY2ODA4MSA0MS4wMjM0NzY0LDg2LjM2NTQyMyBDNDguOTc0NTg1OSw4Ni4zNjU0MjMgNTcuNjQwNDY0LDgzLjM1Njc0NTMgNTcuNjQwNDY0LDgzLjM1Njc0NTMgTDM4LjAxNDc5ODYsMTAyLjk4MjQxMSBMMjQuOTc5OTY1OSw4OS45NDc1Nzc5IEwyNy40MjQ4NjI4LDg2LjM2MTI2NzMgTDI3LjQyNjI0OCw4Ni4zNTk4ODIxIFoiIGlkPSLot6/lvoQiIGZpbGw9IiNGREJERjEiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNOTQuNzIyNTU0OCwzNy41ODM4NDI0IEwxMDUuNjI0MTYzLDI2LjY4MjIzNDIgTDEwMS4yNzg3NTcsMjIuMzM2ODI4MiBMOTAuMzc3MTQ4OSwzMy4yMzg0MzY1IEw5NC43MjI1NTQ4LDM3LjU4Mzg0MjQgWiBNODMuODUxNDIxMiwzMS4wNzMzNTIxIEwxMDEuMjk1MzgsMTMuNjI5MzkzNiBMMTE0LjMzMTU5OCwyNi42NjU2MTE2IEw5Ni44ODYyNTM5LDQ0LjExMDk1NTMgTDgzLjg1MTQyMTIsMzEuMDc2MTIyNiBMODMuODUxNDIxMiwzMS4wNzMzNTIxIFoiIGlkPSLlvaLnirYiIGZpbGw9IiM3ODM2QTAiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNNzEuMjkwMzMwNCwyMi44NzI5MDQ3IEM3MC4wODc5Njc2LDI0LjA3NTI2NzYgNzAuMTkwNDczMSwyNi4xMzM2OTA3IDcxLjUwNjQyMzIsMjcuNDQ5NjQwOSBMMTAwLjUxMjczNiw1Ni40NTU5NTMzIEMxMDEuODE0ODM0LDU3Ljc1ODA1MTQgMTAzLjg5NDAzNSw1Ny44NjQ3MTI2IDEwNS4wODgwODcsNTYuNjcwNjYwOSBDMTA2LjI5MDQ0OSw1NS40NjgyOTggMTA2LjE4Nzk0NCw1My40MDk4NzQ5IDEwNC44NzE5OTQsNTIuMDkzOTI0NyBMNzUuODY3MDY2NywyMy4wODg5OTc2IEM3NC41NjQ5Njg2LDIxLjc4Njg5OTUgNzIuNDg0MzgyMSwyMS42Nzg4NTMyIDcxLjI5MDMzMDQsMjIuODcyOTA0NyBaIE02Ni40NjI4NzExLDE4LjA0NTQ0NTMgQzcwLjA3NTUwMDYsMTQuNDMyODE1OCA3Ni4yNzAxNjI5LDE0Ljc3MDgwNzIgODAuMjI3NzEsMTguNzI4MzU0MyBMMTA5LjIzNDAyMiw0Ny43MzQ2NjY1IEMxMTMuMjIzNDI5LDUxLjcyNDA3MzQgMTEzLjUxOTg2NCw1Ny44OTM4MDE5IDEwOS45MTU1NDYsNjEuNDk4MTIwMiBDMTA2LjMwMjkxNiw2NS4xMTA3NDk3IDEwMC4xMDgyNTQsNjQuNzcyNzU4MyA5Ni4xNTA3MDcxLDYwLjgxNTIxMTQgTDY3LjE0NTc3OTksMzEuODEwMjg0MiBDNjMuMTU2MzczMSwyNy44MjA4Nzc0IDYyLjg1ODU1MjgsMjEuNjQ5NzYzNiA2Ni40NjI4NzExLDE4LjA0NTQ0NTMgWiBNOTkuMTMwMjk1Myw3LjEwMzY2NTkxIEM5Ny45MzA3MDI5LDguMzAzMjU4MzMgOTcuOTI3OTMyNCwxMC4yNjE5NDYzIDk5LjEzMDI5NTMsMTEuNDY0MzA5MiBMMTE2LjQ5NjY4MiwyOC44MzA2OTYgQzExNy43MDQ1ODYsMzAuMDM4NTk5NyAxMTkuNjUyMTkyLDMwLjAzNTgyOTMgMTIwLjg1NzMyNSwyOC44MzA2OTYgQzEyMi4wNTU1MzMsMjcuNjMyNDg4NiAxMjIuMDU5Njg4LDI1LjY3MjQxNTUgMTIwLjg1NzMyNSwyNC40NzAwNTI3IEwxMDMuNDkwOTM5LDcuMTAzNjY1OTEgQzEwMi4yODMwMzUsNS44OTU3NjIxMiAxMDAuMzM1NDI5LDUuODk4NTMyNTggOTkuMTMwMjk1Myw3LjEwMzY2NTkxIFogTTk0Ljc4NDg4OTMsMi43NTgyNTk5NyBDOTYuNTE0OTgsMS4wMjIyODYzOCA5OC44NjQxOTgsMC4wNDUyNjU1OTg0IDEwMS4zMTUwNzcsMC4wNDIzOTUwMjI4IEMxMDMuNzY1OTU3LDAuMDM5NTQ5NTQzNiAxMDYuMTE3NDQ3LDEuMDExMDg4NzIgMTA3Ljg1MTU4MiwyLjc0MzAyMjYgTDEyNS4yMTc5NjksMjAuMTA5NDA5MyBDMTI4LjgyMjI4NywyMy43MTM3Mjc3IDEyOC44MDU2NjQsMjkuNTcwMzk4NSAxMjUuMjAxMzQ2LDMzLjE3NDcxNjggQzEyMy40NzE0OTUsMzQuOTEwNDUwNCAxMjEuMTIyNjc3LDM1Ljg4NzQ1MTIgMTE4LjY3MjEzNywzNS44OTA1ODM5IEMxMTYuMjIxNTk3LDM1Ljg5MzY4NjcgMTEzLjg3MDMwMSwzNC45MjI2NjU2IDExMi4xMzYwMzksMzMuMTkxMzM5MyBMOTQuNzY5NjUyLDE1LjgyNDk1MjcgQzkxLjE2NTMzMzcsMTIuMjIwNjM0MyA5MS4xODE5NTYzLDYuMzYzOTYzNTEgOTQuNzg2Mjc0NSwyLjc1OTY0NTIgTDk0Ljc4NDg4OTMsMi43NTgyNTk5NyBaIiBpZD0i5b2i54q2IiBmaWxsPSIjNzgzNkEwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTI0Ljk5Nzk1MTYsODkuOTI5NTcwMSBDMjQuOTg0MTIxNSw4OS45NDM0MjIyIDM4LjAxNjE4MzgsMTAyLjk4MTAyNiAzOC4wMTYxODM4LDEwMi45ODEwMjYgQzM4LjAyMTcyNDYsMTAyLjk4NjU2NiA4OC4xNjYzNTI1LDUyLjgzMDg1NjggODguMTY2MzUyNSw1Mi44MzA4NTY4IEw3NS4xMzE1MTk3LDM5Ljc5NjAyNCBMMjQuOTk3OTUxNiw4OS45Mjk1NzAxIFogTTc1LjE0NTM3MTgsMzEuMDg4NTg5NCBMOTYuODcyNDAxOSw1Mi44MTU2MTk0IEw0Mi4zNzgyMTI0LDEwNy4zMDk4MDkgQzQxLjIyODE3NywxMDguNDc0NTkgMzkuNjYxMzIzMywxMDkuMTMyOTY4IDM4LjAyNDQ3OTMsMTA5LjEzOTI5NiBDMzYuMzg3NjM1MiwxMDkuMTQ1NDQ3IDM0LjgxNTgwNzcsMTA4LjQ5OTAzNCAzMy42NTY5MjU4LDEwNy4zNDMwNTQgTDIwLjYxOTMyMjUsOTQuMzA1NDUwOCBDMTguMjIwMTM3NSw5MS45MDYyNjU4IDE4LjIzMjYwNDQsODguMDAxMzU2OCAyMC42NTExODIzLDg1LjU4Mjc3ODkgTDc1LjE0NTM3MTgsMzEuMDg4NTg5NCBaIiBpZD0i5b2i54q2IiBmaWxsPSIjNzgzNkEwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTIwLjU5OTkyOTUsMTAzLjAxNTY1NiBDMjAuNjA0MDg1MiwxMDMuMDExNSAyNC45NTM2NDY4LDEwNy4zNjEwNjIgMjQuOTUzNjQ2OCwxMDcuMzYxMDYyIEMyNC45NDk0OTEyLDEwNy4zNTY5MDYgMjkuMzEwMTM0NiwxMDIuOTk2MjYzIDI5LjMxMDEzNDYsMTAyLjk5NjI2MyBMMjQuOTY0NzI4NSw5OC42NTA4NTY4IEwyMC41OTk5Mjk1LDEwMy4wMTU2NTYgTDIwLjU5OTkyOTUsMTAzLjAxNTY1NiBaIE0yNC45ODEzNTEsODkuOTQzNDIyMiBMMzguMDE3NTY5MSwxMDIuOTc5NjQgTDI5LjI5MDc0MTUsMTExLjcwNjQ2OCBDMjYuODkxNTY2NCwxMTQuMTA4NzE4IDIzLjAwMDU4MDgsMTE0LjExNTUzNCAyMC41OTMwMDM1LDExMS43MjE3MDUgTDE2LjIzOTI4NjIsMTA3LjM2Nzk4OCBDMTMuODQ1NDU3LDEwNC45NjA0MTEgMTMuODUyMjczNSwxMDEuMDY5NDI1IDE2LjI1NDUyMzYsOTguNjcwMjQ5NyBMMjQuOTgxMzUxLDg5Ljk0MzQyMjIgTDI0Ljk4MTM1MSw4OS45NDM0MjIyIFoiIGlkPSLlvaLnirYiIGZpbGw9IiM3ODM2QTAiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNMjAuNTk5OTI5NSwxMDMuMDE1NjU2IEMyMC42MDQwODUyLDEwMy4wMTE1IDI0Ljk1MzY0NjgsMTA3LjM2MTA2MiAyNC45NTM2NDY4LDEwNy4zNjEwNjIgQzI0Ljk0OTQ5MTIsMTA3LjM1NjkwNiAyOS4zMTAxMzQ2LDEwMi45OTYyNjMgMjkuMzEwMTM0NiwxMDIuOTk2MjYzIEwyNC45NjQ3Mjg1LDk4LjY1MDg1NjggTDIwLjU5OTkyOTUsMTAzLjAxNTY1NiBMMjAuNTk5OTI5NSwxMDMuMDE1NjU2IFogTTI0Ljk4MTM1MSw4OS45NDM0MjIyIEwzOC4wMTc1NjkxLDEwMi45Nzk2NCBMMjkuMjkwNzQxNSwxMTEuNzA2NDY4IEMyNi44OTE1NjY0LDExNC4xMDg3MTggMjMuMDAwNTgwOCwxMTQuMTE1NTM0IDIwLjU5MzAwMzUsMTExLjcyMTcwNSBMMTYuMjM5Mjg2MiwxMDcuMzY3OTg4IEMxMy44NDU0NTcsMTA0Ljk2MDQxMSAxMy44NTIyNzM1LDEwMS4wNjk0MjUgMTYuMjU0NTIzNiw5OC42NzAyNDk3IEwyNC45ODEzNTEsODkuOTQzNDIyMiBMMjQuOTgxMzUxLDg5Ljk0MzQyMjIgWiIgaWQ9IuW9oueKtiIgZmlsbD0iIzc4MzZBMCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNi4yNDM0NDE5LDEwNy4zNzIxNDMgTDAuOTc5ODA1MDUxLDEyMi42MzU3OCBDLTAuMjI1MzI4MjgzLDEyMy44NDA5MTQgLTAuMjI4MDk4NzM3LDEyNS43ODg1MiAwLjk3Mjg3OTA0LDEyNi45ODk0OTcgQzIuMTcyNDcxNDYsMTI4LjE4OTA5IDQuMTIxNDYzMDEsMTI4LjE4NDkzNCA1LjMyNTIxMDk4LDEyNi45ODExODYgTDIwLjU4ODg0NzksMTExLjcxNzU0OSBDMjEuNzkyNTk2LDExMC41MTM4MDEgMjEuNzk2NzUxNiwxMDguNTY0ODEgMjAuNTk3MTU5MSwxMDcuMzY1MjE3IEMxOS4zOTYxODE0LDEwNi4xNjQyNCAxNy40NDcxODk5LDEwNi4xNjgzOTUgMTYuMjQzNDQxOSwxMDcuMzcyMTQzIFogTTYwLjk2OTEyNTQsNDcuNDM5NjE2NyBMNjcuNDg2NTQxOCw1My45NTcwMzMxIEM2OC4wODg4NDMsNTQuNTU2Mjc4IDY5LjA2MjY5OTYsNTQuNTU0NDE4MyA2OS42NjI3MDc4LDUzLjk1Mjg3NzUgQzY5Ljk1MjIwNTEsNTMuNjY0ODUxNyA3MC4xMTU0MjY4LDUzLjI3MzYxOTkgNzAuMTE2NDc1OCw1Mi44NjUyNDk0IEM3MC4xMTc1MDUsNTIuNDU2ODc4OSA2OS45NTYyNzYzLDUyLjA2NDgyMTYgNjkuNjY4MjQ4Niw1MS43NzUzMjYzIEw2My4xNTA4MzIyLDQ1LjI1NzkwOTggQzYyLjg2MTQ2MzcsNDQuOTY5Mjc0OCA2Mi40NjkyMTI0LDQ0LjgwNzUyODQgNjIuMDYwNTAyNiw0NC44MDgzMDIyIEM2MS42NTE3OTI4LDQ0LjgwOTA4NzMgNjEuMjYwMTYxMyw0NC45NzIzMjg3IDYwLjk3MTg5NTgsNDUuMjYyMDY1NCBDNjAuMzcwNzE0NCw0NS44NjMyNDY4IDYwLjM2Nzk0MzksNDYuODM4NDM1MiA2MC45NjkxMjU0LDQ3LjQzOTYxNjcgTDYwLjk2OTEyNTQsNDcuNDM5NjE2NyBaIE01Mi4yNDc4Mzg4LDU2LjE2MDkwMzMgTDU4Ljc2NTI1NTIsNjIuNjc4MzE5NyBDNTkuMzY3NTU2NCw2My4yNzc1NjQ2IDYwLjM0MTQxMyw2My4yNzU3MDQ5IDYwLjk0MTQyMTIsNjIuNjc0MTY0MSBDNjEuNTQyOTYyLDYyLjA3NDE1NTkgNjEuNTQ0ODIxNyw2MS4xMDAyOTkzIDYwLjk0NTU3NjgsNjAuNDk3OTk4MSBMNTQuNDI4MTYwNCw1My45ODA1ODE3IEM1NC4xMzkwMzE5LDUzLjY5MjE4NzYgNTMuNzQ3MTgxMiw1My41MzA0NjEzIDUzLjMzODgxMSw1My41MzA5Nzg0IEM1Mi45MzA0NDA5LDUzLjUzMTUwMDQgNTIuNTM5MDAyOSw1My42OTQyMjMyIDUyLjI1MDYwOTIsNTMuOTgzMzUyMSBDNTEuNjQ5NDI3OCw1NC41ODQ1MzM2IDUxLjY0NjY1NzMsNTUuNTU5NzIyIDUyLjI0NzgzODgsNTYuMTYwOTAzMyBMNTIuMjQ3ODM4OCw1Ni4xNjA5MDMzIFogTTQzLjUyNjU1MjEsNjQuODgyMTkgTDUwLjA0Mzk2ODQsNzEuMzk5NjA2NCBDNTAuNjQ2MjY5Nyw3MS45OTg4NTEzIDUxLjYyMDEyNjMsNzEuOTk2OTkxNiA1Mi4yMjAxMzQ1LDcxLjM5NTQ1MDggQzUyLjgyMTY3NTMsNzAuNzk1NDQyNSA1Mi44MjM1MzUsNjkuODIxNTg2IDUyLjIyNDI5MDIsNjkuMjE5Mjg0NyBMNDUuNzA2ODczNyw2Mi43MDE4NjgzIEM0NS40MTc3NDUzLDYyLjQxMzQ3NDEgNDUuMDI1ODk0NSw2Mi4yNTE3NDc4IDQ0LjYxNzUyNDMsNjIuMjUyMjY0OSBDNDQuMjA5MTU0MSw2Mi4yNTI3ODY5IDQzLjgxNzcxNjIsNjIuNDE1NTA5OCA0My41MjkzMjI1LDYyLjcwNDYzODggQzQyLjkyNjc1NTgsNjMuMzA3MjA1NCA0Mi45MjUzNzA2LDY0LjI4MTAwODYgNDMuNTI2NTUyMSw2NC44ODIxOSBMNDMuNTI2NTUyMSw2NC44ODIxOSBaIE0zNC44MDUyNjU0LDczLjYwMzQ3NjYgTDQxLjMyMjY4MTgsODAuMTIwODkzMSBDNDEuOTI0OTgzMSw4MC43MjAxMzc5IDQyLjg5ODgzOTYsODAuNzE4Mjc4MiA0My40OTg4NDc5LDgwLjExNjczNzQgQzQ0LjEwMDM4ODcsNzkuNTE2NzI5MiA0NC4xMDIyNDg0LDc4LjU0Mjg3MjYgNDMuNTAzMDAzNSw3Ny45NDA1NzEzIEwzNi45ODU1ODcxLDcxLjQyMzE1NDkgQzM2LjY5NjQ1ODcsNzEuMTM0NzYwNyAzNi4zMDQ2MDc5LDcwLjk3MzAzNDQgMzUuODk2MjM3Nyw3MC45NzM1NTE1IEMzNS40ODc4Njc1LDcwLjk3NDA3MzYgMzUuMDk2NDI5Niw3MS4xMzY3OTY0IDM0LjgwODAzNTksNzEuNDI1OTI1NCBDMzQuMjA1NDY5Miw3Mi4wMjg0OTIgMzQuMjA0MDg0LDczLjAwMjI5NTIgMzQuODA1MjY1NCw3My42MDM0NzY2IEwzNC44MDUyNjU0LDczLjYwMzQ3NjYgWiIgaWQ9IuW9oueKtiIgZmlsbD0iIzc4MzZBMCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=");

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Container_1 = __webpack_require__(8);
var MissingProvidedServiceTypeError_1 = __webpack_require__(25);
var ServiceNotFoundError_1 = __webpack_require__(26);
var Token_1 = __webpack_require__(9);
/**
 * TypeDI can have multiple containers.
 * One container is ContainerInstance.
 */
var ContainerInstance = /** @class */ (function () {
    // -------------------------------------------------------------------------
    // Constructor
    // -------------------------------------------------------------------------
    function ContainerInstance(id) {
        // -------------------------------------------------------------------------
        // Private Properties
        // -------------------------------------------------------------------------
        /**
         * All registered services.
         */
        this.services = [];
        this.id = id;
    }
    /**
     * Checks if the service with given name or type is registered service container.
     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
     */
    ContainerInstance.prototype.has = function (identifier) {
        return !!this.findService(identifier);
    };
    /**
     * Retrieves the service with given name or type from the service container.
     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
     */
    ContainerInstance.prototype.get = function (identifier) {
        var globalContainer = Container_1.Container.of(undefined);
        var service = globalContainer.findService(identifier);
        var scopedService = this.findService(identifier);
        if (service && service.global === true)
            return this.getServiceValue(identifier, service);
        if (scopedService)
            return this.getServiceValue(identifier, scopedService);
        if (service && this !== globalContainer) {
            var clonedService = Object.assign({}, service);
            clonedService.value = undefined;
            var value = this.getServiceValue(identifier, clonedService);
            this.set(identifier, value);
            return value;
        }
        return this.getServiceValue(identifier, service);
    };
    /**
     * Gets all instances registered in the container of the given service identifier.
     * Used when service defined with multiple: true flag.
     */
    ContainerInstance.prototype.getMany = function (id) {
        var _this = this;
        return this.filterServices(id).map(function (service) { return _this.getServiceValue(id, service); });
    };
    /**
     * Sets a value for the given type or service name in the container.
     */
    ContainerInstance.prototype.set = function (identifierOrServiceMetadata, value) {
        var _this = this;
        if (identifierOrServiceMetadata instanceof Array) {
            identifierOrServiceMetadata.forEach(function (v) { return _this.set(v); });
            return this;
        }
        if (typeof identifierOrServiceMetadata === "string" || identifierOrServiceMetadata instanceof Token_1.Token) {
            return this.set({ id: identifierOrServiceMetadata, value: value });
        }
        if (typeof identifierOrServiceMetadata === "object" && identifierOrServiceMetadata.service) {
            return this.set({ id: identifierOrServiceMetadata.service, value: value });
        }
        if (identifierOrServiceMetadata instanceof Function) {
            return this.set({ type: identifierOrServiceMetadata, id: identifierOrServiceMetadata, value: value });
        }
        // const newService: ServiceMetadata<any, any> = arguments.length === 1 && typeof identifierOrServiceMetadata === "object"  && !(identifierOrServiceMetadata instanceof Token) ? identifierOrServiceMetadata : undefined;
        var newService = identifierOrServiceMetadata;
        var service = this.findService(newService.id);
        if (service && service.multiple !== true) {
            Object.assign(service, newService);
        }
        else {
            this.services.push(newService);
        }
        return this;
    };
    /**
     * Removes services with a given service identifiers (tokens or types).
     */
    ContainerInstance.prototype.remove = function () {
        var _this = this;
        var ids = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            ids[_i] = arguments[_i];
        }
        ids.forEach(function (id) {
            _this.filterServices(id).forEach(function (service) {
                _this.services.splice(_this.services.indexOf(service), 1);
            });
        });
        return this;
    };
    /**
     * Completely resets the container by removing all previously registered services from it.
     */
    ContainerInstance.prototype.reset = function () {
        this.services = [];
        return this;
    };
    // -------------------------------------------------------------------------
    // Private Methods
    // -------------------------------------------------------------------------
    /**
     * Filters registered service in the with a given service identifier.
     */
    ContainerInstance.prototype.filterServices = function (identifier) {
        return this.services.filter(function (service) {
            if (service.id)
                return service.id === identifier;
            if (service.type && identifier instanceof Function)
                return service.type === identifier || identifier.prototype instanceof service.type;
            return false;
        });
    };
    /**
     * Finds registered service in the with a given service identifier.
     */
    ContainerInstance.prototype.findService = function (identifier) {
        return this.services.find(function (service) {
            if (service.id) {
                if (identifier instanceof Object &&
                    service.id instanceof Token_1.Token &&
                    identifier.service instanceof Token_1.Token) {
                    return service.id === identifier.service;
                }
                return service.id === identifier;
            }
            if (service.type && identifier instanceof Function)
                return service.type === identifier; // todo: not sure why it was here || identifier.prototype instanceof service.type;
            return false;
        });
    };
    /**
     * Gets service value.
     */
    ContainerInstance.prototype.getServiceValue = function (identifier, service) {
        var _a;
        // find if instance of this object already initialized in the container and return it if it is
        if (service && service.value !== undefined)
            return service.value;
        // if named service was requested and its instance was not found plus there is not type to know what to initialize,
        // this means service was not pre-registered and we throw an exception
        if ((!service || !service.type) &&
            (!service || !service.factory) &&
            (typeof identifier === "string" || identifier instanceof Token_1.Token))
            throw new ServiceNotFoundError_1.ServiceNotFoundError(identifier);
        // at this point we either have type in service registered, either identifier is a target type
        var type = undefined;
        if (service && service.type) {
            type = service.type;
        }
        else if (service && service.id instanceof Function) {
            type = service.id;
        }
        else if (identifier instanceof Function) {
            type = identifier;
            // } else if (identifier instanceof Object && (identifier as { service: Token<any> }).service instanceof Token) {
            //     type = (identifier as { service: Token<any> }).service;
        }
        // if service was not found then create a new one and register it
        if (!service) {
            if (!type)
                throw new MissingProvidedServiceTypeError_1.MissingProvidedServiceTypeError(identifier);
            service = { type: type };
            this.services.push(service);
        }
        // setup constructor parameters for a newly initialized service
        var paramTypes = type && Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:paramtypes", type) : undefined;
        var params = paramTypes ? this.initializeParams(type, paramTypes) : [];
        // if factory is set then use it to create service instance
        var value;
        if (service.factory) {
            // filter out non-service parameters from created service constructor
            // non-service parameters can be, lets say Car(name: string, isNew: boolean, engine: Engine)
            // where name and isNew are non-service parameters and engine is a service parameter
            params = params.filter(function (param) { return param !== undefined; });
            if (service.factory instanceof Array) {
                // use special [Type, "create"] syntax to allow factory services
                // in this case Type instance will be obtained from Container and its method "create" will be called
                value = (_a = this.get(service.factory[0]))[service.factory[1]].apply(_a, params);
            }
            else { // regular factory function
                value = service.factory.apply(service, params.concat([this]));
            }
        }
        else { // otherwise simply create a new object instance
            if (!type)
                throw new MissingProvidedServiceTypeError_1.MissingProvidedServiceTypeError(identifier);
            params.unshift(null);
            // "extra feature" - always pass container instance as the last argument to the service function
            // this allows us to support javascript where we don't have decorators and emitted metadata about dependencies
            // need to be injected, and user can use provided container to get instances he needs
            params.push(this);
            value = new (type.bind.apply(type, params))();
        }
        if (service && !service.transient && value)
            service.value = value;
        if (type)
            this.applyPropertyHandlers(type, value);
        return value;
    };
    /**
     * Initializes all parameter types for a given target service class.
     */
    ContainerInstance.prototype.initializeParams = function (type, paramTypes) {
        var _this = this;
        return paramTypes.map(function (paramType, index) {
            var paramHandler = Container_1.Container.handlers.find(function (handler) { return handler.object === type && handler.index === index; });
            if (paramHandler)
                return paramHandler.value(_this);
            if (paramType && paramType.name && !_this.isTypePrimitive(paramType.name)) {
                return _this.get(paramType);
            }
            return undefined;
        });
    };
    /**
     * Checks if given type is primitive (e.g. string, boolean, number, object).
     */
    ContainerInstance.prototype.isTypePrimitive = function (param) {
        return ["string", "boolean", "number", "object"].indexOf(param.toLowerCase()) !== -1;
    };
    /**
     * Applies all registered handlers on a given target class.
     */
    ContainerInstance.prototype.applyPropertyHandlers = function (target, instance) {
        var _this = this;
        Container_1.Container.handlers.forEach(function (handler) {
            if (typeof handler.index === "number")
                return;
            if (handler.object.constructor !== target && !(target.prototype instanceof handler.object.constructor))
                return;
            instance[handler.propertyName] = handler.value(_this);
        });
    };
    return ContainerInstance;
}());
exports.ContainerInstance = ContainerInstance;

//# sourceMappingURL=ContainerInstance.js.map


/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Thrown when DI cannot inject value into property decorated by @Inject decorator.
 */
var CannotInjectError = /** @class */ (function (_super) {
    __extends(CannotInjectError, _super);
    function CannotInjectError(target, propertyName) {
        var _this = _super.call(this, "Cannot inject value into \"" + target.constructor.name + "." + propertyName + "\". " +
            "Please make sure you setup reflect-metadata properly and you don't use interfaces without service tokens as injection value.") || this;
        _this.name = "ServiceNotFoundError";
        Object.setPrototypeOf(_this, CannotInjectError.prototype);
        return _this;
    }
    return CannotInjectError;
}(Error));
exports.CannotInjectError = CannotInjectError;

//# sourceMappingURL=CannotInjectError.js.map


/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.syncStorage = exports.storage = void 0;
const syncMark = '__sync__';
exports.storage = {
    get: (key) => Promise.resolve(GM_getValue(key)),
    set: (key, value) => Promise.resolve(GM_setValue(key, value)),
    delete: (key) => Promise.resolve(GM_deleteValue(key)),
    keys: () => Promise.resolve(GM_listValues().filter((k) => !k.startsWith(syncMark))),
    on: (key, listener) => GM_addValueChangeListener(key, listener),
    off: (key, id) => GM_removeValueChangeListener(id),
};
const syncKey = (k) => syncMark + k;
exports.syncStorage = {
    get: (key) => GM_getValue(syncKey(key)),
    set: (key, value) => GM_setValue(syncKey(key), value),
    delete: (key) => GM_deleteValue(syncKey(key)),
    keys: () => GM_listValues().filter((k) => k.startsWith(syncMark)),
};


/***/ }),
/* 18 */
/***/ (function(module, exports) {

module.exports = rxjs;

/***/ }),
/* 19 */
/***/ (function(module, exports) {

module.exports = rxjs["operators"];

/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DateTime_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateTime = void 0;
const tslib_1 = __webpack_require__(0);
const _1 = __webpack_require__(2);
const dateFormatter = new Intl.DateTimeFormat(undefined, {
    year: 'numeric',
    month: 'numeric',
    day: 'numeric',
});
const timeFormatter = new Intl.DateTimeFormat(undefined, {
    hour: 'numeric',
    minute: 'numeric',
    hour12: false,
});
const dateTimeFormatter = new Intl.DateTimeFormat(undefined, {
    year: 'numeric',
    month: 'numeric',
    day: 'numeric',
    hour: 'numeric',
    minute: 'numeric',
    hour12: false,
});
const noYearDateTimeFormatter = new Intl.DateTimeFormat(undefined, {
    month: 'numeric',
    day: 'numeric',
    hour: 'numeric',
    minute: 'numeric',
    hour12: false,
});
let DateTime = DateTime_1 = class DateTime {
    diff(hisTime = 0, nowTime = Date.now(), maxRelativeDiff = DateTime_1.day * 7) {
        hisTime = typeof hisTime === 'number' ? hisTime : hisTime.getTime();
        nowTime = typeof nowTime === 'number' ? nowTime : nowTime.getTime();
        if (!hisTime)
            return 'N/A';
        const diffValue = nowTime - hisTime;
        if (diffValue >= maxRelativeDiff) {
            const his = new Date(hisTime);
            const now = new Date(nowTime);
            if (dateFormatter.format(his) === dateFormatter.format(now)) {
                return `今天 ${timeFormatter.format(his)}`;
            }
            if (his.getFullYear() === now.getFullYear()) {
                return noYearDateTimeFormatter.format(his);
            }
            return dateTimeFormatter.format(his);
        }
        const nYear = diffValue / DateTime_1.year;
        const nMonth = diffValue / DateTime_1.month;
        const nDay = diffValue / DateTime_1.day;
        const nHour = diffValue / DateTime_1.hour;
        const nMin = diffValue / DateTime_1.minute;
        if (nYear >= 1)
            return `${Math.floor(nYear)} 年前`;
        else if (nMonth >= 1)
            return `${Math.floor(nMonth)} 个月前`;
        else if (nDay >= 1)
            return `${Math.floor(nDay)} 天前`;
        else if (nHour >= 1)
            return `${Math.floor(nHour)} 小时前`;
        else if (nMin >= 1)
            return `${Math.floor(nMin)} 分钟前`;
        else
            return '刚刚';
    }
};
DateTime.second = 1000;
DateTime.minute = DateTime_1.second * 60;
DateTime.hour = DateTime_1.minute * 60;
DateTime.day = DateTime_1.hour * 24;
DateTime.month = DateTime_1.day * (365.25 / 12);
DateTime.year = DateTime_1.month * 12;
DateTime = DateTime_1 = tslib_1.__decorate([
    _1.Service()
], DateTime);
exports.DateTime = DateTime;


/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createMenu = void 0;
const tslib_1 = __webpack_require__(0);
const logo_svg_1 = tslib_1.__importDefault(__webpack_require__(14));
const typedi_1 = __webpack_require__(4);
const logger_1 = __webpack_require__(3);
const services_1 = __webpack_require__(2);
tslib_1.__exportStar(__webpack_require__(65), exports);
const supported = 'contextMenu' in document.documentElement && 'HTMLMenuItemElement' in window;
let MenuProvider = class MenuProvider {
    constructor(logger) {
        this.logger = logger;
        this.infoLists = new Array();
        if (!supported) {
            logger.warn(`不支持右键菜单`);
        }
    }
    init() {
        if (this.menu)
            return this.menu;
        const id = `user-script-menu-${Math.floor(Math.random() * 100000)}`;
        const body = document.body;
        const menu = body.appendChild(document.createElement('menu'));
        menu.id = id;
        menu.setAttribute('type', 'context');
        const matcher = (context, url) => {
            if (!url)
                return [];
            return this.infoLists.filter((info) => info.menu.contexts.includes(context) && info.patterns.some((p) => p.test(url)));
        };
        body.addEventListener('contextmenu', (ev) => {
            var _a, _b;
            const node = ev.target;
            let showMenu;
            if (node.nodeName === 'IMG') {
                this.url = (_a = node.getAttribute('src')) !== null && _a !== void 0 ? _a : undefined;
                showMenu = matcher('image', this.url);
            }
            else if (node.nodeName === 'A') {
                this.url = (_b = node.getAttribute('href')) !== null && _b !== void 0 ? _b : undefined;
                showMenu = matcher('link', this.url);
            }
            if (showMenu && showMenu.length > 0) {
                body.setAttribute('contextmenu', id);
                while (menu.firstChild) {
                    menu.firstChild.remove();
                }
                showMenu.forEach((menuItem) => {
                    menu.appendChild(menuItem.el);
                });
            }
            else {
                body.removeAttribute('contextmenu');
            }
        }, false);
        return (this.menu = menu);
    }
    createMenu(info) {
        if (!supported)
            return;
        const menu = this.init();
        const patterns = info.targetUrlPatterns.map((p) => new RegExp(`^${p.replace(/[.]/g, '\\.').replace(/[*]/g, '.*').replace(/[?]/g, '.')}$`, 'i'));
        const el = menu.appendChild(document.createElement('menuitem'));
        el.setAttribute('label', info.title);
        el.setAttribute('icon', logo_svg_1.default);
        el.style.visibility = 'hidden';
        el.addEventListener('click', () => {
            info.onclick({ url: this.url });
        }, false);
        this.infoLists.push({
            menu: info,
            patterns,
            el,
        });
    }
};
MenuProvider = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger])
], MenuProvider);
const provider = services_1.Container.get(MenuProvider);
exports.createMenu = provider.createMenu.bind(provider);


/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(0);
tslib_1.__exportStar(__webpack_require__(70), exports);


/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function (url, options) {
  if (!options) {
    // eslint-disable-next-line no-param-reassign
    options = {};
  } // eslint-disable-next-line no-underscore-dangle, no-param-reassign


  url = url && url.__esModule ? url.default : url;

  if (typeof url !== 'string') {
    return url;
  } // If url is already wrapped in quotes, remove them


  if (/^['"].*['"]$/.test(url)) {
    // eslint-disable-next-line no-param-reassign
    url = url.slice(1, -1);
  }

  if (options.hash) {
    // eslint-disable-next-line no-param-reassign
    url += options.hash;
  } // Should url be wrapped?
  // See https://drafts.csswg.org/css-values-3/#urls


  if (/["'() \t\n]/.test(url) || options.needQuotes) {
    return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, '\\n'), "\"");
  }

  return url;
};

/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const services_1 = __webpack_require__(2);
const introduce_1 = __webpack_require__(30);
const tag_tip_1 = __webpack_require__(37);
const syringe_1 = __webpack_require__(40);
const auto_update_1 = __webpack_require__(63);
const tag_context_menu_1 = __webpack_require__(64);
const database_updater_1 = __webpack_require__(66);
const suggest_1 = __webpack_require__(71);
const tag_database_1 = __webpack_require__(72);
const popup_1 = __webpack_require__(73);
const info_1 = __webpack_require__(13);
const utils_1 = __webpack_require__(12);
const image_context_menu_1 = __webpack_require__(76);
__webpack_require__(77);
services_1.Container.get(database_updater_1.DatabaseUpdater);
services_1.Container.get(tag_database_1.TagDatabase);
services_1.Container.get(syringe_1.Syringe);
window.document.addEventListener('DOMContentLoaded', () => {
    services_1.Container.get(tag_context_menu_1.TagContextMenu);
    services_1.Container.get(image_context_menu_1.ImageContextMenu);
    services_1.Container.get(suggest_1.Suggest);
    services_1.Container.get(auto_update_1.AutoUpdate);
    services_1.Container.get(tag_tip_1.TagTip);
    services_1.Container.get(introduce_1.Introduce);
    const button = document.body.appendChild(document.createElement('div'));
    button.id = 'eh-syringe-popup-button';
    button.title = info_1.packageJson.displayName;
    const badge = button.appendChild(document.createElement('div'));
    badge.id = 'eh-syringe-popup-badge';
    utils_1.setBadge({ text: '' });
    const popupBack = document.body.appendChild(document.createElement('div'));
    popupBack.id = 'eh-syringe-popup-back';
    popupBack.lang = 'cmn-Hans';
    const popup = popupBack.appendChild(document.createElement('div'));
    popup.id = 'eh-syringe-popup';
    const closeListeners = new Array();
    const openListeners = new Array();
    popupBack.classList.add('close');
    popupBack.ontransitionend = (ev) => {
        if (ev.target !== popupBack)
            return;
        if (popupBack.classList.contains('opening')) {
            popupBack.classList.remove('opening', 'close');
            popupBack.classList.add('open');
        }
        if (popupBack.classList.contains('closing')) {
            popupBack.classList.remove('closing', 'open');
            popupBack.classList.add('close');
            closeListeners.forEach((l) => l());
        }
    };
    const open = () => {
        openListeners.forEach((l) => l());
        popupBack.classList.add('opening');
    };
    const close = () => {
        popupBack.classList.add('closing');
    };
    services_1.Container.get(popup_1.Popup).mount(popup, {
        close: close,
        onopen(listener) {
            openListeners.push(listener);
        },
        onclose(listener) {
            closeListeners.push(listener);
        },
    });
    popupBack.addEventListener('click', (ev) => {
        if (ev.target === popupBack && popupBack.classList.contains('open'))
            close();
    });
    button.addEventListener('click', () => {
        if (popupBack.classList.contains('close'))
            open();
    });
});


/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Thrown when service is registered without type.
 */
var MissingProvidedServiceTypeError = /** @class */ (function (_super) {
    __extends(MissingProvidedServiceTypeError, _super);
    function MissingProvidedServiceTypeError(identifier) {
        var _this = _super.call(this, "Cannot determine a class of the requesting service \"" + identifier + "\"") || this;
        _this.name = "ServiceNotFoundError";
        Object.setPrototypeOf(_this, MissingProvidedServiceTypeError.prototype);
        return _this;
    }
    return MissingProvidedServiceTypeError;
}(Error));
exports.MissingProvidedServiceTypeError = MissingProvidedServiceTypeError;

//# sourceMappingURL=MissingProvidedServiceTypeError.js.map


/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Token_1 = __webpack_require__(9);
/**
 * Thrown when requested service was not found.
 */
var ServiceNotFoundError = /** @class */ (function (_super) {
    __extends(ServiceNotFoundError, _super);
    function ServiceNotFoundError(identifier) {
        var _this = _super.call(this) || this;
        _this.name = "ServiceNotFoundError";
        if (typeof identifier === "string") {
            _this.message = "Service \"" + identifier + "\" was not found, looks like it was not registered in the container. " +
                ("Register it by calling Container.set(\"" + identifier + "\", ...) before using service.");
        }
        else if (identifier instanceof Token_1.Token && identifier.name) {
            _this.message = "Service \"" + identifier.name + "\" was not found, looks like it was not registered in the container. " +
                "Register it by calling Container.set before using service.";
        }
        else if (identifier instanceof Token_1.Token) {
            _this.message = "Service with a given token was not found, looks like it was not registered in the container. " +
                "Register it by calling Container.set before using service.";
        }
        Object.setPrototypeOf(_this, ServiceNotFoundError.prototype);
        return _this;
    }
    return ServiceNotFoundError;
}(Error));
exports.ServiceNotFoundError = ServiceNotFoundError;

//# sourceMappingURL=ServiceNotFoundError.js.map


/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Container_1 = __webpack_require__(8);
var Token_1 = __webpack_require__(9);
/**
 * Marks class as a service that can be injected using container.
 */
function Service(optionsOrServiceName, maybeFactory) {
    if (arguments.length === 2 || (optionsOrServiceName instanceof Function)) {
        var serviceId = { service: new Token_1.Token() };
        var dependencies_1 = arguments.length === 2 ? optionsOrServiceName : [];
        var factory_1 = arguments.length === 2 ? maybeFactory : optionsOrServiceName;
        Container_1.Container.set({
            id: serviceId.service,
            factory: function (container) {
                var params = dependencies_1.map(function (dependency) { return container.get(dependency); });
                return factory_1.apply(void 0, params);
            }
        });
        return serviceId;
    }
    else {
        return function (target) {
            var service = {
                type: target
            };
            if (typeof optionsOrServiceName === "string" || optionsOrServiceName instanceof Token_1.Token) {
                service.id = optionsOrServiceName;
                service.multiple = optionsOrServiceName.multiple;
                service.global = optionsOrServiceName.global || false;
                service.transient = optionsOrServiceName.transient;
            }
            else if (optionsOrServiceName) { // ServiceOptions
                service.id = optionsOrServiceName.id;
                service.factory = optionsOrServiceName.factory;
                service.multiple = optionsOrServiceName.multiple;
                service.global = optionsOrServiceName.global || false;
                service.transient = optionsOrServiceName.transient;
            }
            Container_1.Container.set(service);
        };
    }
}
exports.Service = Service;

//# sourceMappingURL=Service.js.map


/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Container_1 = __webpack_require__(8);
var Token_1 = __webpack_require__(9);
var CannotInjectError_1 = __webpack_require__(16);
/**
 * Injects a service into a class property or constructor parameter.
 */
function Inject(typeOrName) {
    return function (target, propertyName, index) {
        if (!typeOrName)
            typeOrName = function () { return Reflect.getMetadata("design:type", target, propertyName); };
        Container_1.Container.registerHandler({
            object: target,
            propertyName: propertyName,
            index: index,
            value: function (containerInstance) {
                var identifier;
                if (typeof typeOrName === "string") {
                    identifier = typeOrName;
                }
                else if (typeOrName instanceof Token_1.Token) {
                    identifier = typeOrName;
                }
                else {
                    identifier = typeOrName();
                }
                if (identifier === Object)
                    throw new CannotInjectError_1.CannotInjectError(target, propertyName);
                return containerInstance.get(identifier);
            }
        });
    };
}
exports.Inject = Inject;

//# sourceMappingURL=Inject.js.map


/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Container_1 = __webpack_require__(8);
var Token_1 = __webpack_require__(9);
var CannotInjectError_1 = __webpack_require__(16);
/**
 * Injects a service into a class property or constructor parameter.
 */
function InjectMany(typeOrName) {
    return function (target, propertyName, index) {
        if (!typeOrName)
            typeOrName = function () { return Reflect.getMetadata("design:type", target, propertyName); };
        Container_1.Container.registerHandler({
            object: target,
            propertyName: propertyName,
            index: index,
            value: function (containerInstance) {
                var identifier;
                if (typeof typeOrName === "string") {
                    identifier = typeOrName;
                }
                else if (typeOrName instanceof Token_1.Token) {
                    identifier = typeOrName;
                }
                else {
                    identifier = typeOrName();
                }
                if (identifier === Object)
                    throw new CannotInjectError_1.CannotInjectError(target, propertyName);
                return containerInstance.getMany(identifier);
            }
        });
    };
}
exports.InjectMany = InjectMany;

//# sourceMappingURL=InjectMany.js.map


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Introduce = void 0;
const tslib_1 = __webpack_require__(0);
const services_1 = __webpack_require__(2);
const logger_1 = __webpack_require__(3);
const storage_1 = __webpack_require__(7);
const messaging_1 = __webpack_require__(6);
__webpack_require__(33);
const tagging_1 = __webpack_require__(10);
let Introduce = class Introduce {
    constructor(logger, storage, messaging, tagging) {
        this.logger = logger;
        this.storage = storage;
        this.messaging = messaging;
        this.tagging = tagging;
        this.target = null;
        this.onclick = (e) => {
            var _a;
            const target = this.findTarget(e.target);
            if (!target) {
                return;
            }
            this.target = target;
            const isOpen = !!target.style.color;
            if (!isOpen) {
                this.closeIntroduceBox();
                return;
            }
            const m = /'(.*)'/gi.exec((_a = target.getAttribute('onclick')) !== null && _a !== void 0 ? _a : '');
            if (!(m === null || m === void 0 ? void 0 : m[1]))
                return;
            const m2 = m[1].split(':');
            let namespace = 'misc';
            let tag = '';
            if (m2.length === 1) {
                tag = m2[0];
            }
            else {
                namespace = m2.shift();
                tag = m2.join(':');
            }
            this.openIntroduceBox(namespace, tag, () => this.target !== target).catch(this.logger.error);
        };
        this.init().catch(logger.error);
    }
    init() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const conf = yield this.storage.get('config');
            if (!conf.showIntroduce)
                return;
            const tagList = document.querySelector('#taglist');
            this.tagList = tagList;
            const gridRight = document.querySelector('#gd5');
            if (!(tagList && gridRight))
                return;
            this.logger.log('标签介绍');
            this.initIntroduceBox();
            gridRight.insertBefore(this.introduceBox, null);
            tagList.addEventListener('click', this.onclick);
        });
    }
    initIntroduceBox() {
        this.introduceBox = document.createElement('div');
        this.introduceBox.id = 'ehs-introduce-box';
        this.introduceBox.addEventListener('click', (ev) => {
            let target = ev.target;
            if (target instanceof HTMLElement && target.classList.contains('ehs-close')) {
                const selectedTag = this.tagList.querySelector('[style*="color"]');
                if (selectedTag) {
                    selectedTag.click();
                }
                else {
                    this.closeIntroduceBox();
                }
                return;
            }
            while (target) {
                if (target.nodeName === 'A' && 'href' in target)
                    break;
                target = target.parentNode;
            }
            if (target) {
                const a = target;
                ev.preventDefault();
                window.open(a.href, '_BLANK');
            }
        });
    }
    findTarget(node) {
        const isTarget = (n) => n.nodeType === Node.ELEMENT_NODE &&
            n.nodeName === 'A' &&
            n.id.startsWith('ta_') &&
            n.parentElement != null &&
            (n.parentElement.classList.contains('gt') ||
                n.parentElement.classList.contains('gtl') ||
                n.parentElement.classList.contains('gtw'));
        while (node) {
            if (isTarget(node))
                return node;
            node = node.parentNode;
        }
        return null;
    }
    openIntroduceBox(namespace, key, canceled) {
        var _a;
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const timer = this.logger.time('获取标签介绍');
            const tagData = yield this.messaging.emit('get-tag', this.tagging.fullKey({ namespace, key }));
            timer.log(tagData);
            timer.end();
            if (canceled()) {
                return;
            }
            if (tagData) {
                this.introduceBox.innerHTML = `
            <div class="ehs-title">
                <div>
                    <div class="ehs-cn">${this.tagging.markImagesAndEmoji(tagData.name)}</div>
                    <div class="ehs-en">${this.tagging.namespace(tagData.ns)}:${tagData.key}</div>
                </div>
                <span class="ehs-close">×</span>
            </div>
            <div class="ehs-content">
                ${tagData.intro ? tagData.intro : `<div class="ehs-no-intro">无介绍</div> `}
            </div>
            <div class="ehs-href">${(_a = tagData.links) !== null && _a !== void 0 ? _a : ''}</div>`;
            }
            else {
                const editorUrl = this.tagging.editorUrl({ namespace, key });
                this.introduceBox.innerHTML = `
            <div class="ehs-title">
                <div>
                    <div class="ehs-cn">${namespace}:${key}</div>
                    <div class="ehs-en">该标签尚未翻译</div>
                </div>
                <span class="ehs-close">×</span>
            </div>
            <div class="ehs-content">
                <div class="ehs-no-translation">
                    <div class="text">
                        该标签尚未翻译
                    </div>
                    <div class="button">
                        <a href="${editorUrl}" target="_blank">提供翻译</a>
                    </div>
                </div>
            </div>`;
            }
        });
    }
    closeIntroduceBox() {
        this.introduceBox.innerHTML = '';
    }
};
Introduce = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger,
        storage_1.Storage,
        messaging_1.Messaging,
        tagging_1.Tagging])
], Introduce);
exports.Introduce = Introduce;


/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.messaging = void 0;
const messaging_1 = __webpack_require__(32);
exports.messaging = new messaging_1.Messaging();


/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.messaging = exports.Messaging = exports.Multicast = void 0;
const tslib_1 = __webpack_require__(0);
class Multicast {
    constructor(key) {
        this.key = key;
        this.listeners = new Set();
        this.handle = (request) => tslib_1.__awaiter(this, void 0, void 0, function* () {
            const promises = [...this.listeners.keys()].map((l) => Promise.resolve(l(request)));
            let first, all;
            try {
                first = yield Promise.race(promises);
                all = yield Promise.all(promises);
                return first;
            }
            catch (ex) {
                const error = ex;
                Object.defineProperty(error, 'request', { value: request, enumerable: true });
                if (first)
                    Object.defineProperty(error, 'firstReply', { value: first, enumerable: true });
                if (all)
                    Object.defineProperty(error, 'replies', { value: all, enumerable: true });
                throw error;
            }
        });
    }
    get size() {
        return this.listeners.size;
    }
    add(listener) {
        this.listeners.add(listener);
    }
    remove(listener) {
        return this.listeners.delete(listener);
    }
}
exports.Multicast = Multicast;
class Messaging {
    constructor() {
        this.handlers = new Map();
    }
    on(key, listener) {
        let handler = this.handlers.get(key);
        if (!handler) {
            handler = new Multicast(key);
            this.handlers.set(key, handler);
        }
        handler.add(listener);
        return { key, value: listener };
    }
    off(listener) {
        const handler = this.handlers.get(listener.key);
        if (!handler)
            return false;
        return handler.remove(listener.value);
    }
    emit(key, args, broadcast = false) {
        const handler = this.handlers.get(key);
        if (!handler || handler.size === 0) {
            if (broadcast)
                return Promise.resolve();
            return Promise.reject(new Error(`消息 ${key} 还未注册过处理程序`));
        }
        const handles = handler.handle(args);
        if (broadcast) {
            return handles.catch(console.error);
        }
        return handles;
    }
}
exports.Messaging = Messaging;
exports.messaging = new Messaging();


/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

var api = __webpack_require__(11);
            var content = __webpack_require__(34);

            content = content.__esModule ? content.default : content;

            if (typeof content === 'string') {
              content = [[module.i, content, '']];
            }

var options = {"insert":":root"};

options.insert = ":root";
options.singleton = false;

var update = api(content, options);



module.exports = content.locals || {};

/***/ }),
/* 34 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(true);
// Module
___CSS_LOADER_EXPORT___.push([module.i, "#gmid{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}#gmid #gd3,#gmid #gd4{-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none}#gmid #gd5{-webkit-box-flex:1;-webkit-flex:auto;-moz-box-flex:1;-ms-flex:auto;flex:auto;width:auto}div#gd5{z-index:3;position:relative}div#gd5 #ehs-introduce-box img{margin:0;width:auto;height:auto}#ehs-introduce-box{position:absolute;left:0;top:0;bottom:0;right:-5px;overflow:auto;background:#edebdf;text-align:left;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-border-radius:0 0 5px 0;-moz-border-radius:0 0 5px 0;border-radius:0 0 5px 0}#ehs-introduce-box,#ehs-introduce-box .ehs-title{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal}#ehs-introduce-box .ehs-title{-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none;margin:0 8px;border-bottom:1px solid #5c0d12;line-height:14px;padding:3px 0;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}#ehs-introduce-box .ehs-title .ehs-cn{font-weight:700}#ehs-introduce-box .ehs-title .ehs-cn,#ehs-introduce-box .ehs-title .ehs-en{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#ehs-introduce-box .ehs-title .ehs-en{opacity:.7}#ehs-introduce-box .ehs-title>div{overflow:hidden;-webkit-box-flex:1;-webkit-flex:auto;-moz-box-flex:1;-ms-flex:auto;flex:auto}#ehs-introduce-box .ehs-title>span{overflow:hidden;-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none}#ehs-introduce-box .ehs-close{cursor:pointer;font-size:16px;opacity:.8;line-height:28px;width:20px;text-align:center}#ehs-introduce-box .ehs-close:hover{opacity:1}#ehs-introduce-box .ehs-content{-webkit-box-flex:1;-webkit-flex:auto;-moz-box-flex:1;-ms-flex:auto;flex:auto;overflow:auto;padding:8px}#ehs-introduce-box .ehs-content::-webkit-scrollbar{width:2px}#ehs-introduce-box .ehs-content abbr[title]{padding:0 1px}#ehs-introduce-box .ehs-content abbr[title]:after{content:\" (\" attr(title) \")\";font-size:90%}#ehs-introduce-box .ehs-href{-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none;border-top:1px solid #5c0d12;margin:0 8px;line-height:24px}#ehs-introduce-box .ehs-href:empty{display:none}#ehs-introduce-box:empty{display:none}#ehs-introduce-box img{max-width:100%}body.ex #ehs-introduce-box{background:#4f535b}body.ex #ehs-introduce-box .ehs-title{border-bottom:1px solid #000}body.ex #ehs-introduce-box .ehs-href{border-top:1px solid #000}.ehs-no-translation{text-align:center;padding-top:80px}.ehs-no-translation .text{padding:8px}.ehs-no-intro,.ehs-no-translation .text{font-size:16px;opacity:.3;font-weight:700}.ehs-no-intro{text-align:center;padding-top:88px}body.ehs-image-level-0 #ehs-introduce-box .ehs-content img{display:none}body.ehs-image-level-1 #ehs-introduce-box .ehs-content img[nsfw]{display:none}body.ehs-image-level-2 #ehs-introduce-box .ehs-content img[nsfw=R18G]{display:none}", "",{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,MACE,mBAAa,CAAb,oBAAa,CAAb,gBAAa,CAAb,mBAAa,CAAb,YACF,CACA,sBAEE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SACF,CACA,WACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,UACF,CACA,QACE,SAAU,CACV,iBACF,CACA,+BACE,QAAS,CACT,UAAW,CACX,WACF,CACA,mBACE,iBAAkB,CAClB,MAAS,CACT,KAAQ,CACR,QAAS,CACT,UAAW,CACX,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAEhB,2BAAsB,CAAtB,6BAAsB,CAAtB,wBAAsB,CAAtB,yBAAsB,CAAtB,qBAAsB,CACtB,+BAAwB,CAAxB,4BAAwB,CAAxB,uBACF,CACA,iDAJE,mBAAa,CAAb,oBAAa,CAAb,gBAAa,CAAb,mBAAa,CAAb,YAAa,CACb,4BAAsB,CAAtB,yBAWF,CARA,8BACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,YAAa,CACb,+BAAgC,CAChC,gBAAiB,CACjB,aAAc,CAEd,6BAAmB,CAAnB,0BAAmB,CAAnB,0BAAmB,CAAnB,sBAAmB,CAAnB,kBACF,CACA,sCACE,eAIF,CACA,4EAJE,eAAgB,CAChB,yBAAuB,CAAvB,sBAAuB,CACvB,kBAOF,CALA,sCACE,UAIF,CACA,kCACE,eAAgB,CAChB,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SACF,CACA,mCACE,eAAgB,CAChB,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SACF,CACA,8BACE,cAAe,CACf,cAAe,CACf,UAAY,CACZ,gBAAiB,CACjB,UAAW,CACX,iBACF,CACA,oCACE,SACF,CACA,gCACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,aAAc,CACd,WACF,CACA,mDACE,SACF,CACA,4CACE,aACF,CACA,kDACE,4BAA6B,CAC7B,aACF,CACA,6BACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,4BAA6B,CAC7B,YAAa,CACb,gBACF,CACA,mCACE,YACF,CACA,yBACE,YACF,CACA,uBACE,cACF,CACA,2BACE,kBACF,CACA,sCACE,4BACF,CACA,qCACE,yBACF,CACA,oBACE,iBAAkB,CAClB,gBACF,CACA,0BAGE,WAEF,CACA,wCALE,cAAe,CACf,UAAY,CAEZ,eAQF,CANA,cACE,iBAAkB,CAClB,gBAIF,CAEA,2DACE,YACF,CACA,iEACE,YACF,CACA,sEACE,YACF","file":"index.less","sourcesContent":["#gmid {\n  display: flex;\n}\n#gmid #gd3,\n#gmid #gd4 {\n  flex: none;\n}\n#gmid #gd5 {\n  flex: auto;\n  width: auto;\n}\ndiv#gd5 {\n  z-index: 3;\n  position: relative;\n}\ndiv#gd5 #ehs-introduce-box img {\n  margin: 0;\n  width: auto;\n  height: auto;\n}\n#ehs-introduce-box {\n  position: absolute;\n  left: 0px;\n  top: 0px;\n  bottom: 0;\n  right: -5px;\n  overflow: auto;\n  background: #edebdf;\n  text-align: left;\n  display: flex;\n  flex-direction: column;\n  border-radius: 0 0 5px 0;\n}\n#ehs-introduce-box .ehs-title {\n  flex: none;\n  margin: 0 8px;\n  border-bottom: 1px solid #5c0d12;\n  line-height: 14px;\n  padding: 3px 0;\n  display: flex;\n  flex-direction: row;\n}\n#ehs-introduce-box .ehs-title .ehs-cn {\n  font-weight: bold;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n#ehs-introduce-box .ehs-title .ehs-en {\n  opacity: 0.7;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n#ehs-introduce-box .ehs-title > div {\n  overflow: hidden;\n  flex: auto;\n}\n#ehs-introduce-box .ehs-title > span {\n  overflow: hidden;\n  flex: none;\n}\n#ehs-introduce-box .ehs-close {\n  cursor: pointer;\n  font-size: 16px;\n  opacity: 0.8;\n  line-height: 28px;\n  width: 20px;\n  text-align: center;\n}\n#ehs-introduce-box .ehs-close:hover {\n  opacity: 1;\n}\n#ehs-introduce-box .ehs-content {\n  flex: auto;\n  overflow: auto;\n  padding: 8px;\n}\n#ehs-introduce-box .ehs-content::-webkit-scrollbar {\n  width: 2px;\n}\n#ehs-introduce-box .ehs-content abbr[title] {\n  padding: 0 1px;\n}\n#ehs-introduce-box .ehs-content abbr[title]::after {\n  content: ' (' attr(title) ')';\n  font-size: 90%;\n}\n#ehs-introduce-box .ehs-href {\n  flex: none;\n  border-top: 1px solid #5c0d12;\n  margin: 0 8px;\n  line-height: 24px;\n}\n#ehs-introduce-box .ehs-href:empty {\n  display: none;\n}\n#ehs-introduce-box:empty {\n  display: none;\n}\n#ehs-introduce-box img {\n  max-width: 100%;\n}\nbody.ex #ehs-introduce-box {\n  background: #4f535b;\n}\nbody.ex #ehs-introduce-box .ehs-title {\n  border-bottom: 1px solid #000;\n}\nbody.ex #ehs-introduce-box .ehs-href {\n  border-top: 1px solid #000;\n}\n.ehs-no-translation {\n  text-align: center;\n  padding-top: 80px;\n}\n.ehs-no-translation .text {\n  font-size: 16px;\n  opacity: 0.3;\n  padding: 8px;\n  font-weight: bold;\n}\n.ehs-no-intro {\n  text-align: center;\n  padding-top: 88px;\n  font-size: 16px;\n  opacity: 0.3;\n  font-weight: bold;\n}\n/* nsfw=\"R18\" */\nbody.ehs-image-level-0 #ehs-introduce-box .ehs-content img {\n  display: none;\n}\nbody.ehs-image-level-1 #ehs-introduce-box .ehs-content img[nsfw] {\n  display: none;\n}\nbody.ehs-image-level-2 #ehs-introduce-box .ehs-content img[nsfw='R18G'] {\n  display: none;\n}\n"]}]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);


/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/*!
 * escape-html
 * Copyright(c) 2012-2013 TJ Holowaychuk
 * Copyright(c) 2015 Andreas Lubbe
 * Copyright(c) 2015 Tiancheng "Timothy" Gu
 * MIT Licensed
 */



/**
 * Module variables.
 * @private
 */

var matchHtmlRegExp = /["'&<>]/;

/**
 * Module exports.
 * @public
 */

module.exports = escapeHtml;

/**
 * Escape special characters in the given string of html.
 *
 * @param  {string} string The string to escape for inserting into HTML
 * @return {string}
 * @public
 */

function escapeHtml(string) {
  var str = '' + string;
  var match = matchHtmlRegExp.exec(str);

  if (!match) {
    return str;
  }

  var escape;
  var html = '';
  var index = 0;
  var lastIndex = 0;

  for (index = match.index; index < str.length; index++) {
    switch (str.charCodeAt(index)) {
      case 34: // "
        escape = '&quot;';
        break;
      case 38: // &
        escape = '&amp;';
        break;
      case 39: // '
        escape = '&#39;';
        break;
      case 60: // <
        escape = '&lt;';
        break;
      case 62: // >
        escape = '&gt;';
        break;
      default:
        continue;
    }

    if (lastIndex !== index) {
      html += str.substring(lastIndex, index);
    }

    lastIndex = index + 1;
    html += escape;
  }

  return lastIndex !== index
    ? html + str.substring(lastIndex, index)
    : html;
}


/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function () {
  // https://mths.be/emoji
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83E\uDDD1(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFE])|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83E\uDDD1(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC3B\u200D\u2744|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDF])\u200D[\u2640\u2642])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
};


/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TagTip = void 0;
const tslib_1 = __webpack_require__(0);
const rxjs_1 = __webpack_require__(18);
const operators_1 = __webpack_require__(19);
const services_1 = __webpack_require__(2);
const storage_1 = __webpack_require__(7);
const logger_1 = __webpack_require__(3);
const messaging_1 = __webpack_require__(6);
const tagging_1 = __webpack_require__(10);
__webpack_require__(38);
let TagTip = class TagTip {
    constructor(storage, logger, messaging, tagging) {
        this.storage = storage;
        this.logger = logger;
        this.messaging = messaging;
        this.tagging = tagging;
        this.selectedIndex = 0;
        this.delimiter = ' ';
        this.ctrlKey = false;
        this.disableExclusionMode = false;
        this.init().catch(logger.error);
    }
    init() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const conf = yield this.storage.get('config');
            if (!conf.tagTip)
                return;
            this.logger.log('标签提示');
            const searchInput = document.querySelector('#f_search, #newtagfield, [name=f_search]');
            if (!searchInput)
                return;
            this.disableExclusionMode = searchInput.id === 'newtagfield';
            this.delimiter = location.pathname.startsWith('/g/') ? ',' : ' ';
            this.inputElement = searchInput;
            this.inputElement.autocomplete = 'off';
            this.autoCompleteList = document.createElement('div');
            this.autoCompleteList.className = 'eh-syringe-lite-auto-complete-list';
            rxjs_1.fromEvent(this.inputElement, 'keyup')
                .pipe(operators_1.filter((e) => !new Set(['ArrowUp', 'ArrowDown', 'Enter', 'Meta', 'Control', 'Alt']).has(e.key)), operators_1.map(() => this.inputElement.value))
                .subscribe((s) => {
                this.search(s).catch(this.logger.error);
            });
            rxjs_1.fromEvent(this.inputElement, 'keydown').subscribe((e) => this.keydown(e));
            rxjs_1.fromEvent(this.inputElement, 'keyup').subscribe((e) => this.checkCtrl(e));
            rxjs_1.fromEvent(this.autoCompleteList, 'click').subscribe((e) => {
                this.inputElement.focus();
                e.preventDefault();
                e.stopPropagation();
            });
            rxjs_1.fromEvent(this.inputElement, 'focus').subscribe(() => this.setListPosition());
            rxjs_1.fromEvent(window, 'resize').subscribe(() => this.setListPosition());
            rxjs_1.fromEvent(window, 'scroll').subscribe(() => this.setListPosition());
            rxjs_1.fromEvent(document, 'click').subscribe(() => {
                this.autoCompleteList.innerHTML = '';
            });
            document.body.insertBefore(this.autoCompleteList, null);
        });
    }
    search(value) {
        var _a;
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            value = this.inputElement.value = value.replace(/  +/gm, ' ');
            const values = (_a = value.match(/(\S+:".+?"|".+?"|\S+:\S+|\S+)/gim)) !== null && _a !== void 0 ? _a : [];
            const result = [];
            const used = new Set();
            yield Promise.all(values.map((v, i) => tslib_1.__awaiter(this, void 0, void 0, function* () {
                const sv = values.slice(i);
                if (sv.length) {
                    const svs = sv.join(' ');
                    if (!svs || svs.replace(/\s+/, '').length === 0)
                        return;
                    const suggestions = yield this.messaging.emit('suggest-tag', {
                        term: svs,
                        limit: 50,
                    });
                    suggestions.forEach((suggestion) => {
                        const tag = suggestion.tag;
                        if (used.has(this.tagging.fullKey(tag)))
                            return;
                        used.add(this.tagging.fullKey(tag));
                        result.push(suggestion);
                    });
                }
            })));
            this.autoCompleteList.innerHTML = '';
            result.slice(0, 50).forEach((tag) => {
                this.autoCompleteList.insertBefore(this.tagElementItem(tag), null);
            });
            this.selectedIndex = -1;
        });
    }
    checkCtrl(e) {
        if (this.disableExclusionMode)
            return;
        this.ctrlKey = e.ctrlKey || e.metaKey;
        if (this.ctrlKey) {
            this.autoCompleteList.classList.add('exclude');
        }
        else {
            this.autoCompleteList.classList.remove('exclude');
        }
    }
    keydown(e) {
        this.checkCtrl(e);
        if (e.code === 'ArrowUp' || e.code === 'ArrowDown') {
            if (e.code === 'ArrowUp') {
                this.selectedIndex--;
                if (this.selectedIndex < 0) {
                    this.selectedIndex = this.autoCompleteList.children.length - 1;
                }
            }
            else {
                this.selectedIndex++;
                if (this.selectedIndex >= this.autoCompleteList.children.length) {
                    this.selectedIndex = 0;
                }
            }
            const children = Array.from(this.autoCompleteList.children);
            children.forEach((element) => {
                element.classList.remove('selected');
            });
            if (this.selectedIndex >= 0 && children[this.selectedIndex]) {
                children[this.selectedIndex].classList.add('selected');
            }
            e.preventDefault();
            e.stopPropagation();
        }
        else if (e.code === 'Enter') {
            const children = Array.from(this.autoCompleteList.children);
            if (this.selectedIndex >= 0 && children[this.selectedIndex]) {
                children[this.selectedIndex].click();
                e.preventDefault();
                e.stopPropagation();
            }
        }
    }
    setListPosition() {
        const rect = this.inputElement.getBoundingClientRect();
        this.autoCompleteList.style.left = `${rect.left}px`;
        this.autoCompleteList.style.top = `${rect.bottom}px`;
        this.autoCompleteList.style.minWidth = `${rect.width}px`;
    }
    tagElementItem(suggestion) {
        const tag = suggestion.tag;
        const item = document.createElement('div');
        const cnName = document.createElement('span');
        cnName.className = 'auto-complete-text cn-name';
        const enName = document.createElement('span');
        enName.className = 'auto-complete-text en-name';
        const html = this.tagging.makeTagMatchHtml(suggestion, 'mark');
        cnName.innerHTML = html.cn;
        enName.innerHTML = html.en;
        item.insertBefore(cnName, null);
        item.insertBefore(enName, null);
        item.className = 'auto-complete-item';
        item.onclick = () => {
            let length = suggestion.term.length;
            if (this.inputElement.value.endsWith(' ')) {
                length++;
            }
            const exclude = this.ctrlKey ? '-' : '';
            this.inputElement.value = `${this.inputElement.value.slice(0, 0 - length)}${exclude}${this.tagging.searchTerm(tag)} `;
            this.autoCompleteList.innerHTML = '';
        };
        return item;
    }
};
TagTip = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [storage_1.Storage,
        logger_1.Logger,
        messaging_1.Messaging,
        tagging_1.Tagging])
], TagTip);
exports.TagTip = TagTip;


/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

var api = __webpack_require__(11);
            var content = __webpack_require__(39);

            content = content.__esModule ? content.default : content;

            if (typeof content === 'string') {
              content = [[module.i, content, '']];
            }

var options = {"insert":":root"};

options.insert = ":root";
options.singleton = false;

var update = api(content, options);



module.exports = content.locals || {};

/***/ }),
/* 39 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(true);
// Module
___CSS_LOADER_EXPORT___.push([module.i, ".eh-syringe-lite-auto-complete-list{position:fixed;min-height:20px;background:#fff;-moz-text-align-last:left;text-align-last:left;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);-moz-box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#202124;display:block;max-height:50vh;overflow:auto;padding:8px 0;z-index:10000000000000000000}.eh-syringe-lite-auto-complete-list:empty,.eh-syringe-lite-auto-complete-list[hidden]{display:none}.eh-syringe-lite-auto-complete-list.exclude .auto-complete-item .en-name:before{content:\"- \"}.eh-syringe-lite-auto-complete-list .auto-complete-item{padding:0 8px;line-height:24px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer}.eh-syringe-lite-auto-complete-list .auto-complete-item img{display:inline-block!important;height:8pt;vertical-align:text-top}.eh-syringe-lite-auto-complete-list .auto-complete-item>span{-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none}.eh-syringe-lite-auto-complete-list .auto-complete-item.selected,.eh-syringe-lite-auto-complete-list .auto-complete-item:hover{background:#e8eaed}.eh-syringe-lite-auto-complete-list .auto-complete-item .en-name{padding:0 8px;color:#5f6368}", "",{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,oCACE,cAAe,CACf,eAAgB,CAChB,eAAgB,CAChB,yBAAqB,CAArB,oBAAqB,CACrB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAAkB,CAClB,wGAA+G,CAA/G,qGAA+G,CAA/G,gGAA+G,CAC/G,aAAc,CACd,aAAc,CACd,eAAgB,CAChB,aAAc,CACd,aAAc,CACd,4BACF,CACA,sFAEE,YACF,CACA,gFACE,YACF,CACA,wDACE,aAAc,CACd,gBAAiB,CACjB,mBAAa,CAAb,oBAAa,CAAb,gBAAa,CAAb,mBAAa,CAAb,YAAa,CACb,wBAA8B,CAA9B,qCAA8B,CAA9B,qBAA8B,CAA9B,qBAA8B,CAA9B,6BAA8B,CAC9B,cACF,CACA,4DACE,8BAAgC,CAChC,UAAW,CACX,uBACF,CACA,6DACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SACF,CACA,+HAEE,kBACF,CACA,iEACE,aAAc,CACd,aACF","file":"index.less","sourcesContent":[".eh-syringe-lite-auto-complete-list {\n  position: fixed;\n  min-height: 20px;\n  background: #fff;\n  text-align-last: left;\n  border-radius: 4px;\n  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12);\n  color: #202124;\n  display: block;\n  max-height: 50vh;\n  overflow: auto;\n  padding: 8px 0;\n  z-index: 9999999999999999999;\n}\n.eh-syringe-lite-auto-complete-list[hidden],\n.eh-syringe-lite-auto-complete-list:empty {\n  display: none;\n}\n.eh-syringe-lite-auto-complete-list.exclude .auto-complete-item .en-name::before {\n  content: '- ';\n}\n.eh-syringe-lite-auto-complete-list .auto-complete-item {\n  padding: 0 8px;\n  line-height: 24px;\n  display: flex;\n  justify-content: space-between;\n  cursor: pointer;\n}\n.eh-syringe-lite-auto-complete-list .auto-complete-item img {\n  display: inline-block !important;\n  height: 8pt;\n  vertical-align: text-top;\n}\n.eh-syringe-lite-auto-complete-list .auto-complete-item > span {\n  flex: none;\n}\n.eh-syringe-lite-auto-complete-list .auto-complete-item:hover,\n.eh-syringe-lite-auto-complete-list .auto-complete-item.selected {\n  background: #e8eaed;\n}\n.eh-syringe-lite-auto-complete-list .auto-complete-item .en-name {\n  padding: 0 8px;\n  color: #5f6368;\n}\n"]}]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);


/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Syringe = void 0;
const tslib_1 = __webpack_require__(0);
const ui_translation_1 = __webpack_require__(41);
const services_1 = __webpack_require__(2);
const sync_storage_1 = __webpack_require__(59);
const logger_1 = __webpack_require__(3);
const messaging_1 = __webpack_require__(6);
const tagging_1 = __webpack_require__(10);
const date_time_1 = __webpack_require__(20);
__webpack_require__(61);
function isNode(node, nodeName) {
    return node && node.nodeName === nodeName.toUpperCase();
}
function isText(node) {
    return node.nodeType === Node.TEXT_NODE;
}
let Syringe = class Syringe {
    constructor(storage, uiTranslation, logger, messaging, tagging, time) {
        this.storage = storage;
        this.uiTranslation = uiTranslation;
        this.logger = logger;
        this.messaging = messaging;
        this.tagging = tagging;
        this.time = time;
        this.tagMap = this.storage.get('databaseMap');
        this.pendingTags = [];
        this.documentEnd = false;
        this.skipNode = new Set(['TITLE', 'LINK', 'META', 'HEAD', 'SCRIPT', 'BR', 'HR', 'STYLE', 'MARK']);
        this.config = this.getAndInitConfig();
        this.uiData = this.uiTranslation.get();
        storage.async.on('config', (k, ov, nv) => {
            if (nv)
                this.updateConfig(nv);
        });
        this.init();
    }
    updateConfig(config) {
        this.config = config;
        this.storage.set('config', config);
        const body = document.querySelector('body');
        if (body)
            this.setBodyClass(body);
    }
    getAndInitConfig() {
        this.storage.async
            .get('config')
            .then((conf) => {
            this.updateConfig(conf);
        })
            .catch(this.logger.error);
        return this.storage.get('config');
    }
    init() {
        window.document.addEventListener('DOMContentLoaded', () => {
            this.documentEnd = true;
        });
        const body = document.querySelector('body');
        if (body) {
            const nodes = new Array();
            this.setBodyClass(body);
            const nodeIterator = document.createNodeIterator(body);
            let node = nodeIterator.nextNode();
            while (node) {
                nodes.push(node);
                this.translateNode(node);
                node = nodeIterator.nextNode();
            }
            this.logger.debug(`有 ${nodes.length} 个节点在注入前加载`, nodes);
        }
        else {
            this.logger.debug(`没有节点在注入前加载`);
        }
        this.observer = new MutationObserver((mutations) => mutations.forEach((mutation) => mutation.addedNodes.forEach((node1) => {
            this.translateNode(node1);
            if (this.documentEnd && node1.childNodes) {
                const nodeIterator = document.createNodeIterator(node1);
                let node = nodeIterator.nextNode();
                while (node) {
                    this.translateNode(node);
                    node = nodeIterator.nextNode();
                }
            }
        })));
        this.observer.observe(window.document, {
            attributes: true,
            childList: true,
            subtree: true,
        });
        const timer = this.logger.time('获取替换数据');
        Promise.resolve()
            .then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
            const currentSha = this.storage.get('databaseSha');
            const data = yield this.messaging.emit('get-tag-map', { ifNotMatch: currentSha });
            if (data.map) {
                const tagMap = {};
                for (const key in data.map) {
                    tagMap[key] = data.map[key].name;
                }
                this.tagMap = tagMap;
                const pendingTags = this.pendingTags.splice(0);
                pendingTags.forEach((t) => this.translateTagImpl(t));
                this.storage.set('databaseMap', tagMap);
                this.storage.set('databaseSha', data.sha);
                this.logger.log('替换数据已更新', data.sha);
            }
            timer.end();
        }))
            .catch(this.logger.error);
    }
    setBodyClass(node) {
        if (!node)
            return;
        node.classList.add(!location.host.includes('exhentai') ? 'eh' : 'ex');
        node.classList.remove(...[...node.classList.values()].filter((k) => k.startsWith('ehs')));
        if (!this.config.showIcon) {
            node.classList.add('ehs-hide-icon');
        }
        if (this.config.translateTag) {
            node.classList.add('ehs-translate-tag');
        }
        node.classList.add(`ehs-image-level-${this.config.introduceImageLevel}`);
    }
    translateNode(node) {
        if (!node.nodeName ||
            this.skipNode.has(node.nodeName) ||
            (node.parentNode && this.skipNode.has(node.parentNode.nodeName))) {
            return;
        }
        if (isNode(node, 'body')) {
            this.setBodyClass(node);
        }
        const handled = this.translateTag(node);
        if (!handled && this.config.translateUi) {
            this.translateUi(node);
        }
    }
    isTagContainer(node) {
        if (!node) {
            return false;
        }
        return node.classList.contains('gt') || node.classList.contains('gtl') || node.classList.contains('gtw');
    }
    translateTagImpl(node) {
        var _a;
        const parentElement = node.parentElement;
        if (!parentElement || parentElement.hasAttribute('ehs-tag')) {
            return true;
        }
        const aId = parentElement.id;
        const aTitle = parentElement.title;
        let fullKeyCandidate;
        if (aTitle) {
            const [namespace, key] = aTitle.split(':');
            fullKeyCandidate = this.tagging.fullKey({ namespace, key });
        }
        else if (aId) {
            let id = aId;
            if (id.startsWith('ta_'))
                id = id.slice(3);
            const [namespace, key] = id.replace(/_/gi, ' ').split(':');
            fullKeyCandidate = key
                ? this.tagging.fullKey({ namespace, key })
                : this.tagging.fullKey({ namespace: '', key: namespace });
        }
        if (!fullKeyCandidate)
            return false;
        const fullKey = fullKeyCandidate;
        const text = (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
        if (!this.tagMap) {
            this.pendingTags.push(node);
            return true;
        }
        let value = this.tagMap[fullKey];
        if (!value) {
            this.pendingTags.push(node);
            return true;
        }
        value = this.tagging.markImagesAndEmoji(value);
        if (!aTitle) {
            parentElement.title = fullKey;
        }
        if (text[1] === ':') {
            value = `${text[0]}:${value}`;
        }
        parentElement.innerHTML = `<span ehs-tag-original>${text}</span><span ehs-tag-translated>${value}</span>`;
        parentElement.setAttribute('ehs-tag', '');
        return true;
    }
    translateTag(node) {
        const parentElement = node.parentElement;
        if (!isText(node) || !parentElement) {
            return false;
        }
        if (parentElement.nodeName === 'MARK' || parentElement.classList.contains('auto-complete-text')) {
            return true;
        }
        if (!this.isTagContainer(parentElement) && !this.isTagContainer(parentElement === null || parentElement === void 0 ? void 0 : parentElement.parentElement)) {
            return false;
        }
        return this.translateTagImpl(node);
    }
    translateUi(node) {
        var _a, _b, _c, _d, _e;
        const text = (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
        if (isText(node)) {
            if (this.uiData[text]) {
                node.textContent = this.uiData[text];
                return;
            }
            let reptext = text;
            reptext = reptext.replace(/(\d+) pages?/, '$1 页');
            reptext = reptext.replace(/Torrent Download \(\s*(\d+)\s*\)/, '种子下载($1)');
            reptext = reptext.replace(/Average: ([\d.]+)/, '平均值:$1');
            reptext = reptext.replace(/Posted on (.*?) by:\s*/, `评论时间:$1 \xA0作者:`);
            reptext = reptext.replace(/^, added (.*?)$/, `,更新于 $1`);
            reptext = reptext.replace(/Showing ([\d,]+) results?\. Your filters excluded ([\d,]+) galler(ies|y) from this page/, '共 $1 个结果,你的过滤器已从此页面移除 $2 个结果。');
            reptext = reptext.replace(/Showing ([\d,]+) results?/, '共 $1 个结果');
            reptext = reptext.replace(/Rate as ([\d.]+) stars?/, '$1 星');
            reptext = reptext.replace(/([\d,]+) torrent was found for this gallery./, '找到了 $1 个种子。');
            reptext = reptext.replace(/([\d,]+) \/ ([\d,]+) favorite note slots? used./, '已经使用了 $1 个备注,共 $2 个。');
            reptext = reptext.replace(/Showing results for ([\d,]+) watched tags?/, '订阅的 $1 个标签的结果');
            reptext = reptext.replace(/Showing ([\d,]+)-([\d,]+) of ([\d,]+)/, '$1 - $2,共 $3 个结果');
            reptext = reptext.replace(/Download original (.*?) source/, '下载原图($1)');
            reptext = reptext.replace(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/, (t) => {
                const date = Date.parse(t + 'Z');
                if (!date)
                    return t;
                return `${this.time.diff(date, undefined, date_time_1.DateTime.hour)}`;
            });
            reptext = reptext.replace(/\d\d \w{2,10} \d\d\d\d, \d\d:\d\d\s*UTC/i, (t) => {
                const date = Date.parse(t);
                if (!date)
                    return t;
                return `${this.time.diff(date, undefined, date_time_1.DateTime.hour)}`;
            });
            if (reptext !== text) {
                node.textContent = reptext;
                return;
            }
        }
        else if (isNode(node, 'input') || isNode(node, 'textarea')) {
            if (this.uiData[node.placeholder]) {
                node.placeholder = this.uiData[node.placeholder];
                return;
            }
            if (node.type === 'submit' || node.type === 'button') {
                if (this.uiData[node.value]) {
                    node.value = this.uiData[node.value];
                    return;
                }
            }
        }
        else if (isNode(node, 'optgroup')) {
            if (this.uiData[node.label]) {
                node.label = this.uiData[node.label];
                return;
            }
        }
        else if (isNode(node, 'a') && ((_c = (_b = node === null || node === void 0 ? void 0 : node.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.id) === 'nb') {
            if (this.uiData[text]) {
                node.textContent = this.uiData[text];
                return;
            }
        }
        if (isNode(node, 'p')) {
            if (node.classList.contains('gpc')) {
                node.style.display = 'none';
                const p = document.createElement('p');
                p.textContent = text.replace(/Showing ([\d,]+) - ([\d,]+) of ([\d,]+) images?/, '$1 - $2,共 $3 张图片');
                p.className = 'gpc-translate';
                (_d = node.parentElement) === null || _d === void 0 ? void 0 : _d.insertBefore(p, node);
            }
        }
        if (isNode(node, 'div')) {
            if (node.id === 'gdd') {
                const div = document.createElement('div');
                div.textContent = node.textContent;
                div.style.display = 'none';
                node.insertBefore(div, null);
            }
            if (((_e = node.parentElement) === null || _e === void 0 ? void 0 : _e.id) === 'gdo4' &&
                node.classList.contains('ths') &&
                node.classList.contains('nosel')) {
                const div = document.createElement('div');
                div.textContent = node.textContent;
                div.style.display = 'none';
                div.className = 'ths';
                node.parentElement.insertBefore(div, node);
            }
        }
    }
};
Syringe = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [sync_storage_1.SyncStorage,
        ui_translation_1.UiTranslation,
        logger_1.Logger,
        messaging_1.Messaging,
        tagging_1.Tagging,
        date_time_1.DateTime])
], Syringe);
exports.Syringe = Syringe;


/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UiTranslation = void 0;
const tslib_1 = __webpack_require__(0);
const logger_1 = __webpack_require__(3);
const helper_1 = __webpack_require__(1);
const __1 = __webpack_require__(2);
__webpack_require__(42);
let UiTranslation = class UiTranslation {
    constructor(logger) {
        this.logger = logger;
    }
    get(url = location) {
        if (!url || !(url.host.endsWith('e-hentai.org') || url.host.endsWith('exhentai.org'))) {
            return {};
        }
        const path = url.pathname + url.search;
        this.logger.log('获取 UI 翻译:', path);
        const results = {};
        Object.assign(results, ...helper_1.dataMaps.filter((d) => { var _a, _b; return d[helper_1.REGEX].test(path) && ((_b = (_a = d[helper_1.HOST]) === null || _a === void 0 ? void 0 : _a.includes(location.host)) !== null && _b !== void 0 ? _b : true); }));
        return results;
    }
};
UiTranslation = tslib_1.__decorate([
    __1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger])
], UiTranslation);
exports.UiTranslation = UiTranslation;


/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(43);
__webpack_require__(44);
__webpack_require__(45);
__webpack_require__(46);
__webpack_require__(47);
__webpack_require__(48);
__webpack_require__(49);
__webpack_require__(50);
__webpack_require__(51);
__webpack_require__(52);
__webpack_require__(53);
__webpack_require__(54);
__webpack_require__(55);
__webpack_require__(56);
__webpack_require__(57);
__webpack_require__(58);


/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/archiver\.php/, undefined, {
    'Current Funds:': '现有资金',
    'Estimated Size: \xA0 ': '预计大小: ',
    'Download Cost: \xA0 ': '下载费用: ',
    'Download Original Archive': '下载原始档案',
    'Download Resample Archive': '下载重采样档案',
    'H@H Downloader': 'H@H 下载器',
    Original: '原图',
    'Your H@H client appears to be offline.': '你的 H@H 客户端处于离线状态',
    'Turn it on, then try again.': '请启动 H@H 客户端后重试',
});


/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/.*/, undefined, {
    'Front Page': '首页',
    Watched: '关注',
    Popular: '流行',
    Torrents: '种子',
    Home: '首页',
    Settings: '设置',
    'My ': '我的',
    'My Home': '我的首页',
    Favorites: '收藏',
    Uploads: '上传',
    Toplists: '排行榜',
    Bounties: '悬赏',
    News: '新闻',
    Forums: '论坛',
    Wiki: '维基',
    Doujinshi: '同人志',
    Manga: '漫画',
    'Artist CG': '画师CG',
    'Artist CG Sets': '画师CG集',
    'Game CG': '游戏CG',
    'Game CG Sets': '游戏CG集',
    Western: '西方',
    'Non-H': '无H',
    'Image Set': '图集',
    'Image Sets': '图集',
    'Asian Porn': '亚洲色情',
    Misc: '杂项',
    'Show Advanced Options': '显示高级选项',
    'Show File Search': '文件搜索',
    'E-Hentai Galleries: The Free Hentai Doujinshi, Manga and Image Gallery System': 'E-Hentai: 一个免费的绅士同人志、漫画和图片的图库系统',
    'Visit the E-Hentai Forums': '前往 E-Hentai 论坛',
    'Play the HentaiVerse Minigame': '玩 HentaiVerse 小游戏',
    'Lo-Fi Version': '低保真版',
    'Please read the ': '请阅读',
    'Terms of Service': '服务条款',
    ' before participating with or uploading any content to this site.': '后再使用该网站或上传资源。',
    'Enter new tags, separated with comma': '输入新标签, 用逗号分隔',
    'Search Keywords': '搜索关键词',
    'Enter a single tag to flag, watch or hide': '输入要标记、关注或隐藏的标签',
    ' Watched': ' 关注',
    ' Hidden': ' 隐藏',
    ' Enable': '启用',
    'Action:': '操作:',
    Save: '保存',
    '#default': '#默认',
    'Select All': '全选',
    'Delete Selected': '删除选中项',
    'Confirm Delete': '确认删除',
    'language:': '语言:',
    'parody:': '原作:',
    'character:': '角色:',
    'group:': '社团:',
    'artist:': '作者:',
    'female:': '女性:',
    'male:': '男性:',
    'misc:': '杂项:',
    'reclass:': '重新分类:',
    'Japanese \xA0': '日文 \xA0',
    'English \xA0': '英文 \xA0',
    'Chinese \xA0': '中文 \xA0',
    'Dutch \xA0': '荷兰语 \xA0',
    'French \xA0': '法语 \xA0',
    'German \xA0': '德语 \xA0',
    'Hungarian \xA0': '匈牙利 \xA0',
    'Italian \xA0': '意呆利 \xA0',
    'Korean \xA0': '韩语 \xA0',
    'Polish \xA0': '波兰语 \xA0',
    'Portuguese \xA0': '葡萄牙语 \xA0',
    'Russian \xA0': '俄语 \xA0',
    'Spanish \xA0': '西班牙语 \xA0',
    'Thai \xA0': '泰语 \xA0',
    'Vietnamese \xA0': '越南语 \xA0',
    'Use Posted': '发布时间',
    Posted: '发布时间',
    'Use Favorited': '收藏时间',
    Favorited: '收藏时间',
    'Search:': '搜索:',
    ' Name': ' 名称',
    ' Tags': ' 标签',
    ' Note': ' 备注',
    'Show All Favorites': '显示所有收藏夹',
    Minimal: '最小化',
    'Minimal+': '最小化 + 关注标签',
    Compact: '紧凑 + 标签',
    Extended: '扩展',
    Thumbnail: '缩略图',
    Published: '发布时间',
    Title: '标题',
    Uploader: '上传者',
    'Search Gallery Name': '搜索名称',
    'Search Gallery Tags': '搜索标签',
    'Search Gallery Description': '搜索描述',
    'Search Torrent Filenames': '搜素种子文件名',
    'Only Show Galleries With Torrents': '只显示有种子的图库',
    'Search Low-Power Tags': '搜索低权重标签',
    'Search Downvoted Tags': '搜索投票移除了的标签',
    'Show Expunged Galleries': '显示已删除的库',
    'Minimum Rating:': '最低评分',
    'Between ': '介于 ',
    ' and ': ' 和 ',
    ' pages': ' 页',
    'Disable default filters for: ': '禁用默认筛选器',
    Language: '语言',
    Tags: '标签',
    '2 stars': '2 星',
    '3 stars': '3 星',
    '4 stars': '4 星',
    '5 stars': '5 星',
    Overview: '概况',
    'My Stats': '我的统计',
    'My Settings': '我的设置',
    'My Tags': '我的标签',
    Donations: '捐赠',
    'Hath Exchange': 'Hath 交易',
    'GP Exchange': 'GP 交易',
    'Credit Log': 'Credit 记录',
    'Karma Log': 'Karma 记录',
    'Apply Filter': '应用筛选',
    'Clear Filter': '清理筛选',
    'No hits found': '什么也没有',
    'No unfiltered results in this page range. You either requested an invalid page or used too aggressive filters.': '在此页面范围内没有未被过滤的结果。你的过滤设置可能过于激进。',
    'Favorites 0': '收藏夹 0',
    'Favorites 1': '收藏夹 1',
    'Favorites 2': '收藏夹 2',
    'Favorites 3': '收藏夹 3',
    'Favorites 4': '收藏夹 4',
    'Favorites 5': '收藏夹 5',
    'Favorites 6': '收藏夹 6',
    'Favorites 7': '收藏夹 7',
    'Favorites 8': '收藏夹 8',
    'Favorites 9': '收藏夹 9',
    'It is the dawn of a new day!': '新的一天开始了!',
    'Reflecting on your journey so far, you find that you are a little wiser.': '回想一下你迄今为止的旅程,你发现你更聪明了。',
    'You gain ': '你获得了 ',
    ' EXP, ': ' 经验, ',
    ' Credits!': ' Credits!',
    'Back to Gallery': '返回图库',
    'Report Type': '举报类型',
    '[Select a complaint type...]': '[请选择一个举报类型...]',
    'DMCA/Copyright Infringement': 'DMCA / 侵犯版权',
    'Child Pornography': '儿童色情',
    'Other Illicit Content': '其他非法内容',
    'Watched Tag Galleries': '标签订阅',
    'Currently Popular Recent Galleries': '目前最受欢迎的图库',
    'Search Favorites': '搜索收藏夹',
    Clear: '清除',
    'Delete Favorites': '删除收藏',
    'Change Category': '移动到',
    Confirm: '确定',
    ' Minimal': ' 最小化',
    ' Minimal+': ' 最小化 + 关注标签',
    ' Compact': ' 紧凑 + 标签',
    ' Extended': ' 扩展',
    ' Thumbnail': ' 缩略图',
    Rename: '重命名',
    'Create New': '新建',
    Description: '描述',
    'You have encountered a monster!': '你遇到了怪物!',
    'Click here to fight in the HentaiVerse.': '点击这里进入 HentaiVerse 战斗',
    'If you want to combine a file search with a category/keyword search, upload the file first.': '如果要将文件和类别、关键词结合搜索,请先上传文件。',
    'Select a file to upload, then hit File Search. All public galleries containing this exact file will be displayed.': '选择要搜索的图片文件,点击“文件搜索”。将显示包含此文件的所有公开图库。',
    'For color images, the system can also perform a similarity lookup to find resampled images.': '对于彩色图片,系统还可以执行相似性查询以找到重采样过的图片。',
    'Use Similarity Scan': '使用相似性查询',
    'Only Search Covers': '仅搜索封面',
    'Show Expunged': '显示被删除的图库',
    'File Search': '文件搜索',
    'There are newer versions of this gallery available:': '此图库有更新的版本可用:',
    'Next Page >': '下一页 >',
    'Show all galleries with this file': '显示所有包含此图片的图库',
    'Generate a static forum image link': '生成用于论坛的图片链接',
    'Click here if the image fails loading': '重新加载图片',
});


/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/exchange\.php\?/, undefined, {
    'The Hath Exchange': 'Hath 交易',
    'The GP Exchange': 'GP 交易',
    'Last 8 Hours (per kGP)': '最近 8 小时(每 kGP)',
    'Last 24 Hours (per kGP)': '最近 24 小时(每 kGP)',
    'Last 8 Hours (per Hath)': '最近 8 小时(每 Hath)',
    'Last 24 Hours (per Hath)': '最近 24 小时(每 Hath)',
    'Buy Hath': '买进 Hath',
    'Sell Hath': '卖出 Hath',
    'Buy GP': '买进 GP',
    'Sell GP': '卖出 GP',
    '\n\t\t\t\tCount: ': '数量:',
    ' Hath \xA0\n\t\t\t\tBid Price/Hath: ': 'Hath \xA0 买入单价:',
    ' Hath \xA0\n\t\t\t\tAsk Price/Hath: ': 'Hath \xA0 卖出单价:',
    'Buy Hath!': '买进 Hath',
    'Sell Hath!': '卖出 Hath',
    ' kGP \xA0\n\t\t\t\tBid Price/kGP: ': 'kGP \xA0 买入单价:',
    ' kGP \xA0\n\t\t\t\tAsk Price/kGP: ': 'kGP \xA0 卖出单价:',
    'Buy GP!': '买进 GP',
    'Sell GP!': '卖出 GP',
    Spread: '挂单交易',
    'Recent Transactions': '最近成交',
    'Bid (Buyers)': '买单',
    'Ask (Sellers)': '卖单',
    Time: '时间',
    Seller: '卖家',
    Buyer: '买家',
    Volume: '成交量',
    'Unit Cost': '单价',
    High: '最高',
    Low: '最低',
    Avg: '平均',
    Vol: '成交',
});


/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/g\//, undefined, {
    'No tags have been added for this gallery yet.': '当前图库还没有标签',
    'Report Gallery': '举报图库',
    'Archive Download': '存档下载',
    'Torrent Download': '种子下载',
    'Petition to Expunge': '申请删除',
    'Petition to Rename': '申请重命名',
    'Rename Petition Sent': '已发送的重命名申请',
    'Show Gallery Stats': '查看统计',
    'Multi-Page Viewer': '多页查看器',
    ' Read Later': ' 稍后再读',
    ' Added to Read Later': ' 已添加到稍后再读',
    'Posted:': '发布于:',
    'Parent:': '父级:',
    None: '无',
    'Visible:': '显示:',
    Yes: '是',
    'No (Expunged)': '否(已删除)',
    'No (Replaced)': '否(已被替换)',
    'Language:': '语言:',
    'File Size:': '文件大小:',
    'Length:': '页数:',
    'Favorited:': '收藏:',
    'Rating:': '评分:',
    'Not Yet Rated': '还没有评分',
    'Average:': '平均:',
    ' Add to Favorites': ' 添加到收藏夹',
    Normal: '普通',
    Large: '大图',
    ' Normal': '普通',
    ' Large': '大图',
    '4 rows': '4 行',
    '10 rows': '10 行',
    '20 rows': '20 行',
    '40 rows': '40 行',
    'Score ': '分数 ',
    'Uploader Comment': '上传者评论',
    'Vote+': '顶',
    'Vote-': '踩',
    'Vote Up': '顶',
    'Vote Down': '踩',
    'Show Tagged Galleries': '含有该标签的图库',
    'Show Tag Definition': '显示标签解释',
    'Add New Tag': '添加新标签',
    'Last edited on ': '最后编辑于 ',
    'Post New Comment': '发送新评论',
    'A Quick Note About Tagging': '关于标签系统的简单说明',
    'While tagging is relatively straight-forward, there are a number of established guidelines that determine when adding a particular tag is proper and when it is not. Before you put any significant amount of effort into it, we therefore ask that you skim through the ': '尽管标签相对简单明了,但是有许多已建立的准则可以确定何时添加特定标签是正确的。因此,在您投入其中之前,我们要求您阅读',
    'Basic Tagging Guidelines': '基本标签指南',
    ' and ': '和',
    'Fetish Listing': '恋物标签列表',
    '. This will likely save both you and the tagging moderators from doing unnecessary work. In particular, you should note the following:': '。这可以使您和标签管理员免于进行不必要的工作。特别要注意以下几点:',
    '- These are galleries, not individual images. ': '● 这些是图库,而不是单张图片。',
    'Do not tag stuff that is only featured in a few images.': '不要标记仅在少量图像中显示的内容。',
    '- If a tag is ambiguous or frequently misused, you may have to specify a ': '● 如果标签含糊不清或经常被滥用,则可能必须指定',
    namespace: '命名空间',
    '; ': ';',
    'see the Wiki': '参见 Wiki',
    '.': '。',
    '- The ': '● 您对标签的影响',
    power: '权重',
    ' with which you can affect tagging is determined by a number of factors, such as your account age and whether or not you are active on the ': '取决于多种因素,例如您的帐户资历以及您是否活跃在',
    forums: '论坛',
    '- The forums is also where ': '● 论坛也是',
    'everything about tagging is discussed': '讨论标签相关内容',
    '. If you have any comments, suggestions or questions about tagging, this is where you should take it.': '的地方。如果您对标签有任何意见、建议或问题,可在此处讨论。',
    'Alright Already': '好的',
});


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/gallerypopups\.php\?.*act=expunge/, undefined, {
    'Specify an objective reason why you wish to expunge this gallery.': '请说明要删除此库的客观原因。',
    'None / Withdraw Petition.': '无 / 撤回删除申请。',
    'This gallery is a duplicate of equal or lower quality of an earlier posted, clearly marked gallery.': '此图库是早期发布的标记清楚的图库的质量相同或较低的副本。',
    'A newer higher-quality and clearly marked copy of this gallery has been uploaded.': '这个图库的更高质量和标记清楚的副本已上传。',
    'This gallery contains either illicit content like child porn or anything else forbidden by the ': '这个图库包含非法内容,如儿童色情或其他任何',
    ', or otherwise falls under the ': '禁止的内容,或者符合',
    'Expunge Guidelines': '删除指南',
    ' (specify below).': '(在下方说明)。',
    'Show Expunge Log': '显示删除日志',
    'Enter an explanation for this expunge here. It should include the location of the duplicate or the specific rule being violated.': '请输入清除原因和备注。它应包括副本的位置或违反的特定规则。',
    'No expunge petitions have been filed for this gallery': '此图库尚未有删除申诉',
    Back: '返回',
});
helper_1.merge(/^\/gallerypopups\.php\?.*act=rename/, undefined, {
    'Uploader:': '上传者:',
    'Roman Script': '罗马音',
    'Japanese Script': '日文',
    'Not Set': '未设置',
    'Blank Vote': '空投票',
    ' New': ' 新',
    Submit: '提交',
});
helper_1.merge(/^\/gallerypopups\.php\?.*act=addfav/, undefined, {
    'Please choose a color to file this favorite gallery under. You can also add a note to it if you wish.': '请选择一个颜色标记你的收藏,你也可以加一些备注。',
    'Favorite Note (Max 200 Characters)': '收藏备注(最多 200 字符)',
    'Add to Favorites': '添加到收藏',
    'Remove from Favorites': '从收藏中移除',
    'Apply Changes': '应用更改',
});


/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/hathperks\.php/, undefined, {
    'By running the Hentai@Home client, you will over time gain special bonus points known as ': '通过运行 Hentai@Home 客户端,您将随着时间的推移获得特殊的奖励积分,即 ',
    '. These are rewards for people who help keeping this site free, fast and responsive by donating bandwidth and computer resources, and can be exchanged here for ': '。这是给予捐献带宽和计算机资源,帮助网站保持自由与快速的奖励,可以在这里交换 ',
    ', which grant beneficial effects on E-Hentai Galleries and in the HentaiVerse.': ',这对 E-Hentai 和 HentaiVerse 产生了有益的影响。',
    'If running H@H is not an option, you can also you can exchange Credits for Hath at the ': '如果你不能运行 H@H,你可以在这里用 Credits 交换 Hath:',
    'While the Hath Perks for the HentaiVerse cannot be obtained in any other way, most of the ones that are specific for Galleries will also get unlocked by making a donation on the ': '尽管用于 HentaiVerse 游戏的 Hath Perks 不能用其他方法获取,但关于图库的大部分  Hath Perks 也可以通过',
    'Donation Screen': '捐赠',
    '. These will be refunded if you buy them for Hath, and later make a qualifying donation. There is also an option to "adopt" H@H clients that will grant you Hath over time as if you were running it yourself.': '获取。如果您已经用 Hath 购买,在符合条件的捐赠后将获得退款。还有一个“领养” H@H 客户端的选项,它会随着时间的推移而授予您 Hath,就好像您自己运行它一样。',
    'You currently have ': '你现在拥有 ',
    ' Hath.': ' Hath。',
    Description: '描述',
    Obtained: '已获得',
    Purchase: '购买',
    'Free with a $20 donation.': '捐赠 $20 免费解锁',
    'Free with a $50 donation.': '捐赠 $50 免费解锁',
    'Free with a $100 donation.': '捐赠 $100 免费解锁',
    'Ads-Be-Gone': '广告不见了',
    'Unlocks the display ads toggle for E-Hentai Galleries on the User Settings page. This will allow you to browse E-Hentai Galleries sans ads, and still retain your conscience.': '移除 E-Hentai 的广告,不需要昧着良心使用广告屏蔽插件。',
    'Source Nexus': '原始之力',
    'Unlocks the Original Images functionality on E-Hentai Galleries. This allows you to browse the original, non-resampled version of a gallery directly.': '解锁 E-Hentai 图库的原始图像功能。这允许您直接浏览图库的原始非重采样版本。',
    'Multi-Page Viewer': '多页查看器',
    'Unlocks the Multi-Page Viewer function on E-Hentai Galleries. This allows you to view all images from a gallery on one page. (': '解锁 E-Hentai 图库的多页查看器功能。这允许您在一个页面上查看库中的所有图像。(',
    demo: '演示',
    ')': ')',
    'More Thumbs': '更多的缩略图',
    'Increases the maximum number of thumbnail rows to 10.': '将最大缩略图行数增加到 10。',
    'Thumbs Up': '超多的缩略图',
    'Further increases the maximum number of thumbnail rows to 20.': '将最大缩略图行数增加到 20。',
    'All Thumbs': '全部的缩略图',
    'Further increases the maximum number of thumbnail rows to 40.': '将最大缩略图行数增加到 40。',
    'More Pages': '更多页面',
    'Increases all limits on how many pages you can view by a factor of two.': '将图片限制变为原来的 2 倍。',
    'Lots of Pages': '超多页面',
    'Increases all limits on how many pages you can view by a factor of five.': '将图片限制变为原来的 5 倍。',
    'Too Many Pages': '全部页面',
    'Increases all limits on how many pages you can view by a factor of ten.': '将图片限制变为原来的 10 倍。',
    'More Favorite Notes I': '更多收藏备注 I',
    'Increases the number of favorite note slots to 10000.': '将收藏备注限制增加到 10000。',
    'More Favorite Notes II': '更多收藏备注 II',
    'Increases the number of favorite note slots to 25000.': '将收藏备注限制增加到 25000。',
    'Paging Enlargement I': '页面扩大 I',
    'Increases the number of results you can show per page on the index, search and torrent pages to 50.': '将主页、搜索和种子页面的结果数量变为 50。',
    'Paging Enlargement II': '页面扩大 II',
    'Increases the number of results you can show per page on the index, search and torrent pages to 100.': '将主页、搜索和种子页面的结果数量变为 100。',
    'Paging Enlargement III': '页面扩大 III',
    'Increases the number of results you can show per page on the index, search and torrent pages to 200.': '将主页、搜索和种子页面的结果数量变为 200。',
});


/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/home\.php/, undefined, {
    'Image Limits': '图片限制',
    'You are currently at ': '当前:',
    ' towards a limit of ': ',限制为 ',
    '. This regenerates at a rate of ': ',每分钟回复 ',
    ' per minute.': ' 点',
    'Reset Cost: ': '重置限制花费:',
    'Reset Limit': '重置限制',
    EHTracker: 'EH 种子服务器',
    ' uploaded': '上传量',
    downloaded: '下载量',
    'up/down ratio': '分享率',
    'torrent completes': '完成种子',
    'gallery completes': '完成图库',
    seedmins: '做种时长',
    'Show My Torrents': '显示我的种子',
    'If you misplace any of your personalized torrents, hit the button below to reset your key.': '如果你错误地分发了私有种子,请点击下面的按钮重置你的 KEY。',
    'This will immediately invalidate all of your personalized torrents in play.': '这将立即注销你全部的私有种子。',
    'Your current key is: ': '你当前的 KEY 是:',
    'Reset Torrent Key': '重置种子 KEY',
    'Total GP Gained': '获得的总 GP',
    'GP from gallery visits': 'GP 来自图库浏览',
    'GP from torrent completions': 'GP 来自种子完成',
    'GP from archive downloads': 'GP 来自存档下载',
    'GP from Hentai@Home': 'GP 来自 Hentai@Home',
    Toplists: '排行榜',
    '\n\t\t\tYou are currently not featured on any toplists...\n\t\t': '您当前没有上榜……',
    'You are currently: ': '你现在是:',
    ' toplist': '榜)',
    'on the ': '(在',
    'Galleries All-Time': '图库总排行',
    'Galleries Past Year': '图库年排行',
    'Galleries Past Month': '图库月排行',
    'Galleries Yesterday': '图库日排行',
    'Uploader All-Time': '上传总排行',
    'Uploader Past Year': '上传年排行',
    'Uploader Past Month': '上传月排行',
    'Uploader Yesterday': '上传日排行',
    'Tagging All-Time': '标签总排行',
    'Tagging Past Year': '标签年排行',
    'Tagging Past Month': '标签月排行',
    'Tagging Yesterday': '标签日排行',
    'Hentai@Home All-Time': 'Hentai@Home 总排行',
    'Hentai@Home Past Year': 'Hentai@Home 年排行',
    'Hentai@Home Past Month': 'Hentai@Home 月排行',
    'Hentai@Home Yesterday': 'Hentai@Home 日排行',
    'EHTracker All-Time': '做种总排行',
    'EHTracker Past Year': '做种年排行',
    'EHTracker Past Month': '做种月排行',
    'EHTracker Yesterday': '做种日排行',
    'Cleanup All-Time': '清理总排行',
    'Cleanup Past Year': '清理年排行',
    'Cleanup Past Month': '清理月排行',
    'Cleanup Yesterday': '清理日排行',
    'Rating & Reviewing All-Time': '打分 & 评论总排行',
    'Rating & Reviewing Past Year': '打分 & 评论年排行',
    'Rating & Reviewing Past Month': '打分 & 评论月排行',
    'Rating & Reviewing Yesterday': '打分 & 评论日排行',
    'Moderation Power': '愿力',
    'Current Moderation Power': '当前愿力',
    Base: '基础',
    Awards: '奖励',
    Tagging: '打标签',
    Level: '等级',
    Donations: '捐赠',
    'Forum Activity': '论坛活跃',
    'Uploads/H@H': '上传 / H@H',
    'Account Age': '账户资历',
    '(capped to 25)': '(不超过 25)',
});


/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/bounce_login\.php/, undefined, {
    'This page requires you to log on.': '此页面需要登录才能访问',
    'User:': '用户:',
    'Pass:': '密码:',
    'Login!': '登录',
    '\xA0or\xA0': '或',
    Register: '注册',
});


/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/logs\.php/, undefined, {
    Date: '日期',
    Amount: '金额',
    Information: '信息',
    'Total Karma: ': '总 Karma:',
    From: '来自',
    Topic: '主题',
    Comment: '附言',
});


/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/news\.php/, undefined, {
    'Latest Site Status Updates': '最新网站状态',
    'Site Update Log': '网站更新日志',
    'You can follow ': '你可以',
    'follow us on Twitter': '在推特上关注我们',
    ' to receive these site status updates if the site is ever unavailable.': '以便在网站不可用时获取网站状态信息。 ',
});


/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/stats\.php/, undefined, {
    'Visitor Statistics': '访客统计',
    'This gallery has had a total of ': '此图库共计有 ',
    ' visit(s).': ' 名访客。',
    'Galleries All-Time': '所有时间',
    'Galleries Past Year': '年排行',
    'Galleries Past Month': '月排行',
    'Galleries Yesterday': '日排行',
    'Not in top 1000': '1000 名以外',
    Ranking: '名次',
    Score: '分数',
    Visits: '访问',
    Hits: '点击',
    'Yearly Stats': '年度统计',
    'Last 12 Months': '最近 12 个月',
    'Daily Stats': '每日统计',
    'The number of total visits on your galleries.': '图库总访问次数',
    'The number of total image accesses on your galleries.': '图库中图片访问次数',
    'Back To Gallery': '返回图库',
    Jan: '1 月',
    Feb: '2 月',
    Mar: '3 月',
    Apr: '4 月',
    May: '5 月',
    Jun: '6 月',
    Jul: '7 月',
    Aug: '8 月',
    Sep: '9 月',
    Oct: '10 月',
    Nov: '11 月',
    Dec: '12 月',
    '1st': '1 日',
    '2nd': '2 日',
    '3rd': '3 日',
    '4th': '4 日',
    '5th': '5 日',
    '6th': '6 日',
    '7th': '7 日',
    '8th': '8 日',
    '9th': '9 日',
    '10th': '10 日',
    '11th': '11 日',
    '12th': '12 日',
    '13th': '13 日',
    '14th': '14 日',
    '15th': '15 日',
    '16th': '16 日',
    '17th': '17 日',
    '18th': '18 日',
    '19th': '19 日',
    '20th': '20 日',
    '21st': '21 日',
    '22nd': '22 日',
    '23rd': '23 日',
    '24th': '24 日',
    '25th': '25 日',
    '26th': '26 日',
    '27th': '27 日',
    '28th': '28 日',
    '29th': '29 日',
    '30th': '30 日',
    '31st': '31 日',
});


/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/toplist\.php/, undefined, {
    'EHG Toplists': 'EHG 排行榜',
    'Gallery Toplists': '图库排行',
    'Galleries All-Time': '总排行',
    'Galleries Past Year': '年排行',
    'Galleries Past Month': '月排行',
    'Galleries Yesterday': '日排行',
    'Uploader Toplists': '上传排行',
    'Uploader All-Time': '总排行',
    'Uploader Past Year': '年排行',
    'Uploader Past Month': '月排行',
    'Uploader Yesterday': '日排行',
    'Tagging Toplists': '标签排行',
    'Tagging All-Time': '总排行',
    'Tagging Past Year': '年排行',
    'Tagging Past Month': '月排行',
    'Tagging Yesterday': '日排行',
    'Hentai@Home Toplists': 'Hentai@Home 排行',
    'Hentai@Home All-Time': '总排行',
    'Hentai@Home Past Year': '年排行',
    'Hentai@Home Past Month': '月排行',
    'Hentai@Home Yesterday': '日排行',
    'EHTracker Toplists': '做种排行',
    'EHTracker All-Time': '总排行',
    'EHTracker Past Year': '年排行',
    'EHTracker Past Month': '月排行',
    'EHTracker Yesterday': '日排行',
    'Cleanup Toplists': '清理排行',
    'Cleanup All-Time': '总排行',
    'Cleanup Past Year': '年排行',
    'Cleanup Past Month': '月排行',
    'Cleanup Yesterday': '日排行',
    'Rating & Reviewing Toplists': '打分 & 评论排行',
    'Rating & Reviewing All-Time': '总排行',
    'Rating & Reviewing Past Year': '年排行',
    'Rating & Reviewing Past Month': '月排行',
    'Rating & Reviewing Yesterday': '日排行',
});


/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/(gallery)?torrents\.php/, undefined, {
    'Status: ': '状态:',
    All: '全部',
    Seeded: '有种',
    Unseeded: '无种',
    ' \xA0 \xA0 \xA0 \xA0 Show: ': ' |  显示:',
    'All Torrents': '全部种子',
    'Only My Torrents': '我的种子',
    '\nNote that you cannot add torrents directly to this page. To upload torrents to this system, visit the torrent screen for a gallery.\n': '注意:你不能直接把种子添加到此页面。请在图库中上传。',
    'Search Torrents': '搜索种子',
    Added: '添加于',
    'Torrent Name': '种子名',
    Gallery: '图库 ID',
    Size: '体积',
    Seeds: '做种',
    Peers: '下载',
    'Seeds:': '做种:',
    'Peers:': '下载:',
    DLers: '下载',
    'Downloads:': '完成:',
    Completes: '完成',
    DLs: '完成',
    '0 torrents were found for this gallery.': '当前图库还没有种子',
    'Uploader:': '上传者:',
    'New Torrents:': '新种子:',
    Information: '信息',
    'Close Window': '关闭窗口',
    'Upload Torrent': '上传种子',
    '\n\t\tYou can add a torrent for this gallery by uploading it here. The maximum torrent file size is 10 MB.': '您可以在这里上传来为此库添加种子。最大 Torrent 文件大小为 10MB。',
    '\n\t\tNote that you have to download the finished torrent from this site after uploading for stats to be recorded.\n\t': '请注意,您必须在上传后从该站点下载私有种子,以便记录统计信息。',
    '\n\t\tIf you are creating the torrent yourself, set this as announce tracker: ': '如果您自己创建 Torrent,请将其设置为 AnnounceTracker:',
    'Personalized Torrent': '私有种子',
    'Redistributable Torrent': '可再分发种子',
    '(Just For You - this makes sure to record your stats)\n': '(只属于你 - 确保记录你的下载统计信息)',
    '(use if you want a file you can post or give to others)': '(如果您想再发布或提供给其他人使用)',
    'Back to Index': '返回',
    'Vote to Expunge': '投票删除',
    'No comments were given for this torrent.': '这个种子没有评论',
});


/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/uconfig\.php/, undefined, {
    'Selected Profile:': '当前配置:',
    'Settings were updated': '设置更新完毕',
    Rename: '重命名',
    'Create New': '新建',
    'Delete Profile': '删除配置',
    'Set as Default': '设为默认',
    Apply: '应用',
    ' Auto': '自动',
    ' No': '否',
    ' Yes': '是',
    ' Nope': ' 否',
    ' Yup': ' 是',
    ' Always': '总是',
    'Image Load Settings': '图片加载设置',
    'Do you wish to load images through the Hentai@Home Network, if available?': '如果可用,是否希望通过 Hentai@Home 网络加载图像?',
    ' Any client (Recommended)': ' 所有客户端(推荐)',
    ' Default port clients only (Can be slower. Enable if behind firewall/proxy that blocks outgoing non-standard ports.)': ' 仅使用默认端口的客户端(可能稍慢。当防火墙或代理阻止非标准接口的流量时启用此项。)',
    ' No (Donator only. You will not be able to browse as many pages, enable only if having severe problems.)': ' 否(仅限赞助者。配额消耗会加快,只有出现问题时才启用。)',
    'Image Size Settings': '图片大小设置',
    'Normally, images are resampled to 1280 pixels of horizontal resolution for online viewing. You can alternatively select one of the following resample resolutions. To avoid murdering the staging servers, resolutions above 1280x are temporarily restricted to donators, people with any hath perk, and people with a UID below 3,000,000.': '通常情况,图像将重采样到 1280 像素宽度以用于在线浏览,您也可以选择以下重新采样分辨率。' +
        '但是为了避免负载过高,高于 1280 像素将只供给于赞助者、特殊贡献者,以及 UID 小于 3,000,000 的用户。',
    'While the site will automatically scale down images to fit your screen width, you can also manually restrict the maximum display size of an image. Like the automatic scaling, this does not resample the image, as the resizing is done browser-side. (0 = no limit)': '虽然图片会自动根据窗口缩小,你也可以手动设置最大大小,图片并没有重新采样(0 为不限制)',
    'Horizontal:': '宽/横向',
    'Vertical:': '高/纵向',
    ' pixels': ' 像素',
    'Gallery Name Display': '图库的名字显示',
    'Many galleries have both an English/Romanized title and a title in Japanese script. Which gallery name would you like as default?': '很多图库都同时拥有英文或者日文标题,你想默认显示哪一个?',
    ' Default Title': '默认标题(英文)',
    ' Japanese Title (if available)': '日文标题(如果有)',
    'Archiver Settings': '归档设置',
    'The default behavior for the Archiver is to confirm the cost and selection for original or resampled archive, then present a link that can be clicked or copied elsewhere. You can change this behavior here.': '默认归档下载方式为手动选择(原画质或压缩画质),然后手动复制或点击下载链接。你可以修改归档下载方式。',
    ' Manual Select, Manual Start (Default)': ' 手动选择,手动下载(默认)',
    ' Manual Select, Auto Start': ' 手动选择,自动下载',
    ' Auto Select Original, Manual Start': ' 自动选择原始画质,手动下载',
    ' Auto Select Original, Auto Start': ' 自动选择原始画质,自动下载',
    ' Auto Select Resample, Manual Start': ' 自动选择压缩画质,手动下载',
    ' Auto Select Resample, Auto Start': ' 自动选择压缩画质,自动下载',
    'Front Page Settings': '首页设置',
    'Which display mode would you like to use on the front and search pages?': '你想在搜索页面显示哪种样式?',
    'What categories would you like to show by default on the front page and in searches?': '你希望在首页上看到哪些类别?',
    Favorites: '收藏',
    'Here you can choose and rename your favorite categories.': '在这里你可以重命名你的收藏夹。',
    'You can also select your default sort order for galleries on your favorites page. Note that favorites added prior to the March 2016 revamp did not store a timestamp, and will use the gallery posted time regardless of this setting.': '你也可以选择收藏夹中默认排序。请注意,2016 年 3 月改版之前加入收藏夹的图库并未保存收藏时间,会以图库发布时间代替。',
    ' By last gallery update time': '以最新的图库更新时间排序',
    ' By favorited time': '以收藏时间排序',
    Ratings: '评分',
    'By default, galleries that you have rated will appear with red stars for ratings of 2 stars and below, green for ratings between 2.5 and 4 stars, and blue for ratings of 4.5 or 5 stars. You can customize this by entering your desired color combination below.': '默认设置下,你评为 2 星及以下的图库显示为红星,2.5 ~ 4 星显示为绿星,4.5 ~ 5 星显示为蓝星。你可以将其设定为其他颜色组合。',
    'Each letter represents one star. The default RRGGB means R(ed) for the first and second star, G(reen) for the third and fourth, and B(lue) for the fifth. You can also use (Y)ellow for the normal stars. Any five-letter R/G/B/Y combo works.': '每一个字幕代表一颗星, 默认的 RRGGB 表示第一第二颗星显示为红色 R(ed),第三第四颗星显示是绿色 G(reen),第五颗星显示为蓝色 B(lue)。你也可以使用黄色 (Y)ellow,R/G/B/Y 任何五个组合都是有效的。',
    'Tag Namespaces': '标签组',
    'If you want to exclude certain namespaces from a default tag search, you can check those below. Note that this does not prevent galleries with tags in these namespaces from appearing, it just makes it so that when searching tags, it will forego those namespaces.': '如果要从默认标签搜索中排除某些标签组,可以检查以下内容。请注意,这不会阻止在这些标签组中的标签的展示区出现,它只是在搜索标签时排除这些标签组。',
    ' reclass': ' 重新分类',
    ' language': ' 语言',
    ' parody': ' 原作',
    ' character': ' 角色',
    ' group': ' 社团',
    ' artist': ' 作者',
    ' male': ' 男性',
    ' female': ' 女性',
    'Tag Filtering Threshold': '标签筛选阈值',
    'You can soft filter tags by adding them to ': '你可以通过将标签加入「',
    ' with a negative weight. If a gallery has tags that add up to weight below this value, it is filtered from view. This threshold can be set between 0 and -9999.': '」并设置一个负权重来软过滤它们。如果一个作品所有的标签权重之和低于设定值,此作品将从视图中被过滤。这个值可以设定为 0 ~ -9999。',
    'Tag Watching Threshold': '标签订阅阈值',
    'Recently uploaded galleries will be included on the watched screen if it has at least one watched tag with positive weight, and the sum of weights on its watched tags add up to this value or higher. This threshold can be set between 0 and 9999.': '你可以通过将标签加入「我的标签」并设置一个正权重来关注它们。如果一个最近上传的作品所有标签的权重之和高于设定值,则它将会被包含在「关注」里。这个值可以设定为 0 ~ 9999。',
    'Excluded Languages': '排除语言',
    'If you wish to hide galleries in certain languages from the gallery list and searches, select them from the list below.': '如果您希望以图库列表中的某些语言隐藏图库并进行搜索,请从下面的列表中选择它们。',
    'Note that matching galleries will never appear regardless of your search query.': '请注意,无论搜索查询如何,匹配的图库都不会出现。',
    Original: '原始语言',
    Translated: '翻译版',
    Rewrite: '改编版',
    All: '所有',
    Japanese: '日文',
    English: '英文',
    Chinese: '中文',
    Dutch: '荷兰语',
    French: '法语',
    German: '德语',
    Hungarian: '匈牙利',
    Italian: '意呆利',
    Korean: '韩语',
    Polish: '波兰语',
    Portuguese: '葡萄牙语',
    Russian: '俄语',
    Spanish: '西班牙语',
    Thai: '泰语',
    Vietnamese: '越南语',
    'N/A': '无效',
    Other: '其他',
    'Excluded Uploaders': '屏蔽的上传者',
    'If you wish to hide galleries from certain uploaders from the gallery list and searches, add them below. Put one username per line.': '如果你希望在图库中和搜索中隐藏某个上传者的话,请把他们的用户名填写在下方,每行一个。',
    'Note that galleries from these uploaders will never appear regardless of your search query.': '注意:无论你如何搜索,这些上传者都不会出现。',
    'You are currently using ': '已使用 ',
    ' of ': '/',
    ' exclusion slots.\n': '。',
    'Search Result Count': '搜索结果数',
    'How many results would you like per page for the index/search page and torrent search pages? (Hath Perk: Paging Enlargement Required)': '搜索页面每页显示多少条数据?(Hath Perk:需要「页面扩大」)',
    ' 25 results': '25 个',
    ' 50 results': '50 个',
    ' 100 results': '100 个',
    ' 200 results': '200 个',
    'Thumbnail Settings': '缩略图设置',
    'How would you like the mouse-over thumbnails on the front page to load when using List Mode?': '你希望鼠标悬停缩略图何时加载?',
    ' On mouse-over (pages load faster, but there may be a slight delay before a thumb appears)': '鼠标悬停时 (页面加载快,缩略图加载有延迟)',
    ' On page load (pages take longer to load, but there is no delay for loading a thumb after the page has loaded)': '页面加载时 (页面加载时间更长,但是显示的时候无需等待)',
    'You can set a default thumbnail configuration for all galleries you visit.': '图库页面缩略图设置。',
    'Size: ': '大小:',
    'Rows:': '行数:',
    'Thumbnail Scaling': '缩略图缩放',
    'Thumbnails on the thumbnail and extended gallery list views can be scaled to a custom value between 75% and 150%.': '缩略图和扩展模式下的图库列表缩略图可以缩放为 75% 到 150% 之间的自定义值。',
    'Viewport Override': '移动端虚拟宽度',
    'Allows you to override the virtual width of the site for mobile devices. This is normally determined automatically by your device based on its DPI. Sensible values at 100% thumbnail scale are between 640 and 1400.': '允许你覆盖移动设备的虚拟宽度,默认是根据 DPI 自动计算的,100% 缩略图比例下的合理值在 640 到 1400 之间。',
    'Gallery Comments': '图库评论',
    'Sort order for gallery comments:': '评论排序方式:',
    ' Oldest comments first': '最早的评论',
    ' Recent comments first': '最新的评论',
    ' By highest score': '分数最高',
    'Show gallery comment votes:': '显示评论投票数:',
    ' On score hover or click': '悬停或点击时',
    'Gallery Tags': '图库标签',
    'Sort order for gallery tags:': '图库标签排序方式:',
    ' Alphabetical': '按字母排序',
    ' By tag power': '按标签权重',
    'Gallery Page Numbering': '图库页面页码',
    'Show gallery page numbers:\n\t': '显示图库页码:\n\t',
    'Hentai@Home Local Network Host': 'Hentai@Home 本地网络服务器',
    'This setting can be used if you have a H@H client running on your local network with the same public IP you browse the site with. Some routers are buggy and cannot route requests back to its own IP; this allows you to work around this problem.': '如果你本地安装了 H@H 客户端,本地 IP 与浏览网站的公共 IP 相同,一些路由器不支持回流导致无法访问到自己,你可以设置这里来解决。',
    'If you are running the client on the same PC you browse from, use the loopback address (127.0.0.1:port). If the client is running on another computer on your network, use its local network IP. Some browser configurations prevent external web sites from accessing URLs with local network IPs, the site must then be whitelisted for this to work.': '如果在同一台电脑上访问网站和运行客户端,请使用本地回环地址(127.0.0.1:端口号)。如果客户端在网络上的其他计算机运行,请使用那台机器的内网 IP。某些浏览器的配置可能阻止外部网站访问本地网络,你必须将网站列入白名单才能工作。',
    'Original Images': '原始图像',
    'Use original images instead of the resampled versions where applicable?': '当可用的时候,使用原始图像代替压缩过的版本?',
    ' Yup, I can take it': '好的,我可以接受更多的配额消耗',
    'Multi-Page Viewer': '多页查看器',
    'Always use the Multi-Page Viewer? There will still be a link to manually start it if this is left disabled.': '总是使用多页查看器?禁用此选项时,仍可以手动启动多页查看器。',
    'Multi-Page Viewer Display Style:': '显示样式:',
    ' Align left; Only scale if image is larger than browser width': '左对齐;仅当图像大于浏览器宽度时缩放',
    ' Align center; Only scale if image is larger than browser width': '居中对齐;仅当图像大于浏览器宽度时缩放',
    ' Align center; Always scale images to fit browser width': '居中对齐;始终缩放图像以适应浏览器宽度',
    'Multi-Page Viewer Thumbnail Pane:': '显示缩略图侧栏:',
    ' Show': ' 显示',
    ' Hide': ' 隐藏',
});


/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/.*/, 'upload.e-hentai.org', {
    'Published Galleries': '发布图库',
    'Empty Galleries': '空图库',
    'Unpublished Galleries': '未发布的图库',
    'Gallery Name ': '图库名称',
    'Date Added ': '添加时间 ',
    'Public Category': '发布类别',
    'Available Actions': '操作',
    Files: '文件数',
    Unsorted: '未分类',
    'Go To Gallery': '查看图库',
    Stats: '统计',
    Manage: '管理',
    Publish: '发布',
    'Collapse Open Folders': '折叠文件夹',
    'Set public category for selected galleries: ': '设置选中的发布分类: ',
    'Move selected galleries to folder: ': '移动到文件夹: ',
    'Create New Gallery': '创建新图库',
    'Manage Folders': '管理文件夹',
    'Gallery List': '图库列表',
    'Create Gallery': '创建图库',
    'My Galleries': '我的图库',
    'Main Gallery Title': '主标题',
    'The main english or romanized title for this gallery.': '这个图库的主标题, 英文或者罗马音',
    'Japanese Script Title': '日文标题',
    'The original title in Japanese script, if applicable.': '原始的日文标题(如果有)',
    'Gallery Folder': '图库文件夹',
    'The folder this gallery will be displayed under in the gallery list. This is only used to help you organize your gallery uploads.': '图库文件夹仅在我的图库列表中显示,仅用于帮助整理上传的图库.',
    'Any comments or additional relevant information for this gallery. This will always show up as the topmost comment, and cannot be voted down.': '关于此图库的任何评论或其他相关信息。将始终显示在评论的最顶部,并且不能投票。',
    'or new folder: ': '或新建文件夹:',
    'Date Added:': '添加时间:',
    'Date Posted:': '发布时间:',
    'Not created yet': '尚未创建',
    'Not published yet': '尚未发布',
    'Uploaded Files:': '上传文件数:',
    'Total Filesize:': '总体积:',
    'Parent Gallery:': '父级图库:',
    'Child Gallery:': '子图库:',
    'Expunged:': '删除:',
    'No (Unpublished)': 'No (尚未发布)',
    'Show Public Gallery': '查看图库',
    'Show Gallery Stats': '查看统计',
    'Delete Gallery': '删除图库',
    'Make this gallery publicly available as:': '将图库发布到:',
    'I have read and agree with the ': '我已阅读并同意',
    'Publish Gallery': '发布图库',
    'Upload Files': '上传文件',
    'Start Upload': '开始上传',
    'Select one or more image or archive files and click Start Upload to add files to this gallery.': '选择一个或多个图像或存档文件,然后点击“开始上传”,以添加文件到此图库。',
    '\n\t\tNo files have been added yet\n\t\t': '尚未添加任何文件',
    'Folder Name': '文件夹名称',
    'Display Order': '显示顺序',
    '(No folders have been added yet.)': '(尚未添加文件夹)',
    'Create Folder': '创建文件夹',
    'Save and Auto-Reorder': '保存并自动排序',
    'Save Changes': '保存更改',
    Delete: '删除',
    'New folder name': '新文件夹名称',
});


/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const helper_1 = __webpack_require__(1);
helper_1.merge(/^\/watched/, undefined, {
    'You do not have any watched tags. You can change your watched tags from ': '你当前没有关注任何标签。你可以修改关注的标签:',
});


/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SyncStorage = void 0;
const tslib_1 = __webpack_require__(0);
const _1 = __webpack_require__(2);
const storage_1 = __webpack_require__(17);
const logger_1 = __webpack_require__(3);
const storage_2 = __webpack_require__(7);
const info_1 = __webpack_require__(13);
let SyncStorage = class SyncStorage {
    constructor(logger, async) {
        this.logger = logger;
        this.async = async;
        this.defaults = {
            version: info_1.packageJson.version,
            databaseMap: undefined,
            databaseSha: undefined,
            config: this.async.defaults.config,
        };
        const oldVer = this.get('version');
        if (info_1.packageJson.version !== oldVer) {
            this.migrate();
            this.set('version', info_1.packageJson.version);
        }
    }
    get(key) {
        const value = storage_1.syncStorage.get(key);
        if (value == null)
            return this.defaults[key];
        return value;
    }
    set(key, value) {
        if (value == null)
            return this.delete(key);
        return storage_1.syncStorage.set(key, value);
    }
    delete(key) {
        return storage_1.syncStorage.delete(key);
    }
    keys() {
        return storage_1.syncStorage.keys();
    }
    migrate() {
        const keys = this.keys();
        if (keys.length === 0)
            return;
        this.logger.log(`迁移同步存储版本,删除 `, keys);
        for (const key of keys) {
            this.delete(key);
        }
    }
};
SyncStorage = tslib_1.__decorate([
    _1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger, storage_2.Storage])
], SyncStorage);
exports.SyncStorage = SyncStorage;


/***/ }),
/* 60 */
/***/ (function(module) {

module.exports = JSON.parse("{\"name\":\"ehsyringe\",\"displayName\":\"EhSyringe\",\"version\":\"2.0.6\",\"description\":\"E 站注射器,将中文翻译注入到 E 站体内。\",\"author\":\"EhTagTranslation\",\"scripts\":{\"start:monkey\":\"webpack-dev-server --mode=development --watch --user-script\",\"start:ext\":\"webpack --mode=development --watch --web-ext\",\"start:chrome\":\"yarn start:ext --vendor=chrome\",\"start:firefox\":\"yarn start:ext --vendor=firefox\",\"build\":\"webpack --mode=production\",\"build:monkey\":\"yarn build --user-script\",\"build:ext\":\"yarn build --web-ext\",\"build:chrome\":\"yarn build:ext --vendor=chrome && web-ext build -s dist -a releases -n ehsyringe.chrome.zip -o\",\"build:firefox\":\"yarn build:ext --vendor=firefox && web-ext build -s dist -a releases -n ehsyringe.firefox.xpi -o\",\"lint\":\"eslint ./src/**/*.ts\",\"format\":\"prettier --ignore-path .gitignore --write .\",\"clean\":\"rimraf dist releases\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/EhTagTranslation/EhSyringe.git\"},\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/EhTagTranslation/EhSyringe/issues\"},\"readme\":\"https://github.com/EhTagTranslation/EhSyringe\",\"homepage\":\"https://github.com/EhTagTranslation/EhSyringe\",\"devDependencies\":{\"@types/chrome\":\"^0.0.122\",\"@types/escape-html\":\"^1.0.0\",\"@types/node\":\"^14.0.27\",\"@types/tampermonkey\":\"^4.0.0\",\"@typescript-eslint/eslint-plugin\":\"^3.7.1\",\"@typescript-eslint/parser\":\"^3.7.1\",\"copy-webpack-plugin\":\"^6.0.3\",\"css-loader\":\"^4.1.1\",\"cssnano\":\"^4.1.10\",\"eslint\":\"^7.5.0\",\"eslint-config-prettier\":\"^6.11.0\",\"eslint-plugin-prettier\":\"^3.1.4\",\"execa\":\"^4.0.3\",\"file-loader\":\"^6.0.0\",\"html-webpack-plugin\":\"^4.3.0\",\"less\":\"^3.12.2\",\"less-loader\":\"^6.2.0\",\"postcss-import\":\"^12.0.1\",\"postcss-loader\":\"^3.0.0\",\"postcss-preset-env\":\"^6.7.0\",\"prettier\":\"^2.0.5\",\"rimraf\":\"^3.0.2\",\"semver\":\"^7.3.2\",\"style-loader\":\"^1.2.1\",\"ts-loader\":\"^8.0.1\",\"tsconfig-paths-webpack-plugin\":\"^3.2.0\",\"type-fest\":\"^0.16.0\",\"typescript\":\"^3.9.7\",\"typescript-lit-html-plugin\":\"^0.9.0\",\"url-loader\":\"^4.1.0\",\"web-ext\":\"^4.3.0\",\"webpack\":\"^4.44.1\",\"webpack-bundle-analyzer\":\"^3.8.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.0\",\"webpack-userscript\":\"^2.5.4\",\"webpack-webextension-plugin\":\"^0.2.0\",\"yargs\":\"^15.4.1\"},\"dependencies\":{\"core-js\":\"^3.6.5\",\"emoji-regex\":\"^9.0.0\",\"escape-html\":\"^1.0.3\",\"lit-element\":\"^2.3.1\",\"lit-html\":\"^1.2.1\",\"normalize.css\":\"^8.0.1\",\"rxjs\":\"^6.6.2\",\"tslib\":\"^2.0.0\",\"typedi\":\"^0.8.0\",\"webextension-polyfill-ts\":\"^0.19.0\"}}");

/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

var api = __webpack_require__(11);
            var content = __webpack_require__(62);

            content = content.__esModule ? content.default : content;

            if (typeof content === 'string') {
              content = [[module.i, content, '']];
            }

var options = {"insert":":root"};

options.insert = ":root";
options.singleton = false;

var update = api(content, options);



module.exports = content.locals || {};

/***/ }),
/* 62 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(true);
// Module
___CSS_LOADER_EXPORT___.push([module.i, "td.tc{white-space:nowrap}div.gt,div.gtl,div.gtw{height:16px;line-height:16px;white-space:nowrap}textarea[name=expungexpl]{display:block}body h1#gj{margin:3px 4px}body div#gright{z-index:3}body .g2{padding-bottom:20px}body .gsp{padding-top:10px}body div.gt,body div.gtl,body div.gtw{overflow:hidden;height:16px;line-height:16px}body div#gmid{height:auto}body p.gpc-translate{margin:-3px auto;text-align:center;padding:0 5px 5px;clear:both;font-size:9pt}body div.c6{text-align:left}@media screen and (max-width:990px){p.gpc-translate{margin-top:25px;visibility:hidden!important}}[ehs-emoji],[ehs-icon]{height:1em;margin:0 1px}body.ehs-hide-icon [ehs-emoji],body.ehs-hide-icon [ehs-icon]{display:none}body [ehs-tag-original]{display:inline}body [ehs-tag-translated]{display:none}body.ehs-translate-tag [ehs-tag-original]{display:none}body.ehs-translate-tag [ehs-tag-translated]{display:inline}", "",{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,MACE,kBACF,CACA,uBAGE,WAAY,CACZ,gBAAiB,CACjB,kBACF,CACA,0BACE,aACF,CACA,WACE,cACF,CACA,gBACE,SACF,CACA,SACE,mBACF,CACA,UACE,gBACF,CACA,sCAGE,eAAgB,CAChB,WAAY,CACZ,gBACF,CACA,cACE,WACF,CACA,qBACE,gBAAiB,CACjB,iBAAkB,CAClB,iBAAwB,CACxB,UAAW,CACX,aACF,CACA,YACE,eACF,CACA,oCACE,gBACE,eAAgB,CAChB,2BACF,CACF,CACA,uBAEE,UAAW,CACX,YACF,CACA,6DAEE,YACF,CACA,wBACE,cACF,CACA,0BACE,YACF,CACA,0CACE,YACF,CACA,4CACE,cACF","file":"index.less","sourcesContent":["td.tc {\n  white-space: nowrap;\n}\ndiv.gt,\ndiv.gtl,\ndiv.gtw {\n  height: 16px;\n  line-height: 16px;\n  white-space: nowrap;\n}\ntextarea[name='expungexpl'] {\n  display: block;\n}\nbody h1#gj {\n  margin: 3px 4px;\n}\nbody div#gright {\n  z-index: 3;\n}\nbody .g2 {\n  padding-bottom: 20px;\n}\nbody .gsp {\n  padding-top: 10px;\n}\nbody div.gtl,\nbody div.gtw,\nbody div.gt {\n  overflow: hidden;\n  height: 16px;\n  line-height: 16px;\n}\nbody div#gmid {\n  height: auto;\n}\nbody p.gpc-translate {\n  margin: -3px auto;\n  text-align: center;\n  padding: 0px 5px 5px 5px;\n  clear: both;\n  font-size: 9pt;\n}\nbody div.c6 {\n  text-align: left;\n}\n@media screen and (max-width: 990px) {\n  p.gpc-translate {\n    margin-top: 25px;\n    visibility: hidden !important;\n  }\n}\n[ehs-icon],\n[ehs-emoji] {\n  height: 1em;\n  margin: 0 1px;\n}\nbody.ehs-hide-icon [ehs-icon],\nbody.ehs-hide-icon [ehs-emoji] {\n  display: none;\n}\nbody [ehs-tag-original] {\n  display: inline;\n}\nbody [ehs-tag-translated] {\n  display: none;\n}\nbody.ehs-translate-tag [ehs-tag-original] {\n  display: none;\n}\nbody.ehs-translate-tag [ehs-tag-translated] {\n  display: inline;\n}\n"]}]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);


/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoUpdate = void 0;
const tslib_1 = __webpack_require__(0);
const services_1 = __webpack_require__(2);
const logger_1 = __webpack_require__(3);
const storage_1 = __webpack_require__(7);
const messaging_1 = __webpack_require__(6);
let AutoUpdate = class AutoUpdate {
    constructor(logger, storage, messaging) {
        this.logger = logger;
        this.storage = storage;
        this.messaging = messaging;
        this.init().catch(logger.error);
    }
    init() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.messaging.emit('check-extension', undefined, true).catch(this.logger.error);
            const conf = yield this.storage.get('config');
            if (!conf.autoUpdate)
                return;
            this.messaging.emit('update-database', { force: false }).catch(this.logger.error);
        });
    }
};
AutoUpdate = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger, storage_1.Storage, messaging_1.Messaging])
], AutoUpdate);
exports.AutoUpdate = AutoUpdate;


/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TagContextMenu = void 0;
const tslib_1 = __webpack_require__(0);
const services_1 = __webpack_require__(2);
const menu_1 = __webpack_require__(21);
const utils_1 = __webpack_require__(12);
const tagging_1 = __webpack_require__(10);
let TagContextMenu = class TagContextMenu {
    constructor(tagging) {
        this.tagging = tagging;
        this.documentUrlPatterns = [
            '*://exhentai.org/*',
            '*://e-hentai.org/*',
            '*://*.exhentai.org/*',
            '*://*.e-hentai.org/*',
        ];
        this.title = '提交标签翻译';
        this.targetUrlPatterns = [
            '*://exhentai.org/tag/*',
            '*://e-hentai.org/tag/*',
            '*://*.exhentai.org/tag/*',
            '*://*.e-hentai.org/tag/*',
        ];
        this.contexts = ['link'];
        this.onclick = (info) => {
            var _a, _b, _c;
            if (!info.url || !info.url.includes('/tag/')) {
                return;
            }
            const seg = (_b = (_a = info.url.split('/').pop()) === null || _a === void 0 ? void 0 : _a.replace(/\+/g, ' ').split(':')) !== null && _b !== void 0 ? _b : [];
            const namespace = seg.length <= 1 ? 'misc' : seg[0];
            const key = (_c = seg.pop()) !== null && _c !== void 0 ? _c : '';
            utils_1.openInTab(this.tagging.editorUrl({ namespace, key }));
        };
        this.init();
    }
    init() {
        menu_1.createMenu(this);
    }
};
TagContextMenu = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [tagging_1.Tagging])
], TagContextMenu);
exports.TagContextMenu = TagContextMenu;


/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });


/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DatabaseUpdater = void 0;
const tslib_1 = __webpack_require__(0);
const logger_1 = __webpack_require__(3);
const typedi_1 = __webpack_require__(4);
const messaging_1 = __webpack_require__(6);
const storage_1 = __webpack_require__(7);
const database_1 = __webpack_require__(67);
const badge_loading_1 = __webpack_require__(69);
const utils_1 = __webpack_require__(22);
const defaultStatus = {
    run: false,
    progress: 0,
    info: '',
    complete: false,
    error: false,
};
let DatabaseUpdater = class DatabaseUpdater {
    constructor(logger, messaging, storage, database, badge) {
        this.logger = logger;
        this.messaging = messaging;
        this.storage = storage;
        this.database = database;
        this.badge = badge;
        this._lastCheckData = {
            sha: '',
            check: 0,
            githubRelease: null,
        };
        this.downloadStatus = Object.assign({}, defaultStatus);
        this.loadLock = false;
        this.checked = false;
        this.messaging.on('update-database', ({ force, recheck }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
            if (this.checked && !force) {
                this.logger.log('跳过');
                return undefined;
            }
            const version = yield this.checkVersion(recheck);
            if ((version === null || version === void 0 ? void 0 : version.sha) && (force || version.sha !== (yield this.messaging.emit('get-tag-sha', undefined)))) {
                const success = yield this.update();
                if (success) {
                    this.logger.log('有新版本并更新', version);
                    return version;
                }
                else {
                    this.logger.log('更新新版本失败', version);
                    return undefined;
                }
            }
            this.logger.log('没有新版本');
            return undefined;
        }));
        this.messaging.on('check-database', ({ force }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
            return yield this.checkVersion(force);
        }));
        this.init().catch(logger.error);
    }
    init() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const storage = yield this.storage.get('release');
            if (storage && storage.check > this._lastCheckData.check) {
                Object.assign(this._lastCheckData, storage);
            }
        });
    }
    get lastCheckData() {
        return this._lastCheckData;
    }
    set lastCheckData(value) {
        if (value && value.check > this.lastCheckData.check) {
            Object.assign(this._lastCheckData, value);
            this.storage.set('release', this._lastCheckData).catch(this.logger.error);
        }
    }
    update() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.initDownloadStatus();
            try {
                const data = yield this.download();
                yield this.messaging.emit('update-tag', data.data);
                this.badge.set('OK', '#00C801');
                this.pushDownloadStatus({
                    run: true,
                    info: '更新完成',
                    progress: 100,
                    complete: true,
                });
                void utils_1.sleep(2500).then(() => {
                    if (this.downloadStatus.complete) {
                        this.badge.set('', '#4A90E2');
                        this.initDownloadStatus();
                    }
                });
                return true;
            }
            catch (err) {
                const e = err;
                this.logger.error(e);
                this.badge.set('ERR', '#C80000');
                this.pushDownloadStatus({
                    run: false,
                    error: true,
                    info: (e === null || e === void 0 ? void 0 : e.message) ? e.message : '更新失败',
                });
                return false;
            }
        });
    }
    initDownloadStatus() {
        this.downloadStatus = Object.assign({}, defaultStatus);
        void this.messaging.emit('updating-database', this.downloadStatus, true);
    }
    pushDownloadStatus(data = {}) {
        this.downloadStatus = Object.assign(Object.assign({}, this.downloadStatus), data);
        void this.messaging.emit('updating-database', this.downloadStatus, true);
    }
    checkVersion(force = false) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            if (!force) {
                const time = new Date().getTime();
                const lastCheckData = this.lastCheckData;
                if (time - lastCheckData.check <= 1000 * 60 * 5 && lastCheckData.githubRelease) {
                    return lastCheckData;
                }
            }
            const info = yield this.database.getLatestVersion();
            if (!info.target_commitish)
                throw new Error('获取失败,响应有误');
            this.lastCheckData = {
                sha: info.target_commitish,
                githubRelease: info,
                check: Date.now(),
            };
            this.checked = true;
            return this.lastCheckData;
        });
    }
    download() {
        var _a;
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            if (this.loadLock) {
                throw new Error('已经正在下载');
            }
            this.loadLock = true;
            try {
                this.badge.set('', '#4A90E2', 2);
                this.pushDownloadStatus({ run: true, info: '加载中' });
                const checkData = yield this.checkVersion();
                if (!((_a = checkData === null || checkData === void 0 ? void 0 : checkData.githubRelease) === null || _a === void 0 ? void 0 : _a.target_commitish)) {
                    this.logger.debug('checkData', checkData);
                    throw new Error('无法获取版本信息');
                }
                const info = checkData.githubRelease;
                const timer = this.logger.time(`开始下载`);
                try {
                    this.pushDownloadStatus({ info: '0%', progress: 0 });
                    this.badge.set('0', '#4A90E2', 1);
                    const data = yield this.database.getData(info, (event) => {
                        if (event.lengthComputable) {
                            const percent = Math.floor((event.loaded / event.total) * 100);
                            this.pushDownloadStatus({ info: `${percent}%`, progress: percent });
                            this.badge.set(percent.toFixed(0), '#4A90E2', 1);
                        }
                    });
                    this.pushDownloadStatus({ info: '下载完成', progress: 100 });
                    this.badge.set('100', '#4A90E2', 1);
                    return { release: info, data };
                }
                finally {
                    timer.end();
                }
            }
            finally {
                this.loadLock = false;
            }
        });
    }
};
DatabaseUpdater = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger,
        messaging_1.Messaging,
        storage_1.Storage,
        database_1.Database,
        badge_loading_1.BadgeLoading])
], DatabaseUpdater);
exports.DatabaseUpdater = DatabaseUpdater;


/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Database = void 0;
const tslib_1 = __webpack_require__(0);
const _1 = __webpack_require__(2);
const http_1 = __webpack_require__(68);
const logger_1 = __webpack_require__(3);
let Database = class Database {
    constructor(http, logger) {
        this.http = http;
        this.logger = logger;
    }
    getLatestVersion() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const githubDownloadUrl = 'https://api.github.com/repos/ehtagtranslation/Database/releases/latest';
            const info = this.http.json(githubDownloadUrl);
            return info;
        });
    }
    dataUrls(version) {
        const dataJson = /<!--((.|\s)+?)-->/gi.exec(version.body);
        if (!dataJson)
            throw new Error(`GitHub 发布数据无法解析,可能需要更新插件版本`);
        try {
            const data = JSON.parse(dataJson[1]);
            const sha = data.mirror;
            if (typeof sha != 'string')
                throw new Error();
            return [
                `https://cdn.jsdelivr.net/gh/EhTagTranslation/DatabaseReleases@${sha}/db.html.json`,
                `https://gitcdn.xyz/cdn/EhTagTranslation/DatabaseReleases/${sha}/db.html.json`,
                `https://rawcdn.githack.com/EhTagTranslation/DatabaseReleases/${sha}/db.html.json`,
                `https://cdn.statically.io/gh/EhTagTranslation/DatabaseReleases/${sha}/db.html.json`,
            ];
        }
        catch (_a) {
            throw new Error(`GitHub 发布数据无法解析,可能需要更新插件版本`);
        }
    }
    getData(version, progress) {
        var _a;
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const urls = this.dataUrls(version);
            const errors = [];
            for (const url of urls) {
                try {
                    const result = yield this.http.download(url, 'GET', progress, 'json');
                    if (((_a = result === null || result === void 0 ? void 0 : result.head) === null || _a === void 0 ? void 0 : _a.sha) === version.target_commitish && (result === null || result === void 0 ? void 0 : result.data)) {
                        this.logger.log(`从 ${url} 下载成功`);
                        return result;
                    }
                }
                catch (ex) {
                    errors.push(ex);
                    this.logger.warn(`尝试从 ${url} 下载失败`, ex);
                }
            }
            if (errors.length === 0)
                throw new Error('没有获取到有效的文件');
            const e = errors[errors.length - 1];
            Object.defineProperty(e, 'errors', {
                value: errors,
                enumerable: true,
            });
            throw e;
        });
    }
};
Database = tslib_1.__decorate([
    _1.Service(),
    tslib_1.__metadata("design:paramtypes", [http_1.Http, logger_1.Logger])
], Database);
exports.Database = Database;


/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Http = void 0;
const tslib_1 = __webpack_require__(0);
const _1 = __webpack_require__(2);
let Http = class Http {
    json(url, method = 'GET') {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const res = yield fetch(url, { method });
            return (yield res.json());
        });
    }
    download(url, method = 'GET', progress, responseType = 'arraybuffer') {
        return new Promise((resolve, reject) => {
            const xhr = new XMLHttpRequest();
            xhr.open(method, url);
            xhr.responseType = responseType;
            xhr.onload = () => {
                if (xhr.status >= 300) {
                    reject(new Error(`${method} ${url} ${xhr.statusText} (${xhr.status})`));
                }
                else if (xhr.response instanceof ArrayBuffer && responseType === 'arraybuffer') {
                    resolve(xhr.response);
                }
                else if (responseType === 'json') {
                    resolve(xhr.response);
                }
                else {
                    reject(new Error('数据无法解析'));
                }
            };
            xhr.onerror = () => {
                reject('加载失败');
            };
            if (progress)
                xhr.onprogress = progress;
            xhr.send();
        });
    }
};
Http = tslib_1.__decorate([
    _1.Service()
], Http);
exports.Http = Http;


/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.BadgeLoading = void 0;
const tslib_1 = __webpack_require__(0);
const logger_1 = __webpack_require__(3);
const typedi_1 = __webpack_require__(4);
const utils_1 = __webpack_require__(12);
let BadgeLoading = class BadgeLoading {
    constructor(logger) {
        this.logger = logger;
        this.loadingStrArr = [
            [''],
            ['⢎⠀', '⢆⡀', '⢄⡠', '⢀⡰', '⠀⡱', '⠈⠱', '⠊⠑', '⠎⠁'],
            ['    ', '·   ', ' ·  ', '  · ', '   ·'],
        ];
        this.frame = 0;
        this.index = 0;
        this.interval = undefined;
        this.text = '';
        this.loadingString = [''];
        this.color = '';
        this.extname = 'EhSyringe';
    }
    setColor(color = '#4A90E2') {
        utils_1.setBadge({ background: color });
    }
    setText(text) {
        utils_1.setBadge({ text });
    }
    set(text, color, loading = 0) {
        if (this.index !== loading) {
            this.index = loading;
            this.loadingString = this.loadingStrArr[this.index] || [''];
            this.frame = 0;
        }
        this.text = text;
        this.setColor(color);
        if (loading) {
            if (!this.interval) {
                this.interval = setInterval(() => {
                    this.setText(`${this.text}${this.loadingString[this.frame] || ''}`);
                    this.frame++;
                    if (!this.loadingString[this.frame]) {
                        this.frame = 0;
                    }
                }, 100);
            }
        }
        else {
            this.frame = 0;
            if (this.interval) {
                clearInterval(this.interval);
                this.interval = undefined;
            }
            this.setText(this.text);
        }
    }
};
BadgeLoading = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger])
], BadgeLoading);
exports.BadgeLoading = BadgeLoading;


/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.sleep = void 0;
function sleep(ms) {
    return new Promise((resolve) => setTimeout(resolve, ms));
}
exports.sleep = sleep;


/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Suggest = void 0;
const tslib_1 = __webpack_require__(0);
const typedi_1 = __webpack_require__(4);
const logger_1 = __webpack_require__(3);
const messaging_1 = __webpack_require__(6);
const tagging_1 = __webpack_require__(10);
let Suggest = class Suggest {
    constructor(logger, messaging, tagging) {
        this.logger = logger;
        this.messaging = messaging;
        this.tagging = tagging;
        this.nsScore = {
            female: 5,
            male: 4.995,
            misc: 4.5,
            language: 1,
            artist: 3,
            group: 2.5,
            parody: 4,
            character: 3.5,
            reclass: 1,
            rows: 0,
        };
        this.tagList = [];
        this.sha = '';
        messaging.on('suggest-tag', (args) => {
            return this.getSuggests(args.term, args.limit);
        });
        this.update().catch(logger.error);
    }
    update() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const v = yield this.messaging.emit('get-tag-map', { ifNotMatch: this.sha });
            if (v.map)
                this.tagList = Object.values(v.map);
            this.sha = v.sha;
        });
    }
    markTag(tag, search, term) {
        const key = tag.key;
        const cn = tag.cn.toLowerCase();
        const keyIdx = key.indexOf(search);
        const nameIdx = cn.indexOf(search);
        const ns = this.tagging.namespace(tag.ns);
        let score = 0;
        const match = {};
        if (keyIdx >= 0) {
            score += ((this.nsScore[ns] * (search.length + 1)) / key.length) * (keyIdx === 0 ? 2 : 1);
            match.key = { start: keyIdx, end: keyIdx + search.length };
        }
        if (nameIdx >= 0) {
            score += ((this.nsScore[ns] * (search.length + 1)) / cn.length) * (nameIdx === 0 ? 2 : 1);
            match.cn = { start: nameIdx, end: nameIdx + search.length };
        }
        return {
            tag,
            term,
            match,
            score,
        };
    }
    getSuggests(term, limit = -1) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            yield this.update();
            if (!this.tagList.length || !term) {
                return [];
            }
            let sTerm = term.toLowerCase();
            const col = sTerm.indexOf(':');
            let tagList = this.tagList;
            if (col >= 1) {
                const ns = this.tagging.ns(sTerm.slice(0, col));
                if (ns) {
                    sTerm = sTerm.slice(col + 1);
                    tagList = tagList.filter((tag) => tag.ns === ns);
                }
            }
            let suggestions = tagList.map((tag) => this.markTag(tag, sTerm, term)).filter((st) => st.score > 0);
            if (term) {
                suggestions = suggestions.sort((st1, st2) => st2.score - st1.score);
            }
            if (limit > 0) {
                suggestions = suggestions.slice(0, limit);
            }
            return suggestions;
        });
    }
};
Suggest = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger, messaging_1.Messaging, tagging_1.Tagging])
], Suggest);
exports.Suggest = Suggest;


/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TagDatabase = void 0;
const tslib_1 = __webpack_require__(0);
const typedi_1 = __webpack_require__(4);
const storage_1 = __webpack_require__(7);
const logger_1 = __webpack_require__(3);
const messaging_1 = __webpack_require__(6);
const tagging_1 = __webpack_require__(10);
const rxjs_1 = __webpack_require__(18);
const operators_1 = __webpack_require__(19);
const DATA_STRUCTURE_VERSION = 10;
let TagDatabase = class TagDatabase {
    constructor(storage, logger, messaging, tagging) {
        this.storage = storage;
        this.logger = logger;
        this.messaging = messaging;
        this.tagging = tagging;
        this.tagMap = new rxjs_1.BehaviorSubject(undefined);
        messaging.on('get-tag', (key) => {
            return this.mapView.pipe(operators_1.map((v) => v.map[key])).toPromise();
        });
        messaging.on('get-tag-map', ({ ifNotMatch }) => {
            return this.mapView
                .pipe(operators_1.map((v) => {
                if (ifNotMatch === v.sha)
                    return { sha: v.sha, map: undefined };
                return { sha: v.sha, map: v.map };
            }))
                .toPromise();
        });
        messaging.on('get-tag-sha', () => {
            return this.mapView.pipe(operators_1.map((v) => v.sha)).toPromise();
        });
        this.init().catch(logger.error);
    }
    get mapView() {
        return this.tagMap.pipe(operators_1.first((v) => v != null));
    }
    init() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const data = yield this.storage.get('databaseInfo');
            const dataMap = yield this.storage.get('database');
            this.messaging.on('update-tag', (data) => this.update(data));
            if (!data || data.version !== DATA_STRUCTURE_VERSION || !dataMap || !data.sha) {
                this.tagMap.next({ sha: '', map: {} });
                const timer = this.logger.time('数据结构变化, 重新构建数据');
                yield this.storage.migrate();
                yield this.messaging.emit('update-database', { force: true });
                timer.end();
            }
            else {
                this.tagMap.next(Object.assign(Object.assign({}, data), { map: dataMap }));
            }
            this.logger.log('标签数据库初始化完成');
        });
    }
    update(tagDB) {
        const timer = this.logger.time('构建数据');
        const sha = tagDB.head.sha;
        const map = {};
        const check = Date.now();
        tagDB.data.forEach((nsData) => {
            const namespace = nsData.namespace;
            if (namespace === 'rows')
                return;
            for (const key in nsData.data) {
                const t = nsData.data[key];
                const fullKey = this.tagging.fullKey({ namespace, key });
                const name = this.tagging.removePara(t.name);
                const ehTag = {
                    ns: this.tagging.ns(namespace),
                    key,
                    name: name,
                    cn: this.tagging.removeImagesAndEmoji(name),
                };
                if (t.intro)
                    ehTag.intro = t.intro;
                if (t.links)
                    ehTag.links = t.links;
                map[fullKey] = ehTag;
            }
        });
        this.tagMap.next({ map, sha });
        this.storage
            .set('databaseInfo', {
            sha,
            check,
            version: DATA_STRUCTURE_VERSION,
        })
            .catch(this.logger.error);
        this.storage.set('database', map).catch(this.logger.error);
        timer.end();
    }
};
TagDatabase = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [storage_1.Storage,
        logger_1.Logger,
        messaging_1.Messaging,
        tagging_1.Tagging])
], TagDatabase);
exports.TagDatabase = TagDatabase;


/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Popup = void 0;
const tslib_1 = __webpack_require__(0);
const lit_html_1 = __webpack_require__(79);
const utils_1 = __webpack_require__(22);
const typedi_1 = __webpack_require__(4);
const logger_1 = __webpack_require__(3);
const storage_1 = __webpack_require__(7);
const messaging_1 = __webpack_require__(6);
const date_time_1 = __webpack_require__(20);
const utils_2 = __webpack_require__(12);
const info_1 = __webpack_require__(13);
__webpack_require__(74);
let Popup = class Popup {
    constructor(logger, messaging, storage, time) {
        this.logger = logger;
        this.messaging = messaging;
        this.storage = storage;
        this.time = time;
        this.defaults = () => ({
            sha: '',
            info: '',
            updateTime: '',
            updateTimeFull: '',
            newSha: '',
            versionInfo: '',
            updateAvailable: false,
            updateButtonDisabled: false,
            showSettingPanel: false,
            progress: 0,
            animationState: 0,
            configValue: Object.assign({}, this.configOriginal),
        });
        this.testAnimationIndex = 0;
        this.testAnimationList = [
            [1, 0],
            [1, 10],
            [1, 30],
            [1, 80],
            [1, 100],
            [2, 100],
            [2, 5],
            [1, 5],
            [0, 0],
        ];
        this.openLink = (ev) => {
            if (ev.target instanceof HTMLAnchorElement) {
                const href = ev.target.href;
                if (href && !href.startsWith(document.location.origin + document.location.pathname)) {
                    ev.preventDefault();
                    utils_2.openInTab(href);
                    this.provider.close();
                }
            }
        };
        this.downloadStatus = (data) => tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.state.updateButtonDisabled = data.run;
            this.state.animationState = data.run ? 1 : 0;
            this.state.info = data.info;
            this.state.progress = data.progress || 0;
            if (data.complete) {
                yield utils_1.sleep(1000);
                this.state.progress = 100;
                this.state.animationState = 2;
                this.state.updateButtonDisabled = false;
                yield this.checkVersion();
                yield utils_1.sleep(500);
                this.state.progress = 5;
                yield utils_1.sleep(500);
                this.state.animationState = 1;
            }
        });
    }
    loadConfig() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.configOriginal = yield this.storage.get('config');
            this.state.configValue = Object.assign({}, this.configOriginal);
        });
    }
    testAnimation() {
        const a = this.testAnimationList[this.testAnimationIndex];
        this.testAnimationIndex++;
        if (!this.testAnimationList[this.testAnimationIndex]) {
            this.testAnimationIndex = 0;
        }
        this.state.animationState = a[0];
        this.state.progress = a[1];
    }
    checkVersion() {
        var _a;
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.state.versionInfo = '检查中...';
            const currentSha = yield this.messaging.emit('get-tag-sha', undefined);
            const updateTime = (_a = (yield this.storage.get('databaseInfo'))) === null || _a === void 0 ? void 0 : _a.check;
            this.state.sha = currentSha ? currentSha.slice(0, 7) : 'N/A';
            this.state.updateTime = updateTime ? this.time.diff(updateTime) : 'N/A';
            this.state.updateTimeFull = updateTime ? new Date(updateTime).toLocaleString() : 'N/A';
            try {
                const data = yield this.messaging.emit('check-database', { force: true });
                this.logger.log('Release Data', data);
                const hasNewData = (this.state.updateAvailable = data.sha !== currentSha);
                if (hasNewData) {
                    this.state.newSha = data.sha.slice(0, 7);
                    this.state.versionInfo = `有更新!`;
                }
                else {
                    this.state.versionInfo = '已是最新版本';
                }
            }
            catch (ex) {
                this.logger.error('获取失败', ex);
                this.state.versionInfo = '获取失败';
            }
        });
    }
    updateButtonClick() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.state.updateButtonDisabled = true;
            yield this.messaging.emit('update-database', { force: true, recheck: false });
        });
    }
    logoTemplate(progress = 0) {
        const PushRodStyle = `transform: translate(${(progress / 400) * 70}px, 0)`;
        const EnemaStyle = `transform: scaleX(${progress / 100})`;
        return lit_html_1.svg `
    <svg width="160" height="160" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
      <defs>
          <clipPath id="clip">
              <rect width="200" height="200"/>
          </clipPath>
      </defs>
      <g id="Syringe" clip-path="url(#clip)">
          <g id="PushRod" style="${PushRodStyle}">
              <g transform="translate(-39 -312)">
                  <g transform="translate(131 403)" fill-bg stroke-accent stroke-width="6">
                      <rect width="78" height="18" rx="6" stroke="none"/>
                      <rect x="3" y="3" width="72" height="12" rx="3" fill="none"/>
                  </g>
                  <g transform="translate(203 391)" fill-bg stroke-accent stroke-width="6">
                      <rect width="18" height="43" rx="9" stroke="none"/>
                      <rect x="3" y="3" width="12" height="37" rx="6" fill="none"/>
                  </g>
              </g>
          </g>
          <g transform="translate(56 85)" fill-bg stroke-accent stroke-width="6">
              <rect width="83" height="30" rx="6" stroke="none"/>
              <rect x="3" y="3" width="77" height="24" rx="3" fill="none"/>
          </g>
          <g id="Enema" style="${EnemaStyle}">
              <rect width="70" height="27" transform="translate(61 86)" fill-sa/>
          </g>
          <path id="Enema2" d="M27.426,86.36s5.65.007,13.6.006S57.64,83.357,57.64,83.357L38.015,102.982,24.409,89.377l3.015-3.015Z" transform="translate(107.906 10.036) rotate(45)" fill-sa/>
          <g transform="translate(-39 -312)">
              <g transform="translate(95 397)" fill="none" stroke-accent stroke-width="6">
                  <rect width="83" height="30" rx="6" stroke="none"/>
                  <rect x="3" y="3" width="77" height="24" rx="3" fill="none"/>
              </g>
              <g transform="translate(82 403)" fill-sa stroke-accent stroke-width="6">
                  <rect width="19" height="18" rx="6" stroke="none"/>
                  <rect x="3" y="3" width="13" height="12" rx="3" fill="none"/>
              </g>
              <rect width="29" height="6" rx="3" transform="translate(58 409)" fill-accent/>
              <g transform="translate(172 381)" fill-bg stroke-accent stroke-width="6">
                  <rect width="18" height="62" rx="9" stroke="none"/>
                  <rect x="3" y="3" width="12" height="56" rx="6" fill="none"/>
              </g>
              <g transform="translate(119 398)" fill-bg stroke-accent stroke-width="3">
                  <rect width="4" height="11" rx="2" stroke="none"/>
                  <rect x="1.5" y="1.5" width="1" height="8" rx="0.5" fill="none"/>
              </g>
              <g transform="translate(131 398)" fill-bg stroke-accent stroke-width="3">
                  <rect width="4" height="11" rx="2" stroke="none"/>
                  <rect x="1.5" y="1.5" width="1" height="8" rx="0.5" fill="none"/>
              </g>
              <g transform="translate(144 398)" fill-bg stroke-accent stroke-width="3">
                  <rect width="4" height="11" rx="2" stroke="none"/>
                  <rect x="1.5" y="1.5" width="1" height="8" rx="0.5" fill="none"/>
              </g>
              <g transform="translate(156 398)" fill-bg stroke-accent stroke-width="3">
                  <rect width="4" height="11" rx="2" stroke="none"/>
                  <rect x="1.5" y="1.5" width="1" height="8" rx="0.5" fill="none"/>
              </g>
          </g>
      </g>
  </svg>`;
    }
    changeConfigValue(key, value) {
        this.state.configValue = Object.assign(Object.assign({}, this.state.configValue), { [key]: value });
    }
    changeConfigUnsaved() {
        if (!this.configOriginal)
            return false;
        const keys = [...Object.keys(this.configOriginal), ...Object.keys(this.state.configValue)];
        return keys.some((key) => this.configOriginal[key] !== this.state.configValue[key]);
    }
    saveConfig() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            yield this.storage.set('config', this.state.configValue);
            yield this.loadConfig();
            yield utils_1.sleep(200);
            this.provider.close();
        });
    }
    settingPanelTemplate() {
        const state = this.state;
        const checkboxList = [
            { key: 'translateUi', name: '翻译界面' },
            { key: 'translateTag', name: '翻译标签' },
            { key: 'showIntroduce', name: '标签介绍' },
            { key: 'showIcon', name: '显示标签图标' },
            { key: 'tagTip', name: '搜索提示' },
            { key: 'autoUpdate', name: '自动更新' },
        ];
        return lit_html_1.html `
            <div id="settingPanel" class="panel ${state.showSettingPanel ? 'show' : ''}">
                <div class="header">
                    <div>设置</div>
                    <div class="cushion"></div>
                    <div>
                        <a @click="${() => (this.state.showSettingPanel = false)}" href="#">✕</a>
                    </div>
                </div>
                <form id="settingForm" class="content">
                    ${checkboxList.map((item) => lit_html_1.html `
                            <div class="checkbox-item">
                                <label>
                                    <input
                                        type="checkbox"
                                        @change=${(e) => this.changeConfigValue(item.key, e.target.checked)}
                                        ?checked="${this.state.configValue[item.key]}"
                                    />
                                    ${item.name}
                                    <svg
                                        class="${this.state.configValue[item.key] ? 'checked' : ''}"
                                        viewBox="0 0 100 100"
                                        xmlns="http://www.w3.org/2000/svg"
                                    >
                                        <path d="M 10 10 L 90 90"></path>
                                        <path d="M 90 10 L 10 90"></path>
                                    </svg>
                                </label>
                            </div>
                        `)}
                    <p class="checkbox-item">
                        介绍图片:
                        <span
                            >${['禁用', '隐藏色情图片', '隐藏引起不适的图片', '全部显示'][state.configValue.introduceImageLevel]}</span
                        >
                    </p>
                    <div class="image-level">
                        <div class="range-box">
                            <input
                                type="range"
                                min="0"
                                max="300"
                                @change=${(e) => {
            const value = Math.round(parseInt(e.target.value, 10) / 100);
            this.changeConfigValue('introduceImageLevel', value + 1);
            this.changeConfigValue('introduceImageLevel', value);
        }}
                                .value="${state.configValue.introduceImageLevel * 100}"
                            />
                        </div>
                        <div class="range-label">
                            <a href="#" @click="${() => this.changeConfigValue('introduceImageLevel', 0)}"
                                >禁用</a
                            >
                            <a href="#" @click="${() => this.changeConfigValue('introduceImageLevel', 1)}"
                                >非H</a
                            >
                            <a href="#" @click="${() => this.changeConfigValue('introduceImageLevel', 2)}"
                                >R18</a
                            >
                            <a href="#" @click="${() => this.changeConfigValue('introduceImageLevel', 3)}"
                                >R18G</a
                            >
                        </div>
                    </div>
                </form>
                <button
                    @click="${() => tslib_1.__awaiter(this, void 0, void 0, function* () {
            yield this.saveConfig();
        })}"
                    class="action ${this.changeConfigUnsaved() ? 'primary' : ''}"
                >
                    保存
                </button>
            </div>
        `;
    }
    mainPanelTemplate() {
        const state = this.state;
        return lit_html_1.html `<div id="mainPanel" class="panel ${state.showSettingPanel ? 'hide' : ''}">
            <div class="header">
                <div>
                    <a href="${info_1.packageJson.homepage}" class="monospace minor">v${info_1.packageJson.version}</a>
                </div>
                <div class="cushion"></div>
                <div>
                    <a id="settingSwitch" href="#" @click="${() => (state.showSettingPanel = !state.showSettingPanel)}"
                        >设置</a
                    >
                </div>
            </div>
            <div class="content">
                <div class="logo-box" style="height: 205px;">
                    <div
                        class="logo ${['', 'prominent', 'prominent injection'][state.animationState] || ''}"
                        @click="${() => {
            this.testAnimation();
        }}"
                    >
                        ${this.logoTemplate(state.progress)}
                    </div>
                    <div id="info">${state.info}</div>
                </div>
                <table>
                    <tr>
                        <th>TAG版本:</th>
                        <td>
                            <a href="https://github.com/EhTagTranslation/Database/tree/${state.sha}" class="monospace"
                                >${state.sha || ' --- '}</a
                            >
                        </td>
                    </tr>
                    <tr>
                        <th>上次更新:</th>
                        <td>
                            <span>${state.updateTime || ' --- '}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>更新检查:</th>
                        <td>
                            <span class="${state.updateAvailable ? 'hasNew' : ''}">
                                ${state.versionInfo}
                                <a
                                    class="monospace ${state.updateAvailable ? '' : 'hidden'}"
                                    href="https://github.com/EhTagTranslation/Database/tree/${state.newSha}"
                                >
                                    ${state.newSha || ''}
                                </a>
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
            <button
                @click="${() => this.updateButtonClick()}"
                ?disabled=${state.updateButtonDisabled}
                class="action ${state.updateAvailable ? 'primary' : ''}"
                id="updateButton"
            >
                更新
            </button>
        </div>`;
    }
    template() {
        const state = this.state;
        return lit_html_1.html ` <div id="eh-syringe-popup-root">
            ${this.mainPanelTemplate()} ${state.configValue ? this.settingPanelTemplate() : lit_html_1.nothing}
        </div>`;
    }
    mount(el, provider) {
        if (this.el != null)
            throw new Error('Injected twice');
        this.el = el;
        this.provider = provider;
        this.resetState();
        this.updateView();
        provider.onopen(() => this.onopen().catch(this.logger.error));
        provider.onclose(() => this.onclose());
    }
    resetState() {
        this.state = new Proxy(this.defaults(), {
            set: (target, key, value, receiver) => {
                const r = Reflect.set(target, key, value, receiver);
                this.updateView();
                return r;
            },
        });
    }
    onopen() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.resetState();
            yield this.loadConfig();
            this.updateView();
            yield utils_1.sleep(0);
            yield this.checkVersion();
            if (!this.downloadStatusSub) {
                this.downloadStatusSub = this.messaging.on('updating-database', this.downloadStatus);
            }
            this.el.addEventListener('click', this.openLink);
        });
    }
    onclose() {
        if (this.downloadStatusSub) {
            this.messaging.off(this.downloadStatusSub);
            this.downloadStatusSub = undefined;
        }
        this.el.removeEventListener('click', this.openLink);
        this.state.showSettingPanel = false;
    }
    updateView() {
        lit_html_1.render(this.template(), this.el);
    }
};
Popup = tslib_1.__decorate([
    typedi_1.Service(),
    tslib_1.__metadata("design:paramtypes", [logger_1.Logger,
        messaging_1.Messaging,
        storage_1.Storage,
        date_time_1.DateTime])
], Popup);
exports.Popup = Popup;


/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {

var api = __webpack_require__(11);
            var content = __webpack_require__(75);

            content = content.__esModule ? content.default : content;

            if (typeof content === 'string') {
              content = [[module.i, content, '']];
            }

var options = {"insert":":root"};

options.insert = ":root";
options.singleton = false;

var update = api(content, options);



module.exports = content.locals || {};

/***/ }),
/* 75 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(true);
// Module
___CSS_LOADER_EXPORT___.push([module.i, "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}#eh-syringe-popup-root{text-align:left;text-align:initial;font-size:medium;line-height:normal}#eh-syringe-popup-root input[type=checkbox],#eh-syringe-popup-root input[type=radio]{position:static;top:auto}#eh-syringe-popup-root p{margin:.8em 0}#eh-syringe-popup-root a{background:rgba(0,0,0,0);-webkit-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-o-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-moz-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;transition:all .28s cubic-bezier(.4,0,.2,1) 0s;text-decoration:none}#eh-syringe-popup-root,#eh-syringe-popup-root .panel{background:#f0f0f0;color:#111}#eh-syringe-popup-root #info,#eh-syringe-popup-root a{color:#8041a6}#eh-syringe-popup-root a:hover{color:#491774}#eh-syringe-popup-root a:active{color:#ae79c9}#eh-syringe-popup-root a.minor{color:#a5a3a6}#eh-syringe-popup-root a.minor:hover{color:#d2cdd4}#eh-syringe-popup-root a.minor:active{color:#838185}#eh-syringe-popup-root .logo svg [fill-bg]{fill:#f0f0f0}#eh-syringe-popup-root .logo svg [fill-accent]{fill:#8041a6}#eh-syringe-popup-root .logo svg [fill-sa]{fill:#cfbadc}#eh-syringe-popup-root .logo svg [stroke-bg]{stroke:#f0f0f0}#eh-syringe-popup-root .logo svg [stroke-accent]{stroke:#8041a6}#eh-syringe-popup-root .logo svg [stroke-sa]{stroke:#cfbadc}#eh-syringe-popup-root .action{background:#f0f0f0;color:#8041a6}#eh-syringe-popup-root .action.primary{background:#8041a6;color:#f0f0f0}#eh-syringe-popup-root .action.primary:hover{background:#491774}#eh-syringe-popup-root .action.primary:active{background:#ae79c9}#eh-syringe-popup-root #settingForm .checkbox-item svg path{stroke:#8041a6}#eh-syringe-popup-root #settingForm input[type=checkbox]{border:2px solid #a09da6}#eh-syringe-popup-root #settingForm input[type=checkbox] :checked{border:2px solid #8041a6}#eh-syringe-popup-root #settingForm input[type=range]{background:#f0f0f0}#eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-runnable-track{border:1px solid #ae79c9}#eh-syringe-popup-root #settingForm input[type=range]::-moz-range-track{border:1px solid #ae79c9}#eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-thumb{background:#f0f0f0;border:2px solid #8041a6}#eh-syringe-popup-root #settingForm input[type=range]::-moz-range-thumb{background:#f0f0f0;border:2px solid #8041a6}#eh-syringe-popup-root #settingForm input[type=range]:focus::-webkit-slider-thumb{border:2px solid #8041a6;-webkit-box-shadow:0 0 7px rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2)}#eh-syringe-popup-root #settingForm input[type=range]:focus::-moz-range-thumb{border:2px solid #8041a6;-moz-box-shadow:0 0 7px rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2)}#eh-syringe-popup-root #settingForm input[type=range]:active::-webkit-slider-thumb{border:2px solid #8041a6;background:#fdfdfd;-webkit-box-shadow:0 0 7px 1px rgba(0,0,0,.2);box-shadow:0 0 7px 1px rgba(0,0,0,.2)}#eh-syringe-popup-root #settingForm input[type=range]:active::-moz-range-thumb{border:2px solid #8041a6;background:#fdfdfd;-moz-box-shadow:0 0 7px 1px rgba(0,0,0,.2);box-shadow:0 0 7px 1px rgba(0,0,0,.2)}body.ex #eh-syringe-popup-root,body.ex #eh-syringe-popup-root .panel{background:#313131;color:#eee}body.ex #eh-syringe-popup-root #info,body.ex #eh-syringe-popup-root a{color:#ce90f1}body.ex #eh-syringe-popup-root a:hover{color:#e2b9f7}body.ex #eh-syringe-popup-root a:active{color:#b669e9}body.ex #eh-syringe-popup-root a.minor{color:#a5a3a6}body.ex #eh-syringe-popup-root a.minor:hover{color:#d2cdd4}body.ex #eh-syringe-popup-root a.minor:active{color:#838185}body.ex #eh-syringe-popup-root .logo svg [fill-bg]{fill:#313131}body.ex #eh-syringe-popup-root .logo svg [fill-accent]{fill:#ce90f1}body.ex #eh-syringe-popup-root .logo svg [fill-sa]{fill:#987ca8}body.ex #eh-syringe-popup-root .logo svg [stroke-bg]{stroke:#313131}body.ex #eh-syringe-popup-root .logo svg [stroke-accent]{stroke:#ce90f1}body.ex #eh-syringe-popup-root .logo svg [stroke-sa]{stroke:#987ca8}body.ex #eh-syringe-popup-root .action{background:#313131;color:#ce90f1}body.ex #eh-syringe-popup-root .action.primary{background:#ce90f1;color:#313131}body.ex #eh-syringe-popup-root .action.primary:hover{background:#e2b9f7}body.ex #eh-syringe-popup-root .action.primary:active{background:#b669e9}body.ex #eh-syringe-popup-root #settingForm .checkbox-item svg path{stroke:#ce90f1}body.ex #eh-syringe-popup-root #settingForm input[type=checkbox]{border:2px solid #a09da6}body.ex #eh-syringe-popup-root #settingForm input[type=checkbox] :checked{border:2px solid #ce90f1}body.ex #eh-syringe-popup-root #settingForm input[type=range]{background:#313131}body.ex #eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-runnable-track{border:1px solid #b669e9}body.ex #eh-syringe-popup-root #settingForm input[type=range]::-moz-range-track{border:1px solid #b669e9}body.ex #eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-thumb{background:#313131;border:2px solid #ce90f1}body.ex #eh-syringe-popup-root #settingForm input[type=range]::-moz-range-thumb{background:#313131;border:2px solid #ce90f1}body.ex #eh-syringe-popup-root #settingForm input[type=range]:focus::-webkit-slider-thumb{border:2px solid #ce90f1;-webkit-box-shadow:0 0 7px rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2)}body.ex #eh-syringe-popup-root #settingForm input[type=range]:focus::-moz-range-thumb{border:2px solid #ce90f1;-moz-box-shadow:0 0 7px rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2)}body.ex #eh-syringe-popup-root #settingForm input[type=range]:active::-webkit-slider-thumb{border:2px solid #ce90f1;background:#131313;-webkit-box-shadow:0 0 7px 1px rgba(0,0,0,.2);box-shadow:0 0 7px 1px rgba(0,0,0,.2)}body.ex #eh-syringe-popup-root #settingForm input[type=range]:active::-moz-range-thumb{border:2px solid #ce90f1;background:#131313;-moz-box-shadow:0 0 7px 1px rgba(0,0,0,.2);box-shadow:0 0 7px 1px rgba(0,0,0,.2)}#eh-syringe-popup-root{overflow:hidden;white-space:nowrap;font-family:sans-serif;font-size:12pt;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px;max-width:400px;min-width:240px;position:relative}#eh-syringe-popup-root .hidden{visibility:hidden;display:none}#eh-syringe-popup-root .panel{margin:0 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#eh-syringe-popup-root .panel,#eh-syringe-popup-root .panel .header{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}#eh-syringe-popup-root .panel .header{margin:16px;line-height:1}#eh-syringe-popup-root .panel .header>.cushion{-webkit-box-flex:1;-webkit-flex:auto;-moz-box-flex:1;-ms-flex:auto;flex:auto}#eh-syringe-popup-root .panel .header span{color:#a5a3a6}#eh-syringe-popup-root .panel .content{margin:0 16px;-webkit-box-flex:1;-webkit-flex:auto;-moz-box-flex:1;-ms-flex:auto;flex:auto;overflow:visible}#eh-syringe-popup-root .panel .action{display:block;line-height:36px;font-size:16px;margin:16px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;-webkit-tap-highlight-color:transparent;white-space:nowrap;text-decoration:none;text-align:center;min-width:64px;padding:0 16px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;overflow:visible;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);transform:translateZ(0);border:1px solid #ddd;-webkit-transition:background .4s cubic-bezier(.25,.8,.25,1),-webkit-box-shadow .28s cubic-bezier(.4,0,.2,1);transition:background .4s cubic-bezier(.25,.8,.25,1),-webkit-box-shadow .28s cubic-bezier(.4,0,.2,1);-o-transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);-moz-transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1),-moz-box-shadow .28s cubic-bezier(.4,0,.2,1);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1),-webkit-box-shadow .28s cubic-bezier(.4,0,.2,1),-moz-box-shadow .28s cubic-bezier(.4,0,.2,1)}#eh-syringe-popup-root .panel .action.primary{border:none;-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}#eh-syringe-popup-root .panel .action.primary:active{border:none;-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}#eh-syringe-popup-root .panel .action:disabled{opacity:.6}#eh-syringe-popup-root .panel .action:focus{border:1px solid #888}#eh-syringe-popup-root #mainPanel{-webkit-transition:opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);-o-transition:opacity .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-moz-transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}#eh-syringe-popup-root #mainPanel.hide{-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}#eh-syringe-popup-root .logo-box{overflow:hidden;position:relative;margin:-16px;pointer-events:none}#eh-syringe-popup-root .logo{text-align:center;margin:20px 0;-webkit-transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);-o-transition:-o-transform .28s cubic-bezier(.4,0,.2,1);-moz-transition:transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-webkit-transform:scale(1) rotate(-45deg);-moz-transform:scale(1) rotate(-45deg);-ms-transform:scale(1) rotate(-45deg);-o-transform:scale(1) rotate(-45deg);transform:scale(1) rotate(-45deg)}#eh-syringe-popup-root .logo #Syringe{pointer-events:all}#eh-syringe-popup-root .logo #Enema{opacity:0;-webkit-transform-origin:61px 86px;-moz-transform-origin:61px 86px;-ms-transform-origin:61px 86px;-o-transform-origin:61px 86px;transform-origin:61px 86px}#eh-syringe-popup-root .logo #Enema2{opacity:1}#eh-syringe-popup-root .logo #Enema,#eh-syringe-popup-root .logo #Enema2,#eh-syringe-popup-root .logo #PushRod{-webkit-transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);-o-transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-moz-transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1);transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1);transition:width .28s cubic-bezier(.4,0,.2,1),opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1)}#eh-syringe-popup-root .logo.prominent{-webkit-transform:scale(1.6) rotate(0deg);-moz-transform:scale(1.6) rotate(0deg);-ms-transform:scale(1.6) rotate(0deg);-o-transform:scale(1.6) rotate(0deg);transform:scale(1.6) rotate(0deg)}#eh-syringe-popup-root .logo.prominent #Enema2{opacity:0}#eh-syringe-popup-root .logo.prominent #Enema{opacity:1}#eh-syringe-popup-root .logo.prominent.injection{-webkit-transform:scale(1.6) rotate(0deg) translate(-10px);-moz-transform:scale(1.6) rotate(0deg) translate(-10px);-ms-transform:scale(1.6) rotate(0deg) translate(-10px);-o-transform:scale(1.6) rotate(0deg) translate(-10px);transform:scale(1.6) rotate(0deg) translate(-10px)}#eh-syringe-popup-root .logo.prominent.injection #Enema,#eh-syringe-popup-root .logo.prominent.injection #Enema2,#eh-syringe-popup-root .logo.prominent.injection #PushRod{-webkit-transition:width .6s cubic-bezier(.4,0,.2,1),-webkit-transform .6s cubic-bezier(.4,0,.2,1);transition:width .6s cubic-bezier(.4,0,.2,1),-webkit-transform .6s cubic-bezier(.4,0,.2,1);-o-transition:width .6s cubic-bezier(.4,0,.2,1),-o-transform .6s cubic-bezier(.4,0,.2,1);-moz-transition:width .6s cubic-bezier(.4,0,.2,1),transform .6s cubic-bezier(.4,0,.2,1),-moz-transform .6s cubic-bezier(.4,0,.2,1);transition:width .6s cubic-bezier(.4,0,.2,1),transform .6s cubic-bezier(.4,0,.2,1);transition:width .6s cubic-bezier(.4,0,.2,1),transform .6s cubic-bezier(.4,0,.2,1),-webkit-transform .6s cubic-bezier(.4,0,.2,1),-moz-transform .6s cubic-bezier(.4,0,.2,1),-o-transform .6s cubic-bezier(.4,0,.2,1)}#eh-syringe-popup-root #info{position:absolute;bottom:30px;left:0;right:0;height:24px;line-height:24px;text-align:center;font-size:16px}#eh-syringe-popup-root .monospace{font-family:Menlo,Consolas,Source Code Pro,Inconsolata,Monaco,Courier New,monospace}#eh-syringe-popup-root table{font-size:14px}#eh-syringe-popup-root .hasNew{color:#a6000f}#eh-syringe-popup-root #settingPanel{position:absolute;left:0;top:0;bottom:0;right:0;pointer-events:none;opacity:0;-webkit-transition:opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);-o-transition:opacity .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-moz-transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1);transition:opacity .28s cubic-bezier(.4,0,.2,1),transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1),-moz-transform .28s cubic-bezier(.4,0,.2,1),-o-transform .28s cubic-bezier(.4,0,.2,1);-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}#eh-syringe-popup-root #settingPanel.show{pointer-events:auto;opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}#eh-syringe-popup-root #settingPanel #settingForm{font-size:10pt;line-height:12pt}#eh-syringe-popup-root .checkbox-item{padding:4px 0}#eh-syringe-popup-root .checkbox-item label{position:relative;display:block}#eh-syringe-popup-root .checkbox-item svg{width:10px;height:10px;position:absolute;left:3px;top:3px}#eh-syringe-popup-root .checkbox-item svg path{stroke-dasharray:1000;stroke-dashoffset:1000;stroke-width:16px;stroke-linecap:round;stroke-linejoin:round;fill:none}#eh-syringe-popup-root .checkbox-item svg.checked path{stroke-dasharray:113.137,113.137;stroke-dashoffset:0;-webkit-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-o-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-moz-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;transition:all .28s cubic-bezier(.4,0,.2,1) 0s}#eh-syringe-popup-root .checkbox-item svg.checked path+path{-webkit-transition:all .28s cubic-bezier(.4,0,.2,1) .28s;-o-transition:all .28s cubic-bezier(.4,0,.2,1) .28s;-moz-transition:all .28s cubic-bezier(.4,0,.2,1) .28s;transition:all .28s cubic-bezier(.4,0,.2,1) .28s}#eh-syringe-popup-root .checkbox-item input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;margin-right:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:top;-webkit-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-o-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;-moz-transition:all .28s cubic-bezier(.4,0,.2,1) 0s;transition:all .28s cubic-bezier(.4,0,.2,1) 0s}#eh-syringe-popup-root .checkbox-item input[type=checkbox]:focus{outline:none}#eh-syringe-popup-root #settingForm input[type=range]{appearance:none;-moz-appearance:none;-webkit-appearance:none;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;width:100%}#eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-runnable-track{height:6px;-webkit-border-radius:10px;border-radius:10px;-webkit-box-sizing:border-box;box-sizing:border-box}#eh-syringe-popup-root #settingForm input[type=range]:focus{outline:none}#eh-syringe-popup-root #settingForm input[type=range]::-webkit-slider-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;height:16px;width:16px;margin-top:-6px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:50%;border-radius:50%;-webkit-transition:all .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}#eh-syringe-popup-root #settingForm input[type=range]::-moz-range-track{height:6px;-moz-border-radius:10px;border-radius:10px;-moz-box-sizing:border-box;box-sizing:border-box}#eh-syringe-popup-root #settingForm input[type=range]::-moz-range-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;height:16px;width:16px;margin-top:-6px;-moz-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:50%;border-radius:50%;-moz-transition:all .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}#eh-syringe-popup-root #settingForm h3 span{font-weight:400;font-size:20pt}#eh-syringe-popup-root .image-level{margin:0 4px}#eh-syringe-popup-root .range-box{margin:5px}#eh-syringe-popup-root .range-label{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}#eh-syringe-popup-root .range-label a{-webkit-box-flex:0;-webkit-flex:none;-moz-box-flex:0;-ms-flex:none;flex:none;font-size:10pt;width:30px;text-align:center;display:inline-block}", "",{"version":3,"sources":["../../../node_modules/normalize.css/normalize.css","index.less"],"names":[],"mappings":"AAAA,2EAA2E,CAU3E,KACE,gBAAiB,CACjB,6BACF,CASA,KACE,QACF,CAMA,KACE,aACF,CAOA,GACE,aAAc,CACd,cACF,CAUA,GACE,8BAAuB,CAAvB,2BAAuB,CAAvB,sBAAuB,CACvB,QAAS,CACT,gBACF,CAOA,IACE,+BAAiC,CACjC,aACF,CASA,EACE,8BACF,CAOA,YACE,kBAAmB,CACnB,yBAA0B,CAC1B,wCAAiC,CAAjC,qCAAiC,CAAjC,gCACF,CAMA,SAEE,kBACF,CAOA,cAGE,+BAAiC,CACjC,aACF,CAMA,MACE,aACF,CAOA,QAEE,aAAc,CACd,aAAc,CACd,iBAAkB,CAClB,uBACF,CAEA,IACE,aACF,CAEA,IACE,SACF,CASA,IACE,iBACF,CAUA,sCAKE,mBAAoB,CACpB,cAAe,CACf,gBAAiB,CACjB,QACF,CAOA,aAEE,gBACF,CAOA,cAEE,mBACF,CAMA,gDAIE,yBACF,CAMA,wHAIE,iBAAkB,CAClB,SACF,CAMA,4GAIE,6BACF,CAMA,SACE,0BACF,CASA,OACE,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,aAAc,CACd,aAAc,CACd,cAAe,CACf,SAAU,CACV,kBACF,CAMA,SACE,uBACF,CAMA,SACE,aACF,CAOA,6BAEE,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,SACF,CAMA,kFAEE,WACF,CAOA,cACE,4BAA6B,CAC7B,mBACF,CAMA,yCACE,uBACF,CAOA,6BACE,yBAA0B,CAC1B,YACF,CASA,QACE,aACF,CAMA,QACE,iBACF,CASA,SACE,YACF,CAMA,SACE,YACF,CC3VA,uBACE,eAAmB,CAAnB,kBAAmB,CACnB,gBAAkB,CAClB,kBACF,CACA,qFAEE,eAAiB,CACjB,QACF,CACA,yBACE,aACF,CACA,yBACE,wBAA4B,CAC5B,sDAAqD,CAArD,iDAAqD,CAArD,mDAAqD,CAArD,8CAAqD,CACrD,oBACF,CACA,qDAEE,kBAAmB,CACnB,UACF,CAIA,sDACE,aACF,CACA,+BACE,aACF,CACA,gCACE,aACF,CACA,+BACE,aACF,CACA,qCACE,aACF,CACA,sCACE,aACF,CACA,2CACE,YACF,CACA,+CACE,YACF,CACA,2CACE,YACF,CACA,6CACE,cACF,CACA,iDACE,cACF,CACA,6CACE,cACF,CACA,+BACE,kBAAmB,CACnB,aACF,CACA,uCACE,kBAAmB,CACnB,aACF,CACA,6CACE,kBACF,CACA,8CACE,kBACF,CACA,4DACE,cACF,CACA,yDACE,wBACF,CACA,kEACE,wBACF,CACA,sDACE,kBACF,CACA,qFACE,wBACF,CACA,wEACE,wBACF,CACA,4EACE,kBAAmB,CACnB,wBACF,CACA,wEACE,kBAAmB,CACnB,wBACF,CACA,kFACE,wBAAyB,CACzB,yCAAsC,CAAtC,iCACF,CACA,8EACE,wBAAyB,CACzB,sCAAsC,CAAtC,iCACF,CACA,mFACE,wBAAyB,CACzB,kBAAmB,CACnB,6CAA0C,CAA1C,qCACF,CACA,+EACE,wBAAyB,CACzB,kBAAmB,CACnB,0CAA0C,CAA1C,qCACF,CACA,qEAEE,kBAAmB,CACnB,UACF,CAIA,sEACE,aACF,CACA,uCACE,aACF,CACA,wCACE,aACF,CACA,uCACE,aACF,CACA,6CACE,aACF,CACA,8CACE,aACF,CACA,mDACE,YACF,CACA,uDACE,YACF,CACA,mDACE,YACF,CACA,qDACE,cACF,CACA,yDACE,cACF,CACA,qDACE,cACF,CACA,uCACE,kBAAmB,CACnB,aACF,CACA,+CACE,kBAAmB,CACnB,aACF,CACA,qDACE,kBACF,CACA,sDACE,kBACF,CACA,oEACE,cACF,CACA,iEACE,wBACF,CACA,0EACE,wBACF,CACA,8DACE,kBACF,CACA,6FACE,wBACF,CACA,gFACE,wBACF,CACA,oFACE,kBAAmB,CACnB,wBACF,CACA,gFACE,kBAAmB,CACnB,wBACF,CACA,0FACE,wBAAyB,CACzB,yCAAsC,CAAtC,iCACF,CACA,sFACE,wBAAyB,CACzB,sCAAsC,CAAtC,iCACF,CACA,2FACE,wBAAyB,CACzB,kBAAmB,CACnB,6CAA0C,CAA1C,qCACF,CACA,uFACE,wBAAyB,CACzB,kBAAmB,CACnB,0CAA0C,CAA1C,qCACF,CACA,uBACE,eAAgB,CAChB,kBAAmB,CACnB,sBAAuB,CACvB,cAAe,CACf,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,WAAY,CACZ,eAAgB,CAChB,eAAgB,CAChB,iBACF,CACA,+BACE,iBAAkB,CAClB,YACF,CACA,8BACE,aAAc,CAEd,2BAAsB,CAAtB,4BAAsB,CAAtB,6BAAsB,CAAtB,wBAAsB,CAAtB,yBAAsB,CAAtB,yBAAsB,CAAtB,qBACF,CACA,oEAHE,mBAAa,CAAb,oBAAa,CAAb,gBAAa,CAAb,mBAAa,CAAb,YAOF,CAJA,sCACE,WAAY,CACZ,aAEF,CACA,+CACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SACF,CACA,2CACE,aACF,CACA,uCACE,aAAc,CACd,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,gBACF,CACA,sCACE,aAAc,CACd,gBAAiB,CACjB,cAAe,CACf,WAAY,CACZ,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,iBAAkB,CAClB,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,cAAe,CACf,SAAU,CACV,uCAAwC,CACxC,kBAAmB,CACnB,oBAAqB,CACrB,iBAAkB,CAClB,cAAe,CACf,cAAe,CACf,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAAkB,CAClB,gBAAiB,CACjB,+BAA+B,CAA/B,4BAA+B,CAA/B,uBAA+B,CAC/B,qBAAsB,CACtB,4GAA2G,CAA3G,oGAA2G,CAA3G,+FAA2G,CAA3G,8IAA2G,CAA3G,4FAA2G,CAA3G,yLACF,CACA,8CACE,WAAY,CACZ,wGAA+G,CAA/G,qGAA+G,CAA/G,gGACF,CACA,qDACE,WAAY,CACZ,8GAAqH,CAArH,2GAAqH,CAArH,sGACF,CACA,+CACE,UACF,CACA,4CACE,qBACF,CACA,kCACE,sGAAoG,CAApG,8FAAoG,CAApG,4FAAoG,CAApG,uIAAoG,CAApG,sFAAoG,CAApG,2NAAoG,CACpG,0BAAmB,CAAnB,uBAAmB,CAAnB,sBAAmB,CAAnB,qBAAmB,CAAnB,kBACF,CACA,uCACE,2BAAqB,CAArB,wBAAqB,CAArB,uBAAqB,CAArB,sBAAqB,CAArB,mBACF,CACA,iCACE,eAAgB,CAChB,iBAAkB,CAClB,YAAa,CACb,mBACF,CACA,6BACE,iBAAkB,CAClB,aAAc,CACd,iEAAwD,CAAxD,yDAAwD,CAAxD,uDAAwD,CAAxD,kGAAwD,CAAxD,iDAAwD,CAAxD,sLAAwD,CACxD,yCAAkC,CAAlC,sCAAkC,CAAlC,qCAAkC,CAAlC,oCAAkC,CAAlC,iCACF,CACA,sCACE,kBACF,CACA,oCACE,SAAU,CACV,kCAA2B,CAA3B,+BAA2B,CAA3B,8BAA2B,CAA3B,6BAA2B,CAA3B,0BACF,CACA,qCACE,SACF,CACA,+GAGE,yIAA8I,CAA9I,iIAA8I,CAA9I,+HAA8I,CAA9I,0KAA8I,CAA9I,yHAA8I,CAA9I,8PACF,CACA,uCACE,yCAAkC,CAAlC,sCAAkC,CAAlC,qCAAkC,CAAlC,oCAAkC,CAAlC,iCACF,CACA,+CACE,SACF,CACA,8CACE,SACF,CACA,iDACE,0DAAsD,CAAtD,uDAAsD,CAAtD,sDAAsD,CAAtD,qDAAsD,CAAtD,kDACF,CACA,2KAGE,kGAAkG,CAAlG,0FAAkG,CAAlG,wFAAkG,CAAlG,kIAAkG,CAAlG,kFAAkG,CAAlG,oNACF,CACA,6BACE,iBAAkB,CAClB,WAAY,CACZ,MAAO,CACP,OAAQ,CACR,WAAY,CACZ,gBAAiB,CACjB,iBAAkB,CAClB,cACF,CACA,kCACE,mFACF,CACA,6BACE,cACF,CACA,+BACE,aACF,CACA,qCACE,iBAAkB,CAClB,MAAO,CACP,KAAM,CACN,QAAS,CACT,OAAQ,CACR,mBAAoB,CACpB,SAAU,CACV,sGAAoG,CAApG,8FAAoG,CAApG,4FAAoG,CAApG,uIAAoG,CAApG,sFAAoG,CAApG,2NAAoG,CACpG,4BAAqB,CAArB,yBAAqB,CAArB,wBAAqB,CAArB,uBAAqB,CAArB,oBACF,CACA,0CACE,mBAAoB,CACpB,SAAU,CACV,0BAAmB,CAAnB,uBAAmB,CAAnB,sBAAmB,CAAnB,qBAAmB,CAAnB,kBACF,CACA,kDACE,cAAe,CACf,gBACF,CACA,sCACE,aACF,CACA,4CACE,iBAAkB,CAClB,aACF,CACA,0CACE,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,QAAS,CACT,OACF,CACA,+CACE,qBAAsB,CACtB,sBAAuB,CACvB,iBAAkB,CAClB,oBAAqB,CACrB,qBAAsB,CACtB,SACF,CACA,uDACE,gCAAkC,CAClC,mBAAoB,CACpB,sDAAqD,CAArD,iDAAqD,CAArD,mDAAqD,CAArD,8CACF,CACA,4DACE,wDAAwD,CAAxD,mDAAwD,CAAxD,qDAAwD,CAAxD,gDACF,CACA,2DACE,uBAAgB,CAAhB,oBAAgB,CAAhB,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,gBAAiB,CACjB,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,kBAAmB,CACnB,sDAAqD,CAArD,iDAAqD,CAArD,mDAAqD,CAArD,8CACF,CACA,iEACE,YACF,CACA,sDACE,eAAgB,CAChB,oBAAqB,CACrB,uBAAwB,CACxB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAAkB,CAClB,UACF,CACA,qFACE,UAAW,CACX,0BAAmB,CAAnB,kBAAmB,CACnB,6BAAsB,CAAtB,qBACF,CACA,4DACE,YACF,CACA,4EACE,eAAgB,CAChB,oBAAqB,CACrB,uBAAwB,CACxB,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,6BAAsB,CAAtB,qBAAsB,CACtB,yBAAkB,CAAlB,iBAAkB,CAClB,mDAAkD,CAAlD,2CACF,CACA,wEACE,UAAW,CACX,uBAAmB,CAAnB,kBAAmB,CACnB,0BAAsB,CAAtB,qBACF,CACA,wEACE,eAAgB,CAChB,oBAAqB,CACrB,uBAAwB,CACxB,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,0BAAsB,CAAtB,qBAAsB,CACtB,sBAAkB,CAAlB,iBAAkB,CAClB,gDAAkD,CAAlD,2CACF,CACA,4CACE,eAAgB,CAChB,cACF,CACA,oCACE,YACF,CACA,kCACE,UACF,CACA,oCACE,mBAAa,CAAb,oBAAa,CAAb,gBAAa,CAAb,mBAAa,CAAb,YAAa,CACb,wBAA8B,CAA9B,qCAA8B,CAA9B,qBAA8B,CAA9B,qBAA8B,CAA9B,6BACF,CACA,sCACE,kBAAU,CAAV,iBAAU,CAAV,eAAU,CAAV,aAAU,CAAV,SAAU,CACV,cAAe,CACf,UAAW,CACX,iBAAkB,CAClB,oBACF","file":"index.less","sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n   ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n  line-height: 1.15; /* 1 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n   ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n  margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n  display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/* Grouping content\n   ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n   ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n  background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n  border-bottom: none; /* 1 */\n  text-decoration: underline; /* 2 */\n  text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n  font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nsup {\n  top: -0.5em;\n}\n\n/* Embedded content\n   ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n  border-style: none;\n}\n\n/* Forms\n   ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  font-family: inherit; /* 1 */\n  font-size: 100%; /* 1 */\n  line-height: 1.15; /* 1 */\n  margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n  overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n  text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n  -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n  border-style: none;\n  padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n  outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n  padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n *    `fieldset` elements in all browsers.\n */\n\nlegend {\n  box-sizing: border-box; /* 1 */\n  color: inherit; /* 2 */\n  display: table; /* 1 */\n  max-width: 100%; /* 1 */\n  padding: 0; /* 3 */\n  white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n  vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n  -webkit-appearance: textfield; /* 1 */\n  outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n  -webkit-appearance: button; /* 1 */\n  font: inherit; /* 2 */\n}\n\n/* Interactive\n   ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n  display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n  display: list-item;\n}\n\n/* Misc\n   ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n  display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n  display: none;\n}\n","@import 'normalize.css';\n#eh-syringe-popup-root {\n  text-align: initial;\n  font-size: initial;\n  line-height: initial;\n}\n#eh-syringe-popup-root input[type='radio'],\n#eh-syringe-popup-root input[type='checkbox'] {\n  position: initial;\n  top: initial;\n}\n#eh-syringe-popup-root p {\n  margin: 0.8em 0;\n}\n#eh-syringe-popup-root a {\n  background: rgba(0, 0, 0, 0);\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1) 0s;\n  text-decoration: none;\n}\n#eh-syringe-popup-root,\n#eh-syringe-popup-root .panel {\n  background: #f0f0f0;\n  color: #111;\n}\n#eh-syringe-popup-root #info {\n  color: #8041a6;\n}\n#eh-syringe-popup-root a {\n  color: #8041a6;\n}\n#eh-syringe-popup-root a:hover {\n  color: #491774;\n}\n#eh-syringe-popup-root a:active {\n  color: #ae79c9;\n}\n#eh-syringe-popup-root a.minor {\n  color: #a5a3a6;\n}\n#eh-syringe-popup-root a.minor:hover {\n  color: #d2cdd4;\n}\n#eh-syringe-popup-root a.minor:active {\n  color: #838185;\n}\n#eh-syringe-popup-root .logo svg [fill-bg] {\n  fill: #f0f0f0;\n}\n#eh-syringe-popup-root .logo svg [fill-accent] {\n  fill: #8041a6;\n}\n#eh-syringe-popup-root .logo svg [fill-sa] {\n  fill: #cfbadc;\n}\n#eh-syringe-popup-root .logo svg [stroke-bg] {\n  stroke: #f0f0f0;\n}\n#eh-syringe-popup-root .logo svg [stroke-accent] {\n  stroke: #8041a6;\n}\n#eh-syringe-popup-root .logo svg [stroke-sa] {\n  stroke: #cfbadc;\n}\n#eh-syringe-popup-root .action {\n  background: #f0f0f0;\n  color: #8041a6;\n}\n#eh-syringe-popup-root .action.primary {\n  background: #8041a6;\n  color: #f0f0f0;\n}\n#eh-syringe-popup-root .action.primary:hover {\n  background: #491774;\n}\n#eh-syringe-popup-root .action.primary:active {\n  background: #ae79c9;\n}\n#eh-syringe-popup-root #settingForm .checkbox-item svg path {\n  stroke: #8041a6;\n}\n#eh-syringe-popup-root #settingForm input[type='checkbox'] {\n  border: solid 2px #a09da6;\n}\n#eh-syringe-popup-root #settingForm input[type='checkbox'] :checked {\n  border: solid 2px #8041a6;\n}\n#eh-syringe-popup-root #settingForm input[type='range'] {\n  background: #f0f0f0;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-runnable-track {\n  border: 1px #ae79c9 solid;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-moz-range-track {\n  border: 1px #ae79c9 solid;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-thumb {\n  background: #f0f0f0;\n  border: solid 2px #8041a6;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-moz-range-thumb {\n  background: #f0f0f0;\n  border: solid 2px #8041a6;\n}\n#eh-syringe-popup-root #settingForm input[type='range']:focus::-webkit-slider-thumb {\n  border: solid 2px #8041a6;\n  box-shadow: 0 0 7px rgba(0, 0, 0, 0.2);\n}\n#eh-syringe-popup-root #settingForm input[type='range']:focus::-moz-range-thumb {\n  border: solid 2px #8041a6;\n  box-shadow: 0 0 7px rgba(0, 0, 0, 0.2);\n}\n#eh-syringe-popup-root #settingForm input[type='range']:active::-webkit-slider-thumb {\n  border: solid 2px #8041a6;\n  background: #fdfdfd;\n  box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.2);\n}\n#eh-syringe-popup-root #settingForm input[type='range']:active::-moz-range-thumb {\n  border: solid 2px #8041a6;\n  background: #fdfdfd;\n  box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.2);\n}\nbody.ex #eh-syringe-popup-root,\nbody.ex #eh-syringe-popup-root .panel {\n  background: #313131;\n  color: #eee;\n}\nbody.ex #eh-syringe-popup-root #info {\n  color: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root a {\n  color: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root a:hover {\n  color: #e2b9f7;\n}\nbody.ex #eh-syringe-popup-root a:active {\n  color: #b669e9;\n}\nbody.ex #eh-syringe-popup-root a.minor {\n  color: #a5a3a6;\n}\nbody.ex #eh-syringe-popup-root a.minor:hover {\n  color: #d2cdd4;\n}\nbody.ex #eh-syringe-popup-root a.minor:active {\n  color: #838185;\n}\nbody.ex #eh-syringe-popup-root .logo svg [fill-bg] {\n  fill: #313131;\n}\nbody.ex #eh-syringe-popup-root .logo svg [fill-accent] {\n  fill: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root .logo svg [fill-sa] {\n  fill: #987ca8;\n}\nbody.ex #eh-syringe-popup-root .logo svg [stroke-bg] {\n  stroke: #313131;\n}\nbody.ex #eh-syringe-popup-root .logo svg [stroke-accent] {\n  stroke: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root .logo svg [stroke-sa] {\n  stroke: #987ca8;\n}\nbody.ex #eh-syringe-popup-root .action {\n  background: #313131;\n  color: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root .action.primary {\n  background: #ce90f1;\n  color: #313131;\n}\nbody.ex #eh-syringe-popup-root .action.primary:hover {\n  background: #e2b9f7;\n}\nbody.ex #eh-syringe-popup-root .action.primary:active {\n  background: #b669e9;\n}\nbody.ex #eh-syringe-popup-root #settingForm .checkbox-item svg path {\n  stroke: #ce90f1;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='checkbox'] {\n  border: solid 2px #a09da6;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='checkbox'] :checked {\n  border: solid 2px #ce90f1;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range'] {\n  background: #313131;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-runnable-track {\n  border: 1px #b669e9 solid;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']::-moz-range-track {\n  border: 1px #b669e9 solid;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-thumb {\n  background: #313131;\n  border: solid 2px #ce90f1;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']::-moz-range-thumb {\n  background: #313131;\n  border: solid 2px #ce90f1;\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']:focus::-webkit-slider-thumb {\n  border: solid 2px #ce90f1;\n  box-shadow: 0 0 7px rgba(0, 0, 0, 0.2);\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']:focus::-moz-range-thumb {\n  border: solid 2px #ce90f1;\n  box-shadow: 0 0 7px rgba(0, 0, 0, 0.2);\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']:active::-webkit-slider-thumb {\n  border: solid 2px #ce90f1;\n  background: #131313;\n  box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.2);\n}\nbody.ex #eh-syringe-popup-root #settingForm input[type='range']:active::-moz-range-thumb {\n  border: solid 2px #ce90f1;\n  background: #131313;\n  box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.2);\n}\n#eh-syringe-popup-root {\n  overflow: hidden;\n  white-space: nowrap;\n  font-family: sans-serif;\n  font-size: 12pt;\n  user-select: none;\n  padding: 1px;\n  max-width: 400px;\n  min-width: 240px;\n  position: relative;\n}\n#eh-syringe-popup-root .hidden {\n  visibility: hidden;\n  display: none;\n}\n#eh-syringe-popup-root .panel {\n  margin: 0 auto;\n  display: flex;\n  flex-direction: column;\n}\n#eh-syringe-popup-root .panel .header {\n  margin: 16px;\n  line-height: 1;\n  display: flex;\n}\n#eh-syringe-popup-root .panel .header > .cushion {\n  flex: auto;\n}\n#eh-syringe-popup-root .panel .header span {\n  color: #a5a3a6;\n}\n#eh-syringe-popup-root .panel .content {\n  margin: 0 16px;\n  flex: auto;\n  overflow: visible;\n}\n#eh-syringe-popup-root .panel .action {\n  display: block;\n  line-height: 36px;\n  font-size: 16px;\n  margin: 16px;\n  box-sizing: border-box;\n  position: relative;\n  user-select: none;\n  cursor: pointer;\n  outline: 0;\n  -webkit-tap-highlight-color: transparent;\n  white-space: nowrap;\n  text-decoration: none;\n  text-align: center;\n  min-width: 64px;\n  padding: 0 16px;\n  border-radius: 4px;\n  overflow: visible;\n  transform: translate3d(0, 0, 0);\n  border: 1px #ddd solid;\n  transition: background 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n#eh-syringe-popup-root .panel .action.primary {\n  border: none;\n  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#eh-syringe-popup-root .panel .action.primary:active {\n  border: none;\n  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n#eh-syringe-popup-root .panel .action:disabled {\n  opacity: 0.6;\n}\n#eh-syringe-popup-root .panel .action:focus {\n  border: 1px #888 solid;\n}\n#eh-syringe-popup-root #mainPanel {\n  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 280ms cubic-bezier(0.4, 0, 0.2, 1);\n  transform: scale(1);\n}\n#eh-syringe-popup-root #mainPanel.hide {\n  transform: scale(0.9);\n}\n#eh-syringe-popup-root .logo-box {\n  overflow: hidden;\n  position: relative;\n  margin: -16px;\n  pointer-events: none;\n}\n#eh-syringe-popup-root .logo {\n  text-align: center;\n  margin: 20px 0;\n  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);\n  transform: scale(1) rotate(-45deg);\n}\n#eh-syringe-popup-root .logo #Syringe {\n  pointer-events: all;\n}\n#eh-syringe-popup-root .logo #Enema {\n  opacity: 0;\n  transform-origin: 61px 86px;\n}\n#eh-syringe-popup-root .logo #Enema2 {\n  opacity: 1;\n}\n#eh-syringe-popup-root .logo #Enema,\n#eh-syringe-popup-root .logo #Enema2,\n#eh-syringe-popup-root .logo #PushRod {\n  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n#eh-syringe-popup-root .logo.prominent {\n  transform: scale(1.6) rotate(0deg);\n}\n#eh-syringe-popup-root .logo.prominent #Enema2 {\n  opacity: 0;\n}\n#eh-syringe-popup-root .logo.prominent #Enema {\n  opacity: 1;\n}\n#eh-syringe-popup-root .logo.prominent.injection {\n  transform: scale(1.6) rotate(0deg) translate(-10px, 0);\n}\n#eh-syringe-popup-root .logo.prominent.injection #Enema,\n#eh-syringe-popup-root .logo.prominent.injection #Enema2,\n#eh-syringe-popup-root .logo.prominent.injection #PushRod {\n  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1), transform 600ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n#eh-syringe-popup-root #info {\n  position: absolute;\n  bottom: 30px;\n  left: 0;\n  right: 0;\n  height: 24px;\n  line-height: 24px;\n  text-align: center;\n  font-size: 16px;\n}\n#eh-syringe-popup-root .monospace {\n  font-family: Menlo, Consolas, 'Source Code Pro', Inconsolata, Monaco, 'Courier New', monospace;\n}\n#eh-syringe-popup-root table {\n  font-size: 14px;\n}\n#eh-syringe-popup-root .hasNew {\n  color: #a6000f;\n}\n#eh-syringe-popup-root #settingPanel {\n  position: absolute;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  pointer-events: none;\n  opacity: 0;\n  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 280ms cubic-bezier(0.4, 0, 0.2, 1);\n  transform: scale(1.1);\n}\n#eh-syringe-popup-root #settingPanel.show {\n  pointer-events: auto;\n  opacity: 1;\n  transform: scale(1);\n}\n#eh-syringe-popup-root #settingPanel #settingForm {\n  font-size: 10pt;\n  line-height: 12pt;\n}\n#eh-syringe-popup-root .checkbox-item {\n  padding: 4px 0;\n}\n#eh-syringe-popup-root .checkbox-item label {\n  position: relative;\n  display: block;\n}\n#eh-syringe-popup-root .checkbox-item svg {\n  width: 10px;\n  height: 10px;\n  position: absolute;\n  left: 3px;\n  top: 3px;\n}\n#eh-syringe-popup-root .checkbox-item svg path {\n  stroke-dasharray: 1000;\n  stroke-dashoffset: 1000;\n  stroke-width: 16px;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  fill: none;\n}\n#eh-syringe-popup-root .checkbox-item svg.checked path {\n  stroke-dasharray: 113.137, 113.137;\n  stroke-dashoffset: 0;\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1) 0s;\n}\n#eh-syringe-popup-root .checkbox-item svg.checked path + path {\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1) 280ms;\n}\n#eh-syringe-popup-root .checkbox-item input[type='checkbox'] {\n  appearance: none;\n  width: 16px;\n  height: 16px;\n  margin-right: 2px;\n  box-sizing: border-box;\n  vertical-align: top;\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1) 0s;\n}\n#eh-syringe-popup-root .checkbox-item input[type='checkbox']:focus {\n  outline: none;\n}\n#eh-syringe-popup-root #settingForm input[type='range'] {\n  appearance: none;\n  -moz-appearance: none;\n  -webkit-appearance: none;\n  border-radius: 8px;\n  width: 100%;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-runnable-track {\n  height: 6px;\n  border-radius: 10px;\n  box-sizing: border-box;\n}\n#eh-syringe-popup-root #settingForm input[type='range']:focus {\n  outline: none;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-webkit-slider-thumb {\n  appearance: none;\n  -moz-appearance: none;\n  -webkit-appearance: none;\n  height: 16px;\n  width: 16px;\n  margin-top: -6px;\n  box-sizing: border-box;\n  border-radius: 50%;\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-moz-range-track {\n  height: 6px;\n  border-radius: 10px;\n  box-sizing: border-box;\n}\n#eh-syringe-popup-root #settingForm input[type='range']::-moz-range-thumb {\n  appearance: none;\n  -moz-appearance: none;\n  -webkit-appearance: none;\n  height: 16px;\n  width: 16px;\n  margin-top: -6px;\n  box-sizing: border-box;\n  border-radius: 50%;\n  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n#eh-syringe-popup-root #settingForm h3 span {\n  font-weight: 400;\n  font-size: 20pt;\n}\n#eh-syringe-popup-root .image-level {\n  margin: 0 4px;\n}\n#eh-syringe-popup-root .range-box {\n  margin: 5px;\n}\n#eh-syringe-popup-root .range-label {\n  display: flex;\n  justify-content: space-between;\n}\n#eh-syringe-popup-root .range-label a {\n  flex: none;\n  font-size: 10pt;\n  width: 30px;\n  text-align: center;\n  display: inline-block;\n}\n"]}]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);


/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageContextMenu = void 0;
const tslib_1 = __webpack_require__(0);
const services_1 = __webpack_require__(2);
const menu_1 = __webpack_require__(21);
const utils_1 = __webpack_require__(12);
let ImageContextMenu = class ImageContextMenu {
    constructor() {
        this.documentUrlPatterns = [
            '*://exhentai.org/*',
            '*://e-hentai.org/*',
            '*://*.exhentai.org/*',
            '*://*.e-hentai.org/*',
        ];
        this.title = '显示所有包含此图片的图库';
        this.targetUrlPatterns = [
            '*://exhentai.org/t/*.jpg',
            '*://ehgt.org/*.jpg',
            '*://ul.ehgt.org/*.jpg',
            '*://*.hath.network:*/h/*',
            '*://*.hath.network/h/*',
        ];
        this.contexts = ['image', 'link'];
        this.onclick = (info) => {
            var _a;
            const url = (_a = info.url) !== null && _a !== void 0 ? _a : '';
            const match = /[a-f0-9]{40}/i.exec(url);
            if (!match)
                return;
            utils_1.openInTab(`https://exhentai.org/?f_shash=${match[0]}`);
        };
        this.init();
    }
    init() {
        menu_1.createMenu(this);
    }
};
ImageContextMenu = tslib_1.__decorate([
    services_1.Service(),
    tslib_1.__metadata("design:paramtypes", [])
], ImageContextMenu);
exports.ImageContextMenu = ImageContextMenu;


/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {

var api = __webpack_require__(11);
            var content = __webpack_require__(78);

            content = content.__esModule ? content.default : content;

            if (typeof content === 'string') {
              content = [[module.i, content, '']];
            }

var options = {"insert":":root"};

options.insert = ":root";
options.singleton = false;

var update = api(content, options);



module.exports = content.locals || {};

/***/ }),
/* 78 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _assets_logo_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
// Imports



var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(true);
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_assets_logo_svg__WEBPACK_IMPORTED_MODULE_2__["default"]);
// Module
___CSS_LOADER_EXPORT___.push([module.i, "#eh-syringe-popup-button{position:fixed;bottom:12px;right:12px;width:36px;height:36px;-webkit-border-radius:36px;-moz-border-radius:36px;border-radius:36px;border:2px solid #6e066e;-webkit-box-shadow:rgba(0,0,0,.5) 0 0 2px 1px;-moz-box-shadow:rgba(0,0,0,.5) 0 0 2px 1px;box-shadow:0 0 2px 1px rgba(0,0,0,.5);background:50%/65% no-repeat #fff url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");z-index:1000}#eh-syringe-popup-button:hover{cursor:pointer}body.ex #eh-syringe-popup-button{background-color:#bbb;border-color:#926a92}#eh-syringe-popup-badge{height:14px;font-size:12px;position:absolute;right:-10px;top:-10px;padding:2px 4px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background:#444;color:#fff}#eh-syringe-popup-back{position:fixed;bottom:0;right:0;top:0;left:0;z-index:2000;background:rgba(0,0,0,.3);visibility:hidden;opacity:0;-webkit-transition:visibility,opacity .4s;-o-transition:visibility,opacity .4s;-moz-transition:visibility,opacity .4s;transition:visibility,opacity .4s}#eh-syringe-popup-back.open,#eh-syringe-popup-back.opening{visibility:visible;opacity:1}#eh-syringe-popup-back.closing{visibility:visible;opacity:0}#eh-syringe-popup-back #eh-syringe-popup{position:absolute;bottom:72px;right:12px;border:1px solid #ca8dca;-webkit-box-shadow:rgba(0,0,0,.5) 0 0 6px 2px;-moz-box-shadow:rgba(0,0,0,.5) 0 0 6px 2px;box-shadow:0 0 6px 2px rgba(0,0,0,.5);background:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;overflow:hidden}", "",{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,yBACE,cAAe,CACf,WAAY,CACZ,UAAW,CACX,UAAW,CACX,WAAY,CACZ,0BAAmB,CAAnB,uBAAmB,CAAnB,kBAAmB,CACnB,wBAAyB,CACzB,6CAA0C,CAA1C,0CAA0C,CAA1C,qCAA0C,CAC1C,yEAAkE,CAClE,YACF,CACA,+BACE,cACF,CACA,iCACE,qBAAyB,CACzB,oBACF,CACA,wBACE,WAAY,CACZ,cAAe,CACf,iBAAkB,CAClB,WAAY,CACZ,SAAU,CACV,eAAgB,CAChB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAAkB,CAClB,eAAgB,CAChB,UACF,CACA,uBACE,cAAe,CACf,QAAS,CACT,OAAQ,CACR,KAAM,CACN,MAAO,CACP,YAAa,CACb,yBAA8B,CAC9B,iBAAkB,CAClB,SAAU,CACV,yCAAoC,CAApC,oCAAoC,CAApC,sCAAoC,CAApC,iCACF,CAKA,2DACE,kBAAmB,CACnB,SACF,CACA,+BACE,kBAAmB,CACnB,SACF,CACA,yCACE,iBAAkB,CAClB,WAAY,CACZ,UAAW,CACX,wBAAyB,CACzB,6CAA0C,CAA1C,0CAA0C,CAA1C,qCAA0C,CAC1C,kBAAsB,CACtB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAAkB,CAClB,eACF","file":"index.less","sourcesContent":["#eh-syringe-popup-button {\n  position: fixed;\n  bottom: 12px;\n  right: 12px;\n  width: 36px;\n  height: 36px;\n  border-radius: 36px;\n  border: #6e066e 2px solid;\n  box-shadow: rgba(0, 0, 0, 0.5) 0 0 2px 1px;\n  background: center / 65% no-repeat white url('../assets/logo.svg');\n  z-index: 1000;\n}\n#eh-syringe-popup-button:hover {\n  cursor: pointer;\n}\nbody.ex #eh-syringe-popup-button {\n  background-color: #bbbbbb;\n  border-color: #926a92;\n}\n#eh-syringe-popup-badge {\n  height: 14px;\n  font-size: 12px;\n  position: absolute;\n  right: -10px;\n  top: -10px;\n  padding: 2px 4px;\n  border-radius: 4px;\n  background: #444;\n  color: white;\n}\n#eh-syringe-popup-back {\n  position: fixed;\n  bottom: 0;\n  right: 0;\n  top: 0;\n  left: 0;\n  z-index: 2000;\n  background: rgba(0, 0, 0, 0.3);\n  visibility: hidden;\n  opacity: 0;\n  transition: visibility, opacity 0.4s;\n}\n#eh-syringe-popup-back.open {\n  visibility: visible;\n  opacity: 1;\n}\n#eh-syringe-popup-back.opening {\n  visibility: visible;\n  opacity: 1;\n}\n#eh-syringe-popup-back.closing {\n  visibility: visible;\n  opacity: 0;\n}\n#eh-syringe-popup-back #eh-syringe-popup {\n  position: absolute;\n  bottom: 72px;\n  right: 12px;\n  border: #ca8dca solid 1px;\n  box-shadow: rgba(0, 0, 0, 0.5) 0 0 6px 2px;\n  background: whitesmoke;\n  border-radius: 6px;\n  overflow: hidden;\n}\n"]}]);
// Exports
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);


/***/ }),
/* 79 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, "DefaultTemplateProcessor", function() { return /* reexport */ default_template_processor_DefaultTemplateProcessor; });
__webpack_require__.d(__webpack_exports__, "defaultTemplateProcessor", function() { return /* reexport */ defaultTemplateProcessor; });
__webpack_require__.d(__webpack_exports__, "directive", function() { return /* reexport */ directive_directive; });
__webpack_require__.d(__webpack_exports__, "isDirective", function() { return /* reexport */ isDirective; });
__webpack_require__.d(__webpack_exports__, "removeNodes", function() { return /* reexport */ removeNodes; });
__webpack_require__.d(__webpack_exports__, "reparentNodes", function() { return /* reexport */ reparentNodes; });
__webpack_require__.d(__webpack_exports__, "noChange", function() { return /* reexport */ noChange; });
__webpack_require__.d(__webpack_exports__, "nothing", function() { return /* reexport */ nothing; });
__webpack_require__.d(__webpack_exports__, "AttributeCommitter", function() { return /* reexport */ AttributeCommitter; });
__webpack_require__.d(__webpack_exports__, "AttributePart", function() { return /* reexport */ parts_AttributePart; });
__webpack_require__.d(__webpack_exports__, "BooleanAttributePart", function() { return /* reexport */ parts_BooleanAttributePart; });
__webpack_require__.d(__webpack_exports__, "EventPart", function() { return /* reexport */ parts_EventPart; });
__webpack_require__.d(__webpack_exports__, "isIterable", function() { return /* reexport */ isIterable; });
__webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return /* reexport */ isPrimitive; });
__webpack_require__.d(__webpack_exports__, "NodePart", function() { return /* reexport */ parts_NodePart; });
__webpack_require__.d(__webpack_exports__, "PropertyCommitter", function() { return /* reexport */ PropertyCommitter; });
__webpack_require__.d(__webpack_exports__, "PropertyPart", function() { return /* reexport */ PropertyPart; });
__webpack_require__.d(__webpack_exports__, "parts", function() { return /* reexport */ render_parts; });
__webpack_require__.d(__webpack_exports__, "render", function() { return /* reexport */ render; });
__webpack_require__.d(__webpack_exports__, "templateCaches", function() { return /* reexport */ templateCaches; });
__webpack_require__.d(__webpack_exports__, "templateFactory", function() { return /* reexport */ templateFactory; });
__webpack_require__.d(__webpack_exports__, "TemplateInstance", function() { return /* reexport */ template_instance_TemplateInstance; });
__webpack_require__.d(__webpack_exports__, "SVGTemplateResult", function() { return /* reexport */ template_result_SVGTemplateResult; });
__webpack_require__.d(__webpack_exports__, "TemplateResult", function() { return /* reexport */ template_result_TemplateResult; });
__webpack_require__.d(__webpack_exports__, "createMarker", function() { return /* reexport */ createMarker; });
__webpack_require__.d(__webpack_exports__, "isTemplatePartActive", function() { return /* reexport */ isTemplatePartActive; });
__webpack_require__.d(__webpack_exports__, "Template", function() { return /* reexport */ Template; });
__webpack_require__.d(__webpack_exports__, "html", function() { return /* binding */ lit_html_html; });
__webpack_require__.d(__webpack_exports__, "svg", function() { return /* binding */ svg; });

// CONCATENATED MODULE: ./node_modules/lit-html/lib/directive.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
const directives = new WeakMap();
/**
 * Brands a function as a directive factory function so that lit-html will call
 * the function during template rendering, rather than passing as a value.
 *
 * A _directive_ is a function that takes a Part as an argument. It has the
 * signature: `(part: Part) => void`.
 *
 * A directive _factory_ is a function that takes arguments for data and
 * configuration and returns a directive. Users of directive usually refer to
 * the directive factory as the directive. For example, "The repeat directive".
 *
 * Usually a template author will invoke a directive factory in their template
 * with relevant arguments, which will then return a directive function.
 *
 * Here's an example of using the `repeat()` directive factory that takes an
 * array and a function to render an item:
 *
 * ```js
 * html`<ul><${repeat(items, (item) => html`<li>${item}</li>`)}</ul>`
 * ```
 *
 * When `repeat` is invoked, it returns a directive function that closes over
 * `items` and the template function. When the outer template is rendered, the
 * return directive function is called with the Part for the expression.
 * `repeat` then performs it's custom logic to render multiple items.
 *
 * @param f The directive factory function. Must be a function that returns a
 * function of the signature `(part: Part) => void`. The returned function will
 * be called with the part object.
 *
 * @example
 *
 * import {directive, html} from 'lit-html';
 *
 * const immutable = directive((v) => (part) => {
 *   if (part.value !== v) {
 *     part.setValue(v)
 *   }
 * });
 */
const directive_directive = (f) => ((...args) => {
    const d = f(...args);
    directives.set(d, true);
    return d;
});
const isDirective = (o) => {
    return typeof o === 'function' && directives.has(o);
};
//# sourceMappingURL=directive.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/dom.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * True if the custom elements polyfill is in use.
 */
const isCEPolyfill = typeof window !== 'undefined' &&
    window.customElements != null &&
    window.customElements.polyfillWrapFlushCallback !==
        undefined;
/**
 * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),
 * into another container (could be the same container), before `before`. If
 * `before` is null, it appends the nodes to the container.
 */
const reparentNodes = (container, start, end = null, before = null) => {
    while (start !== end) {
        const n = start.nextSibling;
        container.insertBefore(start, before);
        start = n;
    }
};
/**
 * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from
 * `container`.
 */
const removeNodes = (container, start, end = null) => {
    while (start !== end) {
        const n = start.nextSibling;
        container.removeChild(start);
        start = n;
    }
};
//# sourceMappingURL=dom.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/part.js
/**
 * @license
 * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * A sentinel value that signals that a value was handled by a directive and
 * should not be written to the DOM.
 */
const noChange = {};
/**
 * A sentinel value that signals a NodePart to fully clear its content.
 */
const nothing = {};
//# sourceMappingURL=part.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/template.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * An expression marker with embedded unique key to avoid collision with
 * possible text in templates.
 */
const marker = `{{lit-${String(Math.random()).slice(2)}}}`;
/**
 * An expression marker used text-positions, multi-binding attributes, and
 * attributes with markup-like text values.
 */
const nodeMarker = `<!--${marker}-->`;
const markerRegex = new RegExp(`${marker}|${nodeMarker}`);
/**
 * Suffix appended to all bound attribute names.
 */
const boundAttributeSuffix = '$lit$';
/**
 * An updatable Template that tracks the location of dynamic parts.
 */
class Template {
    constructor(result, element) {
        this.parts = [];
        this.element = element;
        const nodesToRemove = [];
        const stack = [];
        // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null
        const walker = document.createTreeWalker(element.content, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);
        // Keeps track of the last index associated with a part. We try to delete
        // unnecessary nodes, but we never want to associate two different parts
        // to the same index. They must have a constant node between.
        let lastPartIndex = 0;
        let index = -1;
        let partIndex = 0;
        const { strings, values: { length } } = result;
        while (partIndex < length) {
            const node = walker.nextNode();
            if (node === null) {
                // We've exhausted the content inside a nested template element.
                // Because we still have parts (the outer for-loop), we know:
                // - There is a template in the stack
                // - The walker will find a nextNode outside the template
                walker.currentNode = stack.pop();
                continue;
            }
            index++;
            if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {
                if (node.hasAttributes()) {
                    const attributes = node.attributes;
                    const { length } = attributes;
                    // Per
                    // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,
                    // attributes are not guaranteed to be returned in document order.
                    // In particular, Edge/IE can return them out of order, so we cannot
                    // assume a correspondence between part index and attribute index.
                    let count = 0;
                    for (let i = 0; i < length; i++) {
                        if (endsWith(attributes[i].name, boundAttributeSuffix)) {
                            count++;
                        }
                    }
                    while (count-- > 0) {
                        // Get the template literal section leading up to the first
                        // expression in this attribute
                        const stringForPart = strings[partIndex];
                        // Find the attribute name
                        const name = lastAttributeNameRegex.exec(stringForPart)[2];
                        // Find the corresponding attribute
                        // All bound attributes have had a suffix added in
                        // TemplateResult#getHTML to opt out of special attribute
                        // handling. To look up the attribute value we also need to add
                        // the suffix.
                        const attributeLookupName = name.toLowerCase() + boundAttributeSuffix;
                        const attributeValue = node.getAttribute(attributeLookupName);
                        node.removeAttribute(attributeLookupName);
                        const statics = attributeValue.split(markerRegex);
                        this.parts.push({ type: 'attribute', index, name, strings: statics });
                        partIndex += statics.length - 1;
                    }
                }
                if (node.tagName === 'TEMPLATE') {
                    stack.push(node);
                    walker.currentNode = node.content;
                }
            }
            else if (node.nodeType === 3 /* Node.TEXT_NODE */) {
                const data = node.data;
                if (data.indexOf(marker) >= 0) {
                    const parent = node.parentNode;
                    const strings = data.split(markerRegex);
                    const lastIndex = strings.length - 1;
                    // Generate a new text node for each literal section
                    // These nodes are also used as the markers for node parts
                    for (let i = 0; i < lastIndex; i++) {
                        let insert;
                        let s = strings[i];
                        if (s === '') {
                            insert = createMarker();
                        }
                        else {
                            const match = lastAttributeNameRegex.exec(s);
                            if (match !== null && endsWith(match[2], boundAttributeSuffix)) {
                                s = s.slice(0, match.index) + match[1] +
                                    match[2].slice(0, -boundAttributeSuffix.length) + match[3];
                            }
                            insert = document.createTextNode(s);
                        }
                        parent.insertBefore(insert, node);
                        this.parts.push({ type: 'node', index: ++index });
                    }
                    // If there's no text, we must insert a comment to mark our place.
                    // Else, we can trust it will stick around after cloning.
                    if (strings[lastIndex] === '') {
                        parent.insertBefore(createMarker(), node);
                        nodesToRemove.push(node);
                    }
                    else {
                        node.data = strings[lastIndex];
                    }
                    // We have a part for each match found
                    partIndex += lastIndex;
                }
            }
            else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {
                if (node.data === marker) {
                    const parent = node.parentNode;
                    // Add a new marker node to be the startNode of the Part if any of
                    // the following are true:
                    //  * We don't have a previousSibling
                    //  * The previousSibling is already the start of a previous part
                    if (node.previousSibling === null || index === lastPartIndex) {
                        index++;
                        parent.insertBefore(createMarker(), node);
                    }
                    lastPartIndex = index;
                    this.parts.push({ type: 'node', index });
                    // If we don't have a nextSibling, keep this node so we have an end.
                    // Else, we can remove it to save future costs.
                    if (node.nextSibling === null) {
                        node.data = '';
                    }
                    else {
                        nodesToRemove.push(node);
                        index--;
                    }
                    partIndex++;
                }
                else {
                    let i = -1;
                    while ((i = node.data.indexOf(marker, i + 1)) !== -1) {
                        // Comment node has a binding marker inside, make an inactive part
                        // The binding won't work, but subsequent bindings will
                        // TODO (justinfagnani): consider whether it's even worth it to
                        // make bindings in comments work
                        this.parts.push({ type: 'node', index: -1 });
                        partIndex++;
                    }
                }
            }
        }
        // Remove text binding nodes after the walk to not disturb the TreeWalker
        for (const n of nodesToRemove) {
            n.parentNode.removeChild(n);
        }
    }
}
const endsWith = (str, suffix) => {
    const index = str.length - suffix.length;
    return index >= 0 && str.slice(index) === suffix;
};
const isTemplatePartActive = (part) => part.index !== -1;
// Allows `document.createComment('')` to be renamed for a
// small manual size-savings.
const createMarker = () => document.createComment('');
/**
 * This regex extracts the attribute name preceding an attribute-position
 * expression. It does this by matching the syntax allowed for attributes
 * against the string literal directly preceding the expression, assuming that
 * the expression is in an attribute-value position.
 *
 * See attributes in the HTML spec:
 * https://www.w3.org/TR/html5/syntax.html#elements-attributes
 *
 * " \x09\x0a\x0c\x0d" are HTML space characters:
 * https://www.w3.org/TR/html5/infrastructure.html#space-characters
 *
 * "\0-\x1F\x7F-\x9F" are Unicode control characters, which includes every
 * space character except " ".
 *
 * So an attribute is:
 *  * The name: any character except a control character, space character, ('),
 *    ("), ">", "=", or "/"
 *  * Followed by zero or more space characters
 *  * Followed by "="
 *  * Followed by zero or more space characters
 *  * Followed by:
 *    * Any character except space, ('), ("), "<", ">", "=", (`), or
 *    * (") then any non-("), or
 *    * (') then any non-(')
 */
const lastAttributeNameRegex = 
// eslint-disable-next-line no-control-regex
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
//# sourceMappingURL=template.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/template-instance.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @module lit-html
 */


/**
 * An instance of a `Template` that can be attached to the DOM and updated
 * with new values.
 */
class template_instance_TemplateInstance {
    constructor(template, processor, options) {
        this.__parts = [];
        this.template = template;
        this.processor = processor;
        this.options = options;
    }
    update(values) {
        let i = 0;
        for (const part of this.__parts) {
            if (part !== undefined) {
                part.setValue(values[i]);
            }
            i++;
        }
        for (const part of this.__parts) {
            if (part !== undefined) {
                part.commit();
            }
        }
    }
    _clone() {
        // There are a number of steps in the lifecycle of a template instance's
        // DOM fragment:
        //  1. Clone - create the instance fragment
        //  2. Adopt - adopt into the main document
        //  3. Process - find part markers and create parts
        //  4. Upgrade - upgrade custom elements
        //  5. Update - set node, attribute, property, etc., values
        //  6. Connect - connect to the document. Optional and outside of this
        //     method.
        //
        // We have a few constraints on the ordering of these steps:
        //  * We need to upgrade before updating, so that property values will pass
        //    through any property setters.
        //  * We would like to process before upgrading so that we're sure that the
        //    cloned fragment is inert and not disturbed by self-modifying DOM.
        //  * We want custom elements to upgrade even in disconnected fragments.
        //
        // Given these constraints, with full custom elements support we would
        // prefer the order: Clone, Process, Adopt, Upgrade, Update, Connect
        //
        // But Safari does not implement CustomElementRegistry#upgrade, so we
        // can not implement that order and still have upgrade-before-update and
        // upgrade disconnected fragments. So we instead sacrifice the
        // process-before-upgrade constraint, since in Custom Elements v1 elements
        // must not modify their light DOM in the constructor. We still have issues
        // when co-existing with CEv0 elements like Polymer 1, and with polyfills
        // that don't strictly adhere to the no-modification rule because shadow
        // DOM, which may be created in the constructor, is emulated by being placed
        // in the light DOM.
        //
        // The resulting order is on native is: Clone, Adopt, Upgrade, Process,
        // Update, Connect. document.importNode() performs Clone, Adopt, and Upgrade
        // in one step.
        //
        // The Custom Elements v1 polyfill supports upgrade(), so the order when
        // polyfilled is the more ideal: Clone, Process, Adopt, Upgrade, Update,
        // Connect.
        const fragment = isCEPolyfill ?
            this.template.element.content.cloneNode(true) :
            document.importNode(this.template.element.content, true);
        const stack = [];
        const parts = this.template.parts;
        // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null
        const walker = document.createTreeWalker(fragment, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);
        let partIndex = 0;
        let nodeIndex = 0;
        let part;
        let node = walker.nextNode();
        // Loop through all the nodes and parts of a template
        while (partIndex < parts.length) {
            part = parts[partIndex];
            if (!isTemplatePartActive(part)) {
                this.__parts.push(undefined);
                partIndex++;
                continue;
            }
            // Progress the tree walker until we find our next part's node.
            // Note that multiple parts may share the same node (attribute parts
            // on a single element), so this loop may not run at all.
            while (nodeIndex < part.index) {
                nodeIndex++;
                if (node.nodeName === 'TEMPLATE') {
                    stack.push(node);
                    walker.currentNode = node.content;
                }
                if ((node = walker.nextNode()) === null) {
                    // We've exhausted the content inside a nested template element.
                    // Because we still have parts (the outer for-loop), we know:
                    // - There is a template in the stack
                    // - The walker will find a nextNode outside the template
                    walker.currentNode = stack.pop();
                    node = walker.nextNode();
                }
            }
            // We've arrived at our part's node.
            if (part.type === 'node') {
                const part = this.processor.handleTextExpression(this.options);
                part.insertAfterNode(node.previousSibling);
                this.__parts.push(part);
            }
            else {
                this.__parts.push(...this.processor.handleAttributeExpressions(node, part.name, part.strings, this.options));
            }
            partIndex++;
        }
        if (isCEPolyfill) {
            document.adoptNode(fragment);
            customElements.upgrade(fragment);
        }
        return fragment;
    }
}
//# sourceMappingURL=template-instance.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/template-result.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @module lit-html
 */


const commentMarker = ` ${marker} `;
/**
 * The return type of `html`, which holds a Template and the values from
 * interpolated expressions.
 */
class template_result_TemplateResult {
    constructor(strings, values, type, processor) {
        this.strings = strings;
        this.values = values;
        this.type = type;
        this.processor = processor;
    }
    /**
     * Returns a string of HTML used to create a `<template>` element.
     */
    getHTML() {
        const l = this.strings.length - 1;
        let html = '';
        let isCommentBinding = false;
        for (let i = 0; i < l; i++) {
            const s = this.strings[i];
            // For each binding we want to determine the kind of marker to insert
            // into the template source before it's parsed by the browser's HTML
            // parser. The marker type is based on whether the expression is in an
            // attribute, text, or comment position.
            //   * For node-position bindings we insert a comment with the marker
            //     sentinel as its text content, like <!--{{lit-guid}}-->.
            //   * For attribute bindings we insert just the marker sentinel for the
            //     first binding, so that we support unquoted attribute bindings.
            //     Subsequent bindings can use a comment marker because multi-binding
            //     attributes must be quoted.
            //   * For comment bindings we insert just the marker sentinel so we don't
            //     close the comment.
            //
            // The following code scans the template source, but is *not* an HTML
            // parser. We don't need to track the tree structure of the HTML, only
            // whether a binding is inside a comment, and if not, if it appears to be
            // the first binding in an attribute.
            const commentOpen = s.lastIndexOf('<!--');
            // We're in comment position if we have a comment open with no following
            // comment close. Because <-- can appear in an attribute value there can
            // be false positives.
            isCommentBinding = (commentOpen > -1 || isCommentBinding) &&
                s.indexOf('-->', commentOpen + 1) === -1;
            // Check to see if we have an attribute-like sequence preceding the
            // expression. This can match "name=value" like structures in text,
            // comments, and attribute values, so there can be false-positives.
            const attributeMatch = lastAttributeNameRegex.exec(s);
            if (attributeMatch === null) {
                // We're only in this branch if we don't have a attribute-like
                // preceding sequence. For comments, this guards against unusual
                // attribute values like <div foo="<!--${'bar'}">. Cases like
                // <!-- foo=${'bar'}--> are handled correctly in the attribute branch
                // below.
                html += s + (isCommentBinding ? commentMarker : nodeMarker);
            }
            else {
                // For attributes we use just a marker sentinel, and also append a
                // $lit$ suffix to the name to opt-out of attribute-specific parsing
                // that IE and Edge do for style and certain SVG attributes.
                html += s.substr(0, attributeMatch.index) + attributeMatch[1] +
                    attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] +
                    marker;
            }
        }
        html += this.strings[l];
        return html;
    }
    getTemplateElement() {
        const template = document.createElement('template');
        template.innerHTML = this.getHTML();
        return template;
    }
}
/**
 * A TemplateResult for SVG fragments.
 *
 * This class wraps HTML in an `<svg>` tag in order to parse its contents in the
 * SVG namespace, then modifies the template to remove the `<svg>` tag so that
 * clones only container the original fragment.
 */
class template_result_SVGTemplateResult extends template_result_TemplateResult {
    getHTML() {
        return `<svg>${super.getHTML()}</svg>`;
    }
    getTemplateElement() {
        const template = super.getTemplateElement();
        const content = template.content;
        const svgElement = content.firstChild;
        content.removeChild(svgElement);
        reparentNodes(content, svgElement.firstChild);
        return template;
    }
}
//# sourceMappingURL=template-result.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/parts.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @module lit-html
 */






const isPrimitive = (value) => {
    return (value === null ||
        !(typeof value === 'object' || typeof value === 'function'));
};
const isIterable = (value) => {
    return Array.isArray(value) ||
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        !!(value && value[Symbol.iterator]);
};
/**
 * Writes attribute values to the DOM for a group of AttributeParts bound to a
 * single attribute. The value is only set once even if there are multiple parts
 * for an attribute.
 */
class AttributeCommitter {
    constructor(element, name, strings) {
        this.dirty = true;
        this.element = element;
        this.name = name;
        this.strings = strings;
        this.parts = [];
        for (let i = 0; i < strings.length - 1; i++) {
            this.parts[i] = this._createPart();
        }
    }
    /**
     * Creates a single part. Override this to create a differnt type of part.
     */
    _createPart() {
        return new parts_AttributePart(this);
    }
    _getValue() {
        const strings = this.strings;
        const l = strings.length - 1;
        let text = '';
        for (let i = 0; i < l; i++) {
            text += strings[i];
            const part = this.parts[i];
            if (part !== undefined) {
                const v = part.value;
                if (isPrimitive(v) || !isIterable(v)) {
                    text += typeof v === 'string' ? v : String(v);
                }
                else {
                    for (const t of v) {
                        text += typeof t === 'string' ? t : String(t);
                    }
                }
            }
        }
        text += strings[l];
        return text;
    }
    commit() {
        if (this.dirty) {
            this.dirty = false;
            this.element.setAttribute(this.name, this._getValue());
        }
    }
}
/**
 * A Part that controls all or part of an attribute value.
 */
class parts_AttributePart {
    constructor(committer) {
        this.value = undefined;
        this.committer = committer;
    }
    setValue(value) {
        if (value !== noChange && (!isPrimitive(value) || value !== this.value)) {
            this.value = value;
            // If the value is a not a directive, dirty the committer so that it'll
            // call setAttribute. If the value is a directive, it'll dirty the
            // committer if it calls setValue().
            if (!isDirective(value)) {
                this.committer.dirty = true;
            }
        }
    }
    commit() {
        while (isDirective(this.value)) {
            const directive = this.value;
            this.value = noChange;
            directive(this);
        }
        if (this.value === noChange) {
            return;
        }
        this.committer.commit();
    }
}
/**
 * A Part that controls a location within a Node tree. Like a Range, NodePart
 * has start and end locations and can set and update the Nodes between those
 * locations.
 *
 * NodeParts support several value types: primitives, Nodes, TemplateResults,
 * as well as arrays and iterables of those types.
 */
class parts_NodePart {
    constructor(options) {
        this.value = undefined;
        this.__pendingValue = undefined;
        this.options = options;
    }
    /**
     * Appends this part into a container.
     *
     * This part must be empty, as its contents are not automatically moved.
     */
    appendInto(container) {
        this.startNode = container.appendChild(createMarker());
        this.endNode = container.appendChild(createMarker());
    }
    /**
     * Inserts this part after the `ref` node (between `ref` and `ref`'s next
     * sibling). Both `ref` and its next sibling must be static, unchanging nodes
     * such as those that appear in a literal section of a template.
     *
     * This part must be empty, as its contents are not automatically moved.
     */
    insertAfterNode(ref) {
        this.startNode = ref;
        this.endNode = ref.nextSibling;
    }
    /**
     * Appends this part into a parent part.
     *
     * This part must be empty, as its contents are not automatically moved.
     */
    appendIntoPart(part) {
        part.__insert(this.startNode = createMarker());
        part.__insert(this.endNode = createMarker());
    }
    /**
     * Inserts this part after the `ref` part.
     *
     * This part must be empty, as its contents are not automatically moved.
     */
    insertAfterPart(ref) {
        ref.__insert(this.startNode = createMarker());
        this.endNode = ref.endNode;
        ref.endNode = this.startNode;
    }
    setValue(value) {
        this.__pendingValue = value;
    }
    commit() {
        if (this.startNode.parentNode === null) {
            return;
        }
        while (isDirective(this.__pendingValue)) {
            const directive = this.__pendingValue;
            this.__pendingValue = noChange;
            directive(this);
        }
        const value = this.__pendingValue;
        if (value === noChange) {
            return;
        }
        if (isPrimitive(value)) {
            if (value !== this.value) {
                this.__commitText(value);
            }
        }
        else if (value instanceof template_result_TemplateResult) {
            this.__commitTemplateResult(value);
        }
        else if (value instanceof Node) {
            this.__commitNode(value);
        }
        else if (isIterable(value)) {
            this.__commitIterable(value);
        }
        else if (value === nothing) {
            this.value = nothing;
            this.clear();
        }
        else {
            // Fallback, will render the string representation
            this.__commitText(value);
        }
    }
    __insert(node) {
        this.endNode.parentNode.insertBefore(node, this.endNode);
    }
    __commitNode(value) {
        if (this.value === value) {
            return;
        }
        this.clear();
        this.__insert(value);
        this.value = value;
    }
    __commitText(value) {
        const node = this.startNode.nextSibling;
        value = value == null ? '' : value;
        // If `value` isn't already a string, we explicitly convert it here in case
        // it can't be implicitly converted - i.e. it's a symbol.
        const valueAsString = typeof value === 'string' ? value : String(value);
        if (node === this.endNode.previousSibling &&
            node.nodeType === 3 /* Node.TEXT_NODE */) {
            // If we only have a single text node between the markers, we can just
            // set its value, rather than replacing it.
            // TODO(justinfagnani): Can we just check if this.value is primitive?
            node.data = valueAsString;
        }
        else {
            this.__commitNode(document.createTextNode(valueAsString));
        }
        this.value = value;
    }
    __commitTemplateResult(value) {
        const template = this.options.templateFactory(value);
        if (this.value instanceof template_instance_TemplateInstance &&
            this.value.template === template) {
            this.value.update(value.values);
        }
        else {
            // Make sure we propagate the template processor from the TemplateResult
            // so that we use its syntax extension, etc. The template factory comes
            // from the render function options so that it can control template
            // caching and preprocessing.
            const instance = new template_instance_TemplateInstance(template, value.processor, this.options);
            const fragment = instance._clone();
            instance.update(value.values);
            this.__commitNode(fragment);
            this.value = instance;
        }
    }
    __commitIterable(value) {
        // For an Iterable, we create a new InstancePart per item, then set its
        // value to the item. This is a little bit of overhead for every item in
        // an Iterable, but it lets us recurse easily and efficiently update Arrays
        // of TemplateResults that will be commonly returned from expressions like:
        // array.map((i) => html`${i}`), by reusing existing TemplateInstances.
        // If _value is an array, then the previous render was of an
        // iterable and _value will contain the NodeParts from the previous
        // render. If _value is not an array, clear this part and make a new
        // array for NodeParts.
        if (!Array.isArray(this.value)) {
            this.value = [];
            this.clear();
        }
        // Lets us keep track of how many items we stamped so we can clear leftover
        // items from a previous render
        const itemParts = this.value;
        let partIndex = 0;
        let itemPart;
        for (const item of value) {
            // Try to reuse an existing part
            itemPart = itemParts[partIndex];
            // If no existing part, create a new one
            if (itemPart === undefined) {
                itemPart = new parts_NodePart(this.options);
                itemParts.push(itemPart);
                if (partIndex === 0) {
                    itemPart.appendIntoPart(this);
                }
                else {
                    itemPart.insertAfterPart(itemParts[partIndex - 1]);
                }
            }
            itemPart.setValue(item);
            itemPart.commit();
            partIndex++;
        }
        if (partIndex < itemParts.length) {
            // Truncate the parts array so _value reflects the current state
            itemParts.length = partIndex;
            this.clear(itemPart && itemPart.endNode);
        }
    }
    clear(startNode = this.startNode) {
        removeNodes(this.startNode.parentNode, startNode.nextSibling, this.endNode);
    }
}
/**
 * Implements a boolean attribute, roughly as defined in the HTML
 * specification.
 *
 * If the value is truthy, then the attribute is present with a value of
 * ''. If the value is falsey, the attribute is removed.
 */
class parts_BooleanAttributePart {
    constructor(element, name, strings) {
        this.value = undefined;
        this.__pendingValue = undefined;
        if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {
            throw new Error('Boolean attributes can only contain a single expression');
        }
        this.element = element;
        this.name = name;
        this.strings = strings;
    }
    setValue(value) {
        this.__pendingValue = value;
    }
    commit() {
        while (isDirective(this.__pendingValue)) {
            const directive = this.__pendingValue;
            this.__pendingValue = noChange;
            directive(this);
        }
        if (this.__pendingValue === noChange) {
            return;
        }
        const value = !!this.__pendingValue;
        if (this.value !== value) {
            if (value) {
                this.element.setAttribute(this.name, '');
            }
            else {
                this.element.removeAttribute(this.name);
            }
            this.value = value;
        }
        this.__pendingValue = noChange;
    }
}
/**
 * Sets attribute values for PropertyParts, so that the value is only set once
 * even if there are multiple parts for a property.
 *
 * If an expression controls the whole property value, then the value is simply
 * assigned to the property under control. If there are string literals or
 * multiple expressions, then the strings are expressions are interpolated into
 * a string first.
 */
class PropertyCommitter extends AttributeCommitter {
    constructor(element, name, strings) {
        super(element, name, strings);
        this.single =
            (strings.length === 2 && strings[0] === '' && strings[1] === '');
    }
    _createPart() {
        return new PropertyPart(this);
    }
    _getValue() {
        if (this.single) {
            return this.parts[0].value;
        }
        return super._getValue();
    }
    commit() {
        if (this.dirty) {
            this.dirty = false;
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            this.element[this.name] = this._getValue();
        }
    }
}
class PropertyPart extends parts_AttributePart {
}
// Detect event listener options support. If the `capture` property is read
// from the options object, then options are supported. If not, then the third
// argument to add/removeEventListener is interpreted as the boolean capture
// value so we should only pass the `capture` property.
let eventOptionsSupported = false;
// Wrap into an IIFE because MS Edge <= v41 does not support having try/catch
// blocks right into the body of a module
(() => {
    try {
        const options = {
            get capture() {
                eventOptionsSupported = true;
                return false;
            }
        };
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        window.addEventListener('test', options, options);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        window.removeEventListener('test', options, options);
    }
    catch (_e) {
        // event options not supported
    }
})();
class parts_EventPart {
    constructor(element, eventName, eventContext) {
        this.value = undefined;
        this.__pendingValue = undefined;
        this.element = element;
        this.eventName = eventName;
        this.eventContext = eventContext;
        this.__boundHandleEvent = (e) => this.handleEvent(e);
    }
    setValue(value) {
        this.__pendingValue = value;
    }
    commit() {
        while (isDirective(this.__pendingValue)) {
            const directive = this.__pendingValue;
            this.__pendingValue = noChange;
            directive(this);
        }
        if (this.__pendingValue === noChange) {
            return;
        }
        const newListener = this.__pendingValue;
        const oldListener = this.value;
        const shouldRemoveListener = newListener == null ||
            oldListener != null &&
                (newListener.capture !== oldListener.capture ||
                    newListener.once !== oldListener.once ||
                    newListener.passive !== oldListener.passive);
        const shouldAddListener = newListener != null && (oldListener == null || shouldRemoveListener);
        if (shouldRemoveListener) {
            this.element.removeEventListener(this.eventName, this.__boundHandleEvent, this.__options);
        }
        if (shouldAddListener) {
            this.__options = getOptions(newListener);
            this.element.addEventListener(this.eventName, this.__boundHandleEvent, this.__options);
        }
        this.value = newListener;
        this.__pendingValue = noChange;
    }
    handleEvent(event) {
        if (typeof this.value === 'function') {
            this.value.call(this.eventContext || this.element, event);
        }
        else {
            this.value.handleEvent(event);
        }
    }
}
// We copy options because of the inconsistent behavior of browsers when reading
// the third argument of add/removeEventListener. IE11 doesn't support options
// at all. Chrome 41 only reads `capture` if the argument is an object.
const getOptions = (o) => o &&
    (eventOptionsSupported ?
        { capture: o.capture, passive: o.passive, once: o.once } :
        o.capture);
//# sourceMappingURL=parts.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/default-template-processor.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */

/**
 * Creates Parts when a template is instantiated.
 */
class default_template_processor_DefaultTemplateProcessor {
    /**
     * Create parts for an attribute-position binding, given the event, attribute
     * name, and string literals.
     *
     * @param element The element containing the binding
     * @param name  The attribute name
     * @param strings The string literals. There are always at least two strings,
     *   event for fully-controlled bindings with a single expression.
     */
    handleAttributeExpressions(element, name, strings, options) {
        const prefix = name[0];
        if (prefix === '.') {
            const committer = new PropertyCommitter(element, name.slice(1), strings);
            return committer.parts;
        }
        if (prefix === '@') {
            return [new parts_EventPart(element, name.slice(1), options.eventContext)];
        }
        if (prefix === '?') {
            return [new parts_BooleanAttributePart(element, name.slice(1), strings)];
        }
        const committer = new AttributeCommitter(element, name, strings);
        return committer.parts;
    }
    /**
     * Create parts for a text-position binding.
     * @param templateFactory
     */
    handleTextExpression(options) {
        return new parts_NodePart(options);
    }
}
const defaultTemplateProcessor = new default_template_processor_DefaultTemplateProcessor();
//# sourceMappingURL=default-template-processor.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/template-factory.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */

/**
 * The default TemplateFactory which caches Templates keyed on
 * result.type and result.strings.
 */
function templateFactory(result) {
    let templateCache = templateCaches.get(result.type);
    if (templateCache === undefined) {
        templateCache = {
            stringsArray: new WeakMap(),
            keyString: new Map()
        };
        templateCaches.set(result.type, templateCache);
    }
    let template = templateCache.stringsArray.get(result.strings);
    if (template !== undefined) {
        return template;
    }
    // If the TemplateStringsArray is new, generate a key from the strings
    // This key is shared between all templates with identical content
    const key = result.strings.join(marker);
    // Check if we already have a Template for this key
    template = templateCache.keyString.get(key);
    if (template === undefined) {
        // If we have not seen this key before, create a new Template
        template = new Template(result, result.getTemplateElement());
        // Cache the Template for this key
        templateCache.keyString.set(key, template);
    }
    // Cache all future queries for this TemplateStringsArray
    templateCache.stringsArray.set(result.strings, template);
    return template;
}
const templateCaches = new Map();
//# sourceMappingURL=template-factory.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lib/render.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @module lit-html
 */



const render_parts = new WeakMap();
/**
 * Renders a template result or other value to a container.
 *
 * To update a container with new values, reevaluate the template literal and
 * call `render` with the new result.
 *
 * @param result Any value renderable by NodePart - typically a TemplateResult
 *     created by evaluating a template tag like `html` or `svg`.
 * @param container A DOM parent to render to. The entire contents are either
 *     replaced, or efficiently updated if the same result type was previous
 *     rendered there.
 * @param options RenderOptions for the entire render tree rendered to this
 *     container. Render options must *not* change between renders to the same
 *     container, as those changes will not effect previously rendered DOM.
 */
const render = (result, container, options) => {
    let part = render_parts.get(container);
    if (part === undefined) {
        removeNodes(container, container.firstChild);
        render_parts.set(container, part = new parts_NodePart(Object.assign({ templateFactory: templateFactory }, options)));
        part.appendInto(container);
    }
    part.setValue(result);
    part.commit();
};
//# sourceMappingURL=render.js.map
// CONCATENATED MODULE: ./node_modules/lit-html/lit-html.js
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 *
 * Main lit-html module.
 *
 * Main exports:
 *
 * -  [[html]]
 * -  [[svg]]
 * -  [[render]]
 *
 * @module lit-html
 * @preferred
 */
/**
 * Do not remove this comment; it keeps typedoc from misplacing the module
 * docs.
 */




// TODO(justinfagnani): remove line when we get NodePart moving methods








// IMPORTANT: do not change the property name or the assignment expression.
// This line will be used in regexes to search for lit-html usage.
// TODO(justinfagnani): inject version number at build time
if (typeof window !== 'undefined') {
    (window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.2.1');
}
/**
 * Interprets a template literal as an HTML template that can efficiently
 * render to and update a container.
 */
const lit_html_html = (strings, ...values) => new template_result_TemplateResult(strings, values, 'html', defaultTemplateProcessor);
/**
 * Interprets a template literal as an SVG template that can efficiently
 * render to and update a container.
 */
const svg = (strings, ...values) => new template_result_SVGTemplateResult(strings, values, 'svg', defaultTemplateProcessor);
//# sourceMappingURL=lit-html.js.map

/***/ })
/******/ ]);
//# sourceMappingURL=ehsyringe.user.js.map