/** * @name MaganeVencord * @displayName MaganeVencord * @description Bringing LINE stickers to Discord in a chaotic way. Vencord edition. * @author Kana, Bobby * @authorId 176200089226706944 * @authorLink https://github.com/Pitu * @license MIT - https://opensource.org/licenses/MIT * @version 3.2.19 * @invite 5g6vgwn * @source https://github.com/Pitu/Magane * @updateUrl https://raw.githubusercontent.com/Pitu/Magane/master/dist/magane.vencord.js * @website https://magane.moe * @donate https://github.com/sponsors/Pitu * @patreon https://patreon.com/pitu */ "use strict" import definePlugin from "@utils/types"; import { findByPropsLazy, findLazy } from "@webpack"; import { Alerts, Toasts } from "@webpack/common"; function noop() {} function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return "function" == typeof thing; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && "object" == typeof a || "function" == typeof a; } let src_url_equal_anchor, current_component; function src_url_equal(element_src, url) { return src_url_equal_anchor || (src_url_equal_anchor = document.createElement("a")), src_url_equal_anchor.href = url, element_src === src_url_equal_anchor.href; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function destroy_each(iterations, detaching) { for (let i = 0; i < iterations.length; i += 1) iterations[i] && iterations[i].d(detaching); } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(" "); } function listen(node, event, handler, options) { return node.addEventListener(event, handler, options), () => node.removeEventListener(event, handler, options); } function stop_propagation(fn) { return function(event) { return event.stopPropagation(), fn.call(this, event); }; } function attr(node, attribute, value) { null == value ? node.removeAttribute(attribute) : node.getAttribute(attribute) !== value && node.setAttribute(attribute, value); } function set_data(text, data) { data = "" + data, text.wholeText !== data && (text.data = data); } function set_input_value(input, value) { input.value = null == value ? "" : value; } function set_style(node, key, value, important) { null === value ? node.style.removeProperty(key) : node.style.setProperty(key, value, important ? "important" : ""); } function toggle_class(element, name, toggle) { element.classList[toggle ? "add" : "remove"](name); } class HtmlTag { constructor(is_svg = !1) { this.is_svg = !1, this.is_svg = is_svg, this.e = this.n = null; } c(html) { this.h(html); } m(html, target, anchor = null) { this.e || (this.is_svg ? this.e = function svg_element(name) { return document.createElementNS("http://www.w3.org/2000/svg", name); }(target.nodeName) : this.e = element(target.nodeName), this.t = target, this.c(html)), this.i(anchor); } h(html) { this.e.innerHTML = html, this.n = Array.from(this.e.childNodes); } i(anchor) { for (let i = 0; i < this.n.length; i += 1) insert(this.t, this.n[i], anchor); } p(html) { this.d(), this.h(html), this.i(this.a); } d() { this.n.forEach(detach); } } function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error("Function called outside component initialization"); return current_component; } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } function createEventDispatcher() { const component = get_current_component(); return (type, detail, {cancelable = !1} = {}) => { const callbacks = component.$$.callbacks[type]; if (callbacks) { const event = function custom_event(type, detail, {bubbles = !1, cancelable = !1} = {}) { const e = document.createEvent("CustomEvent"); return e.initCustomEvent(type, bubbles, cancelable, detail), e; }(type, detail, { cancelable }); return callbacks.slice().forEach(fn => { fn.call(component, event); }), !event.defaultPrevented; } return !0; }; } const dirty_components = [], binding_callbacks = [], render_callbacks = [], flush_callbacks = [], resolved_promise = Promise.resolve(); let update_scheduled = !1; function add_render_callback(fn) { render_callbacks.push(fn); } const seen_callbacks = new Set; let flushidx = 0; function flush() { const saved_component = current_component; do { for (;flushidx < dirty_components.length; ) { const component = dirty_components[flushidx]; flushidx++, set_current_component(component), update(component.$$); } for (set_current_component(null), dirty_components.length = 0, flushidx = 0; binding_callbacks.length; ) binding_callbacks.pop()(); for (let i = 0; i < render_callbacks.length; i += 1) { const callback = render_callbacks[i]; seen_callbacks.has(callback) || (seen_callbacks.add(callback), callback()); } render_callbacks.length = 0; } while (dirty_components.length); for (;flush_callbacks.length; ) flush_callbacks.pop()(); update_scheduled = !1, seen_callbacks.clear(), set_current_component(saved_component); } function update($$) { if (null !== $$.fragment) { $$.update(), run_all($$.before_update); const dirty = $$.dirty; $$.dirty = [ -1 ], $$.fragment && $$.fragment.p($$.ctx, dirty), $$.after_update.forEach(add_render_callback); } } const outroing = new Set; function transition_in(block, local) { block && block.i && (outroing.delete(block), block.i(local)); } function destroy_block(block, lookup) { block.d(1), lookup.delete(block.key); } function make_dirty(component, i) { -1 === component.$$.dirty[0] && (dirty_components.push(component), function schedule_update() { update_scheduled || (update_scheduled = !0, resolved_promise.then(flush)); }(), component.$$.dirty.fill(0)), component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [ -1 ]) { const parent_component = current_component; set_current_component(component); const $$ = component.$$ = { fragment: null, ctx: null, props, update: noop, not_equal, bound: blank_object(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), callbacks: blank_object(), dirty, skip_bound: !1, root: options.target || parent_component.$$.root }; append_styles && append_styles($$.root); let ready = !1; if ($$.ctx = instance ? instance(component, options.props || {}, (i, ret, ...rest) => { const value = rest.length ? rest[0] : ret; return $$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value) && (!$$.skip_bound && $$.bound[i] && $$.bound[i](value), ready && make_dirty(component, i)), ret; }) : [], $$.update(), ready = !0, run_all($$.before_update), $$.fragment = !!create_fragment && create_fragment($$.ctx), options.target) { if (options.hydrate) { const nodes = function children(element) { return Array.from(element.childNodes); }(options.target); $$.fragment && $$.fragment.l(nodes), nodes.forEach(detach); } else $$.fragment && $$.fragment.c(); options.intro && transition_in(component.$$.fragment), function mount_component(component, target, anchor, customElement) { const {fragment, on_mount, on_destroy, after_update} = component.$$; fragment && fragment.m(target, anchor), customElement || add_render_callback(() => { const new_on_destroy = on_mount.map(run).filter(is_function); on_destroy ? on_destroy.push(...new_on_destroy) : run_all(new_on_destroy), component.$$.on_mount = []; }), after_update.forEach(add_render_callback); }(component, options.target, options.anchor, options.customElement), flush(); } set_current_component(parent_component); } class SvelteComponent { $destroy() { !function destroy_component(component, detaching) { const $$ = component.$$; null !== $$.fragment && (run_all($$.on_destroy), $$.fragment && $$.fragment.d(detaching), $$.on_destroy = $$.fragment = null, $$.ctx = []); }(this, 1), this.$destroy = noop; } $on(type, callback) { const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); return callbacks.push(callback), () => { const index = callbacks.indexOf(callback); -1 !== index && callbacks.splice(index, 1); }; } $set($$props) { this.$$set && !function is_empty(obj) { return 0 === Object.keys(obj).length; }($$props) && (this.$$.skip_bound = !0, this.$$set($$props), this.$$.skip_bound = !1); } } function create_fragment(ctx) { let div, mounted, dispose; return { c() { div = element("div"), div.innerHTML = '', attr(div, "id", "maganeButton"), attr(div, "class", "channel-textarea-emoji channel-textarea-stickers"), toggle_class(div, "active", ctx[1]); }, m(target, anchor) { var fn; insert(target, div, anchor), ctx[5](div), mounted || (dispose = [ listen(div, "click", ctx[6]), listen(div, "contextmenu", stop_propagation((fn = ctx[7], function(event) { return event.preventDefault(), fn.call(this, event); }))) ], mounted = !0); }, p(ctx, [dirty]) { 2 & dirty && toggle_class(div, "active", ctx[1]); }, i: noop, o: noop, d(detaching) { detaching && detach(div), ctx[5](null), mounted = !1, run_all(dispose); } }; } function instance($$self, $$props, $$invalidate) { let {element} = $$props, {active = !1} = $$props, {textArea} = $$props, {lastTextAreaSize = {}} = $$props; const dispatch = createEventDispatcher(), log = message => console.log("%c[MaganeButton]%c", "color: #3a71c1; font-weight: 700", "", message); onMount(() => log("Mounted.")), onDestroy(() => log("Destroyed.")); return $$self.$$set = $$props => { "element" in $$props && $$invalidate(0, element = $$props.element), "active" in $$props && $$invalidate(1, active = $$props.active), "textArea" in $$props && $$invalidate(3, textArea = $$props.textArea), "lastTextAreaSize" in $$props && $$invalidate(4, lastTextAreaSize = $$props.lastTextAreaSize); }, [ element, active, dispatch, textArea, lastTextAreaSize, function div_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](() => { element = $$value, $$invalidate(0, element); }); }, e => dispatch("click", e), e => dispatch("grabPacks", e) ]; } class Button extends SvelteComponent { constructor(options) { super(), init(this, options, instance, create_fragment, safe_not_equal, { element: 0, active: 1, textArea: 3, lastTextAreaSize: 4 }); } get element() { return this.$$.ctx[0]; } set element(element) { this.$$set({ element }), flush(); } get active() { return this.$$.ctx[1]; } set active(active) { this.$$set({ active }), flush(); } get textArea() { return this.$$.ctx[3]; } set textArea(textArea) { this.$$set({ textArea }), flush(); } get lastTextAreaSize() { return this.$$.ctx[4]; } set lastTextAreaSize(lastTextAreaSize) { this.$$set({ lastTextAreaSize }), flush(); } } function noop$1() {} const is_client = "undefined" != typeof window; let now = is_client ? () => window.performance.now() : () => Date.now(), raf = is_client ? cb => requestAnimationFrame(cb) : noop$1; const tasks = new Set; function run_tasks(now) { tasks.forEach(task => { task.c(now) || (tasks.delete(task), task.f()); }), 0 !== tasks.size && raf(run_tasks); } var _ = { $: selector => "string" == typeof selector ? document.querySelector(selector) : selector, extend: (...args) => Object.assign(...args), cumulativeOffset(element) { let top = 0, left = 0; do { top += element.offsetTop || 0, left += element.offsetLeft || 0, element = element.offsetParent; } while (element); return { top, left }; }, directScroll: element => element && element !== document && element !== document.body, scrollTop(element, value) { let inSetter = void 0 !== value; return this.directScroll(element) ? inSetter ? element.scrollTop = value : element.scrollTop : inSetter ? document.documentElement.scrollTop = document.body.scrollTop = value : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; }, scrollLeft(element, value) { let inSetter = void 0 !== value; return this.directScroll(element) ? inSetter ? element.scrollLeft = value : element.scrollLeft : inSetter ? document.documentElement.scrollLeft = document.body.scrollLeft = value : window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; } }; const defaultOptions = { container: "body", duration: 500, delay: 0, offset: 0, easing: function cubicInOut(t) { return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0; }, onStart: noop$1, onDone: noop$1, onAborting: noop$1, scrollX: !1, scrollY: !0 }, _scrollTo = options => { let {offset, duration, delay, easing, x = 0, y = 0, scrollX, scrollY, onStart, onDone, container, onAborting, element} = options; "function" == typeof offset && (offset = offset()); var cumulativeOffsetContainer = _.cumulativeOffset(container), cumulativeOffsetTarget = element ? _.cumulativeOffset(element) : { top: y, left: x }, initialX = _.scrollLeft(container), initialY = _.scrollTop(container), targetX = cumulativeOffsetTarget.left - cumulativeOffsetContainer.left + offset, targetY = cumulativeOffsetTarget.top - cumulativeOffsetContainer.top + offset, diffX = targetX - initialX, diffY = targetY - initialY; let scrolling = !0, started = !1, start_time = now() + delay, end_time = start_time + duration; function start(delayStart) { delayStart || (started = !0, onStart(element, { x, y })); } function tick(progress) { !function scrollToTopLeft(element, top, left) { scrollX && _.scrollLeft(element, left), scrollY && _.scrollTop(element, top); }(container, initialY + diffY * progress, initialX + diffX * progress); } function stop() { scrolling = !1; } return function loop(callback) { let task; return 0 === tasks.size && raf(run_tasks), { promise: new Promise(fulfill => { tasks.add(task = { c: callback, f: fulfill }); }), abort() { tasks.delete(task); } }; }(now => { if (!started && now >= start_time && start(!1), started && now >= end_time && (tick(1), stop(), onDone(element, { x, y })), !scrolling) return onAborting(element, { x, y }), !1; if (started) { tick(0 + 1 * easing((now - start_time) / duration)); } return !0; }), start(delay), tick(0), stop; }, scrollTo = options => _scrollTo((options => { let opts = _.extend({}, defaultOptions, options); return opts.container = _.$(opts.container), opts.element = _.$(opts.element), opts; })(options)); var debug_1 = "object" == typeof process && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; var constants = { MAX_LENGTH: 256, MAX_SAFE_COMPONENT_LENGTH: 16, MAX_SAFE_BUILD_LENGTH: 250, MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991, RELEASE_TYPES: [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ], SEMVER_SPEC_VERSION: "2.0.0", FLAG_INCLUDE_PRERELEASE: 0b001, FLAG_LOOSE: 0b010 }; var re_1 = function createCommonjsModule(fn, module) { return fn(module = { exports: {} }, module.exports), module.exports; }((function(module, exports) { const {MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH} = constants, re = (exports = module.exports = {}).re = [], safeRe = exports.safeRe = [], src = exports.src = [], t = exports.t = {}; let R = 0; const safeRegexReplacements = [ [ "\\s", 1 ], [ "\\d", MAX_SAFE_COMPONENT_LENGTH ], [ "[a-zA-Z0-9-]", MAX_SAFE_BUILD_LENGTH ] ], createToken = (name, value, isGlobal) => { const safe = (value => { for (const [token, max] of safeRegexReplacements) value = value.split(token + "*").join(`${token}{0,${max}}`).split(token + "+").join(`${token}{1,${max}}`); return value; })(value), index = R++; debug_1(name, index, value), t[name] = index, src[index] = value, re[index] = new RegExp(value, isGlobal ? "g" : void 0), safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"), createToken("NUMERICIDENTIFIERLOOSE", "\\d+"), createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"), createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`), createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`), createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`), createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`), createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`), createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`), createToken("BUILDIDENTIFIER", "[a-zA-Z0-9-]+"), createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`), createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`), createToken("FULL", `^${src[t.FULLPLAIN]}$`), createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`), createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`), createToken("GTLT", "((?:<|>)?=?)"), createToken("XRANGEIDENTIFIERLOOSE", src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"), createToken("XRANGEIDENTIFIER", src[t.NUMERICIDENTIFIER] + "|x|X|\\*"), createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`), createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`), createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`), createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`), createToken("COERCE", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`), createToken("COERCERTL", src[t.COERCE], !0), createToken("LONETILDE", "(?:~>?)"), createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, !0), exports.tildeTrimReplace = "$1~", createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`), createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`), createToken("LONECARET", "(?:\\^)"), createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, !0), exports.caretTrimReplace = "$1^", createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`), createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`), createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`), createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`), createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, !0), exports.comparatorTrimReplace = "$1$2$3", createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`), createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`), createToken("STAR", "(<|>)?=?\\s*\\*"), createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); })); re_1.re, re_1.safeRe, re_1.src, re_1.t, re_1.tildeTrimReplace, re_1.caretTrimReplace, re_1.comparatorTrimReplace; const looseOption = Object.freeze({ loose: !0 }), emptyOpts = Object.freeze({}); var parseOptions_1 = options => options ? "object" != typeof options ? looseOption : options : emptyOpts; const numeric = /^[0-9]+$/, compareIdentifiers = (a, b) => { const anum = numeric.test(a), bnum = numeric.test(b); return anum && bnum && (a = +a, b = +b), a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; var identifiers = { compareIdentifiers, rcompareIdentifiers: (a, b) => compareIdentifiers(b, a) }; const {MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1} = constants, {safeRe: re, t} = re_1, {compareIdentifiers: compareIdentifiers$1} = identifiers; class SemVer { constructor(version, options) { if (options = parseOptions_1(options), version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; version = version.version; } else if ("string" != typeof version) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); if (version.length > MAX_LENGTH$1) throw new TypeError(`version is longer than ${MAX_LENGTH$1} characters`); debug_1("SemVer", version, options), this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease; const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) throw new TypeError("Invalid Version: " + version); if (this.raw = version, this.major = +m[1], this.minor = +m[2], this.patch = +m[3], this.major > MAX_SAFE_INTEGER$1 || this.major < 0) throw new TypeError("Invalid major version"); if (this.minor > MAX_SAFE_INTEGER$1 || this.minor < 0) throw new TypeError("Invalid minor version"); if (this.patch > MAX_SAFE_INTEGER$1 || this.patch < 0) throw new TypeError("Invalid patch version"); m[4] ? this.prerelease = m[4].split(".").map(id => { if (/^[0-9]+$/.test(id)) { const num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER$1) return num; } return id; }) : this.prerelease = [], this.build = m[5] ? m[5].split(".") : [], this.format(); } format() { return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += "-" + this.prerelease.join(".")), this.version; } toString() { return this.version; } compare(other) { if (debug_1("SemVer.compare", this.version, this.options, other), !(other instanceof SemVer)) { if ("string" == typeof other && other === this.version) return 0; other = new SemVer(other, this.options); } return other.version === this.version ? 0 : this.compareMain(other) || this.comparePre(other); } compareMain(other) { return other instanceof SemVer || (other = new SemVer(other, this.options)), compareIdentifiers$1(this.major, other.major) || compareIdentifiers$1(this.minor, other.minor) || compareIdentifiers$1(this.patch, other.patch); } comparePre(other) { if (other instanceof SemVer || (other = new SemVer(other, this.options)), this.prerelease.length && !other.prerelease.length) return -1; if (!this.prerelease.length && other.prerelease.length) return 1; if (!this.prerelease.length && !other.prerelease.length) return 0; let i = 0; do { const a = this.prerelease[i], b = other.prerelease[i]; if (debug_1("prerelease compare", i, a, b), void 0 === a && void 0 === b) return 0; if (void 0 === b) return 1; if (void 0 === a) return -1; if (a !== b) return compareIdentifiers$1(a, b); } while (++i); } compareBuild(other) { other instanceof SemVer || (other = new SemVer(other, this.options)); let i = 0; do { const a = this.build[i], b = other.build[i]; if (debug_1("prerelease compare", i, a, b), void 0 === a && void 0 === b) return 0; if (void 0 === b) return 1; if (void 0 === a) return -1; if (a !== b) return compareIdentifiers$1(a, b); } while (++i); } inc(release, identifier, identifierBase) { switch (release) { case "premajor": this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", identifier, identifierBase); break; case "preminor": this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", identifier, identifierBase); break; case "prepatch": this.prerelease.length = 0, this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase); break; case "prerelease": 0 === this.prerelease.length && this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase); break; case "major": 0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length || this.major++, this.minor = 0, this.patch = 0, this.prerelease = []; break; case "minor": 0 === this.patch && 0 !== this.prerelease.length || this.minor++, this.patch = 0, this.prerelease = []; break; case "patch": 0 === this.prerelease.length && this.patch++, this.prerelease = []; break; case "pre": { const base = Number(identifierBase) ? 1 : 0; if (!identifier && !1 === identifierBase) throw new Error("invalid increment argument: identifier is empty"); if (0 === this.prerelease.length) this.prerelease = [ base ]; else { let i = this.prerelease.length; for (;--i >= 0; ) "number" == typeof this.prerelease[i] && (this.prerelease[i]++, i = -2); if (-1 === i) { if (identifier === this.prerelease.join(".") && !1 === identifierBase) throw new Error("invalid increment argument: identifier already exists"); this.prerelease.push(base); } } if (identifier) { let prerelease = [ identifier, base ]; !1 === identifierBase && (prerelease = [ identifier ]), 0 === compareIdentifiers$1(this.prerelease[0], identifier) ? isNaN(this.prerelease[1]) && (this.prerelease = prerelease) : this.prerelease = prerelease; } break; } default: throw new Error("invalid increment argument: " + release); } return this.raw = this.format(), this.build.length && (this.raw += "+" + this.build.join(".")), this; } } var semver = SemVer; var compare_1 = (a, b, loose) => new semver(a, loose).compare(new semver(b, loose)); var gt_1 = (a, b, loose) => compare_1(a, b, loose) > 0; function get_each_context(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[170] = list[i], child_ctx; } function get_each_context_1(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[170] = list[i], child_ctx[174] = i, child_ctx; } function get_each_context_2(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[170] = list[i], child_ctx[174] = i, child_ctx; } function get_each_context_3(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[170] = list[i], child_ctx[174] = i, child_ctx; } function get_each_context_4(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[177] = list[i], child_ctx[174] = i, child_ctx; } function get_each_context_5(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[177] = list[i], child_ctx[174] = i, child_ctx; } function get_each_context_6(ctx, list, i) { const child_ctx = ctx.slice(); return child_ctx[177] = list[i], child_ctx[174] = i, child_ctx; } function create_if_block_16(ctx) { let h3; return { c() { h3 = element("h3"), h3.textContent = "It seems you aren't subscribed to any pack yet. Click the plus symbol on the bottom-left to get started! 🎉", attr(h3, "class", "getStarted"); }, m(target, anchor) { insert(target, h3, anchor); }, d(detaching) { detaching && detach(h3); } }; } function create_if_block_15(ctx) { let div, span, t0, html_tag, t1, raw_value = ctx[31](ctx[8].length) + "", each_value_6 = ctx[8], each_blocks = []; for (let i = 0; i < each_value_6.length; i += 1) each_blocks[i] = create_each_block_6(get_each_context_6(ctx, each_value_6, i)); return { c() { div = element("div"), span = element("span"), t0 = text("Favorites"), html_tag = new HtmlTag(!1), t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); html_tag.a = null, attr(span, "id", "pfavorites"), attr(div, "class", "pack"); }, m(target, anchor) { insert(target, div, anchor), append(div, span), append(span, t0), html_tag.m(raw_value, span), append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div, null); }, p(ctx, dirty) { if (256 & dirty[0] && raw_value !== (raw_value = ctx[31](ctx[8].length) + "") && html_tag.p(raw_value), 738205952 & dirty[0]) { let i; for (each_value_6 = ctx[8], i = 0; i < each_value_6.length; i += 1) { const child_ctx = get_each_context_6(ctx, each_value_6, i); each_blocks[i] ? each_blocks[i].p(child_ctx, dirty) : (each_blocks[i] = create_each_block_6(child_ctx), each_blocks[i].c(), each_blocks[i].m(div, null)); } for (;i < each_blocks.length; i += 1) each_blocks[i].d(1); each_blocks.length = each_value_6.length; } }, d(detaching) { detaching && detach(div), destroy_each(each_blocks, detaching); } }; } function create_each_block_6(ctx) { let div1, img, img_src_value, img_alt_value, img_title_value, t0, div0, t1, mounted, dispose; function click_handler(...args) { return ctx[53](ctx[177], ...args); } function click_handler_1() { return ctx[54](ctx[177]); } return { c() { div1 = element("div"), img = element("img"), t0 = space(), div0 = element("div"), div0.innerHTML = '', t1 = space(), attr(img, "class", "image"), src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[177].pack, ctx[177].id)) || attr(img, "src", img_src_value), attr(img, "alt", img_alt_value = ctx[177].pack + " - " + ctx[177].id), attr(img, "title", img_title_value = ctx[13][ctx[177].pack] ? ctx[13][ctx[177].pack].name : ""), attr(div0, "class", "deleteFavorite"), attr(div0, "title", "Unfavorite"), attr(div1, "class", "sticker"); }, m(target, anchor) { insert(target, div1, anchor), append(div1, img), append(div1, t0), append(div1, div0), append(div1, t1), mounted || (dispose = [ listen(img, "click", click_handler), listen(div0, "click", click_handler_1) ], mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx, 256 & dirty[0] && !src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[177].pack, ctx[177].id)) && attr(img, "src", img_src_value), 256 & dirty[0] && img_alt_value !== (img_alt_value = ctx[177].pack + " - " + ctx[177].id) && attr(img, "alt", img_alt_value), 8448 & dirty[0] && img_title_value !== (img_title_value = ctx[13][ctx[177].pack] ? ctx[13][ctx[177].pack].name : "") && attr(img, "title", img_title_value); }, d(detaching) { detaching && detach(div1), mounted = !1, run_all(dispose); } }; } function create_if_block_13(ctx) { let div, span, t0, html_tag, t1, raw_value = ctx[31](ctx[12].length) + "", each_value_5 = ctx[12], each_blocks = []; for (let i = 0; i < each_value_5.length; i += 1) each_blocks[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i)); return { c() { div = element("div"), span = element("span"), t0 = text("Frequently Used"), html_tag = new HtmlTag(!1), t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); html_tag.a = null, attr(span, "id", "pfrequentlyused"), attr(div, "class", "pack"); }, m(target, anchor) { insert(target, div, anchor), append(div, span), append(span, t0), html_tag.m(raw_value, span), append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div, null); }, p(ctx, dirty) { if (4096 & dirty[0] && raw_value !== (raw_value = ctx[31](ctx[12].length) + "") && html_tag.p(raw_value), 1006645504 & dirty[0]) { let i; for (each_value_5 = ctx[12], i = 0; i < each_value_5.length; i += 1) { const child_ctx = get_each_context_5(ctx, each_value_5, i); each_blocks[i] ? each_blocks[i].p(child_ctx, dirty) : (each_blocks[i] = create_each_block_5(child_ctx), each_blocks[i].c(), each_blocks[i].m(div, null)); } for (;i < each_blocks.length; i += 1) each_blocks[i].d(1); each_blocks.length = each_value_5.length; } }, d(detaching) { detaching && detach(div), destroy_each(each_blocks, detaching); } }; } function create_else_block_2(ctx) { let div, mounted, dispose; function click_handler_4() { return ctx[57](ctx[177]); } return { c() { div = element("div"), div.innerHTML = '', attr(div, "class", "deleteFavorite"), attr(div, "title", "Unfavorite"); }, m(target, anchor) { insert(target, div, anchor), mounted || (dispose = listen(div, "click", click_handler_4), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(div), mounted = !1, dispose(); } }; } function create_if_block_14(ctx) { let div, mounted, dispose; function click_handler_3() { return ctx[56](ctx[177]); } return { c() { div = element("div"), div.innerHTML = '', attr(div, "class", "addFavorite"), attr(div, "title", "Favorite"); }, m(target, anchor) { insert(target, div, anchor), mounted || (dispose = listen(div, "click", click_handler_3), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(div), mounted = !1, dispose(); } }; } function create_each_block_5(ctx) { let div, img, img_src_value, img_alt_value, img_title_value, t0, show_if, t1, mounted, dispose; function func_1(...args) { return ctx[52](ctx[177], ...args); } function click_handler_2(...args) { return ctx[55](ctx[177], ...args); } function select_block_type(ctx, dirty) { return 4352 & dirty[0] && (show_if = null), null == show_if && (show_if = !(-1 !== ctx[8].findIndex(func_1))), show_if ? create_if_block_14 : create_else_block_2; } let current_block_type = select_block_type(ctx, [ -1, -1, -1, -1, -1, -1 ]), if_block = current_block_type(ctx); return { c() { div = element("div"), img = element("img"), t0 = space(), if_block.c(), t1 = space(), attr(img, "class", "image"), src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[177].pack, ctx[177].id)) || attr(img, "src", img_src_value), attr(img, "alt", img_alt_value = ctx[177].pack + " - " + ctx[177].id), attr(img, "title", img_title_value = (ctx[13][ctx[177].pack] ? ctx[13][ctx[177].pack].name + " – " : "") + "Used: " + ctx[177].used), attr(div, "class", "sticker"); }, m(target, anchor) { insert(target, div, anchor), append(div, img), append(div, t0), if_block.m(div, null), append(div, t1), mounted || (dispose = listen(img, "click", click_handler_2), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx, 4096 & dirty[0] && !src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[177].pack, ctx[177].id)) && attr(img, "src", img_src_value), 4096 & dirty[0] && img_alt_value !== (img_alt_value = ctx[177].pack + " - " + ctx[177].id) && attr(img, "alt", img_alt_value), 12288 & dirty[0] && img_title_value !== (img_title_value = (ctx[13][ctx[177].pack] ? ctx[13][ctx[177].pack].name + " – " : "") + "Used: " + ctx[177].used) && attr(img, "title", img_title_value), current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block ? if_block.p(ctx, dirty) : (if_block.d(1), if_block = current_block_type(ctx), if_block && (if_block.c(), if_block.m(div, t1))); }, d(detaching) { detaching && detach(div), if_block.d(), mounted = !1, dispose(); } }; } function create_else_block_1(ctx) { let div, mounted, dispose; function click_handler_7() { return ctx[60](ctx[170], ctx[177]); } return { c() { div = element("div"), div.innerHTML = '', attr(div, "class", "deleteFavorite"), attr(div, "title", "Unfavorite"); }, m(target, anchor) { insert(target, div, anchor), mounted || (dispose = listen(div, "click", click_handler_7), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(div), mounted = !1, dispose(); } }; } function create_if_block_12(ctx) { let div, mounted, dispose; function click_handler_6() { return ctx[59](ctx[170], ctx[177]); } return { c() { div = element("div"), div.innerHTML = '', attr(div, "class", "addFavorite"), attr(div, "title", "Favorite"); }, m(target, anchor) { insert(target, div, anchor), mounted || (dispose = listen(div, "click", click_handler_6), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(div), mounted = !1, dispose(); } }; } function create_each_block_4(ctx) { let div, img, img_src_value, img_alt_value, t, show_if, mounted, dispose; function func(...args) { return ctx[51](ctx[170], ctx[177], ...args); } function click_handler_5(...args) { return ctx[58](ctx[170], ctx[177], ...args); } function select_block_type_1(ctx, dirty) { return 768 & dirty[0] && (show_if = null), null == show_if && (show_if = !(-1 !== ctx[8].findIndex(func))), show_if ? create_if_block_12 : create_else_block_1; } let current_block_type = select_block_type_1(ctx, [ -1, -1, -1, -1, -1, -1 ]), if_block = current_block_type(ctx); return { c() { div = element("div"), img = element("img"), t = space(), if_block.c(), attr(img, "class", "image"), src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[170].id, ctx[177], !1, ctx[174])) || attr(img, "src", img_src_value), attr(img, "alt", img_alt_value = ctx[170].id + " - " + ctx[177]), attr(div, "class", "sticker"); }, m(target, anchor) { insert(target, div, anchor), append(div, img), append(div, t), if_block.m(div, null), mounted || (dispose = listen(img, "click", click_handler_5), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx, 512 & dirty[0] && !src_url_equal(img.src, img_src_value = "" + ctx[26](ctx[170].id, ctx[177], !1, ctx[174])) && attr(img, "src", img_src_value), 512 & dirty[0] && img_alt_value !== (img_alt_value = ctx[170].id + " - " + ctx[177]) && attr(img, "alt", img_alt_value), current_block_type === (current_block_type = select_block_type_1(ctx, dirty)) && if_block ? if_block.p(ctx, dirty) : (if_block.d(1), if_block = current_block_type(ctx), if_block && (if_block.c(), if_block.m(div, null))); }, d(detaching) { detaching && detach(div), if_block.d(), mounted = !1, dispose(); } }; } function create_each_block_3(ctx) { let div, span, t0, html_tag, span_id_value, t1, t2, t0_value = ctx[170].name + "", raw_value = ctx[31](ctx[170].files.length) + "", each_value_4 = ctx[170].files, each_blocks = []; for (let i = 0; i < each_value_4.length; i += 1) each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i)); return { c() { div = element("div"), span = element("span"), t0 = text(t0_value), html_tag = new HtmlTag(!1), t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); t2 = space(), html_tag.a = null, attr(span, "id", span_id_value = "p" + ctx[170].id), attr(div, "class", "pack"); }, m(target, anchor) { insert(target, div, anchor), append(div, span), append(span, t0), html_tag.m(raw_value, span), append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div, null); append(div, t2); }, p(ctx, dirty) { if (512 & dirty[0] && t0_value !== (t0_value = ctx[170].name + "") && set_data(t0, t0_value), 512 & dirty[0] && raw_value !== (raw_value = ctx[31](ctx[170].files.length) + "") && html_tag.p(raw_value), 512 & dirty[0] && span_id_value !== (span_id_value = "p" + ctx[170].id) && attr(span, "id", span_id_value), 1006633728 & dirty[0]) { let i; for (each_value_4 = ctx[170].files, i = 0; i < each_value_4.length; i += 1) { const child_ctx = get_each_context_4(ctx, each_value_4, i); each_blocks[i] ? each_blocks[i].p(child_ctx, dirty) : (each_blocks[i] = create_each_block_4(child_ctx), each_blocks[i].c(), each_blocks[i].m(div, t2)); } for (;i < each_blocks.length; i += 1) each_blocks[i].d(1); each_blocks.length = each_value_4.length; } }, d(detaching) { detaching && detach(div), destroy_each(each_blocks, detaching); } }; } function create_if_block_10(ctx) { let div1, mounted, dispose; return { c() { div1 = element("div"), div1.innerHTML = '
', attr(div1, "class", "pack"), attr(div1, "title", "Frequently Used"); }, m(target, anchor) { insert(target, div1, anchor), mounted || (dispose = listen(div1, "click", ctx[63]), mounted = !0); }, p: noop, d(detaching) { detaching && detach(div1), mounted = !1, dispose(); } }; } function create_each_block_2(ctx) { let div, div_title_value, mounted, dispose; function click_handler_11() { return ctx[64](ctx[170]); } return { c() { div = element("div"), attr(div, "class", "pack"), attr(div, "title", div_title_value = ctx[170].name), set_style(div, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`); }, m(target, anchor) { insert(target, div, anchor), mounted || (dispose = listen(div, "click", click_handler_11), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx, 512 & dirty[0] && div_title_value !== (div_title_value = ctx[170].name) && attr(div, "title", div_title_value), 512 & dirty[0] && set_style(div, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`); }, d(detaching) { detaching && detach(div), mounted = !1, dispose(); } }; } function create_if_block_5(ctx) { let div, div_style_value, each_blocks = [], each_1_lookup = new Map, each_value_1 = ctx[9]; const get_key = ctx => ctx[170].id; for (let i = 0; i < each_value_1.length; i += 1) { let child_ctx = get_each_context_1(ctx, each_value_1, i), key = get_key(child_ctx); each_1_lookup.set(key, each_blocks[i] = create_each_block_1(key, child_ctx)); } return { c() { div = element("div"); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); attr(div, "class", "tab-content has-scroll-y"), attr(div, "style", div_style_value = 0 === ctx[7] ? "" : "display: none;"); }, m(target, anchor) { insert(target, div, anchor); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div, null); }, p(ctx, dirty) { 110117376 & dirty[0] | 418 & dirty[1] && (each_value_1 = ctx[9], each_blocks = function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { let o = old_blocks.length, n = list.length, i = o; const old_indexes = {}; for (;i--; ) old_indexes[old_blocks[i].key] = i; const new_blocks = [], new_lookup = new Map, deltas = new Map; for (i = n; i--; ) { const child_ctx = get_context(ctx, list, i), key = get_key(child_ctx); let block = lookup.get(key); block ? dynamic && block.p(child_ctx, dirty) : (block = create_each_block(key, child_ctx), block.c()), new_lookup.set(key, new_blocks[i] = block), key in old_indexes && deltas.set(key, Math.abs(i - old_indexes[key])); } const will_move = new Set, did_move = new Set; function insert(block) { transition_in(block, 1), block.m(node, next), lookup.set(block.key, block), next = block.first, n--; } for (;o && n; ) { const new_block = new_blocks[n - 1], old_block = old_blocks[o - 1], new_key = new_block.key, old_key = old_block.key; new_block === old_block ? (next = new_block.first, o--, n--) : new_lookup.has(old_key) ? !lookup.has(new_key) || will_move.has(new_key) ? insert(new_block) : did_move.has(old_key) ? o-- : deltas.get(new_key) > deltas.get(old_key) ? (did_move.add(new_key), insert(new_block)) : (will_move.add(old_key), o--) : (destroy(old_block, lookup), o--); } for (;o--; ) { const old_block = old_blocks[o]; new_lookup.has(old_block.key) || destroy(old_block, lookup); } for (;n; ) insert(new_blocks[n - 1]); return new_blocks; }(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, div, destroy_block, create_each_block_1, null, get_each_context_1)), 128 & dirty[0] && div_style_value !== (div_style_value = 0 === ctx[7] ? "" : "display: none;") && attr(div, "style", div_style_value); }, d(detaching) { detaching && detach(div); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(); } }; } function create_if_block_9(ctx) { let div, input, input_data_pack_value, input_value_value, mounted, dispose; return { c() { div = element("div"), input = element("input"), attr(input, "class", "inputPackIndex"), attr(input, "type", "text"), attr(input, "data-pack", input_data_pack_value = ctx[170].id), input.value = input_value_value = ctx[174] + 1, attr(div, "class", "index"); }, m(target, anchor) { insert(target, div, anchor), append(div, input), mounted || (dispose = [ listen(input, "click", click_handler_16), listen(input, "keypress", ctx[36]) ], mounted = !0); }, p(ctx, dirty) { 512 & dirty[0] && input_data_pack_value !== (input_data_pack_value = ctx[170].id) && attr(input, "data-pack", input_data_pack_value), 512 & dirty[0] && input_value_value !== (input_value_value = ctx[174] + 1) && input.value !== input_value_value && (input.value = input_value_value); }, d(detaching) { detaching && detach(div), mounted = !1, run_all(dispose); } }; } function create_if_block_6(ctx) { let t, if_block1_anchor, show_if = ctx[23](ctx[170].id), if_block0 = show_if && create_if_block_8(ctx), if_block1 = ctx[14][ctx[170].id].updateUrl && create_if_block_7(ctx); return { c() { if_block0 && if_block0.c(), t = space(), if_block1 && if_block1.c(), if_block1_anchor = function empty() { return text(""); }(); }, m(target, anchor) { if_block0 && if_block0.m(target, anchor), insert(target, t, anchor), if_block1 && if_block1.m(target, anchor), insert(target, if_block1_anchor, anchor); }, p(ctx, dirty) { 512 & dirty[0] && (show_if = ctx[23](ctx[170].id)), show_if ? if_block0 ? if_block0.p(ctx, dirty) : (if_block0 = create_if_block_8(ctx), if_block0.c(), if_block0.m(t.parentNode, t)) : if_block0 && (if_block0.d(1), if_block0 = null), ctx[14][ctx[170].id].updateUrl ? if_block1 ? if_block1.p(ctx, dirty) : (if_block1 = create_if_block_7(ctx), if_block1.c(), if_block1.m(if_block1_anchor.parentNode, if_block1_anchor)) : if_block1 && (if_block1.d(1), if_block1 = null); }, d(detaching) { if_block0 && if_block0.d(detaching), detaching && detach(t), if_block1 && if_block1.d(detaching), detaching && detach(if_block1_anchor); } }; } function create_if_block_8(ctx) { let button, mounted, dispose; function click_handler_18() { return ctx[70](ctx[170]); } return { c() { button = element("button"), button.textContent = "i", attr(button, "class", "button pack-info"), attr(button, "title", "Info"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_18), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_if_block_7(ctx) { let button, mounted, dispose; function click_handler_19() { return ctx[71](ctx[170]); } return { c() { button = element("button"), button.textContent = "Up", attr(button, "class", "button update-pack"), attr(button, "title", "Update"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_19), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_each_block_1(key_1, ctx) { let div3, t0, div0, t1, div1, span0, t2, span0_title_value, t3, span1, t4, t5, html_tag, t6, div2, button, t8, div2_class_value, t9, mounted, dispose, t2_value = ctx[170].name + "", t4_value = ctx[170].count + "", raw_value = (ctx[20].showPackAppendix ? ctx[32](ctx[170].id) : "") + "", if_block0 = ctx[9].length > 1 && create_if_block_9(ctx); function click_handler_17() { return ctx[69](ctx[170]); } let if_block1 = ctx[14][ctx[170].id] && create_if_block_6(ctx); return { key: key_1, first: null, c() { div3 = element("div"), if_block0 && if_block0.c(), t0 = space(), div0 = element("div"), t1 = space(), div1 = element("div"), span0 = element("span"), t2 = text(t2_value), t3 = space(), span1 = element("span"), t4 = text(t4_value), t5 = text(" stickers"), html_tag = new HtmlTag(!1), t6 = space(), div2 = element("div"), button = element("button"), button.textContent = "Del", t8 = space(), if_block1 && if_block1.c(), t9 = space(), attr(div0, "class", "preview"), set_style(div0, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`), attr(span0, "title", span0_title_value = ctx[20].showPackAppendix ? "" : "ID: " + ctx[170].id), html_tag.a = null, attr(div1, "class", "info"), attr(button, "class", "button is-danger"), attr(button, "title", "Unsubscribe"), attr(div2, "class", div2_class_value = "action" + (ctx[14][ctx[170].id] && (ctx[23](ctx[170].id) || ctx[14][ctx[170].id].updateUrl) ? " is-tight" : "")), attr(div3, "class", "pack"), this.first = div3; }, m(target, anchor) { insert(target, div3, anchor), if_block0 && if_block0.m(div3, null), append(div3, t0), append(div3, div0), append(div3, t1), append(div3, div1), append(div1, span0), append(span0, t2), append(div1, t3), append(div1, span1), append(span1, t4), append(span1, t5), html_tag.m(raw_value, span1), append(div3, t6), append(div3, div2), append(div2, button), append(div2, t8), if_block1 && if_block1.m(div2, null), append(div3, t9), mounted || (dispose = listen(button, "click", click_handler_17), mounted = !0); }, p(new_ctx, dirty) { (ctx = new_ctx)[9].length > 1 ? if_block0 ? if_block0.p(ctx, dirty) : (if_block0 = create_if_block_9(ctx), if_block0.c(), if_block0.m(div3, t0)) : if_block0 && (if_block0.d(1), if_block0 = null), 512 & dirty[0] && set_style(div0, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`), 512 & dirty[0] && t2_value !== (t2_value = ctx[170].name + "") && set_data(t2, t2_value), 1049088 & dirty[0] && span0_title_value !== (span0_title_value = ctx[20].showPackAppendix ? "" : "ID: " + ctx[170].id) && attr(span0, "title", span0_title_value), 512 & dirty[0] && t4_value !== (t4_value = ctx[170].count + "") && set_data(t4, t4_value), 1049088 & dirty[0] && raw_value !== (raw_value = (ctx[20].showPackAppendix ? ctx[32](ctx[170].id) : "") + "") && html_tag.p(raw_value), ctx[14][ctx[170].id] ? if_block1 ? if_block1.p(ctx, dirty) : (if_block1 = create_if_block_6(ctx), if_block1.c(), if_block1.m(div2, null)) : if_block1 && (if_block1.d(1), if_block1 = null), 16896 & dirty[0] && div2_class_value !== (div2_class_value = "action" + (ctx[14][ctx[170].id] && (ctx[23](ctx[170].id) || ctx[14][ctx[170].id].updateUrl) ? " is-tight" : "")) && attr(div2, "class", div2_class_value); }, d(detaching) { detaching && detach(div3), if_block0 && if_block0.d(), if_block1 && if_block1.d(), mounted = !1, dispose(); } }; } function create_if_block(ctx) { let div, each_value = ctx[11], each_blocks = []; for (let i = 0; i < each_value.length; i += 1) each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); return { c() { div = element("div"); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); attr(div, "class", "packs has-scroll-y"), attr(div, "style", ""); }, m(target, anchor) { insert(target, div, anchor); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div, null); }, p(ctx, dirty) { if (126897152 & dirty[0] | 450 & dirty[1]) { let i; for (each_value = ctx[11], i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context(ctx, each_value, i); each_blocks[i] ? each_blocks[i].p(child_ctx, dirty) : (each_blocks[i] = create_each_block(child_ctx), each_blocks[i].c(), each_blocks[i].m(div, null)); } for (;i < each_blocks.length; i += 1) each_blocks[i].d(1); each_blocks.length = each_value.length; } }, d(detaching) { detaching && detach(div), destroy_each(each_blocks, detaching); } }; } function create_else_block(ctx) { let button, mounted, dispose; function click_handler_21() { return ctx[74](ctx[170]); } return { c() { button = element("button"), button.textContent = "Add", attr(button, "class", "button is-primary"), attr(button, "title", "Subscribe"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_21), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_if_block_4(ctx) { let button, mounted, dispose; function click_handler_20() { return ctx[73](ctx[170]); } return { c() { button = element("button"), button.textContent = "Del", attr(button, "class", "button is-danger"), attr(button, "title", "Unsubscribe"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_20), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_if_block_1(ctx) { let t0, t1, button, mounted, dispose, show_if = ctx[23](ctx[170].id), if_block0 = show_if && create_if_block_3(ctx), if_block1 = ctx[14][ctx[170].id].updateUrl && create_if_block_2(ctx); function click_handler_24() { return ctx[77](ctx[170]); } return { c() { if_block0 && if_block0.c(), t0 = space(), if_block1 && if_block1.c(), t1 = space(), button = element("button"), attr(button, "class", "button delete-pack is-danger"), attr(button, "title", "Purge"); }, m(target, anchor) { if_block0 && if_block0.m(target, anchor), insert(target, t0, anchor), if_block1 && if_block1.m(target, anchor), insert(target, t1, anchor), insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_24), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx, 2048 & dirty[0] && (show_if = ctx[23](ctx[170].id)), show_if ? if_block0 ? if_block0.p(ctx, dirty) : (if_block0 = create_if_block_3(ctx), if_block0.c(), if_block0.m(t0.parentNode, t0)) : if_block0 && (if_block0.d(1), if_block0 = null), ctx[14][ctx[170].id].updateUrl ? if_block1 ? if_block1.p(ctx, dirty) : (if_block1 = create_if_block_2(ctx), if_block1.c(), if_block1.m(t1.parentNode, t1)) : if_block1 && (if_block1.d(1), if_block1 = null); }, d(detaching) { if_block0 && if_block0.d(detaching), detaching && detach(t0), if_block1 && if_block1.d(detaching), detaching && detach(t1), detaching && detach(button), mounted = !1, dispose(); } }; } function create_if_block_3(ctx) { let button, mounted, dispose; function click_handler_22() { return ctx[75](ctx[170]); } return { c() { button = element("button"), button.textContent = "i", attr(button, "class", "button pack-info"), attr(button, "title", "Info"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_22), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_if_block_2(ctx) { let button, mounted, dispose; function click_handler_23() { return ctx[76](ctx[170]); } return { c() { button = element("button"), button.textContent = "Up", attr(button, "class", "button update-pack"), attr(button, "title", "Update"); }, m(target, anchor) { insert(target, button, anchor), mounted || (dispose = listen(button, "click", click_handler_23), mounted = !0); }, p(new_ctx, dirty) { ctx = new_ctx; }, d(detaching) { detaching && detach(button), mounted = !1, dispose(); } }; } function create_each_block(ctx) { let div3, div0, t0, div1, span0, t1, span0_title_value, t2, span1, t3, t4, html_tag, t5, div2, show_if, t6, div2_class_value, t7, t1_value = ctx[170].name + "", t3_value = ctx[170].count + "", raw_value = (ctx[20].showPackAppendix ? ctx[32](ctx[170].id) : "") + ""; function select_block_type_2(ctx, dirty) { return 3072 & dirty[0] && (show_if = null), null == show_if && (show_if = !!ctx[10].includes(ctx[170].id)), show_if ? create_if_block_4 : create_else_block; } let current_block_type = select_block_type_2(ctx, [ -1, -1, -1, -1, -1, -1 ]), if_block0 = current_block_type(ctx), if_block1 = ctx[14][ctx[170].id] && create_if_block_1(ctx); return { c() { div3 = element("div"), div0 = element("div"), t0 = space(), div1 = element("div"), span0 = element("span"), t1 = text(t1_value), t2 = space(), span1 = element("span"), t3 = text(t3_value), t4 = text(" stickers"), html_tag = new HtmlTag(!1), t5 = space(), div2 = element("div"), if_block0.c(), t6 = space(), if_block1 && if_block1.c(), t7 = space(), attr(div0, "class", "preview"), set_style(div0, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`), attr(span0, "title", span0_title_value = ctx[20].showPackAppendix ? "" : "ID: " + ctx[170].id), html_tag.a = null, attr(div1, "class", "info"), attr(div2, "class", div2_class_value = "action" + (ctx[14][ctx[170].id] ? " is-tight" : "")), attr(div3, "class", "pack"); }, m(target, anchor) { insert(target, div3, anchor), append(div3, div0), append(div3, t0), append(div3, div1), append(div1, span0), append(span0, t1), append(div1, t2), append(div1, span1), append(span1, t3), append(span1, t4), html_tag.m(raw_value, span1), append(div3, t5), append(div3, div2), if_block0.m(div2, null), append(div2, t6), if_block1 && if_block1.m(div2, null), append(div3, t7); }, p(ctx, dirty) { 2048 & dirty[0] && set_style(div0, "background-image", `url(${ctx[26](ctx[170].id, ctx[170].files[0], !1, 0)})`), 2048 & dirty[0] && t1_value !== (t1_value = ctx[170].name + "") && set_data(t1, t1_value), 1050624 & dirty[0] && span0_title_value !== (span0_title_value = ctx[20].showPackAppendix ? "" : "ID: " + ctx[170].id) && attr(span0, "title", span0_title_value), 2048 & dirty[0] && t3_value !== (t3_value = ctx[170].count + "") && set_data(t3, t3_value), 1050624 & dirty[0] && raw_value !== (raw_value = (ctx[20].showPackAppendix ? ctx[32](ctx[170].id) : "") + "") && html_tag.p(raw_value), current_block_type === (current_block_type = select_block_type_2(ctx, dirty)) && if_block0 ? if_block0.p(ctx, dirty) : (if_block0.d(1), if_block0 = current_block_type(ctx), if_block0 && (if_block0.c(), if_block0.m(div2, t6))), ctx[14][ctx[170].id] ? if_block1 ? if_block1.p(ctx, dirty) : (if_block1 = create_if_block_1(ctx), if_block1.c(), if_block1.m(div2, null)) : if_block1 && (if_block1.d(1), if_block1 = null), 18432 & dirty[0] && div2_class_value !== (div2_class_value = "action" + (ctx[14][ctx[170].id] ? " is-tight" : "")) && attr(div2, "class", div2_class_value); }, d(detaching) { detaching && detach(div3), if_block0.d(), if_block1 && if_block1.d(); } }; } function create_fragment$1(ctx) { let main_1, div28, div27, div0, t0, t1, t2, div0_class_value, t3, div7, div4, div3, div2, t4, t5, t6, div6, div5, div7_class_value, t7, div26, div24, div23, div12, div8, t9, div9, t11, div10, t13, div11, t15, t16, div13, input0, t17, div13_style_value, t18, div16, div14, p0, t20, p1, t24, p2, t26, p3, textarea0, t27, button0, t29, div15, p4, t31, p5, t36, p6, t39, p7, textarea1, t40, button1, t42, p8, input1, t43, button2, t45, p9, button3, div16_style_value, t47, div22, div17, p10, button4, t49, div18, p11, t51, p12, label0, input2, t52, t53, p13, label1, input3, t54, code0, t56, t57, p14, label2, input4, t58, t59, p15, label3, input5, t60, t61, p16, label4, input6, t62, t63, p17, label5, input7, t64, t65, p18, label6, input8, t66, code1, t68, t69, p19, label7, input9, t70, t71, p20, label8, input10, t72, t73, p21, label9, input11, t74, code2, t76, t77, p22, label10, input12, t78, t79, p23, label11, input13, t80, t81, p24, label12, input14, t82, t83, p25, label13, input15, t84, t85, p26, label14, input16, t86, t87, div19, p27, t89, p28, t91, p29, t95, p30, input17, t96, button5, t98, div20, p31, t100, p32, t102, p33, t108, p34, t115, p35, input18, t116, button6, t118, div21, p36, t120, p37, input19, t121, button7, t123, p38, button8, div22_style_value, t125, div25, div26_style_value, div27_style_value, div28_style_value, mounted, dispose, if_block0 = !ctx[8].length && !ctx[9].length && create_if_block_16(), if_block1 = ctx[8].length && create_if_block_15(ctx), if_block2 = ctx[12].length && create_if_block_13(ctx), each_value_3 = ctx[9], each_blocks_1 = []; for (let i = 0; i < each_value_3.length; i += 1) each_blocks_1[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); let if_block3 = ctx[28].length && function create_if_block_11(ctx) { let div1, mounted, dispose; return { c() { div1 = element("div"), div1.innerHTML = '', attr(div1, "class", "pack"), attr(div1, "title", "Favorites"); }, m(target, anchor) { insert(target, div1, anchor), mounted || (dispose = listen(div1, "click", ctx[62]), mounted = !0); }, p: noop, d(detaching) { detaching && detach(div1), mounted = !1, dispose(); } }; }(ctx), if_block4 = ctx[12].length && create_if_block_10(ctx), each_value_2 = ctx[9], each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); let if_block5 = ctx[6][0] && create_if_block_5(ctx), if_block6 = ctx[6][1] && create_if_block(ctx); return { c() { main_1 = element("main"), div28 = element("div"), div27 = element("div"), div0 = element("div"), if_block0 && if_block0.c(), t0 = space(), if_block1 && if_block1.c(), t1 = space(), if_block2 && if_block2.c(), t2 = space(); for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); t3 = space(), div7 = element("div"), div4 = element("div"), div3 = element("div"), div2 = element("div"), div2.innerHTML = '', t4 = space(), if_block3 && if_block3.c(), t5 = space(), if_block4 && if_block4.c(), t6 = space(), div6 = element("div"), div5 = element("div"); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); t7 = space(), div26 = element("div"), div24 = element("div"), div23 = element("div"), div12 = element("div"), div8 = element("div"), div8.textContent = "Installed", t9 = space(), div9 = element("div"), div9.textContent = "Packs", t11 = space(), div10 = element("div"), div10.textContent = "Import", t13 = space(), div11 = element("div"), div11.textContent = "Misc", t15 = space(), if_block5 && if_block5.c(), t16 = space(), div13 = element("div"), input0 = element("input"), t17 = space(), if_block6 && if_block6.c(), t18 = space(), div16 = element("div"), div14 = element("div"), p0 = element("p"), p0.textContent = "LINE Store Proxy", t20 = space(), p1 = element("p"), p1.innerHTML = 'If you are looking for stickers pack that are not provided by Magane, you can go to the LINE Store, pick whichever packs you want, then paste their full URLs in the box below (separated by new lines).', t24 = space(), p2 = element("p"), p2.textContent = "e.g. https://store.line.me/stickershop/product/17573/ja", t26 = space(), p3 = element("p"), textarea0 = element("textarea"), t27 = space(), button0 = element("button"), button0.textContent = "Add", t29 = space(), div15 = element("div"), p4 = element("p"), p4.textContent = "Remote Packs", t31 = space(), p5 = element("p"), p5.innerHTML = 'You can paste URLs to JSON config files of remote packs in here (separated by new lines).0
to completely disable the section and stickers usage counter.",
t95 = space(), p30 = element("p"), input17 = element("input"), t96 = space(), button5 = element("button"),
button5.textContent = "Set", t98 = space(), div20 = element("div"), p31 = element("p"),
p31.textContent = "Hotkey", t100 = space(), p32 = element("p"), p32.innerHTML = 'See a full list of key values.',
t102 = space(), p33 = element("p"), p33.innerHTML = "Ignore notes that will not affect Chromium. Additionally, this may not have full support for everything in the documentation above, but this does support some degree of combinations of modifier keys (Ctrl
, Alt
, etc.) + other keys.",
t108 = space(), p34 = element("p"), p34.innerHTML = "e.g. M
, Ctrl+Q
, Alt+Shift+Y
",
t115 = space(), p35 = element("p"), input18 = element("input"), t116 = space(),
button6 = element("button"), button6.textContent = "Set", t118 = space(), div21 = element("div"),
p36 = element("p"), p36.textContent = "Database", t120 = space(), p37 = element("p"),
input19 = element("input"), t121 = space(), button7 = element("button"), button7.textContent = "Replace Database",
t123 = space(), p38 = element("p"), button8 = element("button"), button8.textContent = "Export Database",
t125 = space(), div25 = element("div"), attr(div0, "class", div0_class_value = "stickers has-scroll-y " + (ctx[20].useLeftToolbar ? "has-left-toolbar" : "")),
attr(div0, "style", ""), attr(div2, "class", "pack"), attr(div2, "title", "Manage subscribed packs"),
attr(div3, "class", "packs-wrapper"), attr(div4, "class", "packs packs-controls"),
attr(div5, "class", "packs-wrapper"), attr(div6, "class", "packs"), attr(div6, "style", ""),
attr(div7, "class", div7_class_value = "packs-toolbar " + (ctx[20].useLeftToolbar ? "has-scroll-y" : "has-scroll-x")),
attr(div8, "class", "tab"), toggle_class(div8, "is-active", 0 === ctx[7]), attr(div9, "class", "tab"),
toggle_class(div9, "is-active", 1 === ctx[7]), attr(div10, "class", "tab"), toggle_class(div10, "is-active", 2 === ctx[7]),
attr(div11, "class", "tab"), toggle_class(div11, "is-active", 3 === ctx[7]), attr(div12, "class", "tabs"),
attr(input0, "class", "inputQuery"), attr(input0, "type", "text"), attr(input0, "placeholder", "Search"),
attr(div13, "class", "tab-content avail-packs"), attr(div13, "style", div13_style_value = 1 === ctx[7] ? "" : "display: none;"),
attr(p0, "class", "section-title"), attr(textarea0, "autocomplete", "off"), attr(textarea0, "class", "inputQuery"),
attr(textarea0, "placeholder", "LINE Sticker Pack URLs"), attr(button0, "class", "button is-primary"),
attr(p3, "class", "input-grouped"), attr(div14, "class", "section line-proxy"),
attr(p4, "class", "section-title"), attr(textarea1, "autocomplete", "off"), attr(textarea1, "class", "inputQuery"),
attr(textarea1, "placeholder", "Remote Pack JSON or Chibisafe Album URLs"), attr(button1, "class", "button is-primary"),
attr(p7, "class", "input-grouped"), attr(input1, "id", "localRemotePackInput"),
attr(input1, "type", "file"), input1.multiple = !0, set_style(input1, "display", "none"),
attr(input1, "accept", "application/JSON"), attr(button2, "class", "button has-width-full"),
attr(button3, "class", "button is-primary has-width-full"), attr(div15, "class", "section remote-packs"),
attr(div16, "class", "tab-content has-scroll-y import"), attr(div16, "style", div16_style_value = 2 === ctx[7] ? "" : "display: none;"),
attr(button4, "class", "button has-width-full"), attr(div17, "class", "section checkupdate"),
attr(p11, "class", "section-title"), attr(input2, "name", "disableUpdateCheck"),
attr(input2, "type", "checkbox"), attr(input3, "name", "enableWindowMagane"), attr(input3, "type", "checkbox"),
attr(input4, "name", "disableToasts"), attr(input4, "type", "checkbox"), attr(input5, "name", "closeWindowOnSend"),
attr(input5, "type", "checkbox"), attr(input6, "name", "useLeftToolbar"), attr(input6, "type", "checkbox"),
attr(input7, "name", "showPackAppendix"), attr(input7, "type", "checkbox"), attr(input8, "name", "disableDownscale"),
attr(input8, "type", "checkbox"), attr(input9, "name", "disableUploadObfuscation"),
attr(input9, "type", "checkbox"), attr(input10, "name", "alwaysSendAsLink"), attr(input10, "type", "checkbox"),
attr(input11, "name", "maskStickerLink"), attr(input11, "type", "checkbox"), attr(input12, "name", "ctrlInvertSendBehavior"),
attr(input12, "type", "checkbox"), attr(input13, "name", "ignoreEmbedLinksPermission"),
attr(input13, "type", "checkbox"), attr(input14, "name", "markAsSpoiler"), attr(input14, "type", "checkbox"),
attr(input15, "name", "ignoreViewportSize"), attr(input15, "type", "checkbox"),
attr(input16, "name", "disableSendingWithChatInput"), attr(input16, "type", "checkbox"),
attr(div18, "class", "section settings"), attr(p27, "class", "section-title"), attr(input17, "class", "inputQuery supress-magane-hotkey"),
attr(input17, "type", "text"), attr(button5, "class", "button is-primary"), attr(p30, "class", "input-grouped"),
attr(div19, "class", "section frequently-used"), attr(p31, "class", "section-title"),
attr(input18, "class", "inputQuery supress-magane-hotkey"), attr(input18, "type", "text"),
attr(button6, "class", "button is-primary"), attr(p35, "class", "input-grouped"),
attr(div20, "class", "section hotkey"), attr(p36, "class", "section-title"), attr(input19, "id", "replaceDatabaseInput"),
attr(input19, "type", "file"), set_style(input19, "display", "none"), attr(input19, "accept", "application/JSON"),
attr(button7, "class", "button is-danger has-width-full"), attr(button8, "class", "button is-primary has-width-full"),
attr(div21, "class", "section database"), attr(div22, "class", "tab-content has-scroll-y misc"),
attr(div22, "style", div22_style_value = 3 === ctx[7] ? "" : "display: none;"),
attr(div23, "class", "stickersConfig"), attr(div24, "class", "modal-content"), attr(div25, "class", "modal-close"),
attr(div26, "class", "stickersModal"), attr(div26, "style", div26_style_value = ctx[5] ? "" : "display: none;"),
attr(div27, "class", "stickerWindow"), attr(div27, "style", div27_style_value = "bottom: " + ctx[1].wbottom + "px; right: " + ctx[1].wright + "px; " + (ctx[4] ? "" : "display: none;")),
attr(div28, "id", "magane"), attr(div28, "style", div28_style_value = (ctx[0] === ctx[21].LEGACY ? `top: ${ctx[1].top}px; left: ${ctx[1].left}px;` : "") + " " + (ctx[3] ? "display: none;" : ""));
},
m(target, anchor) {
insert(target, main_1, anchor), append(main_1, div28), append(div28, div27), append(div27, div0),
if_block0 && if_block0.m(div0, null), append(div0, t0), if_block1 && if_block1.m(div0, null),
append(div0, t1), if_block2 && if_block2.m(div0, null), append(div0, t2);
for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(div0, null);
append(div27, t3), append(div27, div7), append(div7, div4), append(div4, div3),
append(div3, div2), append(div3, t4), if_block3 && if_block3.m(div3, null), append(div3, t5),
if_block4 && if_block4.m(div3, null), append(div7, t6), append(div7, div6), append(div6, div5);
for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(div5, null);
append(div27, t7), append(div27, div26), append(div26, div24), append(div24, div23),
append(div23, div12), append(div12, div8), append(div12, t9), append(div12, div9),
append(div12, t11), append(div12, div10), append(div12, t13), append(div12, div11),
append(div23, t15), if_block5 && if_block5.m(div23, null), append(div23, t16), append(div23, div13),
append(div13, input0), set_input_value(input0, ctx[19]), append(div13, t17), if_block6 && if_block6.m(div13, null),
append(div23, t18), append(div23, div16), append(div16, div14), append(div14, p0),
append(div14, t20), append(div14, p1), append(div14, t24), append(div14, p2), append(div14, t26),
append(div14, p3), append(p3, textarea0), set_input_value(textarea0, ctx[15]), append(p3, t27),
append(p3, button0), append(div16, t29), append(div16, div15), append(div15, p4),
append(div15, t31), append(div15, p5), append(div15, t36), append(div15, p6), append(div15, t39),
append(div15, p7), append(p7, textarea1), set_input_value(textarea1, ctx[16]), append(p7, t40),
append(p7, button1), append(div15, t42), append(div15, p8), append(p8, input1),
append(p8, t43), append(p8, button2), append(div15, t45), append(div15, p9), append(p9, button3),
append(div23, t47), append(div23, div22), append(div22, div17), append(div17, p10),
append(p10, button4), append(div22, t49), append(div22, div18), append(div18, p11),
append(div18, t51), append(div18, p12), append(p12, label0), append(label0, input2),
input2.checked = ctx[20].disableUpdateCheck, append(label0, t52), append(div18, t53),
append(div18, p13), append(p13, label1), append(label1, input3), input3.checked = ctx[20].enableWindowMagane,
append(label1, t54), append(label1, code0), append(label1, t56), append(div18, t57),
append(div18, p14), append(p14, label2), append(label2, input4), input4.checked = ctx[20].disableToasts,
append(label2, t58), append(div18, t59), append(div18, p15), append(p15, label3),
append(label3, input5), input5.checked = ctx[20].closeWindowOnSend, append(label3, t60),
append(div18, t61), append(div18, p16), append(p16, label4), append(label4, input6),
input6.checked = ctx[20].useLeftToolbar, append(label4, t62), append(div18, t63),
append(div18, p17), append(p17, label5), append(label5, input7), input7.checked = ctx[20].showPackAppendix,
append(label5, t64), append(div18, t65), append(div18, p18), append(p18, label6),
append(label6, input8), input8.checked = ctx[20].disableDownscale, append(label6, t66),
append(label6, code1), append(label6, t68), append(div18, t69), append(div18, p19),
append(p19, label7), append(label7, input9), input9.checked = ctx[20].disableUploadObfuscation,
append(label7, t70), append(div18, t71), append(div18, p20), append(p20, label8),
append(label8, input10), input10.checked = ctx[20].alwaysSendAsLink, append(label8, t72),
append(div18, t73), append(div18, p21), append(p21, label9), append(label9, input11),
input11.checked = ctx[20].maskStickerLink, append(label9, t74), append(label9, code2),
append(label9, t76), append(div18, t77), append(div18, p22), append(p22, label10),
append(label10, input12), input12.checked = ctx[20].ctrlInvertSendBehavior, append(label10, t78),
append(div18, t79), append(div18, p23), append(p23, label11), append(label11, input13),
input13.checked = ctx[20].ignoreEmbedLinksPermission, append(label11, t80), append(div18, t81),
append(div18, p24), append(p24, label12), append(label12, input14), input14.checked = ctx[20].markAsSpoiler,
append(label12, t82), append(div18, t83), append(div18, p25), append(p25, label13),
append(label13, input15), input15.checked = ctx[20].ignoreViewportSize, append(label13, t84),
append(div18, t85), append(div18, p26), append(p26, label14), append(label14, input16),
input16.checked = ctx[20].disableSendingWithChatInput, append(label14, t86), append(div22, t87),
append(div22, div19), append(div19, p27), append(div19, t89), append(div19, p28),
append(div19, t91), append(div19, p29), append(div19, t95), append(div19, p30),
append(p30, input17), set_input_value(input17, ctx[17]), append(p30, t96), append(p30, button5),
append(div22, t98), append(div22, div20), append(div20, p31), append(div20, t100),
append(div20, p32), append(div20, t102), append(div20, p33), append(div20, t108),
append(div20, p34), append(div20, t115), append(div20, p35), append(p35, input18),
set_input_value(input18, ctx[18]), append(p35, t116), append(p35, button6), append(div22, t118),
append(div22, div21), append(div21, p36), append(div21, t120), append(div21, p37),
append(p37, input19), append(p37, t121), append(p37, button7), append(div21, t123),
append(div21, p38), append(p38, button8), append(div26, t125), append(div26, div25),
ctx[107](main_1), mounted || (dispose = [ listen(div2, "click", ctx[61]), listen(div8, "click", ctx[65]), listen(div9, "click", ctx[66]), listen(div10, "click", ctx[67]), listen(div11, "click", ctx[68]), listen(input0, "keyup", ctx[30]), listen(input0, "input", ctx[72]), listen(textarea0, "input", ctx[78]), listen(button0, "click", ctx[79]), listen(textarea1, "input", ctx[80]), listen(button1, "click", ctx[81]), listen(input1, "click", click_handler_27), listen(input1, "change", ctx[42]), listen(button2, "click", ctx[82]), listen(button3, "click", ctx[83]), listen(button4, "click", ctx[84]), listen(input2, "change", ctx[85]), listen(input3, "change", ctx[86]), listen(input4, "change", ctx[87]), listen(input5, "change", ctx[88]), listen(input6, "change", ctx[89]), listen(input7, "change", ctx[90]), listen(input8, "change", ctx[91]), listen(input9, "change", ctx[92]), listen(input10, "change", ctx[93]), listen(input11, "change", ctx[94]), listen(input12, "change", ctx[95]), listen(input13, "change", ctx[96]), listen(input14, "change", ctx[97]), listen(input15, "change", ctx[98]), listen(input16, "change", ctx[99]), listen(div18, "change", ctx[45]), listen(input17, "input", ctx[100]), listen(button5, "click", ctx[101]), listen(input18, "input", ctx[102]), listen(button6, "click", ctx[103]), listen(input19, "click", click_handler_33), listen(input19, "change", ctx[48]), listen(button7, "click", ctx[104]), listen(button8, "click", ctx[105]), listen(div25, "click", ctx[106]) ],
mounted = !0);
},
p(ctx, dirty) {
if (ctx[8].length || ctx[9].length ? if_block0 && (if_block0.d(1), if_block0 = null) : if_block0 || (if_block0 = create_if_block_16(),
if_block0.c(), if_block0.m(div0, t0)), ctx[8].length ? if_block1 ? if_block1.p(ctx, dirty) : (if_block1 = create_if_block_15(ctx),
if_block1.c(), if_block1.m(div0, t1)) : if_block1 && (if_block1.d(1), if_block1 = null),
ctx[12].length ? if_block2 ? if_block2.p(ctx, dirty) : (if_block2 = create_if_block_13(ctx),
if_block2.c(), if_block2.m(div0, t2)) : if_block2 && (if_block2.d(1), if_block2 = null),
1006633728 & dirty[0] | 1 & dirty[1]) {
let i;
for (each_value_3 = ctx[9], i = 0; i < each_value_3.length; i += 1) {
const child_ctx = get_each_context_3(ctx, each_value_3, i);
each_blocks_1[i] ? each_blocks_1[i].p(child_ctx, dirty) : (each_blocks_1[i] = create_each_block_3(child_ctx),
each_blocks_1[i].c(), each_blocks_1[i].m(div0, null));
}
for (;i < each_blocks_1.length; i += 1) each_blocks_1[i].d(1);
each_blocks_1.length = each_value_3.length;
}
if (1048576 & dirty[0] && div0_class_value !== (div0_class_value = "stickers has-scroll-y " + (ctx[20].useLeftToolbar ? "has-left-toolbar" : "")) && attr(div0, "class", div0_class_value),
ctx[28].length && if_block3.p(ctx, dirty), ctx[12].length ? if_block4 ? if_block4.p(ctx, dirty) : (if_block4 = create_if_block_10(ctx),
if_block4.c(), if_block4.m(div3, null)) : if_block4 && (if_block4.d(1), if_block4 = null),
67109376 & dirty[0] | 16 & dirty[1]) {
let i;
for (each_value_2 = ctx[9], i = 0; i < each_value_2.length; i += 1) {
const child_ctx = get_each_context_2(ctx, each_value_2, i);
each_blocks[i] ? each_blocks[i].p(child_ctx, dirty) : (each_blocks[i] = create_each_block_2(child_ctx),
each_blocks[i].c(), each_blocks[i].m(div5, null));
}
for (;i < each_blocks.length; i += 1) each_blocks[i].d(1);
each_blocks.length = each_value_2.length;
}
1048576 & dirty[0] && div7_class_value !== (div7_class_value = "packs-toolbar " + (ctx[20].useLeftToolbar ? "has-scroll-y" : "has-scroll-x")) && attr(div7, "class", div7_class_value),
128 & dirty[0] && toggle_class(div8, "is-active", 0 === ctx[7]), 128 & dirty[0] && toggle_class(div9, "is-active", 1 === ctx[7]),
128 & dirty[0] && toggle_class(div10, "is-active", 2 === ctx[7]), 128 & dirty[0] && toggle_class(div11, "is-active", 3 === ctx[7]),
ctx[6][0] ? if_block5 ? if_block5.p(ctx, dirty) : (if_block5 = create_if_block_5(ctx),
if_block5.c(), if_block5.m(div23, t16)) : if_block5 && (if_block5.d(1), if_block5 = null),
524288 & dirty[0] && input0.value !== ctx[19] && set_input_value(input0, ctx[19]),
ctx[6][1] ? if_block6 ? if_block6.p(ctx, dirty) : (if_block6 = create_if_block(ctx),
if_block6.c(), if_block6.m(div13, null)) : if_block6 && (if_block6.d(1), if_block6 = null),
128 & dirty[0] && div13_style_value !== (div13_style_value = 1 === ctx[7] ? "" : "display: none;") && attr(div13, "style", div13_style_value),
32768 & dirty[0] && set_input_value(textarea0, ctx[15]), 65536 & dirty[0] && set_input_value(textarea1, ctx[16]),
128 & dirty[0] && div16_style_value !== (div16_style_value = 2 === ctx[7] ? "" : "display: none;") && attr(div16, "style", div16_style_value),
1048576 & dirty[0] && (input2.checked = ctx[20].disableUpdateCheck), 1048576 & dirty[0] && (input3.checked = ctx[20].enableWindowMagane),
1048576 & dirty[0] && (input4.checked = ctx[20].disableToasts), 1048576 & dirty[0] && (input5.checked = ctx[20].closeWindowOnSend),
1048576 & dirty[0] && (input6.checked = ctx[20].useLeftToolbar), 1048576 & dirty[0] && (input7.checked = ctx[20].showPackAppendix),
1048576 & dirty[0] && (input8.checked = ctx[20].disableDownscale), 1048576 & dirty[0] && (input9.checked = ctx[20].disableUploadObfuscation),
1048576 & dirty[0] && (input10.checked = ctx[20].alwaysSendAsLink), 1048576 & dirty[0] && (input11.checked = ctx[20].maskStickerLink),
1048576 & dirty[0] && (input12.checked = ctx[20].ctrlInvertSendBehavior), 1048576 & dirty[0] && (input13.checked = ctx[20].ignoreEmbedLinksPermission),
1048576 & dirty[0] && (input14.checked = ctx[20].markAsSpoiler), 1048576 & dirty[0] && (input15.checked = ctx[20].ignoreViewportSize),
1048576 & dirty[0] && (input16.checked = ctx[20].disableSendingWithChatInput), 131072 & dirty[0] && input17.value !== ctx[17] && set_input_value(input17, ctx[17]),
262144 & dirty[0] && input18.value !== ctx[18] && set_input_value(input18, ctx[18]),
128 & dirty[0] && div22_style_value !== (div22_style_value = 3 === ctx[7] ? "" : "display: none;") && attr(div22, "style", div22_style_value),
32 & dirty[0] && div26_style_value !== (div26_style_value = ctx[5] ? "" : "display: none;") && attr(div26, "style", div26_style_value),
18 & dirty[0] && div27_style_value !== (div27_style_value = "bottom: " + ctx[1].wbottom + "px; right: " + ctx[1].wright + "px; " + (ctx[4] ? "" : "display: none;")) && attr(div27, "style", div27_style_value),
11 & dirty[0] && div28_style_value !== (div28_style_value = (ctx[0] === ctx[21].LEGACY ? `top: ${ctx[1].top}px; left: ${ctx[1].left}px;` : "") + " " + (ctx[3] ? "display: none;" : "")) && attr(div28, "style", div28_style_value);
},
i: noop,
o: noop,
d(detaching) {
detaching && detach(main_1), if_block0 && if_block0.d(), if_block1 && if_block1.d(),
if_block2 && if_block2.d(), destroy_each(each_blocks_1, detaching), if_block3 && if_block3.d(),
if_block4 && if_block4.d(), destroy_each(each_blocks, detaching), if_block5 && if_block5.d(),
if_block6 && if_block6.d(), ctx[107](null), mounted = !1, run_all(dispose);
}
};
}
"object" != typeof window.MAGANE_STYLES && (window.MAGANE_STYLES = {}), window.MAGANE_STYLES.main_scss = '/** Magane: main.scss **/\ndiv#magane {\n display: flex;\n flex-direction: row;\n height: 44px;\n position: absolute;\n z-index: 1001;\n}\ndiv#magane button, div#magane input, div#magane select, div#magane label, div#magane span, div#magane p, div#magane a, div#magane li, div#magane ul, div#magane div, div#magane textarea {\n font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;\n color: var(--header-secondary);\n font-weight: 400;\n line-height: 1.5;\n font-size: 16px;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: 100%;\n\t -moz-text-size-adjust: 100%;\n\t\t text-size-adjust: 100%;\n}\ndiv#magane div.stickerWindow {\n width: 600px;\n min-height: 200px;\n position: fixed;\n background: var(--background-secondary);\n max-height: 600px;\n transition: all 0.2s ease;\n border-radius: 4px;\n box-shadow: var(--elevation-stroke), var(--elevation-high);\n}\ndiv#magane div.stickerWindow div.stickers {\n height: 550px !important;\n margin-bottom: 100px;\n position: relative;\n}\ndiv#magane div.stickerWindow div.stickers.has-left-toolbar {\n height: 600px !important;\n margin-left: 50px;\n}\ndiv#magane div.stickerWindow div.stickers h3.getStarted {\n text-align: center;\n padding-top: 40%;\n pointer-events: none;\n}\ndiv#magane div.stickerWindow div.stickers div.pack {\n float: left;\n display: flex;\n flex-flow: wrap;\n justify-content: center;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n}\ndiv#magane div.stickerWindow div.stickers div.pack span {\n color: var(--header-secondary);\n width: 100%;\n cursor: auto;\n padding-left: 10px;\n margin: 10px 0px;\n}\ndiv#magane div.stickerWindow div.stickers div.pack span .counts {\n padding-left: 0;\n}\ndiv#magane div.stickerWindow div.stickers div.pack span .counts span {\n padding: 0 0.5em;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100px;\n height: 100px;\n float: left;\n position: relative;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker .image {\n cursor: pointer;\n max-height: 100%;\n max-width: 100%;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.addFavorite, div#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite {\n width: 20px;\n height: 20px;\n position: absolute;\n right: 0;\n transition: all 0.2s ease;\n display: none;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.addFavorite:hover, div#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite:hover {\n transform: scale(1.25);\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.addFavorite:hover svg path, div#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite:hover svg path {\n transition: all 0.2s ease;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.addFavorite {\n bottom: 0;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.addFavorite:hover svg path {\n fill: #2ECC71;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite {\n top: 0px;\n transform: rotateZ(45deg);\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite:hover {\n transform: scale(1.25) rotateZ(45deg);\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker div.deleteFavorite:hover svg path {\n fill: #F04747;\n}\ndiv#magane div.stickerWindow div.stickers div.pack div.sticker:hover div.addFavorite, div#magane div.stickerWindow div.stickers div.pack div.sticker:hover div.deleteFavorite {\n display: block;\n cursor: pointer;\n}\ndiv#magane div.stickerWindow div.packs-toolbar {\n position: absolute;\n bottom: 0;\n background: var(--background-tertiary);\n display: flex;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-x {\n width: 100%;\n height: 50px;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-x div.packs {\n flex: 1 0 auto;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-x div.packs.packs-controls {\n flex: 0 0 auto;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-x div.packs div.packs-wrapper {\n white-space: nowrap;\n float: left;\n width: 100%;\n font-size: 0; /* quick hax to clear whitespace */\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-y {\n width: 50px;\n height: 100%;\n flex-direction: column;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-y div.packs {\n flex: 1 1 auto;\n height: 100%;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-y div.packs.packs-controls {\n flex: 0 0 auto;\n height: auto;\n}\ndiv#magane div.stickerWindow div.packs-toolbar.has-scroll-y div.packs div.packs-wrapper {\n font-size: 0; /* quick hax to clear whitespace */\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack {\n display: inline-block;\n height: 40px;\n width: 40px;\n margin: 5px;\n cursor: pointer;\n background-position: center;\n background-size: contain;\n background-repeat: no-repeat;\n transition: all 0.2s ease;\n filter: grayscale(100%);\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack:hover,\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack div.pack.active {\n transform: scale(1.25);\n filter: grayscale(0%);\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack > div {\n background-image: url("/assets/62ed7720accb1adfe95565b114e843c6.png");\n width: 32px;\n height: 32px;\n background-size: 1344px 1216px;\n background-repeat: no-repeat;\n margin-top: 4px;\n margin-left: 4px;\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack div.icon-favorite {\n background-position: -1056px -288px;\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack div.icon-plus {\n background-position: -384px -896px;\n /* make it greenish */\n /* thanks to the magic of https://codepen.io/sosuke/pen/Pjoqqp */\n filter: invert(63%) sepia(25%) saturate(813%) hue-rotate(55deg) brightness(98%) contrast(82%);\n}\ndiv#magane div.stickerWindow div.packs-toolbar div.packs div.pack div.icon-frequently-used {\n background-position: -160px -960px;\n}\ndiv#magane .stickersModal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n}\ndiv#magane .stickersModal.is-active {\n display: flex;\n}\ndiv#magane .stickersModal .inputQuery {\n width: calc(100% - 30px);\n height: 36px;\n box-sizing: border-box;\n margin: 0 15px 10px;\n padding: 5px 12px;\n border-radius: 3px;\n border: 1px solid var(--background-secondary);\n background: var(--background-secondary);\n color: var(--header-secondary);\n}\ndiv#magane .stickersModal textarea.inputQuery {\n height: auto;\n min-height: 54px;\n}\ndiv#magane .stickersModal .inputPackIndex {\n width: 55px;\n height: 36px;\n box-sizing: border-box;\n padding: 5px 12px;\n border-radius: 3px;\n border: 1px solid var(--background-secondary);\n background: var(--background-secondary);\n color: var(--header-secondary);\n text-align: center;\n}\ndiv#magane .stickersModal .modal-background {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(10, 10, 10, 0.86);\n}\ndiv#magane .stickersModal .modal-content,\ndiv#magane .stickersModal .modal-card {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n background: var(--background-tertiary);\n}\ndiv#magane .stickersModal .modal-content .stickersConfig {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig .tabs {\n width: 100%;\n text-align: center;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig .tabs .tab {\n color: var(--header-secondary);\n display: inline-block;\n border: none;\n border-top: 0px transparent;\n border-left: 0px transparent;\n border-right: 0px transparent;\n border-width: 1px;\n border-style: solid;\n border-bottom-color: var(--header-secondary);\n padding: 20px;\n cursor: pointer;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig .tabs .tab:hover, div#magane .stickersModal .modal-content .stickersConfig .tabs .tab.is-active {\n border-bottom-color: var(--interactive-active);\n color: var(--interactive-active);\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content {\n height: calc(100% - 66px); /* .tabs height */\n width: 100%;\n padding: 10px 0;\n box-sizing: border-box;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.avail-packs {\n display: flex;\n flex-direction: column;\n padding-bottom: 0;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.avail-packs .packs {\n height: 100%;\n width: 100%;\n padding-bottom: 10px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc {\n -webkit-user-select: text;\n\t -moz-user-select: text;\n\t\t user-select: text;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .section, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .section {\n padding: 0 24px 14px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .section .section-title, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .section .section-title {\n font-weight: 800;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .section > p:last-of-type, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .section > p:last-of-type {\n margin-bottom: 0;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .section a, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .section a {\n /* inherit Discord\'s link color */\n color: var(--text-link);\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .section a:hover, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .section a:hover {\n text-decoration: underline;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .input-grouped, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .input-grouped {\n display: flex;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .input-grouped input, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .input-grouped input {\n margin: 0;\n width: auto;\n flex-grow: 1;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .input-grouped textarea, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .input-grouped textarea {\n margin: 0;\n width: auto;\n flex-grow: 1;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.tab-content.import .input-grouped button, div#magane .stickersModal .modal-content .stickersConfig div.tab-content.misc .input-grouped button {\n margin-left: 4px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack {\n height: 75px;\n width: 100%;\n float: left;\n display: flex;\n padding: 0 20px;\n box-sizing: border-box;\n margin-bottom: 5px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack:last-of-type {\n margin-bottom: 0;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.index,\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.handle,\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.preview {\n flex: 0 0 auto;\n min-width: 75px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action {\n flex: 1 0 auto;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action.is-tight button {\n width: auto;\n padding-right: 0.5em;\n padding-left: 0.5em;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action button.delete-pack {\n width: 36px;\n height: 36px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action button.delete-pack:before, div#magane .stickersModal .modal-content .stickersConfig div.pack div.action button.delete-pack:after {\n background-color: var(--header-secondary);\n content: "";\n display: block;\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n transform-origin: center center;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action button.delete-pack:before {\n height: 2px;\n width: 50%;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action button.delete-pack:after {\n height: 50%;\n width: 2px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.index {\n padding-top: 20px;\n text-align: left;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.preview {\n height: 75px;\n background-position: center;\n background-size: contain;\n background-repeat: no-repeat;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.handle {\n padding: 20px;\n cursor: move;\n padding-top: 30px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.handle span {\n background: #555;\n height: 2px;\n width: 100%;\n display: block;\n margin-bottom: 6px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.action {\n padding-top: 20px;\n text-align: right;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.info {\n flex: 1 1 auto;\n padding: 14px;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.info > span {\n display: block;\n width: 100%;\n color: var(--header-secondary);\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.info > span:nth-of-type(1) {\n font-weight: bold;\n color: var(--header-secondary);\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.info > span .appendix span:nth-of-type(1) {\n padding: 0 0.5em;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.info > span .appendix span:nth-of-type(2) {\n -webkit-user-select: text;\n\t -moz-user-select: text;\n\t\t user-select: text;\n}\ndiv#magane .stickersModal .modal-content .stickersConfig div.pack div.preview img {\n height: 100%;\n width: 100%;\n}\ndiv#magane .stickersModal .modal-close {\n -webkit-user-select: none;\n\t -moz-user-select: none;\n\t\t user-select: none;\n background-color: rgba(10, 10, 10, 0.2);\n border: none;\n border-radius: 290486px;\n cursor: pointer;\n display: inline-block;\n flex-grow: 0;\n flex-shrink: 0;\n font-size: 0;\n outline: none;\n vertical-align: top;\n background: none;\n position: absolute;\n right: 20px;\n top: 20px;\n height: 32px;\n max-height: 32px;\n max-width: 32px;\n min-height: 32px;\n min-width: 32px;\n width: 32px;\n}\ndiv#magane .stickersModal .modal-close:before, div#magane .stickersModal .modal-close:after {\n background-color: var(--header-secondary);\n content: "";\n display: block;\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n transform-origin: center center;\n}\ndiv#magane .stickersModal .modal-close:before {\n height: 2px;\n width: 50%;\n}\ndiv#magane .stickersModal .modal-close:after {\n height: 50%;\n width: 2px;\n}\ndiv#magane .stickersModal .modal-close:hover, div#magane .stickersModal .modal-close:focus {\n background-color: rgba(10, 10, 10, 0.3);\n}\ndiv#magane .button {\n align-items: center;\n border: 1px solid transparent;\n border-radius: 3px;\n box-shadow: none;\n display: inline-flex;\n font-size: 1rem;\n padding: calc(0.375em - 1px) 0.75em;\n position: relative;\n vertical-align: top;\n -webkit-user-select: none;\n\t -moz-user-select: none;\n\t\t user-select: none;\n cursor: pointer;\n justify-content: center;\n text-align: center;\n white-space: nowrap;\n border-color: transparent;\n color: var(--header-secondary);\n background-color: var(--background-secondary);\n width: 62px; /* consistent width */\n}\ndiv#magane .button.is-danger {\n color: #ffffff;\n border-color: rgba(240, 71, 71, 0.3);\n background: #f04747;\n}\ndiv#magane .button:hover, div#magane .button.is-primary:hover {\n transform: scale3d(1.1, 1.1, 1.1);\n}\ndiv#magane .button.has-width-full {\n width: 100%;\n}\ndiv#magane .button.has-width-full:hover {\n /* TODO: Figure out how to do a more consistent scaling,\n\tregardless of the button\'s dynamic size. */\n transform: scale3d(1.04, 1.04, 1.04);\n}\ndiv#magane .has-scroll-x {\n overflow-x: auto;\n scrollbar-gutter: stable;\n}\ndiv#magane .has-scroll-y {\n overflow-y: auto;\n scrollbar-gutter: stable;\n}\ndiv#magane ::-webkit-scrollbar {\n /* Let\'s make the scrollbars pretty */\n width: 6px;\n height: 6px;\n}\ndiv#magane ::-webkit-scrollbar-track {\n margin: 0;\n background: transparent;\n border-radius: 5px;\n}\ndiv#magane ::-webkit-scrollbar-track-piece {\n border: 0 solid transparent;\n background: transparent;\n margin: 0;\n}\ndiv#magane ::-webkit-scrollbar-thumb {\n background: rgba(105, 96, 128, 0.5);\n border: 0 solid transparent;\n border-radius: 5px;\n}\ndiv#magane ::-webkit-scrollbar-thumb:hover {\n background: rgba(105, 96, 128, 0.75);\n}\ndiv#magane ::-webkit-scrollbar-thumb:active {\n background: #696080;\n}\ndiv#magane code {\n box-sizing: border-box;\n padding: 2px 6px;\n border-radius: 3px;\n border: 1px solid var(--background-secondary);\n background: var(--background-secondary);\n color: var(--header-secondary);\n}\n\ndiv#maganeButton.channel-textarea-stickers {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\ndiv#maganeButton.channel-textarea-stickers:hover, div#maganeButton.channel-textarea-stickers.active {\n filter: brightness(1.35);\n}\ndiv#maganeButton img.channel-textarea-stickers-content {\n width: 24px;\n height: 24px;\n padding: 4px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* Visually hide Magane button in certain scenarios */\ndiv[class^=submitContainer_] div#maganeButton { /* create thread */\n display: none;\n}\n\ndiv[data-list-item-id^=forum-channel-list-] div#maganeButton { /* create forum post */\n display: none;\n}';
const updateUrl = "https://raw.githubusercontent.com/Pitu/Magane/master/dist/magane.plugin.js", click_handler_16 = event => event.target.select(), click_handler_27 = event => event.stopPropagation(), click_handler_33 = event => event.stopPropagation();
function instance$1($$self, $$props, $$invalidate) {
const log = (message, type = "log") => (type = [ "log", "info", "warn", "error" ].includes(type) ? type : "log",
console[type]("%c[Magane]%c", "color: #3a71c1; font-weight: 700", "", message)), MountType = {
LEGACY: "legacy",
BETTERDISCORD: "betterdiscord",
VENCORD: "vencord"
};
let mountType = null;
const Modules = {}, MOCK_API = {}, VENCORD_TOASTS_TYPE = {
info: 0,
success: 1,
error: 2,
warn: 2
}, Helper = {
findByProps(...args) {
switch (mountType) {
case MountType.BETTERDISCORD:
return BdApi.findModuleByProps(...args);
case MountType.VENCORD:
return findByPropsLazy(...args);
default:
return MOCK_API.FINDBYPROPS(...args);
}
},
find(...args) {
switch (mountType) {
case MountType.BETTERDISCORD:
return BdApi.Webpack.getModule(...args);
case MountType.VENCORD:
return findLazy(args[0]);
default:
return MOCK_API.FIND(...args);
}
},
Alerts: {
show(...args) {
if (mountType === MountType.BETTERDISCORD) return BdApi.showConfirmationModal(...args);
if (mountType === MountType.VENCORD) {
const title = args[0], body = Modules.React.createElement("div", {
dangerouslySetInnerHTML: {
__html: args[1].replace(/\*\*(.*?)\*\*/gm, "$1").replace(/__(.*?)__/gm, "$1").replace(/```\n(.*?)\n```/gms, "$1
").replace(/\n\n/gm, "