diff --git a/dist/vue-advanced-chat.es.js b/dist/vue-advanced-chat.es.js index 50d33a9e..6bf49c4d 100644 --- a/dist/vue-advanced-chat.es.js +++ b/dist/vue-advanced-chat.es.js @@ -1,36 +1,174 @@ -function makeMap$2(str, expectsLowerCase) { +function makeMap(str, expectsLowerCase) { const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; + const list2 = str.split(","); + for (let i = 0; i < list2.length; i++) { + map[list2[i]] = true; } return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; } -const NOOP$1 = () => { +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value)) { + return value; + } else if (isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:(.+)/; +function parseStringStyle(cssText) { + const ret = {}; + cssText.split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { + entries[`${key} =>`] = val2; + return entries; + }, {}) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()] + }; + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const EMPTY_OBJ = {}; +const EMPTY_ARR = []; +const NOOP = () => { +}; +const NO = () => false; +const onRE = /^on[^a-z]/; +const isOn = (key) => onRE.test(key); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; -const extend$2 = Object.assign; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key); -const isArray$2 = Array.isArray; -const isMap$1 = (val) => toTypeString$1(val) === "[object Map]"; -const isFunction$2 = (val) => typeof val === "function"; -const isString$2 = (val) => typeof val === "string"; +const hasOwnProperty$2 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$2.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; -const isObject$2 = (val) => val !== null && typeof val === "object"; -const objectToString$1 = Object.prototype.toString; -const toTypeString$1 = (value) => objectToString$1.call(value); +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return isObject(val) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - return toTypeString$1(value).slice(8, -1); + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); +const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); +const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; -const isIntegerKey = (key) => isString$2(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const hasChanged$1 = (value, oldValue) => !Object.is(value, oldValue); -const def$1 = (obj, key, value) => { +const def = (obj, key, value) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, value }); }; +const toNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; let activeEffectScope; class EffectScope { constructor(detached = false) { @@ -240,7 +378,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { let deps = []; if (type === "clear") { deps = [...depsMap.values()]; - } else if (key === "length" && isArray$2(target)) { + } else if (key === "length" && isArray(target)) { depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newValue) { deps.push(dep); @@ -252,9 +390,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } switch (type) { case "add": - if (!isArray$2(target)) { + if (!isArray(target)) { deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isIntegerKey(key)) { @@ -262,15 +400,15 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } break; case "delete": - if (!isArray$2(target)) { + if (!isArray(target)) { deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(ITERATE_KEY)); } break; @@ -295,7 +433,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } } function triggerEffects(dep, debuggerEventExtraInfo) { - const effects = isArray$2(dep) ? dep : [...dep]; + const effects = isArray(dep) ? dep : [...dep]; for (const effect of effects) { if (effect.computed) { triggerEffect(effect); @@ -316,7 +454,7 @@ function triggerEffect(effect, debuggerEventExtraInfo) { } } } -const isNonTrackableKeys = /* @__PURE__ */ makeMap$2(`__proto__,__v_isRef,__isVue`); +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); @@ -351,7 +489,7 @@ function createArrayInstrumentations() { return instrumentations; } function createGetter(isReadonly2 = false, shallow = false) { - return function get3(target, key, receiver) { + return function get2(target, key, receiver) { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { @@ -361,8 +499,8 @@ function createGetter(isReadonly2 = false, shallow = false) { } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { return target; } - const targetIsArray = isArray$2(target); - if (!isReadonly2 && targetIsArray && hasOwn$1(arrayInstrumentations, key)) { + const targetIsArray = isArray(target); + if (!isReadonly2 && targetIsArray && hasOwn(arrayInstrumentations, key)) { return Reflect.get(arrayInstrumentations, key, receiver); } const res = Reflect.get(target, key, receiver); @@ -378,7 +516,7 @@ function createGetter(isReadonly2 = false, shallow = false) { if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } - if (isObject$2(res)) { + if (isObject(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; @@ -397,17 +535,17 @@ function createSetter(shallow = false) { value = toRaw(value); oldValue = toRaw(oldValue); } - if (!isArray$2(target) && isRef(oldValue) && !isRef(value)) { + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } } - const hadKey = isArray$2(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key); + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); const result = Reflect.set(target, key, value, receiver); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); - } else if (hasChanged$1(value, oldValue)) { + } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } } @@ -415,7 +553,7 @@ function createSetter(shallow = false) { }; } function deleteProperty(target, key) { - const hadKey = hasOwn$1(target, key); + const hadKey = hasOwn(target, key); target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { @@ -431,7 +569,7 @@ function has(target, key) { return result; } function ownKeys(target) { - track(target, "iterate", isArray$2(target) ? "length" : ITERATE_KEY); + track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target); } const mutableHandlers = { @@ -450,7 +588,7 @@ const readonlyHandlers = { return true; } }; -const shallowReactiveHandlers = /* @__PURE__ */ extend$2({}, mutableHandlers, { +const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); @@ -507,30 +645,30 @@ function add(value) { function set$1$1(key, value) { value = toRaw(value); const target = toRaw(this); - const { has: has2, get: get3 } = getProto(target); + const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } - const oldValue = get3.call(target, key); + const oldValue = get2.call(target, key); target.set(key, value); if (!hadKey) { trigger(target, "add", key, value); - } else if (hasChanged$1(value, oldValue)) { + } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } return this; } function deleteEntry(key) { const target = toRaw(this); - const { has: has2, get: get3 } = getProto(target); + const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } - get3 ? get3.call(target, key) : void 0; + get2 ? get2.call(target, key) : void 0; const result = target.delete(key); if (hadKey) { trigger(target, "delete", key, void 0); @@ -562,7 +700,7 @@ function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); - const targetIsMap = isMap$1(rawTarget); + const targetIsMap = isMap(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); @@ -673,7 +811,7 @@ function createInstrumentationGetter(isReadonly2, shallow) { } else if (key === "__v_raw") { return target; } - return Reflect.get(hasOwn$1(instrumentations, key) && key in target ? instrumentations : target, key, receiver); + return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver); }; } const mutableCollectionHandlers = { @@ -719,7 +857,7 @@ function readonly(target) { return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); } function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject$2(target)) { + if (!isObject(target)) { return target; } if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { @@ -757,11 +895,11 @@ function toRaw(observed) { return raw ? toRaw(raw) : observed; } function markRaw(value) { - def$1(value, "__v_skip", true); + def(value, "__v_skip", true); return value; } -const toReactive = (value) => isObject$2(value) ? reactive(value) : value; -const toReadonly = (value) => isObject$2(value) ? readonly(value) : value; +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; function trackRefValue(ref) { if (shouldTrack && activeEffect) { ref = toRaw(ref); @@ -831,10 +969,10 @@ class ComputedRefImpl { function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; - const onlyGetter = isFunction$2(getterOrOptions); + const onlyGetter = isFunction(getterOrOptions); if (onlyGetter) { getter = getterOrOptions; - setter = NOOP$1; + setter = NOOP; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; @@ -842,248 +980,87 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) { const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); return cRef; } -function makeMap$1(str, expectsLowerCase) { - const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; +function callWithErrorHandling(fn, instance2, type, args) { + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance2, type); } - return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; + return res; } -function normalizeStyle(value) { - if (isArray$1(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } +function callWithAsyncErrorHandling(fn, instance2, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance2, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance2, type); + }); } return res; - } else if (isString$1(value)) { - return value; - } else if (isObject$1(value)) { - return value; } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance2, type, args)); + } + return values; } -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString$1(value)) { - res = value; - } else if (isArray$1(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; +function handleError(err, instance2, type, throwInDev = true) { + const contextVNode = instance2 ? instance2.vnode : null; + if (instance2) { + let cur = instance2.parent; + const exposedInstance = instance2.proxy; + const errorInfo = type; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } } + cur = cur.parent; } - } else if (isObject$1(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } + const appErrorHandler = instance2.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); + return; } } - return res.trim(); + logError(err, type, contextVNode, throwInDev); } -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString$1(klass)) { - props.class = normalizeClass(klass); +function logError(err, type, contextVNode, throwInDev = true) { + { + console.error(err); } - if (style) { - props.style = normalizeStyle(style); +} +let isFlushing = false; +let isFlushPending = false; +const queue = []; +let flushIndex = 0; +const pendingPreFlushCbs = []; +let activePreFlushCbs = null; +let preFlushIndex = 0; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +let currentPreFlushParentJob = null; +function nextTick(fn) { + const p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJobId = getId(queue[middle]); + middleJobId < id ? start = middle + 1 : end = middle; } - return props; -} -const toDisplayString = (val) => { - return isString$1(val) ? val : val == null ? "" : isArray$1(val) || isObject$1(val) && (val.toString === objectToString || !isFunction$1(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { - entries[`${key} =>`] = val2; - return entries; - }, {}) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } else if (isObject$1(val) && !isArray$1(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const EMPTY_OBJ = {}; -const EMPTY_ARR = []; -const NOOP = () => { -}; -const NO = () => false; -const onRE$1 = /^on[^a-z]/; -const isOn$1 = (key) => onRE$1.test(key); -const isModelListener$1 = (key) => key.startsWith("onUpdate:"); -const extend$1 = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray$1 = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isFunction$1 = (val) => typeof val === "function"; -const isString$1 = (val) => typeof val === "string"; -const isObject$1 = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isReservedProp = /* @__PURE__ */ makeMap$1( - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const cacheStringFunction$1 = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE$1 = /-(\w)/g; -const camelize$1 = cacheStringFunction$1((str) => { - return str.replace(camelizeRE$1, (_, c) => c ? c.toUpperCase() : ""); -}); -const hyphenateRE$1 = /\B([A-Z])/g; -const hyphenate$1 = cacheStringFunction$1((str) => str.replace(hyphenateRE$1, "-$1").toLowerCase()); -const capitalize$1 = cacheStringFunction$1((str) => str.charAt(0).toUpperCase() + str.slice(1)); -const toHandlerKey = cacheStringFunction$1((str) => str ? `on${capitalize$1(str)}` : ``); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } -}; -const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); -}; -const toNumber$1 = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -function callWithErrorHandling(fn, instance2, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance2, type); - } - return res; -} -function callWithAsyncErrorHandling(fn, instance2, type, args) { - if (isFunction$1(fn)) { - const res = callWithErrorHandling(fn, instance2, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance2, type); - }); - } - return res; - } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance2, type, args)); - } - return values; -} -function handleError(err, instance2, type, throwInDev = true) { - const contextVNode = instance2 ? instance2.vnode : null; - if (instance2) { - let cur = instance2.parent; - const exposedInstance = instance2.proxy; - const errorInfo = type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - const appErrorHandler = instance2.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); - return; - } - } - logError(err, type, contextVNode, throwInDev); -} -function logError(err, type, contextVNode, throwInDev = true) { - { - console.error(err); - } -} -let isFlushing = false; -let isFlushPending = false; -const queue = []; -let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -let currentPreFlushParentJob = null; -function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; - return fn ? p2.then(this ? fn.bind(this) : fn) : p2; -} -function findInsertionIndex(id) { - let start2 = flushIndex + 1; - let end = queue.length; - while (start2 < end) { - const middle = start2 + end >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? start2 = middle + 1 : end = middle; - } - return start2; + return start; } function queueJob(job) { if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) { @@ -1108,7 +1085,7 @@ function invalidateJob(job) { } } function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray$1(cb)) { + if (!isArray(cb)) { if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { pendingQueue.push(cb); } @@ -1161,7 +1138,7 @@ function flushJobs(seen) { isFlushing = true; flushPreFlushCbs(seen); queue.sort((a, b) => getId(a) - getId(b)); - const check2 = NOOP; + const check = NOOP; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; @@ -1196,13 +1173,13 @@ function emit$1(instance2, event, ...rawArgs) { args = rawArgs.map((a) => a.trim()); } if (number) { - args = rawArgs.map(toNumber$1); + args = rawArgs.map(toNumber); } } let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))]; + let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { - handler = props[handlerName = toHandlerKey(hyphenate$1(event))]; + handler = props[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance2, 6, args); @@ -1227,12 +1204,12 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) { const raw = comp.emits; let normalized = {}; let hasExtends = false; - if (!isFunction$1(comp)) { + if (!isFunction(comp)) { const extendEmits = (raw2) => { const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; - extend$1(normalized, normalizedFromExtend); + extend(normalized, normalizedFromExtend); } }; if (!asMixin && appContext.mixins.length) { @@ -1249,20 +1226,20 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) { cache.set(comp, null); return null; } - if (isArray$1(raw)) { + if (isArray(raw)) { raw.forEach((key) => normalized[key] = null); } else { - extend$1(normalized, raw); + extend(normalized, raw); } cache.set(comp, normalized); return normalized; } -function isEmitListener(options2, key) { - if (!options2 || !isOn$1(key)) { +function isEmitListener(options, key) { + if (!options || !isOn(key)) { return false; } key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options2, key[0].toLowerCase() + key.slice(1)) || hasOwn(options2, hyphenate$1(key)) || hasOwn(options2, key); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } let currentRenderingInstance = null; let currentScopeId = null; @@ -1298,7 +1275,7 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { function markAttrsAccessed() { } function renderComponentRoot(instance2) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit: emit2, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance2; + const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance2; let result; let fallthroughAttrs; const prev = setCurrentRenderingInstance(instance2); @@ -1317,8 +1294,8 @@ function renderComponentRoot(instance2) { return attrs; }, slots, - emit: emit2 - } : { attrs, slots, emit: emit2 }) : render3(props, null)); + emit + } : { attrs, slots, emit }) : render3(props, null)); fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); } } catch (err) { @@ -1332,7 +1309,7 @@ function renderComponentRoot(instance2) { const { shapeFlag } = root; if (keys.length) { if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener$1)) { + if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root = cloneVNode(root, fallthroughAttrs); @@ -1355,7 +1332,7 @@ function renderComponentRoot(instance2) { const getFunctionalFallthrough = (attrs) => { let res; for (const key in attrs) { - if (key === "class" || key === "style" || isOn$1(key)) { + if (key === "class" || key === "style" || isOn(key)) { (res || (res = {}))[key] = attrs[key]; } } @@ -1364,7 +1341,7 @@ const getFunctionalFallthrough = (attrs) => { const filterModelListeners = (attrs, props) => { const res = {}; for (const key in attrs) { - if (!isModelListener$1(key) || !(key.slice(9) in props)) { + if (!isModelListener(key) || !(key.slice(9) in props)) { res[key] = attrs[key]; } } @@ -1436,7 +1413,7 @@ function updateHOCHostEl({ vnode, parent }, el) { const isSuspense = (type) => type.__isSuspense; function queueEffectWithSuspense(fn, suspense) { if (suspense && suspense.pendingBranch) { - if (isArray$1(fn)) { + if (isArray(fn)) { suspense.effects.push(...fn); } else { suspense.effects.push(fn); @@ -1464,14 +1441,14 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) { if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction$1(defaultValue) ? defaultValue.call(instance2.proxy) : defaultValue; + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance2.proxy) : defaultValue; } else ; } } const INITIAL_WATCHER_VALUE = {}; -function watch(source, cb, options2) { - return doWatch(source, cb, options2); +function watch(source, cb, options) { + return doWatch(source, cb, options); } function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigger } = EMPTY_OBJ) { const instance2 = currentInstance; @@ -1484,7 +1461,7 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge } else if (isReactive(source)) { getter = () => source; deep = true; - } else if (isArray$1(source)) { + } else if (isArray(source)) { isMultiSource = true; forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); getter = () => source.map((s) => { @@ -1492,12 +1469,12 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge return s.value; } else if (isReactive(s)) { return traverse(s); - } else if (isFunction$1(s)) { + } else if (isFunction(s)) { return callWithErrorHandling(s, instance2, 2); } else ; }); - } else if (isFunction$1(source)) { + } else if (isFunction(source)) { if (cb) { getter = () => callWithErrorHandling(source, instance2, 2); } else { @@ -1587,19 +1564,19 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge } }; } -function instanceWatch(source, value, options2) { +function instanceWatch(source, value, options) { const publicThis = this.proxy; - const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); let cb; - if (isFunction$1(value)) { + if (isFunction(value)) { cb = value; } else { cb = value.handler; - options2 = value; + options = value; } const cur = currentInstance; setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options2); + const res = doWatch(getter, cb.bind(publicThis), options); if (cur) { setCurrentInstance(cur); } else { @@ -1607,8 +1584,8 @@ function instanceWatch(source, value, options2) { } return res; } -function createPathGetter(ctx, path) { - const segments = path.split("."); +function createPathGetter(ctx, path2) { + const segments = path2.split("."); return () => { let cur = ctx; for (let i = 0; i < segments.length && cur; i++) { @@ -1618,7 +1595,7 @@ function createPathGetter(ctx, path) { }; } function traverse(value, seen) { - if (!isObject$1(value) || value["__v_skip"]) { + if (!isObject(value) || value["__v_skip"]) { return value; } seen = seen || /* @__PURE__ */ new Set(); @@ -1628,7 +1605,7 @@ function traverse(value, seen) { seen.add(value); if (isRef(value)) { traverse(value.value, seen); - } else if (isArray$1(value)) { + } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], seen); } @@ -1644,19 +1621,19 @@ function traverse(value, seen) { return value; } function useTransitionState() { - const state2 = { + const state = { isMounted: false, isLeaving: false, isUnmounting: false, leavingVNodes: /* @__PURE__ */ new Map() }; onMounted(() => { - state2.isMounted = true; + state.isMounted = true; }); onBeforeUnmount(() => { - state2.isUnmounting = true; + state.isUnmounting = true; }); - return state2; + return state; } const TransitionHookValidator = [Function, Array]; const BaseTransitionImpl = { @@ -1680,7 +1657,7 @@ const BaseTransitionImpl = { }, setup(props, { slots }) { const instance2 = getCurrentInstance(); - const state2 = useTransitionState(); + const state = useTransitionState(); let prevTransitionKey; return () => { const children = slots.default && getTransitionRawChildren(slots.default(), true); @@ -1698,14 +1675,14 @@ const BaseTransitionImpl = { } const rawProps = toRaw(props); const { mode } = rawProps; - if (state2.isLeaving) { + if (state.isLeaving) { return emptyPlaceholder(child); } const innerChild = getKeepAliveChild(child); if (!innerChild) { return emptyPlaceholder(child); } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state2, instance2); + const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance2); setTransitionHooks(innerChild, enterHooks); const oldChild = instance2.subTree; const oldInnerChild = oldChild && getKeepAliveChild(oldChild); @@ -1721,18 +1698,18 @@ const BaseTransitionImpl = { } } if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state2, instance2); + const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance2); setTransitionHooks(oldInnerChild, leavingHooks); if (mode === "out-in") { - state2.isLeaving = true; + state.isLeaving = true; leavingHooks.afterLeave = () => { - state2.isLeaving = false; + state.isLeaving = false; instance2.update(); }; return emptyPlaceholder(child); } else if (mode === "in-out" && innerChild.type !== Comment) { leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state2, oldInnerChild); + const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; el._leaveCb = () => { earlyRemove(); @@ -1748,8 +1725,8 @@ const BaseTransitionImpl = { } }; const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state2, vnode) { - const { leavingVNodes } = state2; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; let leavingVNodesCache = leavingVNodes.get(vnode.type); if (!leavingVNodesCache) { leavingVNodesCache = /* @__PURE__ */ Object.create(null); @@ -1757,17 +1734,17 @@ function getLeavingNodesForType(state2, vnode) { } return leavingVNodesCache; } -function resolveTransitionHooks(vnode, props, state2, instance2) { +function resolveTransitionHooks(vnode, props, state, instance2) { const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state2, vnode); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); const callHook2 = (hook, args) => { hook && callWithAsyncErrorHandling(hook, instance2, 9, args); }; const callAsyncHook = (hook, args) => { const done = args[1]; callHook2(hook, args); - if (isArray$1(hook)) { + if (isArray(hook)) { if (hook.every((hook2) => hook2.length <= 1)) done(); } else if (hook.length <= 1) { @@ -1779,7 +1756,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { persisted, beforeEnter(el) { let hook = onBeforeEnter; - if (!state2.isMounted) { + if (!state.isMounted) { if (appear) { hook = onBeforeAppear || onBeforeEnter; } else { @@ -1799,7 +1776,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { let hook = onEnter; let afterHook = onAfterEnter; let cancelHook = onEnterCancelled; - if (!state2.isMounted) { + if (!state.isMounted) { if (appear) { hook = onAppear || onEnter; afterHook = onAfterAppear || onAfterEnter; @@ -1834,7 +1811,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { if (el._enterCb) { el._enterCb(true); } - if (state2.isUnmounting) { + if (state.isUnmounting) { return remove2(); } callHook2(onBeforeLeave, [el]); @@ -1862,7 +1839,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { } }, clone(vnode2) { - return resolveTransitionHooks(vnode2, props, state2, instance2); + return resolveTransitionHooks(vnode2, props, state, instance2); } }; return hooks; @@ -1908,8 +1885,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) { } return ret; } -function defineComponent(options2) { - return isFunction$1(options2) ? { setup: options2, name: options2.name } : options2; +function defineComponent(options) { + return isFunction(options) ? { setup: options, name: options.name } : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; @@ -1991,7 +1968,7 @@ function withDirectives(vnode, directives) { const bindings = vnode.dirs || (vnode.dirs = []); for (let i = 0; i < directives.length; i++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction$1(dir)) { + if (isFunction(dir)) { dir = { mounted: dir, updated: dir @@ -2039,7 +2016,7 @@ function resolveComponent(name, maybeSelfReference) { } const NULL_DYNAMIC_COMPONENT = Symbol(); function resolveDynamicComponent(component) { - if (isString$1(component)) { + if (isString(component)) { return resolveAsset(COMPONENTS, component, false) || component; } else { return component || NULL_DYNAMIC_COMPONENT; @@ -2054,7 +2031,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false const Component = instance2.type; if (type === COMPONENTS) { const selfName = getComponentName(Component, false); - if (selfName && (selfName === name || selfName === camelize$1(name) || selfName === capitalize$1(camelize$1(name)))) { + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { return Component; } } @@ -2066,12 +2043,12 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false } } function resolve(registry, name) { - return registry && (registry[name] || registry[camelize$1(name)] || registry[capitalize$1(camelize$1(name))]); + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } function renderList(source, renderItem, cache, index) { let ret; const cached = cache && cache[index]; - if (isArray$1(source) || isString$1(source)) { + if (isArray(source) || isString(source)) { ret = new Array(source.length); for (let i = 0, l = source.length; i < l; i++) { ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); @@ -2081,7 +2058,7 @@ function renderList(source, renderItem, cache, index) { for (let i = 0; i < source; i++) { ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - } else if (isObject$1(source)) { + } else if (isObject(source)) { if (source[Symbol.iterator]) { ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i])); } else { @@ -2103,7 +2080,7 @@ function renderList(source, renderItem, cache, index) { function createSlots(slots, dynamicSlots) { for (let i = 0; i < dynamicSlots.length; i++) { const slot = dynamicSlots[i]; - if (isArray$1(slot)) { + if (isArray(slot)) { for (let j = 0; j < slot.length; j++) { slots[slot[j].name] = slot[j].fn; } @@ -2150,7 +2127,7 @@ const getPublicInstance = (i) => { return getExposeProxy(i) || i.proxy; return getPublicInstance(i.parent); }; -const publicPropertiesMap = /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), { +const publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { $: (i) => i, $el: (i) => i.vnode.el, $data: (i) => i.data, @@ -2253,12 +2230,12 @@ const PublicInstanceProxyHandlers = { }; let shouldCacheAccess = true; function applyOptions(instance2) { - const options2 = resolveMergedOptions(instance2); + const options = resolveMergedOptions(instance2); const publicThis = instance2.proxy; const ctx = instance2.ctx; shouldCacheAccess = false; - if (options2.beforeCreate) { - callHook$1(options2.beforeCreate, instance2, "bc"); + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance2, "bc"); } const { data: dataOptions, @@ -2288,7 +2265,7 @@ function applyOptions(instance2) { components, directives, filters - } = options2; + } = options; const checkDuplicateProperties = null; if (injectOptions) { resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance2.appContext.config.unwrapInjectedRef); @@ -2296,7 +2273,7 @@ function applyOptions(instance2) { if (methods) { for (const key in methods) { const methodHandler = methods[key]; - if (isFunction$1(methodHandler)) { + if (isFunction(methodHandler)) { { ctx[key] = methodHandler.bind(publicThis); } @@ -2305,7 +2282,7 @@ function applyOptions(instance2) { } if (dataOptions) { const data = dataOptions.call(publicThis, publicThis); - if (!isObject$1(data)) + if (!isObject(data)) ; else { instance2.data = reactive(data); @@ -2315,10 +2292,10 @@ function applyOptions(instance2) { if (computedOptions) { for (const key in computedOptions) { const opt = computedOptions[key]; - const get3 = isFunction$1(opt) ? opt.bind(publicThis, publicThis) : isFunction$1(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - const set2 = !isFunction$1(opt) && isFunction$1(opt.set) ? opt.set.bind(publicThis) : NOOP; + const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; const c = computed({ - get: get3, + get: get2, set: set2 }); Object.defineProperty(ctx, key, { @@ -2335,7 +2312,7 @@ function applyOptions(instance2) { } } if (provideOptions) { - const provides = isFunction$1(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; Reflect.ownKeys(provides).forEach((key) => { provide(key, provides[key]); }); @@ -2344,7 +2321,7 @@ function applyOptions(instance2) { callHook$1(created, instance2, "c"); } function registerLifecycleHook(register2, hook) { - if (isArray$1(hook)) { + if (isArray(hook)) { hook.forEach((_hook) => register2(_hook.bind(publicThis))); } else if (hook) { register2(hook.bind(publicThis)); @@ -2362,7 +2339,7 @@ function applyOptions(instance2) { registerLifecycleHook(onBeforeUnmount, beforeUnmount); registerLifecycleHook(onUnmounted, unmounted2); registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray$1(expose)) { + if (isArray(expose)) { if (expose.length) { const exposed = instance2.exposed || (instance2.exposed = {}); expose.forEach((key) => { @@ -2387,13 +2364,13 @@ function applyOptions(instance2) { instance2.directives = directives; } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray$1(injectOptions)) { + if (isArray(injectOptions)) { injectOptions = normalizeInject(injectOptions); } for (const key in injectOptions) { const opt = injectOptions[key]; let injected; - if (isObject$1(opt)) { + if (isObject(opt)) { if ("default" in opt) { injected = inject(opt.from || key, opt.default, true); } else { @@ -2419,23 +2396,23 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, } } function callHook$1(hook, instance2, type) { - callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h2) => h2.bind(instance2.proxy)) : hook.bind(instance2.proxy), instance2, type); + callWithAsyncErrorHandling(isArray(hook) ? hook.map((h2) => h2.bind(instance2.proxy)) : hook.bind(instance2.proxy), instance2, type); } function createWatcher(raw, ctx, publicThis, key) { const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString$1(raw)) { + if (isString(raw)) { const handler = ctx[raw]; - if (isFunction$1(handler)) { + if (isFunction(handler)) { watch(getter, handler); } - } else if (isFunction$1(raw)) { + } else if (isFunction(raw)) { watch(getter, raw.bind(publicThis)); - } else if (isObject$1(raw)) { - if (isArray$1(raw)) { + } else if (isObject(raw)) { + if (isArray(raw)) { raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); } else { - const handler = isFunction$1(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction$1(handler)) { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { watch(getter, handler, raw); } } @@ -2516,14 +2493,14 @@ function mergeDataFn(to, from) { return from; } return function mergedDataFn() { - return extend$1(isFunction$1(to) ? to.call(this, this) : to, isFunction$1(from) ? from.call(this, this) : from); + return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); }; } function mergeInject(to, from) { return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray$1(raw)) { + if (isArray(raw)) { const res = {}; for (let i = 0; i < raw.length; i++) { res[raw[i]] = raw[i]; @@ -2536,14 +2513,14 @@ function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend$1(extend$1(/* @__PURE__ */ Object.create(null), to), from) : from; + return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from; } function mergeWatchOptions(to, from) { if (!to) return from; if (!from) return to; - const merged = extend$1(/* @__PURE__ */ Object.create(null), to); + const merged = extend(/* @__PURE__ */ Object.create(null), to); for (const key in from) { merged[key] = mergeAsArray(to[key], from[key]); } @@ -2574,7 +2551,7 @@ function initProps(instance2, rawProps, isStateful, isSSR = false) { function updateProps(instance2, rawProps, rawPrevProps, optimized) { const { props, attrs, vnode: { patchFlag } } = instance2; const rawCurrentProps = toRaw(props); - const [options2] = instance2.propsOptions; + const [options] = instance2.propsOptions; let hasAttrsChanged = false; if ((optimized || patchFlag > 0) && !(patchFlag & 16)) { if (patchFlag & 8) { @@ -2585,15 +2562,15 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { continue; } const value = rawProps[key]; - if (options2) { + if (options) { if (hasOwn(attrs, key)) { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } else { - const camelizedKey = camelize$1(key); - props[camelizedKey] = resolvePropValue(options2, rawCurrentProps, camelizedKey, value, instance2, false); + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance2, false); } } else { if (value !== attrs[key]) { @@ -2609,10 +2586,10 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { } let kebabKey; for (const key in rawCurrentProps) { - if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options2) { + if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue(options2, rawCurrentProps, key, void 0, instance2, true); + props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance2, true); } } else { delete props[key]; @@ -2633,7 +2610,7 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { } } function setFullProps(instance2, rawProps, props, attrs) { - const [options2, needCastKeys] = instance2.propsOptions; + const [options, needCastKeys] = instance2.propsOptions; let hasAttrsChanged = false; let rawCastValues; if (rawProps) { @@ -2643,7 +2620,7 @@ function setFullProps(instance2, rawProps, props, attrs) { } const value = rawProps[key]; let camelKey; - if (options2 && hasOwn(options2, camelKey = camelize$1(key))) { + if (options && hasOwn(options, camelKey = camelize(key))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props[camelKey] = value; } else { @@ -2662,18 +2639,18 @@ function setFullProps(instance2, rawProps, props, attrs) { const castValues = rawCastValues || EMPTY_OBJ; for (let i = 0; i < needCastKeys.length; i++) { const key = needCastKeys[i]; - props[key] = resolvePropValue(options2, rawCurrentProps, key, castValues[key], instance2, !hasOwn(castValues, key)); + props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance2, !hasOwn(castValues, key)); } } return hasAttrsChanged; } -function resolvePropValue(options2, props, key, value, instance2, isAbsent) { - const opt = options2[key]; +function resolvePropValue(options, props, key, value, instance2, isAbsent) { + const opt = options[key]; if (opt != null) { const hasDefault = hasOwn(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; - if (opt.type !== Function && isFunction$1(defaultValue)) { + if (opt.type !== Function && isFunction(defaultValue)) { const { propsDefaults } = instance2; if (key in propsDefaults) { value = propsDefaults[key]; @@ -2689,7 +2666,7 @@ function resolvePropValue(options2, props, key, value, instance2, isAbsent) { if (opt[0]) { if (isAbsent && !hasDefault) { value = false; - } else if (opt[1] && (value === "" || value === hyphenate$1(key))) { + } else if (opt[1] && (value === "" || value === hyphenate(key))) { value = true; } } @@ -2706,11 +2683,11 @@ function normalizePropsOptions(comp, appContext, asMixin = false) { const normalized = {}; const needCastKeys = []; let hasExtends = false; - if (!isFunction$1(comp)) { + if (!isFunction(comp)) { const extendProps = (raw2) => { hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend$1(normalized, props); + extend(normalized, props); if (keys) needCastKeys.push(...keys); }; @@ -2728,19 +2705,19 @@ function normalizePropsOptions(comp, appContext, asMixin = false) { cache.set(comp, EMPTY_ARR); return EMPTY_ARR; } - if (isArray$1(raw)) { + if (isArray(raw)) { for (let i = 0; i < raw.length; i++) { - const normalizedKey = camelize$1(raw[i]); + const normalizedKey = camelize(raw[i]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { for (const key in raw) { - const normalizedKey = camelize$1(key); + const normalizedKey = camelize(key); if (validatePropName(normalizedKey)) { const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction$1(opt) ? { type: opt } : opt; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : opt; if (prop) { const booleanIndex = getTypeIndex(Boolean, prop.type); const stringIndex = getTypeIndex(String, prop.type); @@ -2771,15 +2748,15 @@ function isSameType(a, b) { return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray$1(expectedTypes)) { + if (isArray(expectedTypes)) { return expectedTypes.findIndex((t) => isSameType(t, type)); - } else if (isFunction$1(expectedTypes)) { + } else if (isFunction(expectedTypes)) { return isSameType(expectedTypes, type) ? 0 : -1; } return -1; } const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray$1(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { if (rawSlot._n) { return rawSlot; @@ -2796,7 +2773,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance2) => { if (isInternalKey(key)) continue; const value = rawSlots[key]; - if (isFunction$1(value)) { + if (isFunction(value)) { slots[key] = normalizeSlot(key, value, ctx); } else if (value != null) { const normalized = normalizeSlotValue(value); @@ -2835,7 +2812,7 @@ const updateSlots = (instance2, children, optimized) => { if (optimized && type === 1) { needDeletionCheck = false; } else { - extend$1(slots, children); + extend(slots, children); if (!optimized && type === 1) { delete slots._; } @@ -2881,10 +2858,10 @@ function createAppContext() { let uid = 0; function createAppAPI(render2, hydrate) { return function createApp(rootComponent, rootProps = null) { - if (!isFunction$1(rootComponent)) { + if (!isFunction(rootComponent)) { rootComponent = Object.assign({}, rootComponent); } - if (rootProps != null && !isObject$1(rootProps)) { + if (rootProps != null && !isObject(rootProps)) { rootProps = null; } const context = createAppContext(); @@ -2903,15 +2880,15 @@ function createAppAPI(render2, hydrate) { }, set config(v) { }, - use(plugin, ...options2) { + use(plugin, ...options) { if (installedPlugins.has(plugin)) ; - else if (plugin && isFunction$1(plugin.install)) { + else if (plugin && isFunction(plugin.install)) { installedPlugins.add(plugin); - plugin.install(app, ...options2); - } else if (isFunction$1(plugin)) { + plugin.install(app, ...options); + } else if (isFunction(plugin)) { installedPlugins.add(plugin); - plugin(app, ...options2); + plugin(app, ...options); } else ; return app; @@ -2968,8 +2945,8 @@ function createAppAPI(render2, hydrate) { }; } function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray$1(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); + if (isArray(rawRef)) { + rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); return; } if (isAsyncWrapper(vnode) && !isUnmount) { @@ -2982,7 +2959,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; const setupState = owner.setupState; if (oldRef != null && oldRef !== ref) { - if (isString$1(oldRef)) { + if (isString(oldRef)) { refs[oldRef] = null; if (hasOwn(setupState, oldRef)) { setupState[oldRef] = null; @@ -2991,19 +2968,19 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { oldRef.value = null; } } - if (isFunction$1(ref)) { + if (isFunction(ref)) { callWithErrorHandling(ref, owner, 12, [value, refs]); } else { - const _isString = isString$1(ref); + const _isString = isString(ref); const _isRef = isRef(ref); if (_isString || _isRef) { const doSet = () => { if (rawRef.f) { const existing = _isString ? refs[ref] : ref.value; if (isUnmount) { - isArray$1(existing) && remove(existing, refValue); + isArray(existing) && remove(existing, refValue); } else { - if (!isArray$1(existing)) { + if (!isArray(existing)) { if (_isString) { refs[ref] = [refValue]; if (hasOwn(setupState, ref)) { @@ -3040,13 +3017,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { } } const queuePostRenderEffect = queueEffectWithSuspense; -function createRenderer(options2) { - return baseCreateRenderer(options2); +function createRenderer(options) { + return baseCreateRenderer(options); } -function baseCreateRenderer(options2, createHydrationFns) { +function baseCreateRenderer(options, createHydrationFns) { const target = getGlobalThis(); target.__VUE__ = true; - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options2; + const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { if (n1 === n2) { return; @@ -3113,20 +3090,20 @@ function baseCreateRenderer(options2, createHydrationFns) { [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); }; const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next2; + let next; while (el && el !== anchor) { - next2 = hostNextSibling(el); + next = hostNextSibling(el); hostInsert(el, container, nextSibling); - el = next2; + el = next; } hostInsert(anchor, container, nextSibling); }; const removeStaticNode = ({ el, anchor }) => { - let next2; + let next; while (el && el !== anchor) { - next2 = hostNextSibling(el); + next = hostNextSibling(el); hostRemove(el); - el = next2; + el = next; } hostRemove(anchor); }; @@ -3202,8 +3179,8 @@ function baseCreateRenderer(options2, createHydrationFns) { } } }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start2 = 0) => { - for (let i = start2; i < children.length; i++) { + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } @@ -3246,9 +3223,9 @@ function baseCreateRenderer(options2, createHydrationFns) { for (let i = 0; i < propsToUpdate.length; i++) { const key = propsToUpdate[i]; const prev = oldProps[key]; - const next2 = newProps[key]; - if (next2 !== prev || key === "value") { - hostPatchProp(el, key, prev, next2, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); } } } @@ -3281,10 +3258,10 @@ function baseCreateRenderer(options2, createHydrationFns) { for (const key in newProps) { if (isReservedProp(key)) continue; - const next2 = newProps[key]; + const next = newProps[key]; const prev = oldProps[key]; - if (next2 !== prev && key !== "value") { - hostPatchProp(el, key, prev, next2, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (oldProps !== EMPTY_OBJ) { @@ -3412,21 +3389,21 @@ function baseCreateRenderer(options2, createHydrationFns) { instance2.isMounted = true; initialVNode = container = anchor = null; } else { - let { next: next2, bu, u, parent, vnode } = instance2; - let originNext = next2; + let { next, bu, u, parent, vnode } = instance2; + let originNext = next; let vnodeHook; toggleRecurse(instance2, false); - if (next2) { - next2.el = vnode.el; - updateComponentPreRender(instance2, next2, optimized); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance2, next, optimized); } else { - next2 = vnode; + next = vnode; } if (bu) { invokeArrayFns(bu); } - if (vnodeHook = next2.props && next2.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next2, vnode); + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } toggleRecurse(instance2, true); const nextTree = renderComponentRoot(instance2); @@ -3441,15 +3418,15 @@ function baseCreateRenderer(options2, createHydrationFns) { parentSuspense, isSVG ); - next2.el = nextTree.el; + next.el = nextTree.el; if (originNext === null) { updateHOCHostEl(instance2, nextTree.el); } if (u) { queuePostRenderEffect(u, parentSuspense); } - if (vnodeHook = next2.props && next2.props.onVnodeUpdated) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next2, vnode), parentSuspense); + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); } } }; @@ -3760,11 +3737,11 @@ function baseCreateRenderer(options2, createHydrationFns) { } }; const removeFragment = (cur, end) => { - let next2; + let next; while (cur !== end) { - next2 = hostNextSibling(cur); + next = hostNextSibling(cur); hostRemove(cur); - cur = next2; + cur = next; } hostRemove(end); }; @@ -3791,8 +3768,8 @@ function baseCreateRenderer(options2, createHydrationFns) { } } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start2 = 0) => { - for (let i = start2; i < children.length; i++) { + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); } }; @@ -3826,7 +3803,7 @@ function baseCreateRenderer(options2, createHydrationFns) { pc: patchChildren, pbc: patchBlockChildren, n: getNextHostNode, - o: options2 + o: options }; let hydrate; let hydrateNode; @@ -3845,7 +3822,7 @@ function toggleRecurse({ effect, update: update2 }, allowed) { function traverseStaticChildren(n1, n2, shallow = false) { const ch1 = n1.children; const ch2 = n2.children; - if (isArray$1(ch1) && isArray$1(ch2)) { + if (isArray(ch1) && isArray(ch2)) { for (let i = 0; i < ch1.length; i++) { const c1 = ch1[i]; let c2 = ch2[i]; @@ -3941,7 +3918,7 @@ function isSameVNodeType(n1, n2) { const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; const normalizeRef = ({ ref, ref_key, ref_for }) => { - return ref != null ? isString$1(ref) || isRef(ref) || isFunction$1(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { const vnode = { @@ -3977,7 +3954,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn type.normalize(vnode); } } else if (children) { - vnode.shapeFlag |= isString$1(children) ? 8 : 16; + vnode.shapeFlag |= isString(children) ? 8 : 16; } if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) { currentBlock.push(vnode); @@ -4010,23 +3987,23 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami if (props) { props = guardReactiveProps(props); let { class: klass, style } = props; - if (klass && !isString$1(klass)) { + if (klass && !isString(klass)) { props.class = normalizeClass(klass); } - if (isObject$1(style)) { - if (isProxy(style) && !isArray$1(style)) { - style = extend$1({}, style); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); } props.style = normalizeStyle(style); } } - const shapeFlag = isString$1(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction$1(type) ? 2 : 0; + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); } function guardReactiveProps(props) { if (!props) return null; - return isProxy(props) || InternalObjectKey in props ? extend$1({}, props) : props; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { const { props, ref, patchFlag, children } = vnode; @@ -4037,7 +4014,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) { type: vnode.type, props: mergedProps, key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray$1(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref, + ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref, scopeId: vnode.scopeId, slotScopeIds: vnode.slotScopeIds, children, @@ -4069,7 +4046,7 @@ function createCommentVNode(text2 = "", asBlock = false) { function normalizeVNode(child) { if (child == null || typeof child === "boolean") { return createVNode(Comment); - } else if (isArray$1(child)) { + } else if (isArray(child)) { return createVNode( Fragment, null, @@ -4089,7 +4066,7 @@ function normalizeChildren(vnode, children) { const { shapeFlag } = vnode; if (children == null) { children = null; - } else if (isArray$1(children)) { + } else if (isArray(children)) { type = 16; } else if (typeof children === "object") { if (shapeFlag & (1 | 64)) { @@ -4114,7 +4091,7 @@ function normalizeChildren(vnode, children) { } } } - } else if (isFunction$1(children)) { + } else if (isFunction(children)) { children = { default: children, _ctx: currentRenderingInstance }; type = 32; } else { @@ -4140,10 +4117,10 @@ function mergeProps(...args) { } } else if (key === "style") { ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn$1(key)) { + } else if (isOn(key)) { const existing = ret[key]; const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray$1(existing) && existing.includes(incoming))) { + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { ret[key] = existing ? [].concat(existing, incoming) : incoming; } } else if (key !== "") { @@ -4287,32 +4264,32 @@ function setupStatefulComponent(instance2, isSSR) { } } function handleSetupResult(instance2, setupResult, isSSR) { - if (isFunction$1(setupResult)) { + if (isFunction(setupResult)) { if (instance2.type.__ssrInlineRender) { instance2.ssrRender = setupResult; } else { instance2.render = setupResult; } - } else if (isObject$1(setupResult)) { + } else if (isObject(setupResult)) { instance2.setupState = proxyRefs(setupResult); } else ; finishComponentSetup(instance2, isSSR); } -let compile; +let compile$1; function finishComponentSetup(instance2, isSSR, skipOptions) { const Component = instance2.type; if (!instance2.render) { - if (!isSSR && compile && !Component.render) { + if (!isSSR && compile$1 && !Component.render) { const template = Component.template; if (template) { const { isCustomElement, compilerOptions } = instance2.appContext.config; const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend$1(extend$1({ + const finalCompilerOptions = extend(extend({ isCustomElement, delimiters }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); + Component.render = compile$1(template, finalCompilerOptions); } } instance2.render = Component.render || NOOP; @@ -4363,10 +4340,10 @@ function getExposeProxy(instance2) { } } function getComponentName(Component, includeInferred = true) { - return isFunction$1(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } function isClassComponent(value) { - return isFunction$1(value) && "__vccOpts" in value; + return isFunction(value) && "__vccOpts" in value; } const computed = (getterOrOptions, debugOptions) => { return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); @@ -4374,7 +4351,7 @@ const computed = (getterOrOptions, debugOptions) => { function h(type, propsOrChildren, children) { const l = arguments.length; if (l === 2) { - if (isObject$1(propsOrChildren) && !isArray$1(propsOrChildren)) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { if (isVNode(propsOrChildren)) { return createVNode(type, null, [propsOrChildren]); } @@ -4392,45 +4369,6 @@ function h(type, propsOrChildren, children) { } } const version = "3.2.37"; -function makeMap(str, expectsLowerCase) { - const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; -} -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const isArray = Array.isArray; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isObject = (val) => val !== null && typeof val === "object"; -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; const svgNS = "http://www.w3.org/2000/svg"; const doc = typeof document !== "undefined" ? document : null; const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); @@ -4472,16 +4410,16 @@ const nodeOps = { } return cloned; }, - insertStaticContent(content, parent, anchor, isSVG, start2, end) { + insertStaticContent(content2, parent, anchor, isSVG, start, end) { const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start2 && (start2 === end || start2.nextSibling)) { + if (start && (start === end || start.nextSibling)) { while (true) { - parent.insertBefore(start2.cloneNode(true), anchor); - if (start2 === end || !(start2 = start2.nextSibling)) + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; } } else { - templateContainer.innerHTML = isSVG ? `` : content; + templateContainer.innerHTML = isSVG ? `` : content2; const template = templateContainer.content; if (isSVG) { const wrapper = template.firstChild; @@ -4511,16 +4449,16 @@ function patchClass(el, value, isSVG) { el.className = value; } } -function patchStyle(el, prev, next2) { +function patchStyle(el, prev, next) { const style = el.style; - const isCssString = isString(next2); - if (next2 && !isCssString) { - for (const key in next2) { - setStyle(style, key, next2[key]); + const isCssString = isString(next); + if (next && !isCssString) { + for (const key in next) { + setStyle(style, key, next[key]); } if (prev && !isString(prev)) { for (const key in prev) { - if (next2[key] == null) { + if (next[key] == null) { setStyle(style, key, ""); } } @@ -4528,8 +4466,8 @@ function patchStyle(el, prev, next2) { } else { const currentDisplay = style.display; if (isCssString) { - if (prev !== next2) { - style.cssText = next2; + if (prev !== next) { + style.cssText = next; } } else if (prev) { el.removeAttribute("style"); @@ -4565,7 +4503,7 @@ function autoPrefix(style, rawName) { if (cached) { return cached; } - let name = camelize$1(rawName); + let name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache[rawName] = name; } @@ -4651,11 +4589,11 @@ const reset = () => { cachedNow = 0; }; const getNow = () => cachedNow || (p.then(reset), cachedNow = _getNow()); -function addEventListener$1(el, event, handler, options2) { - el.addEventListener(event, handler, options2); +function addEventListener$1(el, event, handler, options) { + el.addEventListener(event, handler, options); } -function removeEventListener(el, event, handler, options2) { - el.removeEventListener(event, handler, options2); +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); } function patchEvent(el, rawName, prevValue, nextValue, instance2 = null) { const invokers = el._vei || (el._vei = {}); @@ -4663,28 +4601,28 @@ function patchEvent(el, rawName, prevValue, nextValue, instance2 = null) { if (nextValue && existingInvoker) { existingInvoker.value = nextValue; } else { - const [name, options2] = parseName(rawName); + const [name, options] = parseName(rawName); if (nextValue) { const invoker = invokers[rawName] = createInvoker(nextValue, instance2); - addEventListener$1(el, name, invoker, options2); + addEventListener$1(el, name, invoker, options); } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options2); + removeEventListener(el, name, existingInvoker, options); invokers[rawName] = void 0; } } } const optionsModifierRE = /(?:Once|Passive|Capture)$/; function parseName(name) { - let options2; + let options; if (optionsModifierRE.test(name)) { - options2 = {}; + options = {}; let m; while (m = name.match(optionsModifierRE)) { name = name.slice(0, name.length - m[0].length); - options2[m[0].toLowerCase()] = true; + options[m[0].toLowerCase()] = true; } } - return [hyphenate(name.slice(2)), options2]; + return [hyphenate(name.slice(2)), options]; } function createInvoker(initialValue, instance2) { const invoker = (e) => { @@ -4757,8 +4695,8 @@ function shouldSetAsProp(el, key, value, isSVG) { } return key in el; } -function defineCustomElement(options2, hydrate) { - const Comp = defineComponent(options2); +function defineCustomElement(options, hydrate) { + const Comp = defineComponent(options); class VueCustomElement extends VueElement { constructor(initialProps) { super(Comp, initialProps, hydrate); @@ -4812,7 +4750,7 @@ class VueElement extends BaseClass { this._setAttr(m.attributeName); } }).observe(this, { attributes: true }); - const resolve3 = (def2) => { + const resolve2 = (def2) => { const { props, styles } = def2; const hasOptions = !isArray(props); const rawKeys = props ? hasOptions ? Object.keys(props) : props : []; @@ -4847,9 +4785,9 @@ class VueElement extends BaseClass { }; const asyncDef = this._def.__asyncLoader; if (asyncDef) { - asyncDef().then(resolve3); + asyncDef().then(resolve2); } else { - resolve3(this._def); + resolve2(this._def); } } _setAttr(key) { @@ -4977,13 +4915,13 @@ function resolveTransitionProps(rawProps) { const makeEnterHook = (isAppear) => { return (el, done) => { const hook = isAppear ? onAppear : onEnter; - const resolve3 = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve3]); + const resolve2 = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve2]); nextFrame(() => { removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); addTransitionClass(el, isAppear ? appearToClass : enterToClass); if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve3); + whenTransitionEnds(el, type, enterDuration, resolve2); } }); }; @@ -5003,7 +4941,7 @@ function resolveTransitionProps(rawProps) { onAppear: makeEnterHook(true), onLeave(el, done) { el._isLeaving = true; - const resolve3 = () => finishLeave(el, done); + const resolve2 = () => finishLeave(el, done); addTransitionClass(el, leaveFromClass); forceReflow(); addTransitionClass(el, leaveActiveClass); @@ -5014,10 +4952,10 @@ function resolveTransitionProps(rawProps) { removeTransitionClass(el, leaveFromClass); addTransitionClass(el, leaveToClass); if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve3); + whenTransitionEnds(el, type, leaveDuration, resolve2); } }); - callHook(onLeave, [el, resolve3]); + callHook(onLeave, [el, resolve2]); }, onEnterCancelled(el) { finishEnter(el, false); @@ -5067,11 +5005,11 @@ function nextFrame(cb) { }); } let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve3) { +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) { const id = el._endId = ++endId; const resolveIfNotStale = () => { if (id === el._endId) { - resolve3(); + resolve2(); } }; if (explicitTimeout) { @@ -5079,7 +5017,7 @@ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve3) { } const { type, timeout, propCount } = getTransitionInfo(el, expectedType); if (!type) { - return resolve3(); + return resolve2(); } const endEvent = type + "end"; let ended = 0; @@ -5158,7 +5096,7 @@ const TransitionGroupImpl = { }), setup(props, { slots }) { const instance2 = getCurrentInstance(); - const state2 = useTransitionState(); + const state = useTransitionState(); let prevChildren; let children; onUpdated(() => { @@ -5200,13 +5138,13 @@ const TransitionGroupImpl = { for (let i = 0; i < children.length; i++) { const child = children[i]; if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state2, instance2)); + setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance2)); } } if (prevChildren) { for (let i = 0; i < prevChildren.length; i++) { const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state2, instance2)); + setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance2)); positionMap.set(child, child.el.getBoundingClientRect()); } } @@ -5363,7 +5301,7 @@ const _sfc_main$q = { const _hoisted_1$q = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_2$n = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_3$j = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); -const _hoisted_4$h = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); +const _hoisted_4$g = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_5$b = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_6$7 = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { @@ -5389,7 +5327,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { _hoisted_3$j ]) : createCommentVNode("", true), $props.type === "room-file" ? renderSlot(_ctx.$slots, "spinner-icon-room-file", { key: 3 }, () => [ - _hoisted_4$h + _hoisted_4$g ]) : createCommentVNode("", true), $props.type === "messages" ? renderSlot(_ctx.$slots, "spinner-icon-messages", { key: 4 }, () => [ _hoisted_5$b @@ -5576,887 +5514,6382 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { ], 2); } var RoomsSearch = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o]]); -var linkify = {}; -var _class$4 = {}; -_class$4.__esModule = true; -_class$4.inherits = inherits; -function inherits(parent, child) { - var props = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var extended = Object.create(parent.prototype); - for (var p2 in props) { - extended[p2] = props[p2]; - } - extended.constructor = child; - child.prototype = extended; - return child; -} -var options$1 = {}; -options$1.__esModule = true; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { - return typeof obj; -} : function(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; -var defaults = { - defaultProtocol: "http", - events: null, - format: noop$1, - formatHref: noop$1, - nl2br: false, - tagName: "a", - target: typeToTarget, - validate: true, - ignoreTags: [], - attributes: null, - className: "linkified" -}; -options$1.defaults = defaults; -options$1.Options = Options; -options$1.contains = contains; -function Options(opts) { - opts = opts || {}; - this.defaultProtocol = opts.hasOwnProperty("defaultProtocol") ? opts.defaultProtocol : defaults.defaultProtocol; - this.events = opts.hasOwnProperty("events") ? opts.events : defaults.events; - this.format = opts.hasOwnProperty("format") ? opts.format : defaults.format; - this.formatHref = opts.hasOwnProperty("formatHref") ? opts.formatHref : defaults.formatHref; - this.nl2br = opts.hasOwnProperty("nl2br") ? opts.nl2br : defaults.nl2br; - this.tagName = opts.hasOwnProperty("tagName") ? opts.tagName : defaults.tagName; - this.target = opts.hasOwnProperty("target") ? opts.target : defaults.target; - this.validate = opts.hasOwnProperty("validate") ? opts.validate : defaults.validate; - this.ignoreTags = []; - this.attributes = opts.attributes || opts.linkAttributes || defaults.attributes; - this.className = opts.hasOwnProperty("className") ? opts.className : opts.linkClass || defaults.className; - var ignoredTags = opts.hasOwnProperty("ignoreTags") ? opts.ignoreTags : defaults.ignoreTags; - for (var i = 0; i < ignoredTags.length; i++) { - this.ignoreTags.push(ignoredTags[i].toUpperCase()); - } -} -Options.prototype = { - resolve: function resolve2(token) { - var href = token.toHref(this.defaultProtocol); - return { - formatted: this.get("format", token.toString(), token), - formattedHref: this.get("formatHref", href, token), - tagName: this.get("tagName", href, token), - className: this.get("className", href, token), - target: this.get("target", href, token), - events: this.getObject("events", href, token), - attributes: this.getObject("attributes", href, token) - }; - }, - check: function check(token) { - return this.get("validate", token.toString(), token); - }, - get: function get(key, operator, token) { - var optionValue = void 0, option = this[key]; - if (!option) { - return option; - } - switch (typeof option === "undefined" ? "undefined" : _typeof(option)) { - case "function": - return option(operator, token.type); - case "object": - optionValue = option.hasOwnProperty(token.type) ? option[token.type] : defaults[key]; - return typeof optionValue === "function" ? optionValue(operator, token.type) : optionValue; - } - return option; - }, - getObject: function getObject(key, operator, token) { - var option = this[key]; - return typeof option === "function" ? option(operator, token.type) : option; +const element$1 = document.createElement("i"); +function decodeNamedCharacterReference(value) { + const characterReference2 = "&" + value + ";"; + element$1.innerHTML = characterReference2; + const char = element$1.textContent; + if (char.charCodeAt(char.length - 1) === 59 && value !== "semi") { + return false; + } + return char === characterReference2 ? false : char; +} +function splice(list2, start, remove2, items) { + const end = list2.length; + let chunkStart = 0; + let parameters; + if (start < 0) { + start = -start > end ? 0 : end + start; + } else { + start = start > end ? end : start; + } + remove2 = remove2 > 0 ? remove2 : 0; + if (items.length < 1e4) { + parameters = Array.from(items); + parameters.unshift(start, remove2); + list2.splice(...parameters); + } else { + if (remove2) + list2.splice(start, remove2); + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 1e4); + parameters.unshift(start, 0); + list2.splice(...parameters); + chunkStart += 1e4; + start += 1e4; + } + } +} +function push(list2, items) { + if (list2.length > 0) { + splice(list2, list2.length, 0, items); + return list2; + } + return items; +} +const hasOwnProperty$1 = {}.hasOwnProperty; +function combineExtensions(extensions) { + const all = {}; + let index = -1; + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]); + } + return all; +} +function syntaxExtension(all, extension) { + let hook; + for (hook in extension) { + const maybe = hasOwnProperty$1.call(all, hook) ? all[hook] : void 0; + const left = maybe || (all[hook] = {}); + const right = extension[hook]; + let code2; + if (right) { + for (code2 in right) { + if (!hasOwnProperty$1.call(left, code2)) + left[code2] = []; + const value = right[code2]; + constructs( + left[code2], + Array.isArray(value) ? value : value ? [value] : [] + ); + } + } + } +} +function constructs(existing, list2) { + let index = -1; + const before = []; + while (++index < list2.length) { + (list2[index].add === "after" ? existing : before).push(list2[index]); + } + splice(existing, 0, 0, before); +} +function combineHtmlExtensions(htmlExtensions) { + const handlers = {}; + let index = -1; + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]); + } + return handlers; +} +function htmlExtension(all, extension) { + let hook; + for (hook in extension) { + const maybe = hasOwnProperty$1.call(all, hook) ? all[hook] : void 0; + const left = maybe || (all[hook] = {}); + const right = extension[hook]; + let type; + if (right) { + for (type in right) { + left[type] = right[type]; + } + } + } +} +function decodeNumericCharacterReference(value, base) { + const code2 = Number.parseInt(value, base); + if (code2 < 9 || code2 === 11 || code2 > 13 && code2 < 32 || code2 > 126 && code2 < 160 || code2 > 55295 && code2 < 57344 || code2 > 64975 && code2 < 65008 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534 || code2 > 1114111) { + return "\uFFFD"; + } + return String.fromCharCode(code2); +} +const characterReferences = { '"': "quot", "&": "amp", "<": "lt", ">": "gt" }; +function encode(value) { + return value.replace(/["&<>]/g, replace2); + function replace2(value2) { + return "&" + characterReferences[value2] + ";"; + } +} +function normalizeIdentifier(value) { + return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} +const unicodePunctuationRegex = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; +const asciiAlpha = regexCheck(/[A-Za-z]/); +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/); +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); +function asciiControl(code2) { + return code2 !== null && (code2 < 32 || code2 === 127); +} +const asciiDigit = regexCheck(/\d/); +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/); +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); +function markdownLineEnding(code2) { + return code2 !== null && code2 < -2; +} +function markdownLineEndingOrSpace(code2) { + return code2 !== null && (code2 < 0 || code2 === 32); +} +function markdownSpace(code2) { + return code2 === -2 || code2 === -1 || code2 === 32; +} +const unicodePunctuation = regexCheck(unicodePunctuationRegex); +const unicodeWhitespace = regexCheck(/\s/); +function regexCheck(regex) { + return check; + function check(code2) { + return code2 !== null && regex.test(String.fromCharCode(code2)); + } +} +function sanitizeUri(url, protocol) { + const value = encode(normalizeUri(url || "")); + if (!protocol) { + return value; + } + const colon = value.indexOf(":"); + const questionMark = value.indexOf("?"); + const numberSign = value.indexOf("#"); + const slash = value.indexOf("/"); + if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign || protocol.test(value.slice(0, colon))) { + return value; + } + return ""; +} +function normalizeUri(value) { + const result = []; + let index = -1; + let start = 0; + let skip = 0; + while (++index < value.length) { + const code2 = value.charCodeAt(index); + let replace2 = ""; + if (code2 === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) { + skip = 2; + } else if (code2 < 128) { + if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))) { + replace2 = String.fromCharCode(code2); + } + } else if (code2 > 55295 && code2 < 57344) { + const next = value.charCodeAt(index + 1); + if (code2 < 56320 && next > 56319 && next < 57344) { + replace2 = String.fromCharCode(code2, next); + skip = 1; + } else { + replace2 = "\uFFFD"; + } + } else { + replace2 = String.fromCharCode(code2); + } + if (replace2) { + result.push(value.slice(start, index), encodeURIComponent(replace2)); + start = index + skip + 1; + replace2 = ""; + } + if (skip) { + index += skip; + skip = 0; + } + } + return result.join("") + value.slice(start); +} +const hasOwnProperty = {}.hasOwnProperty; +const protocolHref = /^(https?|ircs?|mailto|xmpp)$/i; +const protocolSrc = /^https?$/i; +function compile(options) { + const settings = options || {}; + let tags = true; + const definitions2 = {}; + const buffers = [[]]; + const mediaStack = []; + const tightStack = []; + const defaultHandlers = { + enter: { + blockQuote: onenterblockquote, + codeFenced: onentercodefenced, + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: onentercodeindented, + codeText: onentercodetext, + content: onentercontent, + definition: onenterdefinition, + definitionDestinationString: onenterdefinitiondestinationstring, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: onenteremphasis, + htmlFlow: onenterhtmlflow, + htmlText: onenterhtml, + image: onenterimage, + label: buffer, + link: onenterlink, + listItemMarker: onenterlistitemmarker, + listItemValue: onenterlistitemvalue, + listOrdered: onenterlistordered, + listUnordered: onenterlistunordered, + paragraph: onenterparagraph, + reference: buffer, + resource: onenterresource, + resourceDestinationString: onenterresourcedestinationstring, + resourceTitleString: buffer, + setextHeading: onentersetextheading, + strong: onenterstrong + }, + exit: { + atxHeading: onexitatxheading, + atxHeadingSequence: onexitatxheadingsequence, + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: onexitblockquote, + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: onexitflowcode, + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: resume, + codeFlowValue: onexitcodeflowvalue, + codeIndented: onexitflowcode, + codeText: onexitcodetext, + codeTextData: onexitdata, + data: onexitdata, + definition: onexitdefinition, + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: onexitemphasis, + hardBreakEscape: onexithardbreak, + hardBreakTrailing: onexithardbreak, + htmlFlow: onexithtml, + htmlFlowData: onexitdata, + htmlText: onexithtml, + htmlTextData: onexitdata, + image: onexitmedia, + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: onexitmedia, + listOrdered: onexitlistordered, + listUnordered: onexitlistunordered, + paragraph: onexitparagraph, + reference: resume, + referenceString: onexitreferencestring, + resource: resume, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + setextHeading: onexitsetextheading, + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: onexitstrong, + thematicBreak: onexitthematicbreak + } + }; + const handlers = combineHtmlExtensions( + [defaultHandlers].concat(settings.htmlExtensions || []) + ); + const data = { + tightStack, + definitions: definitions2 + }; + const context = { + lineEndingIfNeeded, + options: settings, + encode: encode$1, + raw, + tag, + buffer, + resume, + setData, + getData + }; + let lineEndingStyle = settings.defaultLineEnding; + return compile2; + function compile2(events) { + let index = -1; + let start = 0; + const listStack = []; + let head = []; + let body = []; + while (++index < events.length) { + if (!lineEndingStyle && (events[index][1].type === "lineEnding" || events[index][1].type === "lineEndingBlank")) { + lineEndingStyle = events[index][2].sliceSerialize(events[index][1]); + } + if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") { + if (events[index][0] === "enter") { + listStack.push(index); + } else { + prepareList(events.slice(listStack.pop(), index)); + } + } + if (events[index][1].type === "definition") { + if (events[index][0] === "enter") { + body = push(body, events.slice(start, index)); + start = index; + } else { + head = push(head, events.slice(start, index + 1)); + start = index + 1; + } + } + } + head = push(head, body); + head = push(head, events.slice(start)); + index = -1; + const result = head; + if (handlers.enter.null) { + handlers.enter.null.call(context); + } + while (++index < events.length) { + const handles = handlers[result[index][0]]; + const kind = result[index][1].type; + const handle = handles[kind]; + if (hasOwnProperty.call(handles, kind) && handle) { + handle.call( + Object.assign( + { + sliceSerialize: result[index][2].sliceSerialize + }, + context + ), + result[index][1] + ); + } + } + if (handlers.exit.null) { + handlers.exit.null.call(context); + } + return buffers[0].join(""); + } + function prepareList(slice) { + const length = slice.length; + let index = 0; + let containerBalance = 0; + let loose = false; + let atMarker; + while (++index < length) { + const event = slice[index]; + if (event[1]._container) { + atMarker = void 0; + if (event[0] === "enter") { + containerBalance++; + } else { + containerBalance--; + } + } else + switch (event[1].type) { + case "listItemPrefix": { + if (event[0] === "exit") { + atMarker = true; + } + break; + } + case "linePrefix": { + break; + } + case "lineEndingBlank": { + if (event[0] === "enter" && !containerBalance) { + if (atMarker) { + atMarker = void 0; + } else { + loose = true; + } + } + break; + } + default: { + atMarker = void 0; + } + } + } + slice[0][1]._loose = loose; + } + function setData(key, value) { + data[key] = value; + } + function getData(key) { + return data[key]; + } + function buffer() { + buffers.push([]); + } + function resume() { + const buf = buffers.pop(); + return buf.join(""); + } + function tag(value) { + if (!tags) + return; + setData("lastWasTag", true); + buffers[buffers.length - 1].push(value); + } + function raw(value) { + setData("lastWasTag"); + buffers[buffers.length - 1].push(value); + } + function lineEnding2() { + raw(lineEndingStyle || "\n"); + } + function lineEndingIfNeeded() { + const buffer2 = buffers[buffers.length - 1]; + const slice = buffer2[buffer2.length - 1]; + const previous2 = slice ? slice.charCodeAt(slice.length - 1) : null; + if (previous2 === 10 || previous2 === 13 || previous2 === null) { + return; + } + lineEnding2(); + } + function encode$1(value) { + return getData("ignoreEncode") ? value : encode(value); + } + function onenterlistordered(token) { + tightStack.push(!token._loose); + lineEndingIfNeeded(); + tag("
"); + } + function onexitblockquote() { + tightStack.pop(); + lineEndingIfNeeded(); + tag(""); + setData("slurpAllLineEndings"); + } + function onenterparagraph() { + if (!tightStack[tightStack.length - 1]) { + lineEndingIfNeeded(); + tag("
"); + } + setData("slurpAllLineEndings"); + } + function onexitparagraph() { + if (tightStack[tightStack.length - 1]) { + setData("slurpAllLineEndings", true); + } else { + tag("
"); + } + } + function onentercodefenced() { + lineEndingIfNeeded(); + tag("");
+ setData("slurpOneLineEnding", true);
+ }
+ setData("fencesCount", count + 1);
+ }
+ function onentercodeindented() {
+ lineEndingIfNeeded();
+ tag("");
+ }
+ function onexitflowcode() {
+ const count = getData("fencesCount");
+ if (count !== void 0 && count < 2 && data.tightStack.length > 0 && !getData("lastWasTag")) {
+ lineEnding2();
+ }
+ if (getData("flowCodeSeenData")) {
+ lineEndingIfNeeded();
+ }
+ tag("
");
+ if (count !== void 0 && count < 2)
+ lineEndingIfNeeded();
+ setData("flowCodeSeenData");
+ setData("fencesCount");
+ setData("slurpOneLineEnding");
+ }
+ function onenterimage() {
+ mediaStack.push({
+ image: true
+ });
+ tags = void 0;
+ }
+ function onenterlink() {
+ mediaStack.push({});
+ }
+ function onexitlabeltext(token) {
+ mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token);
+ }
+ function onexitlabel() {
+ mediaStack[mediaStack.length - 1].label = resume();
+ }
+ function onexitreferencestring(token) {
+ mediaStack[mediaStack.length - 1].referenceId = this.sliceSerialize(token);
+ }
+ function onenterresource() {
+ buffer();
+ mediaStack[mediaStack.length - 1].destination = "";
+ }
+ function onenterresourcedestinationstring() {
+ buffer();
+ setData("ignoreEncode", true);
+ }
+ function onexitresourcedestinationstring() {
+ mediaStack[mediaStack.length - 1].destination = resume();
+ setData("ignoreEncode");
+ }
+ function onexitresourcetitlestring() {
+ mediaStack[mediaStack.length - 1].title = resume();
+ }
+ function onexitmedia() {
+ let index = mediaStack.length - 1;
+ const media = mediaStack[index];
+ const id = media.referenceId || media.labelId;
+ const context2 = media.destination === void 0 ? definitions2[normalizeIdentifier(id)] : media;
+ tags = true;
+ while (index--) {
+ if (mediaStack[index].image) {
+ tags = void 0;
+ break;
+ }
+ }
+ if (media.image) {
+ tag(
+ '
");
+ } else {
+ tag(">");
+ raw(media.label);
+ tag("");
+ }
+ mediaStack.pop();
+ }
+ function onenterdefinition() {
+ buffer();
+ mediaStack.push({});
+ }
+ function onexitdefinitionlabelstring(token) {
+ resume();
+ mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token);
+ }
+ function onenterdefinitiondestinationstring() {
+ buffer();
+ setData("ignoreEncode", true);
+ }
+ function onexitdefinitiondestinationstring() {
+ mediaStack[mediaStack.length - 1].destination = resume();
+ setData("ignoreEncode");
+ }
+ function onexitdefinitiontitlestring() {
+ mediaStack[mediaStack.length - 1].title = resume();
+ }
+ function onexitdefinition() {
+ const media = mediaStack[mediaStack.length - 1];
+ const id = normalizeIdentifier(media.labelId);
+ resume();
+ if (!hasOwnProperty.call(definitions2, id)) {
+ definitions2[id] = mediaStack[mediaStack.length - 1];
+ }
+ mediaStack.pop();
+ }
+ function onentercontent() {
+ setData("slurpAllLineEndings", true);
+ }
+ function onexitatxheadingsequence(token) {
+ if (getData("headingRank"))
+ return;
+ setData("headingRank", this.sliceSerialize(token).length);
+ lineEndingIfNeeded();
+ tag("");
+ }
+ function onentersetextheading() {
+ buffer();
+ setData("slurpAllLineEndings");
+ }
+ function onexitsetextheadingtext() {
+ setData("slurpAllLineEndings", true);
+ }
+ function onexitatxheading() {
+ tag(" ");
+ setData("headingRank");
+ }
+ function onexitsetextheadinglinesequence(token) {
+ setData(
+ "headingRank",
+ this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2
+ );
+ }
+ function onexitsetextheading() {
+ const value = resume();
+ lineEndingIfNeeded();
+ tag("");
+ raw(value);
+ tag(" ");
+ setData("slurpAllLineEndings");
+ setData("headingRank");
+ }
+ function onexitdata(token) {
+ raw(encode$1(this.sliceSerialize(token)));
+ }
+ function onexitlineending(token) {
+ if (getData("slurpAllLineEndings")) {
+ return;
+ }
+ if (getData("slurpOneLineEnding")) {
+ setData("slurpOneLineEnding");
+ return;
+ }
+ if (getData("inCodeText")) {
+ raw(" ");
+ return;
+ }
+ raw(encode$1(this.sliceSerialize(token)));
+ }
+ function onexitcodeflowvalue(token) {
+ raw(encode$1(this.sliceSerialize(token)));
+ setData("flowCodeSeenData", true);
+ }
+ function onexithardbreak() {
+ tag("
");
+ }
+ function onenterhtmlflow() {
+ lineEndingIfNeeded();
+ onenterhtml();
+ }
+ function onexithtml() {
+ setData("ignoreEncode");
+ }
+ function onenterhtml() {
+ if (settings.allowDangerousHtml) {
+ setData("ignoreEncode", true);
+ }
+ }
+ function onenteremphasis() {
+ tag("");
+ }
+ function onenterstrong() {
+ tag("");
+ }
+ function onentercodetext() {
+ setData("inCodeText", true);
+ tag("");
+ }
+ function onexitcodetext() {
+ setData("inCodeText");
+ tag("
");
+ }
+ function onexitemphasis() {
+ tag("");
+ }
+ function onexitstrong() {
+ tag("");
+ }
+ function onexitthematicbreak() {
+ lineEndingIfNeeded();
+ tag("
");
+ }
+ function onexitcharacterreferencemarker(token) {
+ setData("characterReferenceType", token.type);
+ }
+ function onexitcharacterreferencevalue(token) {
+ let value = this.sliceSerialize(token);
+ value = getData("characterReferenceType") ? decodeNumericCharacterReference(
+ value,
+ getData("characterReferenceType") === "characterReferenceMarkerNumeric" ? 10 : 16
+ ) : decodeNamedCharacterReference(value);
+ raw(encode$1(value));
+ setData("characterReferenceType");
+ }
+ function onexitautolinkprotocol(token) {
+ const uri = this.sliceSerialize(token);
+ tag(
+ ''
+ );
+ raw(encode$1(uri));
+ tag("");
+ }
+ function onexitautolinkemail(token) {
+ const uri = this.sliceSerialize(token);
+ tag('');
+ raw(encode$1(uri));
+ tag("");
+ }
+}
+function factorySpace(effects, ok, type, max) {
+ const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
+ let size2 = 0;
+ return start;
+ function start(code2) {
+ if (markdownSpace(code2)) {
+ effects.enter(type);
+ return prefix(code2);
+ }
+ return ok(code2);
+ }
+ function prefix(code2) {
+ if (markdownSpace(code2) && size2++ < limit) {
+ effects.consume(code2);
+ return prefix;
+ }
+ effects.exit(type);
+ return ok(code2);
+ }
+}
+const content$1 = {
+ tokenize: initializeContent
+};
+function initializeContent(effects) {
+ const contentStart = effects.attempt(
+ this.parser.constructs.contentInitial,
+ afterContentStartConstruct,
+ paragraphInitial
+ );
+ let previous2;
+ return contentStart;
+ function afterContentStartConstruct(code2) {
+ if (code2 === null) {
+ effects.consume(code2);
+ return;
+ }
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return factorySpace(effects, contentStart, "linePrefix");
+ }
+ function paragraphInitial(code2) {
+ effects.enter("paragraph");
+ return lineStart(code2);
+ }
+ function lineStart(code2) {
+ const token = effects.enter("chunkText", {
+ contentType: "text",
+ previous: previous2
+ });
+ if (previous2) {
+ previous2.next = token;
+ }
+ previous2 = token;
+ return data(code2);
+ }
+ function data(code2) {
+ if (code2 === null) {
+ effects.exit("chunkText");
+ effects.exit("paragraph");
+ effects.consume(code2);
+ return;
+ }
+ if (markdownLineEnding(code2)) {
+ effects.consume(code2);
+ effects.exit("chunkText");
+ return lineStart;
+ }
+ effects.consume(code2);
+ return data;
+ }
+}
+const document$2 = {
+ tokenize: initializeDocument
+};
+const containerConstruct = {
+ tokenize: tokenizeContainer
+};
+function initializeDocument(effects) {
+ const self2 = this;
+ const stack = [];
+ let continued = 0;
+ let childFlow;
+ let childToken;
+ let lineStartOffset;
+ return start;
+ function start(code2) {
+ if (continued < stack.length) {
+ const item = stack[continued];
+ self2.containerState = item[1];
+ return effects.attempt(
+ item[0].continuation,
+ documentContinue,
+ checkNewContainers
+ )(code2);
+ }
+ return checkNewContainers(code2);
+ }
+ function documentContinue(code2) {
+ continued++;
+ if (self2.containerState._closeFlow) {
+ self2.containerState._closeFlow = void 0;
+ if (childFlow) {
+ closeFlow();
+ }
+ const indexBeforeExits = self2.events.length;
+ let indexBeforeFlow = indexBeforeExits;
+ let point;
+ while (indexBeforeFlow--) {
+ if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
+ point = self2.events[indexBeforeFlow][1].end;
+ break;
+ }
+ }
+ exitContainers(continued);
+ let index = indexBeforeExits;
+ while (index < self2.events.length) {
+ self2.events[index][1].end = Object.assign({}, point);
+ index++;
+ }
+ splice(
+ self2.events,
+ indexBeforeFlow + 1,
+ 0,
+ self2.events.slice(indexBeforeExits)
+ );
+ self2.events.length = index;
+ return checkNewContainers(code2);
+ }
+ return start(code2);
+ }
+ function checkNewContainers(code2) {
+ if (continued === stack.length) {
+ if (!childFlow) {
+ return documentContinued(code2);
+ }
+ if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
+ return flowStart(code2);
+ }
+ self2.interrupt = Boolean(
+ childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
+ );
+ }
+ self2.containerState = {};
+ return effects.check(
+ containerConstruct,
+ thereIsANewContainer,
+ thereIsNoNewContainer
+ )(code2);
+ }
+ function thereIsANewContainer(code2) {
+ if (childFlow)
+ closeFlow();
+ exitContainers(continued);
+ return documentContinued(code2);
+ }
+ function thereIsNoNewContainer(code2) {
+ self2.parser.lazy[self2.now().line] = continued !== stack.length;
+ lineStartOffset = self2.now().offset;
+ return flowStart(code2);
+ }
+ function documentContinued(code2) {
+ self2.containerState = {};
+ return effects.attempt(
+ containerConstruct,
+ containerContinue,
+ flowStart
+ )(code2);
+ }
+ function containerContinue(code2) {
+ continued++;
+ stack.push([self2.currentConstruct, self2.containerState]);
+ return documentContinued(code2);
+ }
+ function flowStart(code2) {
+ if (code2 === null) {
+ if (childFlow)
+ closeFlow();
+ exitContainers(0);
+ effects.consume(code2);
+ return;
+ }
+ childFlow = childFlow || self2.parser.flow(self2.now());
+ effects.enter("chunkFlow", {
+ contentType: "flow",
+ previous: childToken,
+ _tokenizer: childFlow
+ });
+ return flowContinue(code2);
+ }
+ function flowContinue(code2) {
+ if (code2 === null) {
+ writeToChild(effects.exit("chunkFlow"), true);
+ exitContainers(0);
+ effects.consume(code2);
+ return;
+ }
+ if (markdownLineEnding(code2)) {
+ effects.consume(code2);
+ writeToChild(effects.exit("chunkFlow"));
+ continued = 0;
+ self2.interrupt = void 0;
+ return start;
+ }
+ effects.consume(code2);
+ return flowContinue;
+ }
+ function writeToChild(token, eof) {
+ const stream = self2.sliceStream(token);
+ if (eof)
+ stream.push(null);
+ token.previous = childToken;
+ if (childToken)
+ childToken.next = token;
+ childToken = token;
+ childFlow.defineSkip(token.start);
+ childFlow.write(stream);
+ if (self2.parser.lazy[token.start.line]) {
+ let index = childFlow.events.length;
+ while (index--) {
+ if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) {
+ return;
+ }
+ }
+ const indexBeforeExits = self2.events.length;
+ let indexBeforeFlow = indexBeforeExits;
+ let seen;
+ let point;
+ while (indexBeforeFlow--) {
+ if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
+ if (seen) {
+ point = self2.events[indexBeforeFlow][1].end;
+ break;
+ }
+ seen = true;
+ }
+ }
+ exitContainers(continued);
+ index = indexBeforeExits;
+ while (index < self2.events.length) {
+ self2.events[index][1].end = Object.assign({}, point);
+ index++;
+ }
+ splice(
+ self2.events,
+ indexBeforeFlow + 1,
+ 0,
+ self2.events.slice(indexBeforeExits)
+ );
+ self2.events.length = index;
+ }
+ }
+ function exitContainers(size2) {
+ let index = stack.length;
+ while (index-- > size2) {
+ const entry = stack[index];
+ self2.containerState = entry[1];
+ entry[0].exit.call(self2, effects);
+ }
+ stack.length = size2;
+ }
+ function closeFlow() {
+ childFlow.write([null]);
+ childToken = void 0;
+ childFlow = void 0;
+ self2.containerState._closeFlow = void 0;
+ }
+}
+function tokenizeContainer(effects, ok, nok) {
+ return factorySpace(
+ effects,
+ effects.attempt(this.parser.constructs.document, ok, nok),
+ "linePrefix",
+ this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ );
+}
+function classifyCharacter(code2) {
+ if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
+ return 1;
+ }
+ if (unicodePunctuation(code2)) {
+ return 2;
+ }
+}
+function resolveAll(constructs2, events, context) {
+ const called = [];
+ let index = -1;
+ while (++index < constructs2.length) {
+ const resolve2 = constructs2[index].resolveAll;
+ if (resolve2 && !called.includes(resolve2)) {
+ events = resolve2(events, context);
+ called.push(resolve2);
+ }
+ }
+ return events;
+}
+const attention = {
+ name: "attention",
+ tokenize: tokenizeAttention,
+ resolveAll: resolveAllAttention
+};
+function resolveAllAttention(events, context) {
+ let index = -1;
+ let open;
+ let group;
+ let text2;
+ let openingSequence;
+ let closingSequence;
+ let use;
+ let nextEvents;
+ let offset;
+ while (++index < events.length) {
+ if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
+ open = index;
+ while (open--) {
+ if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
+ if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {
+ continue;
+ }
+ use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
+ const start = Object.assign({}, events[open][1].end);
+ const end = Object.assign({}, events[index][1].start);
+ movePoint(start, -use);
+ movePoint(end, use);
+ openingSequence = {
+ type: use > 1 ? "strongSequence" : "emphasisSequence",
+ start,
+ end: Object.assign({}, events[open][1].end)
+ };
+ closingSequence = {
+ type: use > 1 ? "strongSequence" : "emphasisSequence",
+ start: Object.assign({}, events[index][1].start),
+ end
+ };
+ text2 = {
+ type: use > 1 ? "strongText" : "emphasisText",
+ start: Object.assign({}, events[open][1].end),
+ end: Object.assign({}, events[index][1].start)
+ };
+ group = {
+ type: use > 1 ? "strong" : "emphasis",
+ start: Object.assign({}, openingSequence.start),
+ end: Object.assign({}, closingSequence.end)
+ };
+ events[open][1].end = Object.assign({}, openingSequence.start);
+ events[index][1].start = Object.assign({}, closingSequence.end);
+ nextEvents = [];
+ if (events[open][1].end.offset - events[open][1].start.offset) {
+ nextEvents = push(nextEvents, [
+ ["enter", events[open][1], context],
+ ["exit", events[open][1], context]
+ ]);
+ }
+ nextEvents = push(nextEvents, [
+ ["enter", group, context],
+ ["enter", openingSequence, context],
+ ["exit", openingSequence, context],
+ ["enter", text2, context]
+ ]);
+ nextEvents = push(
+ nextEvents,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + 1, index),
+ context
+ )
+ );
+ nextEvents = push(nextEvents, [
+ ["exit", text2, context],
+ ["enter", closingSequence, context],
+ ["exit", closingSequence, context],
+ ["exit", group, context]
+ ]);
+ if (events[index][1].end.offset - events[index][1].start.offset) {
+ offset = 2;
+ nextEvents = push(nextEvents, [
+ ["enter", events[index][1], context],
+ ["exit", events[index][1], context]
+ ]);
+ } else {
+ offset = 0;
+ }
+ splice(events, open - 1, index - open + 3, nextEvents);
+ index = open + nextEvents.length - offset - 2;
+ break;
+ }
+ }
+ }
+ }
+ index = -1;
+ while (++index < events.length) {
+ if (events[index][1].type === "attentionSequence") {
+ events[index][1].type = "data";
+ }
+ }
+ return events;
+}
+function tokenizeAttention(effects, ok) {
+ const attentionMarkers2 = this.parser.constructs.attentionMarkers.null;
+ const previous2 = this.previous;
+ const before = classifyCharacter(previous2);
+ let marker;
+ return start;
+ function start(code2) {
+ marker = code2;
+ effects.enter("attentionSequence");
+ return inside(code2);
+ }
+ function inside(code2) {
+ if (code2 === marker) {
+ effects.consume(code2);
+ return inside;
+ }
+ const token = effects.exit("attentionSequence");
+ const after = classifyCharacter(code2);
+ const open = !after || after === 2 && before || attentionMarkers2.includes(code2);
+ const close = !before || before === 2 && after || attentionMarkers2.includes(previous2);
+ token._open = Boolean(marker === 42 ? open : open && (before || !close));
+ token._close = Boolean(marker === 42 ? close : close && (after || !open));
+ return ok(code2);
+ }
+}
+function movePoint(point, offset) {
+ point.column += offset;
+ point.offset += offset;
+ point._bufferIndex += offset;
+}
+const autolink = {
+ name: "autolink",
+ tokenize: tokenizeAutolink
+};
+function tokenizeAutolink(effects, ok, nok) {
+ let size2 = 0;
+ return start;
+ function start(code2) {
+ effects.enter("autolink");
+ effects.enter("autolinkMarker");
+ effects.consume(code2);
+ effects.exit("autolinkMarker");
+ effects.enter("autolinkProtocol");
+ return open;
+ }
+ function open(code2) {
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ return schemeOrEmailAtext;
+ }
+ return emailAtext(code2);
+ }
+ function schemeOrEmailAtext(code2) {
+ if (code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) {
+ size2 = 1;
+ return schemeInsideOrEmailAtext(code2);
+ }
+ return emailAtext(code2);
+ }
+ function schemeInsideOrEmailAtext(code2) {
+ if (code2 === 58) {
+ effects.consume(code2);
+ size2 = 0;
+ return urlInside;
+ }
+ if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size2++ < 32) {
+ effects.consume(code2);
+ return schemeInsideOrEmailAtext;
+ }
+ size2 = 0;
+ return emailAtext(code2);
+ }
+ function urlInside(code2) {
+ if (code2 === 62) {
+ effects.exit("autolinkProtocol");
+ effects.enter("autolinkMarker");
+ effects.consume(code2);
+ effects.exit("autolinkMarker");
+ effects.exit("autolink");
+ return ok;
+ }
+ if (code2 === null || code2 === 32 || code2 === 60 || asciiControl(code2)) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return urlInside;
+ }
+ function emailAtext(code2) {
+ if (code2 === 64) {
+ effects.consume(code2);
+ return emailAtSignOrDot;
+ }
+ if (asciiAtext(code2)) {
+ effects.consume(code2);
+ return emailAtext;
+ }
+ return nok(code2);
+ }
+ function emailAtSignOrDot(code2) {
+ return asciiAlphanumeric(code2) ? emailLabel(code2) : nok(code2);
+ }
+ function emailLabel(code2) {
+ if (code2 === 46) {
+ effects.consume(code2);
+ size2 = 0;
+ return emailAtSignOrDot;
+ }
+ if (code2 === 62) {
+ effects.exit("autolinkProtocol").type = "autolinkEmail";
+ effects.enter("autolinkMarker");
+ effects.consume(code2);
+ effects.exit("autolinkMarker");
+ effects.exit("autolink");
+ return ok;
+ }
+ return emailValue(code2);
+ }
+ function emailValue(code2) {
+ if ((code2 === 45 || asciiAlphanumeric(code2)) && size2++ < 63) {
+ const next = code2 === 45 ? emailValue : emailLabel;
+ effects.consume(code2);
+ return next;
+ }
+ return nok(code2);
+ }
+}
+const blankLine = {
+ tokenize: tokenizeBlankLine,
+ partial: true
+};
+function tokenizeBlankLine(effects, ok, nok) {
+ return start;
+ function start(code2) {
+ return markdownSpace(code2) ? factorySpace(effects, after, "linePrefix")(code2) : after(code2);
+ }
+ function after(code2) {
+ return code2 === null || markdownLineEnding(code2) ? ok(code2) : nok(code2);
+ }
+}
+const blockQuote = {
+ name: "blockQuote",
+ tokenize: tokenizeBlockQuoteStart,
+ continuation: {
+ tokenize: tokenizeBlockQuoteContinuation
+ },
+ exit
+};
+function tokenizeBlockQuoteStart(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ if (code2 === 62) {
+ const state = self2.containerState;
+ if (!state.open) {
+ effects.enter("blockQuote", {
+ _container: true
+ });
+ state.open = true;
+ }
+ effects.enter("blockQuotePrefix");
+ effects.enter("blockQuoteMarker");
+ effects.consume(code2);
+ effects.exit("blockQuoteMarker");
+ return after;
+ }
+ return nok(code2);
+ }
+ function after(code2) {
+ if (markdownSpace(code2)) {
+ effects.enter("blockQuotePrefixWhitespace");
+ effects.consume(code2);
+ effects.exit("blockQuotePrefixWhitespace");
+ effects.exit("blockQuotePrefix");
+ return ok;
+ }
+ effects.exit("blockQuotePrefix");
+ return ok(code2);
+ }
+}
+function tokenizeBlockQuoteContinuation(effects, ok, nok) {
+ const self2 = this;
+ return contStart;
+ function contStart(code2) {
+ if (markdownSpace(code2)) {
+ return factorySpace(
+ effects,
+ contBefore,
+ "linePrefix",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ )(code2);
+ }
+ return contBefore(code2);
+ }
+ function contBefore(code2) {
+ return effects.attempt(blockQuote, ok, nok)(code2);
+ }
+}
+function exit(effects) {
+ effects.exit("blockQuote");
+}
+const characterEscape = {
+ name: "characterEscape",
+ tokenize: tokenizeCharacterEscape
+};
+function tokenizeCharacterEscape(effects, ok, nok) {
+ return start;
+ function start(code2) {
+ effects.enter("characterEscape");
+ effects.enter("escapeMarker");
+ effects.consume(code2);
+ effects.exit("escapeMarker");
+ return inside;
+ }
+ function inside(code2) {
+ if (asciiPunctuation(code2)) {
+ effects.enter("characterEscapeValue");
+ effects.consume(code2);
+ effects.exit("characterEscapeValue");
+ effects.exit("characterEscape");
+ return ok;
+ }
+ return nok(code2);
+ }
+}
+const characterReference = {
+ name: "characterReference",
+ tokenize: tokenizeCharacterReference
+};
+function tokenizeCharacterReference(effects, ok, nok) {
+ const self2 = this;
+ let size2 = 0;
+ let max;
+ let test;
+ return start;
+ function start(code2) {
+ effects.enter("characterReference");
+ effects.enter("characterReferenceMarker");
+ effects.consume(code2);
+ effects.exit("characterReferenceMarker");
+ return open;
+ }
+ function open(code2) {
+ if (code2 === 35) {
+ effects.enter("characterReferenceMarkerNumeric");
+ effects.consume(code2);
+ effects.exit("characterReferenceMarkerNumeric");
+ return numeric;
+ }
+ effects.enter("characterReferenceValue");
+ max = 31;
+ test = asciiAlphanumeric;
+ return value(code2);
+ }
+ function numeric(code2) {
+ if (code2 === 88 || code2 === 120) {
+ effects.enter("characterReferenceMarkerHexadecimal");
+ effects.consume(code2);
+ effects.exit("characterReferenceMarkerHexadecimal");
+ effects.enter("characterReferenceValue");
+ max = 6;
+ test = asciiHexDigit;
+ return value;
+ }
+ effects.enter("characterReferenceValue");
+ max = 7;
+ test = asciiDigit;
+ return value(code2);
+ }
+ function value(code2) {
+ if (code2 === 59 && size2) {
+ const token = effects.exit("characterReferenceValue");
+ if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token))) {
+ return nok(code2);
+ }
+ effects.enter("characterReferenceMarker");
+ effects.consume(code2);
+ effects.exit("characterReferenceMarker");
+ effects.exit("characterReference");
+ return ok;
+ }
+ if (test(code2) && size2++ < max) {
+ effects.consume(code2);
+ return value;
+ }
+ return nok(code2);
+ }
+}
+const nonLazyContinuation = {
+ tokenize: tokenizeNonLazyContinuation,
+ partial: true
+};
+const codeFenced = {
+ name: "codeFenced",
+ tokenize: tokenizeCodeFenced,
+ concrete: true
+};
+function tokenizeCodeFenced(effects, ok, nok) {
+ const self2 = this;
+ const closeStart = {
+ tokenize: tokenizeCloseStart,
+ partial: true
+ };
+ let initialPrefix = 0;
+ let sizeOpen = 0;
+ let marker;
+ return start;
+ function start(code2) {
+ return beforeSequenceOpen(code2);
+ }
+ function beforeSequenceOpen(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
+ marker = code2;
+ effects.enter("codeFenced");
+ effects.enter("codeFencedFence");
+ effects.enter("codeFencedFenceSequence");
+ return sequenceOpen(code2);
+ }
+ function sequenceOpen(code2) {
+ if (code2 === marker) {
+ sizeOpen++;
+ effects.consume(code2);
+ return sequenceOpen;
+ }
+ if (sizeOpen < 3) {
+ return nok(code2);
+ }
+ effects.exit("codeFencedFenceSequence");
+ return markdownSpace(code2) ? factorySpace(effects, infoBefore, "whitespace")(code2) : infoBefore(code2);
+ }
+ function infoBefore(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("codeFencedFence");
+ return self2.interrupt ? ok(code2) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code2);
+ }
+ effects.enter("codeFencedFenceInfo");
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return info(code2);
+ }
+ function info(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("chunkString");
+ effects.exit("codeFencedFenceInfo");
+ return infoBefore(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.exit("chunkString");
+ effects.exit("codeFencedFenceInfo");
+ return factorySpace(effects, metaBefore, "whitespace")(code2);
+ }
+ if (code2 === 96 && code2 === marker) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return info;
+ }
+ function metaBefore(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ return infoBefore(code2);
+ }
+ effects.enter("codeFencedFenceMeta");
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return meta(code2);
+ }
+ function meta(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("chunkString");
+ effects.exit("codeFencedFenceMeta");
+ return infoBefore(code2);
+ }
+ if (code2 === 96 && code2 === marker) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return meta;
+ }
+ function atNonLazyBreak(code2) {
+ return effects.attempt(closeStart, after, contentBefore)(code2);
+ }
+ function contentBefore(code2) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return contentStart;
+ }
+ function contentStart(code2) {
+ return initialPrefix > 0 && markdownSpace(code2) ? factorySpace(
+ effects,
+ beforeContentChunk,
+ "linePrefix",
+ initialPrefix + 1
+ )(code2) : beforeContentChunk(code2);
+ }
+ function beforeContentChunk(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code2);
+ }
+ effects.enter("codeFlowValue");
+ return contentChunk(code2);
+ }
+ function contentChunk(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("codeFlowValue");
+ return beforeContentChunk(code2);
+ }
+ effects.consume(code2);
+ return contentChunk;
+ }
+ function after(code2) {
+ effects.exit("codeFenced");
+ return ok(code2);
+ }
+ function tokenizeCloseStart(effects2, ok2, nok2) {
+ let size2 = 0;
+ return startBefore;
+ function startBefore(code2) {
+ effects2.enter("lineEnding");
+ effects2.consume(code2);
+ effects2.exit("lineEnding");
+ return start2;
+ }
+ function start2(code2) {
+ effects2.enter("codeFencedFence");
+ return markdownSpace(code2) ? factorySpace(
+ effects2,
+ beforeSequenceClose,
+ "linePrefix",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ )(code2) : beforeSequenceClose(code2);
+ }
+ function beforeSequenceClose(code2) {
+ if (code2 === marker) {
+ effects2.enter("codeFencedFenceSequence");
+ return sequenceClose(code2);
+ }
+ return nok2(code2);
+ }
+ function sequenceClose(code2) {
+ if (code2 === marker) {
+ size2++;
+ effects2.consume(code2);
+ return sequenceClose;
+ }
+ if (size2 >= sizeOpen) {
+ effects2.exit("codeFencedFenceSequence");
+ return markdownSpace(code2) ? factorySpace(effects2, sequenceCloseAfter, "whitespace")(code2) : sequenceCloseAfter(code2);
+ }
+ return nok2(code2);
+ }
+ function sequenceCloseAfter(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects2.exit("codeFencedFence");
+ return ok2(code2);
+ }
+ return nok2(code2);
+ }
+ }
+}
+function tokenizeNonLazyContinuation(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return lineStart;
+ }
+ function lineStart(code2) {
+ return self2.parser.lazy[self2.now().line] ? nok(code2) : ok(code2);
+ }
+}
+const codeIndented = {
+ name: "codeIndented",
+ tokenize: tokenizeCodeIndented
+};
+const furtherStart = {
+ tokenize: tokenizeFurtherStart,
+ partial: true
+};
+function tokenizeCodeIndented(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ effects.enter("codeIndented");
+ return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2);
+ }
+ function afterPrefix(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code2) : nok(code2);
+ }
+ function atBreak(code2) {
+ if (code2 === null) {
+ return after(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ return effects.attempt(furtherStart, atBreak, after)(code2);
+ }
+ effects.enter("codeFlowValue");
+ return inside(code2);
+ }
+ function inside(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("codeFlowValue");
+ return atBreak(code2);
+ }
+ effects.consume(code2);
+ return inside;
+ }
+ function after(code2) {
+ effects.exit("codeIndented");
+ return ok(code2);
+ }
+}
+function tokenizeFurtherStart(effects, ok, nok) {
+ const self2 = this;
+ return furtherStart2;
+ function furtherStart2(code2) {
+ if (self2.parser.lazy[self2.now().line]) {
+ return nok(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return furtherStart2;
+ }
+ return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2);
+ }
+ function afterPrefix(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code2) : markdownLineEnding(code2) ? furtherStart2(code2) : nok(code2);
+ }
+}
+const codeText = {
+ name: "codeText",
+ tokenize: tokenizeCodeText,
+ resolve: resolveCodeText,
+ previous
+};
+function resolveCodeText(events) {
+ let tailExitIndex = events.length - 4;
+ let headEnterIndex = 3;
+ let index;
+ let enter;
+ if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
+ index = headEnterIndex;
+ while (++index < tailExitIndex) {
+ if (events[index][1].type === "codeTextData") {
+ events[headEnterIndex][1].type = "codeTextPadding";
+ events[tailExitIndex][1].type = "codeTextPadding";
+ headEnterIndex += 2;
+ tailExitIndex -= 2;
+ break;
+ }
+ }
+ }
+ index = headEnterIndex - 1;
+ tailExitIndex++;
+ while (++index <= tailExitIndex) {
+ if (enter === void 0) {
+ if (index !== tailExitIndex && events[index][1].type !== "lineEnding") {
+ enter = index;
+ }
+ } else if (index === tailExitIndex || events[index][1].type === "lineEnding") {
+ events[enter][1].type = "codeTextData";
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end;
+ events.splice(enter + 2, index - enter - 2);
+ tailExitIndex -= index - enter - 2;
+ index = enter + 2;
+ }
+ enter = void 0;
+ }
+ }
+ return events;
+}
+function previous(code2) {
+ return code2 !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
+}
+function tokenizeCodeText(effects, ok, nok) {
+ let sizeOpen = 0;
+ let size2;
+ let token;
+ return start;
+ function start(code2) {
+ effects.enter("codeText");
+ effects.enter("codeTextSequence");
+ return sequenceOpen(code2);
+ }
+ function sequenceOpen(code2) {
+ if (code2 === 96) {
+ effects.consume(code2);
+ sizeOpen++;
+ return sequenceOpen;
+ }
+ effects.exit("codeTextSequence");
+ return between(code2);
+ }
+ function between(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (code2 === 32) {
+ effects.enter("space");
+ effects.consume(code2);
+ effects.exit("space");
+ return between;
+ }
+ if (code2 === 96) {
+ token = effects.enter("codeTextSequence");
+ size2 = 0;
+ return sequenceClose(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return between;
+ }
+ effects.enter("codeTextData");
+ return data(code2);
+ }
+ function data(code2) {
+ if (code2 === null || code2 === 32 || code2 === 96 || markdownLineEnding(code2)) {
+ effects.exit("codeTextData");
+ return between(code2);
+ }
+ effects.consume(code2);
+ return data;
+ }
+ function sequenceClose(code2) {
+ if (code2 === 96) {
+ effects.consume(code2);
+ size2++;
+ return sequenceClose;
+ }
+ if (size2 === sizeOpen) {
+ effects.exit("codeTextSequence");
+ effects.exit("codeText");
+ return ok(code2);
+ }
+ token.type = "codeTextData";
+ return data(code2);
+ }
+}
+function subtokenize(events) {
+ const jumps = {};
+ let index = -1;
+ let event;
+ let lineIndex;
+ let otherIndex;
+ let otherEvent;
+ let parameters;
+ let subevents;
+ let more;
+ while (++index < events.length) {
+ while (index in jumps) {
+ index = jumps[index];
+ }
+ event = events[index];
+ if (index && event[1].type === "chunkFlow" && events[index - 1][1].type === "listItemPrefix") {
+ subevents = event[1]._tokenizer.events;
+ otherIndex = 0;
+ if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
+ otherIndex += 2;
+ }
+ if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
+ while (++otherIndex < subevents.length) {
+ if (subevents[otherIndex][1].type === "content") {
+ break;
+ }
+ if (subevents[otherIndex][1].type === "chunkText") {
+ subevents[otherIndex][1]._isInFirstContentOfListItem = true;
+ otherIndex++;
+ }
+ }
+ }
+ }
+ if (event[0] === "enter") {
+ if (event[1].contentType) {
+ Object.assign(jumps, subcontent(events, index));
+ index = jumps[index];
+ more = true;
+ }
+ } else if (event[1]._container) {
+ otherIndex = index;
+ lineIndex = void 0;
+ while (otherIndex--) {
+ otherEvent = events[otherIndex];
+ if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
+ if (otherEvent[0] === "enter") {
+ if (lineIndex) {
+ events[lineIndex][1].type = "lineEndingBlank";
+ }
+ otherEvent[1].type = "lineEnding";
+ lineIndex = otherIndex;
+ }
+ } else {
+ break;
+ }
+ }
+ if (lineIndex) {
+ event[1].end = Object.assign({}, events[lineIndex][1].start);
+ parameters = events.slice(lineIndex, index);
+ parameters.unshift(event);
+ splice(events, lineIndex, index - lineIndex + 1, parameters);
+ }
+ }
+ }
+ return !more;
+}
+function subcontent(events, eventIndex) {
+ const token = events[eventIndex][1];
+ const context = events[eventIndex][2];
+ let startPosition = eventIndex - 1;
+ const startPositions = [];
+ const tokenizer = token._tokenizer || context.parser[token.contentType](token.start);
+ const childEvents = tokenizer.events;
+ const jumps = [];
+ const gaps = {};
+ let stream;
+ let previous2;
+ let index = -1;
+ let current = token;
+ let adjust = 0;
+ let start = 0;
+ const breaks = [start];
+ while (current) {
+ while (events[++startPosition][1] !== current) {
+ }
+ startPositions.push(startPosition);
+ if (!current._tokenizer) {
+ stream = context.sliceStream(current);
+ if (!current.next) {
+ stream.push(null);
+ }
+ if (previous2) {
+ tokenizer.defineSkip(current.start);
+ }
+ if (current._isInFirstContentOfListItem) {
+ tokenizer._gfmTasklistFirstContentOfListItem = true;
+ }
+ tokenizer.write(stream);
+ if (current._isInFirstContentOfListItem) {
+ tokenizer._gfmTasklistFirstContentOfListItem = void 0;
+ }
+ }
+ previous2 = current;
+ current = current.next;
+ }
+ current = token;
+ while (++index < childEvents.length) {
+ if (childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {
+ start = index + 1;
+ breaks.push(start);
+ current._tokenizer = void 0;
+ current.previous = void 0;
+ current = current.next;
+ }
+ }
+ tokenizer.events = [];
+ if (current) {
+ current._tokenizer = void 0;
+ current.previous = void 0;
+ } else {
+ breaks.pop();
+ }
+ index = breaks.length;
+ while (index--) {
+ const slice = childEvents.slice(breaks[index], breaks[index + 1]);
+ const start2 = startPositions.pop();
+ jumps.unshift([start2, start2 + slice.length - 1]);
+ splice(events, start2, 2, slice);
+ }
+ index = -1;
+ while (++index < jumps.length) {
+ gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
+ adjust += jumps[index][1] - jumps[index][0] - 1;
+ }
+ return gaps;
+}
+const content = {
+ tokenize: tokenizeContent,
+ resolve: resolveContent
+};
+const continuationConstruct = {
+ tokenize: tokenizeContinuation,
+ partial: true
+};
+function resolveContent(events) {
+ subtokenize(events);
+ return events;
+}
+function tokenizeContent(effects, ok) {
+ let previous2;
+ return chunkStart;
+ function chunkStart(code2) {
+ effects.enter("content");
+ previous2 = effects.enter("chunkContent", {
+ contentType: "content"
+ });
+ return chunkInside(code2);
+ }
+ function chunkInside(code2) {
+ if (code2 === null) {
+ return contentEnd(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ return effects.check(
+ continuationConstruct,
+ contentContinue,
+ contentEnd
+ )(code2);
+ }
+ effects.consume(code2);
+ return chunkInside;
+ }
+ function contentEnd(code2) {
+ effects.exit("chunkContent");
+ effects.exit("content");
+ return ok(code2);
+ }
+ function contentContinue(code2) {
+ effects.consume(code2);
+ effects.exit("chunkContent");
+ previous2.next = effects.enter("chunkContent", {
+ contentType: "content",
+ previous: previous2
+ });
+ previous2 = previous2.next;
+ return chunkInside;
+ }
+}
+function tokenizeContinuation(effects, ok, nok) {
+ const self2 = this;
+ return startLookahead;
+ function startLookahead(code2) {
+ effects.exit("chunkContent");
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return factorySpace(effects, prefixed, "linePrefix");
+ }
+ function prefixed(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ return nok(code2);
+ }
+ const tail = self2.events[self2.events.length - 1];
+ if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
+ return ok(code2);
+ }
+ return effects.interrupt(self2.parser.constructs.flow, nok, ok)(code2);
+ }
+}
+function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
+ const limit = max || Number.POSITIVE_INFINITY;
+ let balance = 0;
+ return start;
+ function start(code2) {
+ if (code2 === 60) {
+ effects.enter(type);
+ effects.enter(literalType);
+ effects.enter(literalMarkerType);
+ effects.consume(code2);
+ effects.exit(literalMarkerType);
+ return enclosedBefore;
+ }
+ if (code2 === null || code2 === 32 || code2 === 41 || asciiControl(code2)) {
+ return nok(code2);
+ }
+ effects.enter(type);
+ effects.enter(rawType);
+ effects.enter(stringType);
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return raw(code2);
+ }
+ function enclosedBefore(code2) {
+ if (code2 === 62) {
+ effects.enter(literalMarkerType);
+ effects.consume(code2);
+ effects.exit(literalMarkerType);
+ effects.exit(literalType);
+ effects.exit(type);
+ return ok;
+ }
+ effects.enter(stringType);
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return enclosed(code2);
+ }
+ function enclosed(code2) {
+ if (code2 === 62) {
+ effects.exit("chunkString");
+ effects.exit(stringType);
+ return enclosedBefore(code2);
+ }
+ if (code2 === null || code2 === 60 || markdownLineEnding(code2)) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return code2 === 92 ? enclosedEscape : enclosed;
+ }
+ function enclosedEscape(code2) {
+ if (code2 === 60 || code2 === 62 || code2 === 92) {
+ effects.consume(code2);
+ return enclosed;
+ }
+ return enclosed(code2);
+ }
+ function raw(code2) {
+ if (!balance && (code2 === null || code2 === 41 || markdownLineEndingOrSpace(code2))) {
+ effects.exit("chunkString");
+ effects.exit(stringType);
+ effects.exit(rawType);
+ effects.exit(type);
+ return ok(code2);
+ }
+ if (balance < limit && code2 === 40) {
+ effects.consume(code2);
+ balance++;
+ return raw;
+ }
+ if (code2 === 41) {
+ effects.consume(code2);
+ balance--;
+ return raw;
+ }
+ if (code2 === null || code2 === 32 || code2 === 40 || asciiControl(code2)) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return code2 === 92 ? rawEscape : raw;
+ }
+ function rawEscape(code2) {
+ if (code2 === 40 || code2 === 41 || code2 === 92) {
+ effects.consume(code2);
+ return raw;
+ }
+ return raw(code2);
+ }
+}
+function factoryLabel(effects, ok, nok, type, markerType, stringType) {
+ const self2 = this;
+ let size2 = 0;
+ let seen;
+ return start;
+ function start(code2) {
+ effects.enter(type);
+ effects.enter(markerType);
+ effects.consume(code2);
+ effects.exit(markerType);
+ effects.enter(stringType);
+ return atBreak;
+ }
+ function atBreak(code2) {
+ if (size2 > 999 || code2 === null || code2 === 91 || code2 === 93 && !seen || code2 === 94 && !size2 && "_hiddenFootnoteSupport" in self2.parser.constructs) {
+ return nok(code2);
+ }
+ if (code2 === 93) {
+ effects.exit(stringType);
+ effects.enter(markerType);
+ effects.consume(code2);
+ effects.exit(markerType);
+ effects.exit(type);
+ return ok;
+ }
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return atBreak;
+ }
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return labelInside(code2);
+ }
+ function labelInside(code2) {
+ if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size2++ > 999) {
+ effects.exit("chunkString");
+ return atBreak(code2);
+ }
+ effects.consume(code2);
+ if (!seen)
+ seen = !markdownSpace(code2);
+ return code2 === 92 ? labelEscape : labelInside;
+ }
+ function labelEscape(code2) {
+ if (code2 === 91 || code2 === 92 || code2 === 93) {
+ effects.consume(code2);
+ size2++;
+ return labelInside;
+ }
+ return labelInside(code2);
+ }
+}
+function factoryTitle(effects, ok, nok, type, markerType, stringType) {
+ let marker;
+ return start;
+ function start(code2) {
+ if (code2 === 34 || code2 === 39 || code2 === 40) {
+ effects.enter(type);
+ effects.enter(markerType);
+ effects.consume(code2);
+ effects.exit(markerType);
+ marker = code2 === 40 ? 41 : code2;
+ return begin;
+ }
+ return nok(code2);
+ }
+ function begin(code2) {
+ if (code2 === marker) {
+ effects.enter(markerType);
+ effects.consume(code2);
+ effects.exit(markerType);
+ effects.exit(type);
+ return ok;
+ }
+ effects.enter(stringType);
+ return atBreak(code2);
+ }
+ function atBreak(code2) {
+ if (code2 === marker) {
+ effects.exit(stringType);
+ return begin(marker);
+ }
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return factorySpace(effects, atBreak, "linePrefix");
+ }
+ effects.enter("chunkString", {
+ contentType: "string"
+ });
+ return inside(code2);
+ }
+ function inside(code2) {
+ if (code2 === marker || code2 === null || markdownLineEnding(code2)) {
+ effects.exit("chunkString");
+ return atBreak(code2);
+ }
+ effects.consume(code2);
+ return code2 === 92 ? escape : inside;
+ }
+ function escape(code2) {
+ if (code2 === marker || code2 === 92) {
+ effects.consume(code2);
+ return inside;
+ }
+ return inside(code2);
+ }
+}
+function factoryWhitespace(effects, ok) {
+ let seen;
+ return start;
+ function start(code2) {
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ seen = true;
+ return start;
+ }
+ if (markdownSpace(code2)) {
+ return factorySpace(
+ effects,
+ start,
+ seen ? "linePrefix" : "lineSuffix"
+ )(code2);
+ }
+ return ok(code2);
+ }
+}
+const definition = {
+ name: "definition",
+ tokenize: tokenizeDefinition
+};
+const titleBefore = {
+ tokenize: tokenizeTitleBefore,
+ partial: true
+};
+function tokenizeDefinition(effects, ok, nok) {
+ const self2 = this;
+ let identifier;
+ return start;
+ function start(code2) {
+ effects.enter("definition");
+ return before(code2);
+ }
+ function before(code2) {
+ return factoryLabel.call(
+ self2,
+ effects,
+ labelAfter,
+ nok,
+ "definitionLabel",
+ "definitionLabelMarker",
+ "definitionLabelString"
+ )(code2);
+ }
+ function labelAfter(code2) {
+ identifier = normalizeIdentifier(
+ self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
+ );
+ if (code2 === 58) {
+ effects.enter("definitionMarker");
+ effects.consume(code2);
+ effects.exit("definitionMarker");
+ return markerAfter;
+ }
+ return nok(code2);
+ }
+ function markerAfter(code2) {
+ return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, destinationBefore)(code2) : destinationBefore(code2);
+ }
+ function destinationBefore(code2) {
+ return factoryDestination(
+ effects,
+ destinationAfter,
+ nok,
+ "definitionDestination",
+ "definitionDestinationLiteral",
+ "definitionDestinationLiteralMarker",
+ "definitionDestinationRaw",
+ "definitionDestinationString"
+ )(code2);
+ }
+ function destinationAfter(code2) {
+ return effects.attempt(titleBefore, after, after)(code2);
+ }
+ function after(code2) {
+ return markdownSpace(code2) ? factorySpace(effects, afterWhitespace, "whitespace")(code2) : afterWhitespace(code2);
+ }
+ function afterWhitespace(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("definition");
+ self2.parser.defined.push(identifier);
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+}
+function tokenizeTitleBefore(effects, ok, nok) {
+ return titleBefore2;
+ function titleBefore2(code2) {
+ return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, beforeMarker)(code2) : nok(code2);
+ }
+ function beforeMarker(code2) {
+ return factoryTitle(
+ effects,
+ titleAfter,
+ nok,
+ "definitionTitle",
+ "definitionTitleMarker",
+ "definitionTitleString"
+ )(code2);
+ }
+ function titleAfter(code2) {
+ return markdownSpace(code2) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code2) : titleAfterOptionalWhitespace(code2);
+ }
+ function titleAfterOptionalWhitespace(code2) {
+ return code2 === null || markdownLineEnding(code2) ? ok(code2) : nok(code2);
+ }
+}
+const hardBreakEscape = {
+ name: "hardBreakEscape",
+ tokenize: tokenizeHardBreakEscape
+};
+function tokenizeHardBreakEscape(effects, ok, nok) {
+ return start;
+ function start(code2) {
+ effects.enter("hardBreakEscape");
+ effects.consume(code2);
+ return after;
+ }
+ function after(code2) {
+ if (markdownLineEnding(code2)) {
+ effects.exit("hardBreakEscape");
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+}
+const headingAtx = {
+ name: "headingAtx",
+ tokenize: tokenizeHeadingAtx,
+ resolve: resolveHeadingAtx
+};
+function resolveHeadingAtx(events, context) {
+ let contentEnd = events.length - 2;
+ let contentStart = 3;
+ let content2;
+ let text2;
+ if (events[contentStart][1].type === "whitespace") {
+ contentStart += 2;
+ }
+ if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
+ contentEnd -= 2;
+ }
+ if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
+ contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
+ }
+ if (contentEnd > contentStart) {
+ content2 = {
+ type: "atxHeadingText",
+ start: events[contentStart][1].start,
+ end: events[contentEnd][1].end
+ };
+ text2 = {
+ type: "chunkText",
+ start: events[contentStart][1].start,
+ end: events[contentEnd][1].end,
+ contentType: "text"
+ };
+ splice(events, contentStart, contentEnd - contentStart + 1, [
+ ["enter", content2, context],
+ ["enter", text2, context],
+ ["exit", text2, context],
+ ["exit", content2, context]
+ ]);
+ }
+ return events;
+}
+function tokenizeHeadingAtx(effects, ok, nok) {
+ let size2 = 0;
+ return start;
+ function start(code2) {
+ effects.enter("atxHeading");
+ return before(code2);
+ }
+ function before(code2) {
+ effects.enter("atxHeadingSequence");
+ return sequenceOpen(code2);
+ }
+ function sequenceOpen(code2) {
+ if (code2 === 35 && size2++ < 6) {
+ effects.consume(code2);
+ return sequenceOpen;
+ }
+ if (code2 === null || markdownLineEndingOrSpace(code2)) {
+ effects.exit("atxHeadingSequence");
+ return atBreak(code2);
+ }
+ return nok(code2);
+ }
+ function atBreak(code2) {
+ if (code2 === 35) {
+ effects.enter("atxHeadingSequence");
+ return sequenceFurther(code2);
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("atxHeading");
+ return ok(code2);
+ }
+ if (markdownSpace(code2)) {
+ return factorySpace(effects, atBreak, "whitespace")(code2);
+ }
+ effects.enter("atxHeadingText");
+ return data(code2);
+ }
+ function sequenceFurther(code2) {
+ if (code2 === 35) {
+ effects.consume(code2);
+ return sequenceFurther;
+ }
+ effects.exit("atxHeadingSequence");
+ return atBreak(code2);
+ }
+ function data(code2) {
+ if (code2 === null || code2 === 35 || markdownLineEndingOrSpace(code2)) {
+ effects.exit("atxHeadingText");
+ return atBreak(code2);
+ }
+ effects.consume(code2);
+ return data;
+ }
+}
+const htmlBlockNames = [
+ "address",
+ "article",
+ "aside",
+ "base",
+ "basefont",
+ "blockquote",
+ "body",
+ "caption",
+ "center",
+ "col",
+ "colgroup",
+ "dd",
+ "details",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hr",
+ "html",
+ "iframe",
+ "legend",
+ "li",
+ "link",
+ "main",
+ "menu",
+ "menuitem",
+ "nav",
+ "noframes",
+ "ol",
+ "optgroup",
+ "option",
+ "p",
+ "param",
+ "search",
+ "section",
+ "summary",
+ "table",
+ "tbody",
+ "td",
+ "tfoot",
+ "th",
+ "thead",
+ "title",
+ "tr",
+ "track",
+ "ul"
+];
+const htmlRawNames = ["pre", "script", "style", "textarea"];
+const htmlFlow = {
+ name: "htmlFlow",
+ tokenize: tokenizeHtmlFlow,
+ resolveTo: resolveToHtmlFlow,
+ concrete: true
+};
+const blankLineBefore = {
+ tokenize: tokenizeBlankLineBefore,
+ partial: true
+};
+const nonLazyContinuationStart = {
+ tokenize: tokenizeNonLazyContinuationStart,
+ partial: true
+};
+function resolveToHtmlFlow(events) {
+ let index = events.length;
+ while (index--) {
+ if (events[index][0] === "enter" && events[index][1].type === "htmlFlow") {
+ break;
+ }
+ }
+ if (index > 1 && events[index - 2][1].type === "linePrefix") {
+ events[index][1].start = events[index - 2][1].start;
+ events[index + 1][1].start = events[index - 2][1].start;
+ events.splice(index - 2, 2);
+ }
+ return events;
+}
+function tokenizeHtmlFlow(effects, ok, nok) {
+ const self2 = this;
+ let marker;
+ let closingTag;
+ let buffer;
+ let index;
+ let markerB;
+ return start;
+ function start(code2) {
+ return before(code2);
+ }
+ function before(code2) {
+ effects.enter("htmlFlow");
+ effects.enter("htmlFlowData");
+ effects.consume(code2);
+ return open;
+ }
+ function open(code2) {
+ if (code2 === 33) {
+ effects.consume(code2);
+ return declarationOpen;
+ }
+ if (code2 === 47) {
+ effects.consume(code2);
+ closingTag = true;
+ return tagCloseStart;
+ }
+ if (code2 === 63) {
+ effects.consume(code2);
+ marker = 3;
+ return self2.interrupt ? ok : continuationDeclarationInside;
+ }
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ buffer = String.fromCharCode(code2);
+ return tagName;
+ }
+ return nok(code2);
+ }
+ function declarationOpen(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ marker = 2;
+ return commentOpenInside;
+ }
+ if (code2 === 91) {
+ effects.consume(code2);
+ marker = 5;
+ index = 0;
+ return cdataOpenInside;
+ }
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ marker = 4;
+ return self2.interrupt ? ok : continuationDeclarationInside;
+ }
+ return nok(code2);
+ }
+ function commentOpenInside(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return self2.interrupt ? ok : continuationDeclarationInside;
+ }
+ return nok(code2);
+ }
+ function cdataOpenInside(code2) {
+ const value = "CDATA[";
+ if (code2 === value.charCodeAt(index++)) {
+ effects.consume(code2);
+ if (index === value.length) {
+ return self2.interrupt ? ok : continuation;
+ }
+ return cdataOpenInside;
+ }
+ return nok(code2);
+ }
+ function tagCloseStart(code2) {
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ buffer = String.fromCharCode(code2);
+ return tagName;
+ }
+ return nok(code2);
+ }
+ function tagName(code2) {
+ if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
+ const slash = code2 === 47;
+ const name = buffer.toLowerCase();
+ if (!slash && !closingTag && htmlRawNames.includes(name)) {
+ marker = 1;
+ return self2.interrupt ? ok(code2) : continuation(code2);
+ }
+ if (htmlBlockNames.includes(buffer.toLowerCase())) {
+ marker = 6;
+ if (slash) {
+ effects.consume(code2);
+ return basicSelfClosing;
+ }
+ return self2.interrupt ? ok(code2) : continuation(code2);
+ }
+ marker = 7;
+ return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : closingTag ? completeClosingTagAfter(code2) : completeAttributeNameBefore(code2);
+ }
+ if (code2 === 45 || asciiAlphanumeric(code2)) {
+ effects.consume(code2);
+ buffer += String.fromCharCode(code2);
+ return tagName;
+ }
+ return nok(code2);
+ }
+ function basicSelfClosing(code2) {
+ if (code2 === 62) {
+ effects.consume(code2);
+ return self2.interrupt ? ok : continuation;
+ }
+ return nok(code2);
+ }
+ function completeClosingTagAfter(code2) {
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return completeClosingTagAfter;
+ }
+ return completeEnd(code2);
+ }
+ function completeAttributeNameBefore(code2) {
+ if (code2 === 47) {
+ effects.consume(code2);
+ return completeEnd;
+ }
+ if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
+ effects.consume(code2);
+ return completeAttributeName;
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return completeAttributeNameBefore;
+ }
+ return completeEnd(code2);
+ }
+ function completeAttributeName(code2) {
+ if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
+ effects.consume(code2);
+ return completeAttributeName;
+ }
+ return completeAttributeNameAfter(code2);
+ }
+ function completeAttributeNameAfter(code2) {
+ if (code2 === 61) {
+ effects.consume(code2);
+ return completeAttributeValueBefore;
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return completeAttributeNameAfter;
+ }
+ return completeAttributeNameBefore(code2);
+ }
+ function completeAttributeValueBefore(code2) {
+ if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
+ return nok(code2);
+ }
+ if (code2 === 34 || code2 === 39) {
+ effects.consume(code2);
+ markerB = code2;
+ return completeAttributeValueQuoted;
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return completeAttributeValueBefore;
+ }
+ return completeAttributeValueUnquoted(code2);
+ }
+ function completeAttributeValueQuoted(code2) {
+ if (code2 === markerB) {
+ effects.consume(code2);
+ markerB = null;
+ return completeAttributeValueQuotedAfter;
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ return nok(code2);
+ }
+ effects.consume(code2);
+ return completeAttributeValueQuoted;
+ }
+ function completeAttributeValueUnquoted(code2) {
+ if (code2 === null || code2 === 34 || code2 === 39 || code2 === 47 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96 || markdownLineEndingOrSpace(code2)) {
+ return completeAttributeNameAfter(code2);
+ }
+ effects.consume(code2);
+ return completeAttributeValueUnquoted;
+ }
+ function completeAttributeValueQuotedAfter(code2) {
+ if (code2 === 47 || code2 === 62 || markdownSpace(code2)) {
+ return completeAttributeNameBefore(code2);
+ }
+ return nok(code2);
+ }
+ function completeEnd(code2) {
+ if (code2 === 62) {
+ effects.consume(code2);
+ return completeAfter;
+ }
+ return nok(code2);
+ }
+ function completeAfter(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ return continuation(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return completeAfter;
+ }
+ return nok(code2);
+ }
+ function continuation(code2) {
+ if (code2 === 45 && marker === 2) {
+ effects.consume(code2);
+ return continuationCommentInside;
+ }
+ if (code2 === 60 && marker === 1) {
+ effects.consume(code2);
+ return continuationRawTagOpen;
+ }
+ if (code2 === 62 && marker === 4) {
+ effects.consume(code2);
+ return continuationClose;
+ }
+ if (code2 === 63 && marker === 3) {
+ effects.consume(code2);
+ return continuationDeclarationInside;
+ }
+ if (code2 === 93 && marker === 5) {
+ effects.consume(code2);
+ return continuationCdataInside;
+ }
+ if (markdownLineEnding(code2) && (marker === 6 || marker === 7)) {
+ effects.exit("htmlFlowData");
+ return effects.check(
+ blankLineBefore,
+ continuationAfter,
+ continuationStart
+ )(code2);
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("htmlFlowData");
+ return continuationStart(code2);
+ }
+ effects.consume(code2);
+ return continuation;
+ }
+ function continuationStart(code2) {
+ return effects.check(
+ nonLazyContinuationStart,
+ continuationStartNonLazy,
+ continuationAfter
+ )(code2);
+ }
+ function continuationStartNonLazy(code2) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return continuationBefore;
+ }
+ function continuationBefore(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ return continuationStart(code2);
+ }
+ effects.enter("htmlFlowData");
+ return continuation(code2);
+ }
+ function continuationCommentInside(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return continuationDeclarationInside;
+ }
+ return continuation(code2);
+ }
+ function continuationRawTagOpen(code2) {
+ if (code2 === 47) {
+ effects.consume(code2);
+ buffer = "";
+ return continuationRawEndTag;
+ }
+ return continuation(code2);
+ }
+ function continuationRawEndTag(code2) {
+ if (code2 === 62) {
+ const name = buffer.toLowerCase();
+ if (htmlRawNames.includes(name)) {
+ effects.consume(code2);
+ return continuationClose;
+ }
+ return continuation(code2);
+ }
+ if (asciiAlpha(code2) && buffer.length < 8) {
+ effects.consume(code2);
+ buffer += String.fromCharCode(code2);
+ return continuationRawEndTag;
+ }
+ return continuation(code2);
+ }
+ function continuationCdataInside(code2) {
+ if (code2 === 93) {
+ effects.consume(code2);
+ return continuationDeclarationInside;
+ }
+ return continuation(code2);
+ }
+ function continuationDeclarationInside(code2) {
+ if (code2 === 62) {
+ effects.consume(code2);
+ return continuationClose;
+ }
+ if (code2 === 45 && marker === 2) {
+ effects.consume(code2);
+ return continuationDeclarationInside;
+ }
+ return continuation(code2);
+ }
+ function continuationClose(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("htmlFlowData");
+ return continuationAfter(code2);
+ }
+ effects.consume(code2);
+ return continuationClose;
+ }
+ function continuationAfter(code2) {
+ effects.exit("htmlFlow");
+ return ok(code2);
+ }
+}
+function tokenizeNonLazyContinuationStart(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ if (markdownLineEnding(code2)) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return after;
+ }
+ return nok(code2);
+ }
+ function after(code2) {
+ return self2.parser.lazy[self2.now().line] ? nok(code2) : ok(code2);
+ }
+}
+function tokenizeBlankLineBefore(effects, ok, nok) {
+ return start;
+ function start(code2) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return effects.attempt(blankLine, ok, nok);
+ }
+}
+const htmlText = {
+ name: "htmlText",
+ tokenize: tokenizeHtmlText
+};
+function tokenizeHtmlText(effects, ok, nok) {
+ const self2 = this;
+ let marker;
+ let index;
+ let returnState;
+ return start;
+ function start(code2) {
+ effects.enter("htmlText");
+ effects.enter("htmlTextData");
+ effects.consume(code2);
+ return open;
+ }
+ function open(code2) {
+ if (code2 === 33) {
+ effects.consume(code2);
+ return declarationOpen;
+ }
+ if (code2 === 47) {
+ effects.consume(code2);
+ return tagCloseStart;
+ }
+ if (code2 === 63) {
+ effects.consume(code2);
+ return instruction;
+ }
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ return tagOpen;
+ }
+ return nok(code2);
+ }
+ function declarationOpen(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return commentOpenInside;
+ }
+ if (code2 === 91) {
+ effects.consume(code2);
+ index = 0;
+ return cdataOpenInside;
+ }
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ return declaration;
+ }
+ return nok(code2);
+ }
+ function commentOpenInside(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return commentEnd;
+ }
+ return nok(code2);
+ }
+ function comment(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (code2 === 45) {
+ effects.consume(code2);
+ return commentClose;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = comment;
+ return lineEndingBefore(code2);
+ }
+ effects.consume(code2);
+ return comment;
+ }
+ function commentClose(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return commentEnd;
+ }
+ return comment(code2);
+ }
+ function commentEnd(code2) {
+ return code2 === 62 ? end(code2) : code2 === 45 ? commentClose(code2) : comment(code2);
+ }
+ function cdataOpenInside(code2) {
+ const value = "CDATA[";
+ if (code2 === value.charCodeAt(index++)) {
+ effects.consume(code2);
+ return index === value.length ? cdata : cdataOpenInside;
+ }
+ return nok(code2);
+ }
+ function cdata(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (code2 === 93) {
+ effects.consume(code2);
+ return cdataClose;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = cdata;
+ return lineEndingBefore(code2);
+ }
+ effects.consume(code2);
+ return cdata;
+ }
+ function cdataClose(code2) {
+ if (code2 === 93) {
+ effects.consume(code2);
+ return cdataEnd;
+ }
+ return cdata(code2);
+ }
+ function cdataEnd(code2) {
+ if (code2 === 62) {
+ return end(code2);
+ }
+ if (code2 === 93) {
+ effects.consume(code2);
+ return cdataEnd;
+ }
+ return cdata(code2);
+ }
+ function declaration(code2) {
+ if (code2 === null || code2 === 62) {
+ return end(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = declaration;
+ return lineEndingBefore(code2);
+ }
+ effects.consume(code2);
+ return declaration;
+ }
+ function instruction(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (code2 === 63) {
+ effects.consume(code2);
+ return instructionClose;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = instruction;
+ return lineEndingBefore(code2);
+ }
+ effects.consume(code2);
+ return instruction;
+ }
+ function instructionClose(code2) {
+ return code2 === 62 ? end(code2) : instruction(code2);
+ }
+ function tagCloseStart(code2) {
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ return tagClose;
+ }
+ return nok(code2);
+ }
+ function tagClose(code2) {
+ if (code2 === 45 || asciiAlphanumeric(code2)) {
+ effects.consume(code2);
+ return tagClose;
+ }
+ return tagCloseBetween(code2);
+ }
+ function tagCloseBetween(code2) {
+ if (markdownLineEnding(code2)) {
+ returnState = tagCloseBetween;
+ return lineEndingBefore(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return tagCloseBetween;
+ }
+ return end(code2);
+ }
+ function tagOpen(code2) {
+ if (code2 === 45 || asciiAlphanumeric(code2)) {
+ effects.consume(code2);
+ return tagOpen;
+ }
+ if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
+ return tagOpenBetween(code2);
+ }
+ return nok(code2);
+ }
+ function tagOpenBetween(code2) {
+ if (code2 === 47) {
+ effects.consume(code2);
+ return end;
+ }
+ if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
+ effects.consume(code2);
+ return tagOpenAttributeName;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = tagOpenBetween;
+ return lineEndingBefore(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return tagOpenBetween;
+ }
+ return end(code2);
+ }
+ function tagOpenAttributeName(code2) {
+ if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
+ effects.consume(code2);
+ return tagOpenAttributeName;
+ }
+ return tagOpenAttributeNameAfter(code2);
+ }
+ function tagOpenAttributeNameAfter(code2) {
+ if (code2 === 61) {
+ effects.consume(code2);
+ return tagOpenAttributeValueBefore;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = tagOpenAttributeNameAfter;
+ return lineEndingBefore(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return tagOpenAttributeNameAfter;
+ }
+ return tagOpenBetween(code2);
+ }
+ function tagOpenAttributeValueBefore(code2) {
+ if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
+ return nok(code2);
+ }
+ if (code2 === 34 || code2 === 39) {
+ effects.consume(code2);
+ marker = code2;
+ return tagOpenAttributeValueQuoted;
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = tagOpenAttributeValueBefore;
+ return lineEndingBefore(code2);
+ }
+ if (markdownSpace(code2)) {
+ effects.consume(code2);
+ return tagOpenAttributeValueBefore;
+ }
+ effects.consume(code2);
+ return tagOpenAttributeValueUnquoted;
+ }
+ function tagOpenAttributeValueQuoted(code2) {
+ if (code2 === marker) {
+ effects.consume(code2);
+ marker = void 0;
+ return tagOpenAttributeValueQuotedAfter;
+ }
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ returnState = tagOpenAttributeValueQuoted;
+ return lineEndingBefore(code2);
+ }
+ effects.consume(code2);
+ return tagOpenAttributeValueQuoted;
+ }
+ function tagOpenAttributeValueUnquoted(code2) {
+ if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 96) {
+ return nok(code2);
+ }
+ if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
+ return tagOpenBetween(code2);
+ }
+ effects.consume(code2);
+ return tagOpenAttributeValueUnquoted;
+ }
+ function tagOpenAttributeValueQuotedAfter(code2) {
+ if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
+ return tagOpenBetween(code2);
+ }
+ return nok(code2);
+ }
+ function end(code2) {
+ if (code2 === 62) {
+ effects.consume(code2);
+ effects.exit("htmlTextData");
+ effects.exit("htmlText");
+ return ok;
+ }
+ return nok(code2);
+ }
+ function lineEndingBefore(code2) {
+ effects.exit("htmlTextData");
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return lineEndingAfter;
+ }
+ function lineEndingAfter(code2) {
+ return markdownSpace(code2) ? factorySpace(
+ effects,
+ lineEndingAfterPrefix,
+ "linePrefix",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ )(code2) : lineEndingAfterPrefix(code2);
+ }
+ function lineEndingAfterPrefix(code2) {
+ effects.enter("htmlTextData");
+ return returnState(code2);
+ }
+}
+const labelEnd = {
+ name: "labelEnd",
+ tokenize: tokenizeLabelEnd,
+ resolveTo: resolveToLabelEnd,
+ resolveAll: resolveAllLabelEnd
+};
+const resourceConstruct = {
+ tokenize: tokenizeResource
+};
+const referenceFullConstruct = {
+ tokenize: tokenizeReferenceFull
+};
+const referenceCollapsedConstruct = {
+ tokenize: tokenizeReferenceCollapsed
+};
+function resolveAllLabelEnd(events) {
+ let index = -1;
+ while (++index < events.length) {
+ const token = events[index][1];
+ if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
+ events.splice(index + 1, token.type === "labelImage" ? 4 : 2);
+ token.type = "data";
+ index++;
+ }
+ }
+ return events;
+}
+function resolveToLabelEnd(events, context) {
+ let index = events.length;
+ let offset = 0;
+ let token;
+ let open;
+ let close;
+ let media;
+ while (index--) {
+ token = events[index][1];
+ if (open) {
+ if (token.type === "link" || token.type === "labelLink" && token._inactive) {
+ break;
+ }
+ if (events[index][0] === "enter" && token.type === "labelLink") {
+ token._inactive = true;
+ }
+ } else if (close) {
+ if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
+ open = index;
+ if (token.type !== "labelLink") {
+ offset = 2;
+ break;
+ }
+ }
+ } else if (token.type === "labelEnd") {
+ close = index;
+ }
+ }
+ const group = {
+ type: events[open][1].type === "labelLink" ? "link" : "image",
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ };
+ const label = {
+ type: "label",
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[close][1].end)
+ };
+ const text2 = {
+ type: "labelText",
+ start: Object.assign({}, events[open + offset + 2][1].end),
+ end: Object.assign({}, events[close - 2][1].start)
+ };
+ media = [
+ ["enter", group, context],
+ ["enter", label, context]
+ ];
+ media = push(media, events.slice(open + 1, open + offset + 3));
+ media = push(media, [["enter", text2, context]]);
+ media = push(
+ media,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + offset + 4, close - 3),
+ context
+ )
+ );
+ media = push(media, [
+ ["exit", text2, context],
+ events[close - 2],
+ events[close - 1],
+ ["exit", label, context]
+ ]);
+ media = push(media, events.slice(close + 1));
+ media = push(media, [["exit", group, context]]);
+ splice(events, open, events.length, media);
+ return events;
+}
+function tokenizeLabelEnd(effects, ok, nok) {
+ const self2 = this;
+ let index = self2.events.length;
+ let labelStart;
+ let defined;
+ while (index--) {
+ if ((self2.events[index][1].type === "labelImage" || self2.events[index][1].type === "labelLink") && !self2.events[index][1]._balanced) {
+ labelStart = self2.events[index][1];
+ break;
+ }
+ }
+ return start;
+ function start(code2) {
+ if (!labelStart) {
+ return nok(code2);
+ }
+ if (labelStart._inactive) {
+ return labelEndNok(code2);
+ }
+ defined = self2.parser.defined.includes(
+ normalizeIdentifier(
+ self2.sliceSerialize({
+ start: labelStart.end,
+ end: self2.now()
+ })
+ )
+ );
+ effects.enter("labelEnd");
+ effects.enter("labelMarker");
+ effects.consume(code2);
+ effects.exit("labelMarker");
+ effects.exit("labelEnd");
+ return after;
+ }
+ function after(code2) {
+ if (code2 === 40) {
+ return effects.attempt(
+ resourceConstruct,
+ labelEndOk,
+ defined ? labelEndOk : labelEndNok
+ )(code2);
+ }
+ if (code2 === 91) {
+ return effects.attempt(
+ referenceFullConstruct,
+ labelEndOk,
+ defined ? referenceNotFull : labelEndNok
+ )(code2);
+ }
+ return defined ? labelEndOk(code2) : labelEndNok(code2);
+ }
+ function referenceNotFull(code2) {
+ return effects.attempt(
+ referenceCollapsedConstruct,
+ labelEndOk,
+ labelEndNok
+ )(code2);
+ }
+ function labelEndOk(code2) {
+ return ok(code2);
+ }
+ function labelEndNok(code2) {
+ labelStart._balanced = true;
+ return nok(code2);
+ }
+}
+function tokenizeResource(effects, ok, nok) {
+ return resourceStart;
+ function resourceStart(code2) {
+ effects.enter("resource");
+ effects.enter("resourceMarker");
+ effects.consume(code2);
+ effects.exit("resourceMarker");
+ return resourceBefore;
+ }
+ function resourceBefore(code2) {
+ return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceOpen)(code2) : resourceOpen(code2);
+ }
+ function resourceOpen(code2) {
+ if (code2 === 41) {
+ return resourceEnd(code2);
+ }
+ return factoryDestination(
+ effects,
+ resourceDestinationAfter,
+ resourceDestinationMissing,
+ "resourceDestination",
+ "resourceDestinationLiteral",
+ "resourceDestinationLiteralMarker",
+ "resourceDestinationRaw",
+ "resourceDestinationString",
+ 32
+ )(code2);
+ }
+ function resourceDestinationAfter(code2) {
+ return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceBetween)(code2) : resourceEnd(code2);
+ }
+ function resourceDestinationMissing(code2) {
+ return nok(code2);
+ }
+ function resourceBetween(code2) {
+ if (code2 === 34 || code2 === 39 || code2 === 40) {
+ return factoryTitle(
+ effects,
+ resourceTitleAfter,
+ nok,
+ "resourceTitle",
+ "resourceTitleMarker",
+ "resourceTitleString"
+ )(code2);
+ }
+ return resourceEnd(code2);
+ }
+ function resourceTitleAfter(code2) {
+ return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceEnd)(code2) : resourceEnd(code2);
+ }
+ function resourceEnd(code2) {
+ if (code2 === 41) {
+ effects.enter("resourceMarker");
+ effects.consume(code2);
+ effects.exit("resourceMarker");
+ effects.exit("resource");
+ return ok;
+ }
+ return nok(code2);
+ }
+}
+function tokenizeReferenceFull(effects, ok, nok) {
+ const self2 = this;
+ return referenceFull;
+ function referenceFull(code2) {
+ return factoryLabel.call(
+ self2,
+ effects,
+ referenceFullAfter,
+ referenceFullMissing,
+ "reference",
+ "referenceMarker",
+ "referenceString"
+ )(code2);
+ }
+ function referenceFullAfter(code2) {
+ return self2.parser.defined.includes(
+ normalizeIdentifier(
+ self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
+ )
+ ) ? ok(code2) : nok(code2);
+ }
+ function referenceFullMissing(code2) {
+ return nok(code2);
+ }
+}
+function tokenizeReferenceCollapsed(effects, ok, nok) {
+ return referenceCollapsedStart;
+ function referenceCollapsedStart(code2) {
+ effects.enter("reference");
+ effects.enter("referenceMarker");
+ effects.consume(code2);
+ effects.exit("referenceMarker");
+ return referenceCollapsedOpen;
+ }
+ function referenceCollapsedOpen(code2) {
+ if (code2 === 93) {
+ effects.enter("referenceMarker");
+ effects.consume(code2);
+ effects.exit("referenceMarker");
+ effects.exit("reference");
+ return ok;
+ }
+ return nok(code2);
+ }
+}
+const labelStartImage = {
+ name: "labelStartImage",
+ tokenize: tokenizeLabelStartImage,
+ resolveAll: labelEnd.resolveAll
+};
+function tokenizeLabelStartImage(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ effects.enter("labelImage");
+ effects.enter("labelImageMarker");
+ effects.consume(code2);
+ effects.exit("labelImageMarker");
+ return open;
+ }
+ function open(code2) {
+ if (code2 === 91) {
+ effects.enter("labelMarker");
+ effects.consume(code2);
+ effects.exit("labelMarker");
+ effects.exit("labelImage");
+ return after;
+ }
+ return nok(code2);
+ }
+ function after(code2) {
+ return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok(code2);
+ }
+}
+const labelStartLink = {
+ name: "labelStartLink",
+ tokenize: tokenizeLabelStartLink,
+ resolveAll: labelEnd.resolveAll
+};
+function tokenizeLabelStartLink(effects, ok, nok) {
+ const self2 = this;
+ return start;
+ function start(code2) {
+ effects.enter("labelLink");
+ effects.enter("labelMarker");
+ effects.consume(code2);
+ effects.exit("labelMarker");
+ effects.exit("labelLink");
+ return after;
+ }
+ function after(code2) {
+ return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok(code2);
+ }
+}
+const lineEnding = {
+ name: "lineEnding",
+ tokenize: tokenizeLineEnding
+};
+function tokenizeLineEnding(effects, ok) {
+ return start;
+ function start(code2) {
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return factorySpace(effects, ok, "linePrefix");
+ }
+}
+const thematicBreak = {
+ name: "thematicBreak",
+ tokenize: tokenizeThematicBreak
+};
+function tokenizeThematicBreak(effects, ok, nok) {
+ let size2 = 0;
+ let marker;
+ return start;
+ function start(code2) {
+ effects.enter("thematicBreak");
+ return before(code2);
+ }
+ function before(code2) {
+ marker = code2;
+ return atBreak(code2);
+ }
+ function atBreak(code2) {
+ if (code2 === marker) {
+ effects.enter("thematicBreakSequence");
+ return sequence(code2);
+ }
+ if (size2 >= 3 && (code2 === null || markdownLineEnding(code2))) {
+ effects.exit("thematicBreak");
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+ function sequence(code2) {
+ if (code2 === marker) {
+ effects.consume(code2);
+ size2++;
+ return sequence;
+ }
+ effects.exit("thematicBreakSequence");
+ return markdownSpace(code2) ? factorySpace(effects, atBreak, "whitespace")(code2) : atBreak(code2);
+ }
+}
+const list = {
+ name: "list",
+ tokenize: tokenizeListStart,
+ continuation: {
+ tokenize: tokenizeListContinuation
+ },
+ exit: tokenizeListEnd
+};
+const listItemPrefixWhitespaceConstruct = {
+ tokenize: tokenizeListItemPrefixWhitespace,
+ partial: true
+};
+const indentConstruct = {
+ tokenize: tokenizeIndent$1,
+ partial: true
+};
+function tokenizeListStart(effects, ok, nok) {
+ const self2 = this;
+ const tail = self2.events[self2.events.length - 1];
+ let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
+ let size2 = 0;
+ return start;
+ function start(code2) {
+ const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered");
+ if (kind === "listUnordered" ? !self2.containerState.marker || code2 === self2.containerState.marker : asciiDigit(code2)) {
+ if (!self2.containerState.type) {
+ self2.containerState.type = kind;
+ effects.enter(kind, {
+ _container: true
+ });
+ }
+ if (kind === "listUnordered") {
+ effects.enter("listItemPrefix");
+ return code2 === 42 || code2 === 45 ? effects.check(thematicBreak, nok, atMarker)(code2) : atMarker(code2);
+ }
+ if (!self2.interrupt || code2 === 49) {
+ effects.enter("listItemPrefix");
+ effects.enter("listItemValue");
+ return inside(code2);
+ }
+ }
+ return nok(code2);
+ }
+ function inside(code2) {
+ if (asciiDigit(code2) && ++size2 < 10) {
+ effects.consume(code2);
+ return inside;
+ }
+ if ((!self2.interrupt || size2 < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) {
+ effects.exit("listItemValue");
+ return atMarker(code2);
+ }
+ return nok(code2);
+ }
+ function atMarker(code2) {
+ effects.enter("listItemMarker");
+ effects.consume(code2);
+ effects.exit("listItemMarker");
+ self2.containerState.marker = self2.containerState.marker || code2;
+ return effects.check(
+ blankLine,
+ self2.interrupt ? nok : onBlank,
+ effects.attempt(
+ listItemPrefixWhitespaceConstruct,
+ endOfPrefix,
+ otherPrefix
+ )
+ );
+ }
+ function onBlank(code2) {
+ self2.containerState.initialBlankLine = true;
+ initialSize++;
+ return endOfPrefix(code2);
+ }
+ function otherPrefix(code2) {
+ if (markdownSpace(code2)) {
+ effects.enter("listItemPrefixWhitespace");
+ effects.consume(code2);
+ effects.exit("listItemPrefixWhitespace");
+ return endOfPrefix;
+ }
+ return nok(code2);
+ }
+ function endOfPrefix(code2) {
+ self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length;
+ return ok(code2);
+ }
+}
+function tokenizeListContinuation(effects, ok, nok) {
+ const self2 = this;
+ self2.containerState._closeFlow = void 0;
+ return effects.check(blankLine, onBlank, notBlank);
+ function onBlank(code2) {
+ self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine;
+ return factorySpace(
+ effects,
+ ok,
+ "listItemIndent",
+ self2.containerState.size + 1
+ )(code2);
+ }
+ function notBlank(code2) {
+ if (self2.containerState.furtherBlankLines || !markdownSpace(code2)) {
+ self2.containerState.furtherBlankLines = void 0;
+ self2.containerState.initialBlankLine = void 0;
+ return notInCurrentItem(code2);
+ }
+ self2.containerState.furtherBlankLines = void 0;
+ self2.containerState.initialBlankLine = void 0;
+ return effects.attempt(indentConstruct, ok, notInCurrentItem)(code2);
+ }
+ function notInCurrentItem(code2) {
+ self2.containerState._closeFlow = true;
+ self2.interrupt = void 0;
+ return factorySpace(
+ effects,
+ effects.attempt(list, ok, nok),
+ "linePrefix",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ )(code2);
+ }
+}
+function tokenizeIndent$1(effects, ok, nok) {
+ const self2 = this;
+ return factorySpace(
+ effects,
+ afterPrefix,
+ "listItemIndent",
+ self2.containerState.size + 1
+ );
+ function afterPrefix(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok(code2) : nok(code2);
+ }
+}
+function tokenizeListEnd(effects) {
+ effects.exit(this.containerState.type);
+}
+function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
+ const self2 = this;
+ return factorySpace(
+ effects,
+ afterPrefix,
+ "listItemPrefixWhitespace",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1
+ );
+ function afterPrefix(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ return !markdownSpace(code2) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code2) : nok(code2);
+ }
+}
+const setextUnderline = {
+ name: "setextUnderline",
+ tokenize: tokenizeSetextUnderline,
+ resolveTo: resolveToSetextUnderline
+};
+function resolveToSetextUnderline(events, context) {
+ let index = events.length;
+ let content2;
+ let text2;
+ let definition2;
+ while (index--) {
+ if (events[index][0] === "enter") {
+ if (events[index][1].type === "content") {
+ content2 = index;
+ break;
+ }
+ if (events[index][1].type === "paragraph") {
+ text2 = index;
+ }
+ } else {
+ if (events[index][1].type === "content") {
+ events.splice(index, 1);
+ }
+ if (!definition2 && events[index][1].type === "definition") {
+ definition2 = index;
+ }
+ }
+ }
+ const heading = {
+ type: "setextHeading",
+ start: Object.assign({}, events[text2][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ };
+ events[text2][1].type = "setextHeadingText";
+ if (definition2) {
+ events.splice(text2, 0, ["enter", heading, context]);
+ events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]);
+ events[content2][1].end = Object.assign({}, events[definition2][1].end);
+ } else {
+ events[content2][1] = heading;
+ }
+ events.push(["exit", heading, context]);
+ return events;
+}
+function tokenizeSetextUnderline(effects, ok, nok) {
+ const self2 = this;
+ let marker;
+ return start;
+ function start(code2) {
+ let index = self2.events.length;
+ let paragraph;
+ while (index--) {
+ if (self2.events[index][1].type !== "lineEnding" && self2.events[index][1].type !== "linePrefix" && self2.events[index][1].type !== "content") {
+ paragraph = self2.events[index][1].type === "paragraph";
+ break;
+ }
+ }
+ if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph)) {
+ effects.enter("setextHeadingLine");
+ marker = code2;
+ return before(code2);
+ }
+ return nok(code2);
+ }
+ function before(code2) {
+ effects.enter("setextHeadingLineSequence");
+ return inside(code2);
+ }
+ function inside(code2) {
+ if (code2 === marker) {
+ effects.consume(code2);
+ return inside;
+ }
+ effects.exit("setextHeadingLineSequence");
+ return markdownSpace(code2) ? factorySpace(effects, after, "lineSuffix")(code2) : after(code2);
+ }
+ function after(code2) {
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("setextHeadingLine");
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+}
+const flow$1 = {
+ tokenize: initializeFlow
+};
+function initializeFlow(effects) {
+ const self2 = this;
+ const initial = effects.attempt(
+ blankLine,
+ atBlankEnding,
+ effects.attempt(
+ this.parser.constructs.flowInitial,
+ afterConstruct,
+ factorySpace(
+ effects,
+ effects.attempt(
+ this.parser.constructs.flow,
+ afterConstruct,
+ effects.attempt(content, afterConstruct)
+ ),
+ "linePrefix"
+ )
+ )
+ );
+ return initial;
+ function atBlankEnding(code2) {
+ if (code2 === null) {
+ effects.consume(code2);
+ return;
+ }
+ effects.enter("lineEndingBlank");
+ effects.consume(code2);
+ effects.exit("lineEndingBlank");
+ self2.currentConstruct = void 0;
+ return initial;
+ }
+ function afterConstruct(code2) {
+ if (code2 === null) {
+ effects.consume(code2);
+ return;
+ }
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ self2.currentConstruct = void 0;
+ return initial;
+ }
+}
+const resolver = {
+ resolveAll: createResolver()
+};
+const string$1 = initializeFactory("string");
+const text$3 = initializeFactory("text");
+function initializeFactory(field) {
+ return {
+ tokenize: initializeText,
+ resolveAll: createResolver(
+ field === "text" ? resolveAllLineSuffixes : void 0
+ )
+ };
+ function initializeText(effects) {
+ const self2 = this;
+ const constructs2 = this.parser.constructs[field];
+ const text2 = effects.attempt(constructs2, start, notText);
+ return start;
+ function start(code2) {
+ return atBreak(code2) ? text2(code2) : notText(code2);
+ }
+ function notText(code2) {
+ if (code2 === null) {
+ effects.consume(code2);
+ return;
+ }
+ effects.enter("data");
+ effects.consume(code2);
+ return data;
+ }
+ function data(code2) {
+ if (atBreak(code2)) {
+ effects.exit("data");
+ return text2(code2);
+ }
+ effects.consume(code2);
+ return data;
+ }
+ function atBreak(code2) {
+ if (code2 === null) {
+ return true;
+ }
+ const list2 = constructs2[code2];
+ let index = -1;
+ if (list2) {
+ while (++index < list2.length) {
+ const item = list2[index];
+ if (!item.previous || item.previous.call(self2, self2.previous)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
+function createResolver(extraResolver) {
+ return resolveAllText;
+ function resolveAllText(events, context) {
+ let index = -1;
+ let enter;
+ while (++index <= events.length) {
+ if (enter === void 0) {
+ if (events[index] && events[index][1].type === "data") {
+ enter = index;
+ index++;
+ }
+ } else if (!events[index] || events[index][1].type !== "data") {
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end;
+ events.splice(enter + 2, index - enter - 2);
+ index = enter + 2;
+ }
+ enter = void 0;
+ }
+ }
+ return extraResolver ? extraResolver(events, context) : events;
+ }
+}
+function resolveAllLineSuffixes(events, context) {
+ let eventIndex = 0;
+ while (++eventIndex <= events.length) {
+ if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
+ const data = events[eventIndex - 1][1];
+ const chunks = context.sliceStream(data);
+ let index = chunks.length;
+ let bufferIndex = -1;
+ let size2 = 0;
+ let tabs;
+ while (index--) {
+ const chunk = chunks[index];
+ if (typeof chunk === "string") {
+ bufferIndex = chunk.length;
+ while (chunk.charCodeAt(bufferIndex - 1) === 32) {
+ size2++;
+ bufferIndex--;
+ }
+ if (bufferIndex)
+ break;
+ bufferIndex = -1;
+ } else if (chunk === -2) {
+ tabs = true;
+ size2++;
+ } else if (chunk === -1)
+ ;
+ else {
+ index++;
+ break;
+ }
+ }
+ if (size2) {
+ const token = {
+ type: eventIndex === events.length || tabs || size2 < 2 ? "lineSuffix" : "hardBreakTrailing",
+ start: {
+ line: data.end.line,
+ column: data.end.column - size2,
+ offset: data.end.offset - size2,
+ _index: data.start._index + index,
+ _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex
+ },
+ end: Object.assign({}, data.end)
+ };
+ data.end = Object.assign({}, token.start);
+ if (data.start.offset === data.end.offset) {
+ Object.assign(data, token);
+ } else {
+ events.splice(
+ eventIndex,
+ 0,
+ ["enter", token, context],
+ ["exit", token, context]
+ );
+ eventIndex += 2;
+ }
+ }
+ eventIndex++;
+ }
+ }
+ return events;
+}
+function createTokenizer(parser, initialize, from) {
+ let point = Object.assign(
+ from ? Object.assign({}, from) : {
+ line: 1,
+ column: 1,
+ offset: 0
+ },
+ {
+ _index: 0,
+ _bufferIndex: -1
+ }
+ );
+ const columnStart = {};
+ const resolveAllConstructs = [];
+ let chunks = [];
+ let stack = [];
+ const effects = {
+ consume,
+ enter,
+ exit: exit2,
+ attempt: constructFactory(onsuccessfulconstruct),
+ check: constructFactory(onsuccessfulcheck),
+ interrupt: constructFactory(onsuccessfulcheck, {
+ interrupt: true
+ })
+ };
+ const context = {
+ previous: null,
+ code: null,
+ containerState: {},
+ events: [],
+ parser,
+ sliceStream,
+ sliceSerialize,
+ now,
+ defineSkip,
+ write
+ };
+ let state = initialize.tokenize.call(context, effects);
+ if (initialize.resolveAll) {
+ resolveAllConstructs.push(initialize);
+ }
+ return context;
+ function write(slice) {
+ chunks = push(chunks, slice);
+ main();
+ if (chunks[chunks.length - 1] !== null) {
+ return [];
+ }
+ addResult(initialize, 0);
+ context.events = resolveAll(resolveAllConstructs, context.events, context);
+ return context.events;
+ }
+ function sliceSerialize(token, expandTabs) {
+ return serializeChunks(sliceStream(token), expandTabs);
+ }
+ function sliceStream(token) {
+ return sliceChunks(chunks, token);
+ }
+ function now() {
+ const { line, column, offset, _index, _bufferIndex } = point;
+ return {
+ line,
+ column,
+ offset,
+ _index,
+ _bufferIndex
+ };
+ }
+ function defineSkip(value) {
+ columnStart[value.line] = value.column;
+ accountForPotentialSkip();
+ }
+ function main() {
+ let chunkIndex;
+ while (point._index < chunks.length) {
+ const chunk = chunks[point._index];
+ if (typeof chunk === "string") {
+ chunkIndex = point._index;
+ if (point._bufferIndex < 0) {
+ point._bufferIndex = 0;
+ }
+ while (point._index === chunkIndex && point._bufferIndex < chunk.length) {
+ go(chunk.charCodeAt(point._bufferIndex));
+ }
+ } else {
+ go(chunk);
+ }
+ }
+ }
+ function go(code2) {
+ state = state(code2);
+ }
+ function consume(code2) {
+ if (markdownLineEnding(code2)) {
+ point.line++;
+ point.column = 1;
+ point.offset += code2 === -3 ? 2 : 1;
+ accountForPotentialSkip();
+ } else if (code2 !== -1) {
+ point.column++;
+ point.offset++;
+ }
+ if (point._bufferIndex < 0) {
+ point._index++;
+ } else {
+ point._bufferIndex++;
+ if (point._bufferIndex === chunks[point._index].length) {
+ point._bufferIndex = -1;
+ point._index++;
+ }
+ }
+ context.previous = code2;
+ }
+ function enter(type, fields) {
+ const token = fields || {};
+ token.type = type;
+ token.start = now();
+ context.events.push(["enter", token, context]);
+ stack.push(token);
+ return token;
+ }
+ function exit2(type) {
+ const token = stack.pop();
+ token.end = now();
+ context.events.push(["exit", token, context]);
+ return token;
+ }
+ function onsuccessfulconstruct(construct, info) {
+ addResult(construct, info.from);
+ }
+ function onsuccessfulcheck(_, info) {
+ info.restore();
+ }
+ function constructFactory(onreturn, fields) {
+ return hook;
+ function hook(constructs2, returnState, bogusState) {
+ let listOfConstructs;
+ let constructIndex;
+ let currentConstruct;
+ let info;
+ return Array.isArray(constructs2) ? handleListOfConstructs(constructs2) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2);
+ function handleMapOfConstructs(map) {
+ return start;
+ function start(code2) {
+ const def2 = code2 !== null && map[code2];
+ const all = code2 !== null && map.null;
+ const list2 = [
+ ...Array.isArray(def2) ? def2 : def2 ? [def2] : [],
+ ...Array.isArray(all) ? all : all ? [all] : []
+ ];
+ return handleListOfConstructs(list2)(code2);
+ }
+ }
+ function handleListOfConstructs(list2) {
+ listOfConstructs = list2;
+ constructIndex = 0;
+ if (list2.length === 0) {
+ return bogusState;
+ }
+ return handleConstruct(list2[constructIndex]);
+ }
+ function handleConstruct(construct) {
+ return start;
+ function start(code2) {
+ info = store();
+ currentConstruct = construct;
+ if (!construct.partial) {
+ context.currentConstruct = construct;
+ }
+ if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {
+ return nok();
+ }
+ return construct.tokenize.call(
+ fields ? Object.assign(Object.create(context), fields) : context,
+ effects,
+ ok,
+ nok
+ )(code2);
+ }
+ }
+ function ok(code2) {
+ onreturn(currentConstruct, info);
+ return returnState;
+ }
+ function nok(code2) {
+ info.restore();
+ if (++constructIndex < listOfConstructs.length) {
+ return handleConstruct(listOfConstructs[constructIndex]);
+ }
+ return bogusState;
+ }
+ }
+ }
+ function addResult(construct, from2) {
+ if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
+ resolveAllConstructs.push(construct);
+ }
+ if (construct.resolve) {
+ splice(
+ context.events,
+ from2,
+ context.events.length - from2,
+ construct.resolve(context.events.slice(from2), context)
+ );
+ }
+ if (construct.resolveTo) {
+ context.events = construct.resolveTo(context.events, context);
+ }
+ }
+ function store() {
+ const startPoint = now();
+ const startPrevious = context.previous;
+ const startCurrentConstruct = context.currentConstruct;
+ const startEventsIndex = context.events.length;
+ const startStack = Array.from(stack);
+ return {
+ restore,
+ from: startEventsIndex
+ };
+ function restore() {
+ point = startPoint;
+ context.previous = startPrevious;
+ context.currentConstruct = startCurrentConstruct;
+ context.events.length = startEventsIndex;
+ stack = startStack;
+ accountForPotentialSkip();
+ }
+ }
+ function accountForPotentialSkip() {
+ if (point.line in columnStart && point.column < 2) {
+ point.column = columnStart[point.line];
+ point.offset += columnStart[point.line] - 1;
+ }
+ }
+}
+function sliceChunks(chunks, token) {
+ const startIndex = token.start._index;
+ const startBufferIndex = token.start._bufferIndex;
+ const endIndex = token.end._index;
+ const endBufferIndex = token.end._bufferIndex;
+ let view;
+ if (startIndex === endIndex) {
+ view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
+ } else {
+ view = chunks.slice(startIndex, endIndex);
+ if (startBufferIndex > -1) {
+ const head = view[0];
+ if (typeof head === "string") {
+ view[0] = head.slice(startBufferIndex);
+ } else {
+ view.shift();
+ }
+ }
+ if (endBufferIndex > 0) {
+ view.push(chunks[endIndex].slice(0, endBufferIndex));
+ }
+ }
+ return view;
+}
+function serializeChunks(chunks, expandTabs) {
+ let index = -1;
+ const result = [];
+ let atTab;
+ while (++index < chunks.length) {
+ const chunk = chunks[index];
+ let value;
+ if (typeof chunk === "string") {
+ value = chunk;
+ } else
+ switch (chunk) {
+ case -5: {
+ value = "\r";
+ break;
+ }
+ case -4: {
+ value = "\n";
+ break;
+ }
+ case -3: {
+ value = "\r\n";
+ break;
+ }
+ case -2: {
+ value = expandTabs ? " " : " ";
+ break;
+ }
+ case -1: {
+ if (!expandTabs && atTab)
+ continue;
+ value = " ";
+ break;
+ }
+ default: {
+ value = String.fromCharCode(chunk);
+ }
+ }
+ atTab = chunk === -2;
+ result.push(value);
+ }
+ return result.join("");
+}
+const document$1 = {
+ [42]: list,
+ [43]: list,
+ [45]: list,
+ [48]: list,
+ [49]: list,
+ [50]: list,
+ [51]: list,
+ [52]: list,
+ [53]: list,
+ [54]: list,
+ [55]: list,
+ [56]: list,
+ [57]: list,
+ [62]: blockQuote
+};
+const contentInitial = {
+ [91]: definition
+};
+const flowInitial = {
+ [-2]: codeIndented,
+ [-1]: codeIndented,
+ [32]: codeIndented
+};
+const flow = {
+ [35]: headingAtx,
+ [42]: thematicBreak,
+ [45]: [setextUnderline, thematicBreak],
+ [60]: htmlFlow,
+ [61]: setextUnderline,
+ [95]: thematicBreak,
+ [96]: codeFenced,
+ [126]: codeFenced
+};
+const string = {
+ [38]: characterReference,
+ [92]: characterEscape
+};
+const text$2 = {
+ [-5]: lineEnding,
+ [-4]: lineEnding,
+ [-3]: lineEnding,
+ [33]: labelStartImage,
+ [38]: characterReference,
+ [42]: attention,
+ [60]: [autolink, htmlText],
+ [91]: labelStartLink,
+ [92]: [hardBreakEscape, characterEscape],
+ [93]: labelEnd,
+ [95]: attention,
+ [96]: codeText
+};
+const insideSpan = {
+ null: [attention, resolver]
+};
+const attentionMarkers = {
+ null: [42, 95]
+};
+const disable = {
+ null: []
+};
+var defaultConstructs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ document: document$1,
+ contentInitial,
+ flowInitial,
+ flow,
+ string,
+ text: text$2,
+ insideSpan,
+ attentionMarkers,
+ disable
+}, Symbol.toStringTag, { value: "Module" }));
+function parse(options) {
+ const settings = options || {};
+ const constructs2 = combineExtensions([defaultConstructs, ...settings.extensions || []]);
+ const parser = {
+ defined: [],
+ lazy: {},
+ constructs: constructs2,
+ content: create(content$1),
+ document: create(document$2),
+ flow: create(flow$1),
+ string: create(string$1),
+ text: create(text$3)
+ };
+ return parser;
+ function create(initial) {
+ return creator;
+ function creator(from) {
+ return createTokenizer(parser, initial, from);
+ }
+ }
+}
+function postprocess(events) {
+ while (!subtokenize(events)) {
+ }
+ return events;
+}
+const search = /[\0\t\n\r]/g;
+function preprocess() {
+ let column = 1;
+ let buffer = "";
+ let start = true;
+ let atCarriageReturn;
+ return preprocessor;
+ function preprocessor(value, encoding, end) {
+ const chunks = [];
+ let match;
+ let next;
+ let startPosition;
+ let endPosition;
+ let code2;
+ value = buffer + value.toString(encoding);
+ startPosition = 0;
+ buffer = "";
+ if (start) {
+ if (value.charCodeAt(0) === 65279) {
+ startPosition++;
+ }
+ start = void 0;
+ }
+ while (startPosition < value.length) {
+ search.lastIndex = startPosition;
+ match = search.exec(value);
+ endPosition = match && match.index !== void 0 ? match.index : value.length;
+ code2 = value.charCodeAt(endPosition);
+ if (!match) {
+ buffer = value.slice(startPosition);
+ break;
+ }
+ if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
+ chunks.push(-3);
+ atCarriageReturn = void 0;
+ } else {
+ if (atCarriageReturn) {
+ chunks.push(-5);
+ atCarriageReturn = void 0;
+ }
+ if (startPosition < endPosition) {
+ chunks.push(value.slice(startPosition, endPosition));
+ column += endPosition - startPosition;
+ }
+ switch (code2) {
+ case 0: {
+ chunks.push(65533);
+ column++;
+ break;
+ }
+ case 9: {
+ next = Math.ceil(column / 4) * 4;
+ chunks.push(-2);
+ while (column++ < next)
+ chunks.push(-1);
+ break;
+ }
+ case 10: {
+ chunks.push(-4);
+ column = 1;
+ break;
+ }
+ default: {
+ atCarriageReturn = true;
+ column = 1;
+ }
+ }
+ }
+ startPosition = endPosition + 1;
+ }
+ if (end) {
+ if (atCarriageReturn)
+ chunks.push(-5);
+ if (buffer)
+ chunks.push(buffer);
+ chunks.push(null);
+ }
+ return chunks;
+ }
+}
+function micromark(value, encoding, options) {
+ if (typeof encoding !== "string") {
+ options = encoding;
+ encoding = void 0;
+ }
+ return compile(options)(
+ postprocess(
+ parse(options).document().write(preprocess()(value, encoding, true))
+ )
+ );
+}
+const wwwPrefix = {
+ tokenize: tokenizeWwwPrefix,
+ partial: true
+};
+const domain = {
+ tokenize: tokenizeDomain,
+ partial: true
+};
+const path = {
+ tokenize: tokenizePath,
+ partial: true
+};
+const trail = {
+ tokenize: tokenizeTrail,
+ partial: true
+};
+const emailDomainDotTrail = {
+ tokenize: tokenizeEmailDomainDotTrail,
+ partial: true
+};
+const wwwAutolink = {
+ tokenize: tokenizeWwwAutolink,
+ previous: previousWww
+};
+const protocolAutolink = {
+ tokenize: tokenizeProtocolAutolink,
+ previous: previousProtocol
+};
+const emailAutolink = {
+ tokenize: tokenizeEmailAutolink,
+ previous: previousEmail
+};
+const text$1 = {};
+const gfmAutolinkLiteral = {
+ text: text$1
+};
+let code = 48;
+while (code < 123) {
+ text$1[code] = emailAutolink;
+ code++;
+ if (code === 58)
+ code = 65;
+ else if (code === 91)
+ code = 97;
+}
+text$1[43] = emailAutolink;
+text$1[45] = emailAutolink;
+text$1[46] = emailAutolink;
+text$1[95] = emailAutolink;
+text$1[72] = [emailAutolink, protocolAutolink];
+text$1[104] = [emailAutolink, protocolAutolink];
+text$1[87] = [emailAutolink, wwwAutolink];
+text$1[119] = [emailAutolink, wwwAutolink];
+function tokenizeEmailAutolink(effects, ok, nok) {
+ const self2 = this;
+ let dot;
+ let data;
+ return start;
+ function start(code2) {
+ if (!gfmAtext(code2) || !previousEmail.call(self2, self2.previous) || previousUnbalanced(self2.events)) {
+ return nok(code2);
+ }
+ effects.enter("literalAutolink");
+ effects.enter("literalAutolinkEmail");
+ return atext(code2);
+ }
+ function atext(code2) {
+ if (gfmAtext(code2)) {
+ effects.consume(code2);
+ return atext;
+ }
+ if (code2 === 64) {
+ effects.consume(code2);
+ return emailDomain;
+ }
+ return nok(code2);
+ }
+ function emailDomain(code2) {
+ if (code2 === 46) {
+ return effects.check(
+ emailDomainDotTrail,
+ emailDomainAfter,
+ emailDomainDot
+ )(code2);
+ }
+ if (code2 === 45 || code2 === 95 || asciiAlphanumeric(code2)) {
+ data = true;
+ effects.consume(code2);
+ return emailDomain;
+ }
+ return emailDomainAfter(code2);
+ }
+ function emailDomainDot(code2) {
+ effects.consume(code2);
+ dot = true;
+ return emailDomain;
+ }
+ function emailDomainAfter(code2) {
+ if (data && dot && asciiAlpha(self2.previous)) {
+ effects.exit("literalAutolinkEmail");
+ effects.exit("literalAutolink");
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+}
+function tokenizeWwwAutolink(effects, ok, nok) {
+ const self2 = this;
+ return wwwStart;
+ function wwwStart(code2) {
+ if (code2 !== 87 && code2 !== 119 || !previousWww.call(self2, self2.previous) || previousUnbalanced(self2.events)) {
+ return nok(code2);
+ }
+ effects.enter("literalAutolink");
+ effects.enter("literalAutolinkWww");
+ return effects.check(
+ wwwPrefix,
+ effects.attempt(domain, effects.attempt(path, wwwAfter), nok),
+ nok
+ )(code2);
+ }
+ function wwwAfter(code2) {
+ effects.exit("literalAutolinkWww");
+ effects.exit("literalAutolink");
+ return ok(code2);
+ }
+}
+function tokenizeProtocolAutolink(effects, ok, nok) {
+ const self2 = this;
+ let buffer = "";
+ let seen = false;
+ return protocolStart;
+ function protocolStart(code2) {
+ if ((code2 === 72 || code2 === 104) && previousProtocol.call(self2, self2.previous) && !previousUnbalanced(self2.events)) {
+ effects.enter("literalAutolink");
+ effects.enter("literalAutolinkHttp");
+ buffer += String.fromCodePoint(code2);
+ effects.consume(code2);
+ return protocolPrefixInside;
+ }
+ return nok(code2);
+ }
+ function protocolPrefixInside(code2) {
+ if (asciiAlpha(code2) && buffer.length < 5) {
+ buffer += String.fromCodePoint(code2);
+ effects.consume(code2);
+ return protocolPrefixInside;
+ }
+ if (code2 === 58) {
+ const protocol = buffer.toLowerCase();
+ if (protocol === "http" || protocol === "https") {
+ effects.consume(code2);
+ return protocolSlashesInside;
+ }
+ }
+ return nok(code2);
+ }
+ function protocolSlashesInside(code2) {
+ if (code2 === 47) {
+ effects.consume(code2);
+ if (seen) {
+ return afterProtocol;
+ }
+ seen = true;
+ return protocolSlashesInside;
+ }
+ return nok(code2);
+ }
+ function afterProtocol(code2) {
+ return code2 === null || asciiControl(code2) || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || unicodePunctuation(code2) ? nok(code2) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code2);
+ }
+ function protocolAfter(code2) {
+ effects.exit("literalAutolinkHttp");
+ effects.exit("literalAutolink");
+ return ok(code2);
+ }
+}
+function tokenizeWwwPrefix(effects, ok, nok) {
+ let size2 = 0;
+ return wwwPrefixInside;
+ function wwwPrefixInside(code2) {
+ if ((code2 === 87 || code2 === 119) && size2 < 3) {
+ size2++;
+ effects.consume(code2);
+ return wwwPrefixInside;
+ }
+ if (code2 === 46 && size2 === 3) {
+ effects.consume(code2);
+ return wwwPrefixAfter;
+ }
+ return nok(code2);
+ }
+ function wwwPrefixAfter(code2) {
+ return code2 === null ? nok(code2) : ok(code2);
+ }
+}
+function tokenizeDomain(effects, ok, nok) {
+ let underscoreInLastSegment;
+ let underscoreInLastLastSegment;
+ let seen;
+ return domainInside;
+ function domainInside(code2) {
+ if (code2 === 46 || code2 === 95) {
+ return effects.check(trail, domainAfter, domainAtPunctuation)(code2);
+ }
+ if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== 45 && unicodePunctuation(code2)) {
+ return domainAfter(code2);
+ }
+ seen = true;
+ effects.consume(code2);
+ return domainInside;
+ }
+ function domainAtPunctuation(code2) {
+ if (code2 === 95) {
+ underscoreInLastSegment = true;
+ } else {
+ underscoreInLastLastSegment = underscoreInLastSegment;
+ underscoreInLastSegment = void 0;
+ }
+ effects.consume(code2);
+ return domainInside;
+ }
+ function domainAfter(code2) {
+ if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {
+ return nok(code2);
+ }
+ return ok(code2);
+ }
+}
+function tokenizePath(effects, ok) {
+ let sizeOpen = 0;
+ let sizeClose = 0;
+ return pathInside;
+ function pathInside(code2) {
+ if (code2 === 40) {
+ sizeOpen++;
+ effects.consume(code2);
+ return pathInside;
+ }
+ if (code2 === 41 && sizeClose < sizeOpen) {
+ return pathAtPunctuation(code2);
+ }
+ if (code2 === 33 || code2 === 34 || code2 === 38 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 60 || code2 === 63 || code2 === 93 || code2 === 95 || code2 === 126) {
+ return effects.check(trail, ok, pathAtPunctuation)(code2);
+ }
+ if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
+ return ok(code2);
+ }
+ effects.consume(code2);
+ return pathInside;
+ }
+ function pathAtPunctuation(code2) {
+ if (code2 === 41) {
+ sizeClose++;
+ }
+ effects.consume(code2);
+ return pathInside;
+ }
+}
+function tokenizeTrail(effects, ok, nok) {
+ return trail2;
+ function trail2(code2) {
+ if (code2 === 33 || code2 === 34 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 63 || code2 === 95 || code2 === 126) {
+ effects.consume(code2);
+ return trail2;
+ }
+ if (code2 === 38) {
+ effects.consume(code2);
+ return trailCharRefStart;
+ }
+ if (code2 === 93) {
+ effects.consume(code2);
+ return trailBracketAfter;
+ }
+ if (code2 === 60 || code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
+ return ok(code2);
+ }
+ return nok(code2);
+ }
+ function trailBracketAfter(code2) {
+ if (code2 === null || code2 === 40 || code2 === 91 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
+ return ok(code2);
+ }
+ return trail2(code2);
+ }
+ function trailCharRefStart(code2) {
+ return asciiAlpha(code2) ? trailCharRefInside(code2) : nok(code2);
+ }
+ function trailCharRefInside(code2) {
+ if (code2 === 59) {
+ effects.consume(code2);
+ return trail2;
+ }
+ if (asciiAlpha(code2)) {
+ effects.consume(code2);
+ return trailCharRefInside;
+ }
+ return nok(code2);
+ }
+}
+function tokenizeEmailDomainDotTrail(effects, ok, nok) {
+ return start;
+ function start(code2) {
+ effects.consume(code2);
+ return after;
+ }
+ function after(code2) {
+ return asciiAlphanumeric(code2) ? nok(code2) : ok(code2);
+ }
+}
+function previousWww(code2) {
+ return code2 === null || code2 === 40 || code2 === 42 || code2 === 95 || code2 === 91 || code2 === 93 || code2 === 126 || markdownLineEndingOrSpace(code2);
+}
+function previousProtocol(code2) {
+ return !asciiAlpha(code2);
+}
+function previousEmail(code2) {
+ return !(code2 === 47 || gfmAtext(code2));
+}
+function gfmAtext(code2) {
+ return code2 === 43 || code2 === 45 || code2 === 46 || code2 === 95 || asciiAlphanumeric(code2);
+}
+function previousUnbalanced(events) {
+ let index = events.length;
+ let result = false;
+ while (index--) {
+ const token = events[index][1];
+ if ((token.type === "labelLink" || token.type === "labelImage") && !token._balanced) {
+ result = true;
+ break;
+ }
+ if (token._gfmAutolinkLiteralWalkedInto) {
+ result = false;
+ break;
+ }
+ }
+ if (events.length > 0 && !result) {
+ events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;
+ }
+ return result;
+}
+const gfmAutolinkLiteralHtml = {
+ exit: {
+ literalAutolinkEmail,
+ literalAutolinkHttp,
+ literalAutolinkWww
+ }
+};
+function literalAutolinkWww(token) {
+ anchorFromToken.call(this, token, "http://");
+}
+function literalAutolinkEmail(token) {
+ anchorFromToken.call(this, token, "mailto:");
+}
+function literalAutolinkHttp(token) {
+ anchorFromToken.call(this, token);
+}
+function anchorFromToken(token, protocol) {
+ const url = this.sliceSerialize(token);
+ this.tag('');
+ this.raw(this.encode(url));
+ this.tag("");
+}
+const indent = {
+ tokenize: tokenizeIndent,
+ partial: true
+};
+function gfmFootnote() {
+ return {
+ document: {
+ [91]: {
+ tokenize: tokenizeDefinitionStart,
+ continuation: {
+ tokenize: tokenizeDefinitionContinuation
+ },
+ exit: gfmFootnoteDefinitionEnd
+ }
+ },
+ text: {
+ [91]: {
+ tokenize: tokenizeGfmFootnoteCall
+ },
+ [93]: {
+ add: "after",
+ tokenize: tokenizePotentialGfmFootnoteCall,
+ resolveTo: resolveToPotentialGfmFootnoteCall
+ }
+ }
+ };
+}
+function tokenizePotentialGfmFootnoteCall(effects, ok, nok) {
+ const self2 = this;
+ let index = self2.events.length;
+ const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []);
+ let labelStart;
+ while (index--) {
+ const token = self2.events[index][1];
+ if (token.type === "labelImage") {
+ labelStart = token;
+ break;
+ }
+ if (token.type === "gfmFootnoteCall" || token.type === "labelLink" || token.type === "label" || token.type === "image" || token.type === "link") {
+ break;
+ }
+ }
+ return start;
+ function start(code2) {
+ if (!labelStart || !labelStart._balanced) {
+ return nok(code2);
+ }
+ const id = normalizeIdentifier(
+ self2.sliceSerialize({
+ start: labelStart.end,
+ end: self2.now()
+ })
+ );
+ if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {
+ return nok(code2);
+ }
+ effects.enter("gfmFootnoteCallLabelMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteCallLabelMarker");
+ return ok(code2);
}
-};
-function contains(arr, value) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i] === value) {
- return true;
+}
+function resolveToPotentialGfmFootnoteCall(events, context) {
+ let index = events.length;
+ while (index--) {
+ if (events[index][1].type === "labelImage" && events[index][0] === "enter") {
+ events[index][1];
+ break;
}
}
- return false;
+ events[index + 1][1].type = "data";
+ events[index + 3][1].type = "gfmFootnoteCallLabelMarker";
+ const call = {
+ type: "gfmFootnoteCall",
+ start: Object.assign({}, events[index + 3][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ };
+ const marker = {
+ type: "gfmFootnoteCallMarker",
+ start: Object.assign({}, events[index + 3][1].end),
+ end: Object.assign({}, events[index + 3][1].end)
+ };
+ marker.end.column++;
+ marker.end.offset++;
+ marker.end._bufferIndex++;
+ const string2 = {
+ type: "gfmFootnoteCallString",
+ start: Object.assign({}, marker.end),
+ end: Object.assign({}, events[events.length - 1][1].start)
+ };
+ const chunk = {
+ type: "chunkString",
+ contentType: "string",
+ start: Object.assign({}, string2.start),
+ end: Object.assign({}, string2.end)
+ };
+ const replacement = [
+ events[index + 1],
+ events[index + 2],
+ ["enter", call, context],
+ events[index + 3],
+ events[index + 4],
+ ["enter", marker, context],
+ ["exit", marker, context],
+ ["enter", string2, context],
+ ["enter", chunk, context],
+ ["exit", chunk, context],
+ ["exit", string2, context],
+ events[events.length - 2],
+ events[events.length - 1],
+ ["exit", call, context]
+ ];
+ events.splice(index, events.length - index + 1, ...replacement);
+ return events;
+}
+function tokenizeGfmFootnoteCall(effects, ok, nok) {
+ const self2 = this;
+ const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []);
+ let size2 = 0;
+ let data;
+ return start;
+ function start(code2) {
+ effects.enter("gfmFootnoteCall");
+ effects.enter("gfmFootnoteCallLabelMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteCallLabelMarker");
+ return callStart;
+ }
+ function callStart(code2) {
+ if (code2 !== 94)
+ return nok(code2);
+ effects.enter("gfmFootnoteCallMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteCallMarker");
+ effects.enter("gfmFootnoteCallString");
+ effects.enter("chunkString").contentType = "string";
+ return callData;
+ }
+ function callData(code2) {
+ if (size2 > 999 || code2 === 93 && !data || code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)) {
+ return nok(code2);
+ }
+ if (code2 === 93) {
+ effects.exit("chunkString");
+ const token = effects.exit("gfmFootnoteCallString");
+ if (!defined.includes(normalizeIdentifier(self2.sliceSerialize(token)))) {
+ return nok(code2);
+ }
+ effects.enter("gfmFootnoteCallLabelMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteCallLabelMarker");
+ effects.exit("gfmFootnoteCall");
+ return ok;
+ }
+ if (!markdownLineEndingOrSpace(code2)) {
+ data = true;
+ }
+ size2++;
+ effects.consume(code2);
+ return code2 === 92 ? callEscape : callData;
+ }
+ function callEscape(code2) {
+ if (code2 === 91 || code2 === 92 || code2 === 93) {
+ effects.consume(code2);
+ size2++;
+ return callData;
+ }
+ return callData(code2);
+ }
+}
+function tokenizeDefinitionStart(effects, ok, nok) {
+ const self2 = this;
+ const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []);
+ let identifier;
+ let size2 = 0;
+ let data;
+ return start;
+ function start(code2) {
+ effects.enter("gfmFootnoteDefinition")._container = true;
+ effects.enter("gfmFootnoteDefinitionLabel");
+ effects.enter("gfmFootnoteDefinitionLabelMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteDefinitionLabelMarker");
+ return labelAtMarker;
+ }
+ function labelAtMarker(code2) {
+ if (code2 === 94) {
+ effects.enter("gfmFootnoteDefinitionMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteDefinitionMarker");
+ effects.enter("gfmFootnoteDefinitionLabelString");
+ effects.enter("chunkString").contentType = "string";
+ return labelInside;
+ }
+ return nok(code2);
+ }
+ function labelInside(code2) {
+ if (size2 > 999 || code2 === 93 && !data || code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)) {
+ return nok(code2);
+ }
+ if (code2 === 93) {
+ effects.exit("chunkString");
+ const token = effects.exit("gfmFootnoteDefinitionLabelString");
+ identifier = normalizeIdentifier(self2.sliceSerialize(token));
+ effects.enter("gfmFootnoteDefinitionLabelMarker");
+ effects.consume(code2);
+ effects.exit("gfmFootnoteDefinitionLabelMarker");
+ effects.exit("gfmFootnoteDefinitionLabel");
+ return labelAfter;
+ }
+ if (!markdownLineEndingOrSpace(code2)) {
+ data = true;
+ }
+ size2++;
+ effects.consume(code2);
+ return code2 === 92 ? labelEscape : labelInside;
+ }
+ function labelEscape(code2) {
+ if (code2 === 91 || code2 === 92 || code2 === 93) {
+ effects.consume(code2);
+ size2++;
+ return labelInside;
+ }
+ return labelInside(code2);
+ }
+ function labelAfter(code2) {
+ if (code2 === 58) {
+ effects.enter("definitionMarker");
+ effects.consume(code2);
+ effects.exit("definitionMarker");
+ if (!defined.includes(identifier)) {
+ defined.push(identifier);
+ }
+ return factorySpace(
+ effects,
+ whitespaceAfter,
+ "gfmFootnoteDefinitionWhitespace"
+ );
+ }
+ return nok(code2);
+ }
+ function whitespaceAfter(code2) {
+ return ok(code2);
+ }
}
-function noop$1(val) {
- return val;
+function tokenizeDefinitionContinuation(effects, ok, nok) {
+ return effects.check(blankLine, ok, effects.attempt(indent, ok, nok));
}
-function typeToTarget(href, type) {
- return type === "url" ? "_blank" : null;
-}
-var scanner$1 = {};
-var state = {};
-state.__esModule = true;
-state.stateify = state.TokenState = state.CharacterState = void 0;
-var _class$3 = _class$4;
-function createStateClass() {
- return function(tClass) {
- this.j = [];
- this.T = tClass || null;
- };
+function gfmFootnoteDefinitionEnd(effects) {
+ effects.exit("gfmFootnoteDefinition");
}
-var BaseState = createStateClass();
-BaseState.prototype = {
- defaultTransition: false,
- on: function on(symbol, state2) {
- if (symbol instanceof Array) {
- for (var i = 0; i < symbol.length; i++) {
- this.j.push([symbol[i], state2]);
+function tokenizeIndent(effects, ok, nok) {
+ const self2 = this;
+ return factorySpace(
+ effects,
+ afterPrefix,
+ "gfmFootnoteDefinitionIndent",
+ 4 + 1
+ );
+ function afterPrefix(code2) {
+ const tail = self2.events[self2.events.length - 1];
+ return tail && tail[1].type === "gfmFootnoteDefinitionIndent" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code2) : nok(code2);
+ }
+}
+const own = {}.hasOwnProperty;
+const emptyOptions = {};
+function defaultBackLabel(referenceIndex, rereferenceIndex) {
+ return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : "");
+}
+function gfmFootnoteHtml(options) {
+ const config = options || emptyOptions;
+ const label = config.label || "Footnotes";
+ const labelTagName = config.labelTagName || "h2";
+ const labelAttributes = config.labelAttributes === null || config.labelAttributes === void 0 ? 'class="sr-only"' : config.labelAttributes;
+ const backLabel = config.backLabel || defaultBackLabel;
+ const clobberPrefix = config.clobberPrefix === null || config.clobberPrefix === void 0 ? "user-content-" : config.clobberPrefix;
+ return {
+ enter: {
+ gfmFootnoteDefinition() {
+ const stack = this.getData("tightStack");
+ stack.push(false);
+ },
+ gfmFootnoteDefinitionLabelString() {
+ this.buffer();
+ },
+ gfmFootnoteCallString() {
+ this.buffer();
+ }
+ },
+ exit: {
+ gfmFootnoteDefinition() {
+ let definitions2 = this.getData("gfmFootnoteDefinitions");
+ const footnoteStack = this.getData("gfmFootnoteDefinitionStack");
+ const tightStack = this.getData("tightStack");
+ const current = footnoteStack.pop();
+ const value = this.resume();
+ if (!definitions2) {
+ this.setData("gfmFootnoteDefinitions", definitions2 = {});
+ }
+ if (!own.call(definitions2, current))
+ definitions2[current] = value;
+ tightStack.pop();
+ this.setData("slurpOneLineEnding", true);
+ this.setData("lastWasTag");
+ },
+ gfmFootnoteDefinitionLabelString(token) {
+ let footnoteStack = this.getData("gfmFootnoteDefinitionStack");
+ if (!footnoteStack) {
+ this.setData("gfmFootnoteDefinitionStack", footnoteStack = []);
+ }
+ footnoteStack.push(normalizeIdentifier(this.sliceSerialize(token)));
+ this.resume();
+ this.buffer();
+ },
+ gfmFootnoteCallString(token) {
+ let calls = this.getData("gfmFootnoteCallOrder");
+ let counts = this.getData("gfmFootnoteCallCounts");
+ const id = normalizeIdentifier(this.sliceSerialize(token));
+ let counter;
+ this.resume();
+ if (!calls)
+ this.setData("gfmFootnoteCallOrder", calls = []);
+ if (!counts)
+ this.setData("gfmFootnoteCallCounts", counts = {});
+ const index = calls.indexOf(id);
+ const safeId = sanitizeUri(id.toLowerCase());
+ if (index === -1) {
+ calls.push(id);
+ counts[id] = 1;
+ counter = calls.length;
+ } else {
+ counts[id]++;
+ counter = index + 1;
+ }
+ const reuseCounter = counts[id];
+ this.tag(
+ ' 1 ? "-" + reuseCounter : "") + '" data-footnote-ref="" aria-describedby="footnote-label">' + String(counter) + ""
+ );
+ },
+ null() {
+ const calls = this.getData("gfmFootnoteCallOrder") || [];
+ const counts = this.getData("gfmFootnoteCallCounts") || {};
+ const definitions2 = this.getData("gfmFootnoteDefinitions") || {};
+ let index = -1;
+ if (calls.length > 0) {
+ this.lineEndingIfNeeded();
+ this.tag(
+ '<' + labelTagName + ' id="footnote-label"' + (labelAttributes ? " " + labelAttributes : "") + ">"
+ );
+ this.raw(this.encode(label));
+ this.tag("" + labelTagName + ">");
+ this.lineEndingIfNeeded();
+ this.tag("");
+ }
+ while (++index < calls.length) {
+ const id = calls[index];
+ const safeId = sanitizeUri(id.toLowerCase());
+ let referenceIndex = 0;
+ const references = [];
+ while (++referenceIndex <= counts[id]) {
+ references.push(
+ ' 1 ? "-" + referenceIndex : "") + '" data-footnote-backref="" aria-label="' + this.encode(
+ typeof backLabel === "string" ? backLabel : backLabel(index, referenceIndex)
+ ) + '" class="data-footnote-backref">\u21A9' + (referenceIndex > 1 ? "" + referenceIndex + "" : "") + ""
+ );
+ }
+ const reference = references.join(" ");
+ let injected = false;
+ this.lineEndingIfNeeded();
+ this.tag('- ');
+ this.lineEndingIfNeeded();
+ this.tag(
+ definitions2[id].replace(
+ /<\/p>(?:\r?\n|\r)?$/,
+ ($0) => {
+ injected = true;
+ return " " + reference + $0;
+ }
+ )
+ );
+ if (!injected) {
+ this.lineEndingIfNeeded();
+ this.tag(reference);
+ }
+ this.lineEndingIfNeeded();
+ this.tag("
");
+ }
+ if (calls.length > 0) {
+ this.lineEndingIfNeeded();
+ this.tag("
");
+ this.lineEndingIfNeeded();
+ this.tag(" ");
+ }
}
- return this;
}
- this.j.push([symbol, state2]);
- return this;
- },
- next: function next(item) {
- for (var i = 0; i < this.j.length; i++) {
- var jump2 = this.j[i];
- var symbol = jump2[0];
- var state2 = jump2[1];
- if (this.test(item, symbol)) {
- return state2;
- }
+ };
+}
+const gfmStrikethroughHtml = {
+ enter: {
+ strikethrough() {
+ this.tag("");
}
- return this.defaultTransition;
- },
- accepts: function accepts() {
- return !!this.T;
},
- test: function test(item, symbol) {
- return item === symbol;
- },
- emit: function emit() {
- return this.T;
+ exit: {
+ strikethrough() {
+ this.tag("");
+ }
}
};
-var CharacterState = (0, _class$3.inherits)(BaseState, createStateClass(), {
- test: function test2(character, charOrRegExp) {
- return character === charOrRegExp || charOrRegExp instanceof RegExp && charOrRegExp.test(character);
- }
-});
-var TokenState = (0, _class$3.inherits)(BaseState, createStateClass(), {
- jump: function jump(token) {
- var tClass = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
- var state2 = this.next(new token(""));
- if (state2 === this.defaultTransition) {
- state2 = new this.constructor(tClass);
- this.on(token, state2);
- } else if (tClass) {
- state2.T = tClass;
- }
- return state2;
- },
- test: function test3(token, tokenClass) {
- return token instanceof tokenClass;
- }
-});
-function stateify(str, start2, endToken, defaultToken) {
- var i = 0, len = str.length, state2 = start2, newStates = [], nextState = void 0;
- while (i < len && (nextState = state2.next(str[i]))) {
- state2 = nextState;
- i++;
- }
- if (i >= len) {
- return [];
+function gfmStrikethrough(options) {
+ const options_ = options || {};
+ let single = options_.singleTilde;
+ const tokenizer = {
+ tokenize: tokenizeStrikethrough,
+ resolveAll: resolveAllStrikethrough
+ };
+ if (single === null || single === void 0) {
+ single = true;
}
- while (i < len - 1) {
- nextState = new CharacterState(defaultToken);
- newStates.push(nextState);
- state2.on(str[i], nextState);
- state2 = nextState;
- i++;
- }
- nextState = new CharacterState(endToken);
- newStates.push(nextState);
- state2.on(str[len - 1], nextState);
- return newStates;
-}
-state.CharacterState = CharacterState;
-state.TokenState = TokenState;
-state.stateify = stateify;
-var text$1 = {};
-var createTokenClass$1 = {};
-createTokenClass$1.__esModule = true;
-function createTokenClass() {
- return function(value) {
- if (value) {
- this.v = value;
+ return {
+ text: {
+ [126]: tokenizer
+ },
+ insideSpan: {
+ null: [tokenizer]
+ },
+ attentionMarkers: {
+ null: [126]
}
};
-}
-createTokenClass$1.createTokenClass = createTokenClass;
-text$1.__esModule = true;
-text$1.AMPERSAND = text$1.CLOSEPAREN = text$1.CLOSEANGLEBRACKET = text$1.CLOSEBRACKET = text$1.CLOSEBRACE = text$1.OPENPAREN = text$1.OPENANGLEBRACKET = text$1.OPENBRACKET = text$1.OPENBRACE = text$1.WS = text$1.TLD = text$1.SYM = text$1.UNDERSCORE = text$1.SLASH = text$1.MAILTO = text$1.PROTOCOL = text$1.QUERY = text$1.POUND = text$1.PLUS = text$1.NUM = text$1.NL = text$1.LOCALHOST = text$1.PUNCTUATION = text$1.DOT = text$1.COLON = text$1.AT = text$1.DOMAIN = text$1.Base = void 0;
-var _createTokenClass$1 = createTokenClass$1;
-var _class$2 = _class$4;
-var TextToken = (0, _createTokenClass$1.createTokenClass)();
-TextToken.prototype = {
- toString: function toString() {
- return this.v + "";
+ function resolveAllStrikethrough(events, context) {
+ let index = -1;
+ while (++index < events.length) {
+ if (events[index][0] === "enter" && events[index][1].type === "strikethroughSequenceTemporary" && events[index][1]._close) {
+ let open = index;
+ while (open--) {
+ if (events[open][0] === "exit" && events[open][1].type === "strikethroughSequenceTemporary" && events[open][1]._open && events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
+ events[index][1].type = "strikethroughSequence";
+ events[open][1].type = "strikethroughSequence";
+ const strikethrough = {
+ type: "strikethrough",
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[index][1].end)
+ };
+ const text2 = {
+ type: "strikethroughText",
+ start: Object.assign({}, events[open][1].end),
+ end: Object.assign({}, events[index][1].start)
+ };
+ const nextEvents = [
+ ["enter", strikethrough, context],
+ ["enter", events[open][1], context],
+ ["exit", events[open][1], context],
+ ["enter", text2, context]
+ ];
+ const insideSpan2 = context.parser.constructs.insideSpan.null;
+ if (insideSpan2) {
+ splice(
+ nextEvents,
+ nextEvents.length,
+ 0,
+ resolveAll(insideSpan2, events.slice(open + 1, index), context)
+ );
+ }
+ splice(nextEvents, nextEvents.length, 0, [
+ ["exit", text2, context],
+ ["enter", events[index][1], context],
+ ["exit", events[index][1], context],
+ ["exit", strikethrough, context]
+ ]);
+ splice(events, open - 1, index - open + 3, nextEvents);
+ index = open + nextEvents.length - 2;
+ break;
+ }
+ }
+ }
+ }
+ index = -1;
+ while (++index < events.length) {
+ if (events[index][1].type === "strikethroughSequenceTemporary") {
+ events[index][1].type = "data";
+ }
+ }
+ return events;
}
-};
-function inheritsToken(value) {
- var props = value ? { v: value } : {};
- return (0, _class$2.inherits)(TextToken, (0, _createTokenClass$1.createTokenClass)(), props);
-}
-var DOMAIN = inheritsToken();
-var AT = inheritsToken("@");
-var COLON = inheritsToken(":");
-var DOT = inheritsToken(".");
-var PUNCTUATION = inheritsToken();
-var LOCALHOST = inheritsToken();
-var NL$1 = inheritsToken("\n");
-var NUM = inheritsToken();
-var PLUS = inheritsToken("+");
-var POUND = inheritsToken("#");
-var PROTOCOL = inheritsToken();
-var MAILTO = inheritsToken("mailto:");
-var QUERY = inheritsToken("?");
-var SLASH = inheritsToken("/");
-var UNDERSCORE = inheritsToken("_");
-var SYM = inheritsToken();
-var TLD = inheritsToken();
-var WS = inheritsToken();
-var OPENBRACE = inheritsToken("{");
-var OPENBRACKET = inheritsToken("[");
-var OPENANGLEBRACKET = inheritsToken("<");
-var OPENPAREN = inheritsToken("(");
-var CLOSEBRACE = inheritsToken("}");
-var CLOSEBRACKET = inheritsToken("]");
-var CLOSEANGLEBRACKET = inheritsToken(">");
-var CLOSEPAREN = inheritsToken(")");
-var AMPERSAND = inheritsToken("&");
-text$1.Base = TextToken;
-text$1.DOMAIN = DOMAIN;
-text$1.AT = AT;
-text$1.COLON = COLON;
-text$1.DOT = DOT;
-text$1.PUNCTUATION = PUNCTUATION;
-text$1.LOCALHOST = LOCALHOST;
-text$1.NL = NL$1;
-text$1.NUM = NUM;
-text$1.PLUS = PLUS;
-text$1.POUND = POUND;
-text$1.QUERY = QUERY;
-text$1.PROTOCOL = PROTOCOL;
-text$1.MAILTO = MAILTO;
-text$1.SLASH = SLASH;
-text$1.UNDERSCORE = UNDERSCORE;
-text$1.SYM = SYM;
-text$1.TLD = TLD;
-text$1.WS = WS;
-text$1.OPENBRACE = OPENBRACE;
-text$1.OPENBRACKET = OPENBRACKET;
-text$1.OPENANGLEBRACKET = OPENANGLEBRACKET;
-text$1.OPENPAREN = OPENPAREN;
-text$1.CLOSEBRACE = CLOSEBRACE;
-text$1.CLOSEBRACKET = CLOSEBRACKET;
-text$1.CLOSEANGLEBRACKET = CLOSEANGLEBRACKET;
-text$1.CLOSEPAREN = CLOSEPAREN;
-text$1.AMPERSAND = AMPERSAND;
-scanner$1.__esModule = true;
-scanner$1.start = scanner$1.run = scanner$1.TOKENS = scanner$1.State = void 0;
-var _state$1 = state;
-var _text$2 = text$1;
-var TOKENS = _interopRequireWildcard$2(_text$2);
-function _interopRequireWildcard$2(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key))
- newObj[key] = obj[key];
+ function tokenizeStrikethrough(effects, ok, nok) {
+ const previous2 = this.previous;
+ const events = this.events;
+ let size2 = 0;
+ return start;
+ function start(code2) {
+ if (previous2 === 126 && events[events.length - 1][1].type !== "characterEscape") {
+ return nok(code2);
+ }
+ effects.enter("strikethroughSequenceTemporary");
+ return more(code2);
+ }
+ function more(code2) {
+ const before = classifyCharacter(previous2);
+ if (code2 === 126) {
+ if (size2 > 1)
+ return nok(code2);
+ effects.consume(code2);
+ size2++;
+ return more;
}
+ if (size2 < 2 && !single)
+ return nok(code2);
+ const token = effects.exit("strikethroughSequenceTemporary");
+ const after = classifyCharacter(code2);
+ token._open = !after || after === 2 && Boolean(before);
+ token._close = !before || before === 2 && Boolean(after);
+ return ok(code2);
}
- newObj.default = obj;
- return newObj;
}
}
-var tlds = "aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|");
-var NUMBERS = "0123456789".split("");
-var ALPHANUM = "0123456789abcdefghijklmnopqrstuvwxyz".split("");
-var WHITESPACE = [" ", "\f", "\r", " ", "\v", "\xA0", "\u1680", "\u180E"];
-var domainStates = [];
-var makeState$1 = function makeState(tokenClass) {
- return new _state$1.CharacterState(tokenClass);
+const alignment = {
+ none: "",
+ left: ' align="left"',
+ right: ' align="right"',
+ center: ' align="center"'
};
-var S_START$1 = makeState$1();
-var S_NUM = makeState$1(_text$2.NUM);
-var S_DOMAIN$1 = makeState$1(_text$2.DOMAIN);
-var S_DOMAIN_HYPHEN = makeState$1();
-var S_WS = makeState$1(_text$2.WS);
-S_START$1.on("@", makeState$1(_text$2.AT)).on(".", makeState$1(_text$2.DOT)).on("+", makeState$1(_text$2.PLUS)).on("#", makeState$1(_text$2.POUND)).on("?", makeState$1(_text$2.QUERY)).on("/", makeState$1(_text$2.SLASH)).on("_", makeState$1(_text$2.UNDERSCORE)).on(":", makeState$1(_text$2.COLON)).on("{", makeState$1(_text$2.OPENBRACE)).on("[", makeState$1(_text$2.OPENBRACKET)).on("<", makeState$1(_text$2.OPENANGLEBRACKET)).on("(", makeState$1(_text$2.OPENPAREN)).on("}", makeState$1(_text$2.CLOSEBRACE)).on("]", makeState$1(_text$2.CLOSEBRACKET)).on(">", makeState$1(_text$2.CLOSEANGLEBRACKET)).on(")", makeState$1(_text$2.CLOSEPAREN)).on("&", makeState$1(_text$2.AMPERSAND)).on([",", ";", "!", '"', "'"], makeState$1(_text$2.PUNCTUATION));
-S_START$1.on("\n", makeState$1(_text$2.NL)).on(WHITESPACE, S_WS);
-S_WS.on(WHITESPACE, S_WS);
-for (var i = 0; i < tlds.length; i++) {
- var newStates = (0, _state$1.stateify)(tlds[i], S_START$1, _text$2.TLD, _text$2.DOMAIN);
- domainStates.push.apply(domainStates, newStates);
-}
-var partialProtocolFileStates = (0, _state$1.stateify)("file", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN);
-var partialProtocolFtpStates = (0, _state$1.stateify)("ftp", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN);
-var partialProtocolHttpStates = (0, _state$1.stateify)("http", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN);
-var partialProtocolMailtoStates = (0, _state$1.stateify)("mailto", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN);
-domainStates.push.apply(domainStates, partialProtocolFileStates);
-domainStates.push.apply(domainStates, partialProtocolFtpStates);
-domainStates.push.apply(domainStates, partialProtocolHttpStates);
-domainStates.push.apply(domainStates, partialProtocolMailtoStates);
-var S_PROTOCOL_FILE = partialProtocolFileStates.pop();
-var S_PROTOCOL_FTP = partialProtocolFtpStates.pop();
-var S_PROTOCOL_HTTP = partialProtocolHttpStates.pop();
-var S_MAILTO$1 = partialProtocolMailtoStates.pop();
-var S_PROTOCOL_SECURE = makeState$1(_text$2.DOMAIN);
-var S_FULL_PROTOCOL = makeState$1(_text$2.PROTOCOL);
-var S_FULL_MAILTO = makeState$1(_text$2.MAILTO);
-S_PROTOCOL_FTP.on("s", S_PROTOCOL_SECURE).on(":", S_FULL_PROTOCOL);
-S_PROTOCOL_HTTP.on("s", S_PROTOCOL_SECURE).on(":", S_FULL_PROTOCOL);
-domainStates.push(S_PROTOCOL_SECURE);
-S_PROTOCOL_FILE.on(":", S_FULL_PROTOCOL);
-S_PROTOCOL_SECURE.on(":", S_FULL_PROTOCOL);
-S_MAILTO$1.on(":", S_FULL_MAILTO);
-var partialLocalhostStates = (0, _state$1.stateify)("localhost", S_START$1, _text$2.LOCALHOST, _text$2.DOMAIN);
-domainStates.push.apply(domainStates, partialLocalhostStates);
-S_START$1.on(NUMBERS, S_NUM);
-S_NUM.on("-", S_DOMAIN_HYPHEN).on(NUMBERS, S_NUM).on(ALPHANUM, S_DOMAIN$1);
-S_DOMAIN$1.on("-", S_DOMAIN_HYPHEN).on(ALPHANUM, S_DOMAIN$1);
-for (var _i = 0; _i < domainStates.length; _i++) {
- domainStates[_i].on("-", S_DOMAIN_HYPHEN).on(ALPHANUM, S_DOMAIN$1);
-}
-S_DOMAIN_HYPHEN.on("-", S_DOMAIN_HYPHEN).on(NUMBERS, S_DOMAIN$1).on(ALPHANUM, S_DOMAIN$1);
-S_START$1.defaultTransition = makeState$1(_text$2.SYM);
-var run$2 = function run(str) {
- var lowerStr = str.replace(/[A-Z]/g, function(c) {
- return c.toLowerCase();
- });
- var len = str.length;
- var tokens = [];
- var cursor = 0;
- while (cursor < len) {
- var state2 = S_START$1;
- var nextState = null;
- var tokenLength = 0;
- var latestAccepting = null;
- var sinceAccepts = -1;
- while (cursor < len && (nextState = state2.next(lowerStr[cursor]))) {
- state2 = nextState;
- if (state2.accepts()) {
- sinceAccepts = 0;
- latestAccepting = state2;
- } else if (sinceAccepts >= 0) {
- sinceAccepts++;
- }
- tokenLength++;
- cursor++;
- }
- if (sinceAccepts < 0) {
- continue;
+const gfmTableHtml = {
+ enter: {
+ table(token) {
+ const tableAlign = token._align;
+ this.lineEndingIfNeeded();
+ this.tag("");
+ this.setData("tableAlign", tableAlign);
+ },
+ tableBody() {
+ this.tag("");
+ },
+ tableData() {
+ const tableAlign = this.getData("tableAlign");
+ const tableColumn = this.getData("tableColumn");
+ const align = alignment[tableAlign[tableColumn]];
+ if (align === void 0) {
+ this.buffer();
+ } else {
+ this.lineEndingIfNeeded();
+ this.tag("");
+ }
+ },
+ tableHead() {
+ this.lineEndingIfNeeded();
+ this.tag("");
+ },
+ tableHeader() {
+ const tableAlign = this.getData("tableAlign");
+ const tableColumn = this.getData("tableColumn");
+ const align = alignment[tableAlign[tableColumn]];
+ this.lineEndingIfNeeded();
+ this.tag("");
+ },
+ tableRow() {
+ this.setData("tableColumn", 0);
+ this.lineEndingIfNeeded();
+ this.tag(" ");
}
- cursor -= sinceAccepts;
- tokenLength -= sinceAccepts;
- var TOKEN = latestAccepting.emit();
- tokens.push(new TOKEN(str.substr(cursor - tokenLength, tokenLength)));
- }
- return tokens;
-};
-var start = S_START$1;
-scanner$1.State = _state$1.CharacterState;
-scanner$1.TOKENS = TOKENS;
-scanner$1.run = run$2;
-scanner$1.start = start;
-var parser$1 = {};
-var multi = {};
-multi.__esModule = true;
-multi.URL = multi.TEXT = multi.NL = multi.EMAIL = multi.MAILTOEMAIL = multi.Base = void 0;
-var _createTokenClass = createTokenClass$1;
-var _class$1 = _class$4;
-var _text$1 = text$1;
-function isDomainToken(token) {
- return token instanceof _text$1.DOMAIN || token instanceof _text$1.TLD;
-}
-var MultiToken = (0, _createTokenClass.createTokenClass)();
-MultiToken.prototype = {
- type: "token",
- isLink: false,
- toString: function toString2() {
- var result = [];
- for (var i = 0; i < this.v.length; i++) {
- result.push(this.v[i].toString());
- }
- return result.join("");
},
- toHref: function toHref() {
- return this.toString();
- },
- toObject: function toObject() {
- var protocol = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "http";
- return {
- type: this.type,
- value: this.toString(),
- href: this.toHref(protocol)
- };
+ exit: {
+ codeTextData(token) {
+ let value = this.sliceSerialize(token);
+ if (this.getData("tableAlign")) {
+ value = value.replace(/\\([\\|])/g, replace);
+ }
+ this.raw(this.encode(value));
+ },
+ table() {
+ this.setData("tableAlign");
+ this.setData("slurpAllLineEndings");
+ this.lineEndingIfNeeded();
+ this.tag("
");
+ },
+ tableBody() {
+ this.lineEndingIfNeeded();
+ this.tag("");
+ },
+ tableData() {
+ const tableAlign = this.getData("tableAlign");
+ const tableColumn = this.getData("tableColumn");
+ if (tableColumn in tableAlign) {
+ this.tag("");
+ this.setData("tableColumn", tableColumn + 1);
+ } else {
+ this.resume();
+ }
+ },
+ tableHead() {
+ this.lineEndingIfNeeded();
+ this.tag("");
+ },
+ tableHeader() {
+ const tableColumn = this.getData("tableColumn");
+ this.tag("");
+ this.setData("tableColumn", tableColumn + 1);
+ },
+ tableRow() {
+ const tableAlign = this.getData("tableAlign");
+ let tableColumn = this.getData("tableColumn");
+ while (tableColumn < tableAlign.length) {
+ this.lineEndingIfNeeded();
+ this.tag(" ");
+ tableColumn++;
+ }
+ this.setData("tableColumn", tableColumn);
+ this.lineEndingIfNeeded();
+ this.tag("");
+ }
}
};
-var MAILTOEMAIL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), {
- type: "email",
- isLink: true
-});
-var EMAIL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), {
- type: "email",
- isLink: true,
- toHref: function toHref2() {
- return "mailto:" + this.toString();
+function replace($0, $1) {
+ return $1 === "|" ? $1 : $0;
+}
+class EditMap {
+ constructor() {
+ this.map = [];
}
-});
-var TEXT = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { type: "text" });
-var NL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { type: "nl" });
-var URL$1 = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), {
- type: "url",
- isLink: true,
- toHref: function toHref3() {
- var protocol = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "http";
- var hasProtocol2 = false;
- var hasSlashSlash = false;
- var tokens = this.v;
- var result = [];
- var i = 0;
- while (tokens[i] instanceof _text$1.PROTOCOL) {
- hasProtocol2 = true;
- result.push(tokens[i].toString().toLowerCase());
- i++;
- }
- while (tokens[i] instanceof _text$1.SLASH) {
- hasSlashSlash = true;
- result.push(tokens[i].toString());
- i++;
+ add(index, remove2, add2) {
+ addImpl(this, index, remove2, add2);
+ }
+ consume(events) {
+ this.map.sort((a, b) => a[0] - b[0]);
+ if (this.map.length === 0) {
+ return;
}
- while (isDomainToken(tokens[i])) {
- result.push(tokens[i].toString().toLowerCase());
- i++;
+ let index = this.map.length;
+ const vecs = [];
+ while (index > 0) {
+ index -= 1;
+ vecs.push(events.slice(this.map[index][0] + this.map[index][1]));
+ vecs.push(this.map[index][2]);
+ events.length = this.map[index][0];
}
- for (; i < tokens.length; i++) {
- result.push(tokens[i].toString());
+ vecs.push([...events]);
+ events.length = 0;
+ let slice = vecs.pop();
+ while (slice) {
+ events.push(...slice);
+ slice = vecs.pop();
}
- result = result.join("");
- if (!(hasProtocol2 || hasSlashSlash)) {
- result = protocol + "://" + result;
+ this.map.length = 0;
+ }
+}
+function addImpl(editMap, at, remove2, add2) {
+ let index = 0;
+ if (remove2 === 0 && add2.length === 0) {
+ return;
+ }
+ while (index < editMap.map.length) {
+ if (editMap.map[index][0] === at) {
+ editMap.map[index][1] += remove2;
+ editMap.map[index][2].push(...add2);
+ return;
}
- return result;
- },
- hasProtocol: function hasProtocol() {
- return this.v[0] instanceof _text$1.PROTOCOL;
+ index += 1;
}
-});
-multi.Base = MultiToken;
-multi.MAILTOEMAIL = MAILTOEMAIL;
-multi.EMAIL = EMAIL;
-multi.NL = NL;
-multi.TEXT = TEXT;
-multi.URL = URL$1;
-parser$1.__esModule = true;
-parser$1.start = parser$1.run = parser$1.TOKENS = parser$1.State = void 0;
-var _state = state;
-var _multi = multi;
-var MULTI_TOKENS = _interopRequireWildcard$1(_multi);
-var _text = text$1;
-function _interopRequireWildcard$1(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key))
- newObj[key] = obj[key];
+ editMap.map.push([at, remove2, add2]);
+}
+function gfmTableAlign(events, index) {
+ let inDelimiterRow = false;
+ const align = [];
+ while (index < events.length) {
+ const event = events[index];
+ if (inDelimiterRow) {
+ if (event[0] === "enter") {
+ if (event[1].type === "tableContent") {
+ align.push(
+ events[index + 1][1].type === "tableDelimiterMarker" ? "left" : "none"
+ );
+ }
+ } else if (event[1].type === "tableContent") {
+ if (events[index - 1][1].type === "tableDelimiterMarker") {
+ const alignIndex = align.length - 1;
+ align[alignIndex] = align[alignIndex] === "left" ? "center" : "right";
+ }
+ } else if (event[1].type === "tableDelimiterRow") {
+ break;
}
+ } else if (event[0] === "enter" && event[1].type === "tableDelimiterRow") {
+ inDelimiterRow = true;
}
- newObj.default = obj;
- return newObj;
+ index += 1;
}
+ return align;
}
-var makeState2 = function makeState3(tokenClass) {
- return new _state.TokenState(tokenClass);
+const gfmTable = {
+ flow: {
+ null: {
+ tokenize: tokenizeTable,
+ resolveAll: resolveTable
+ }
+ }
};
-var S_START = makeState2();
-var S_PROTOCOL = makeState2();
-var S_MAILTO = makeState2();
-var S_PROTOCOL_SLASH = makeState2();
-var S_PROTOCOL_SLASH_SLASH = makeState2();
-var S_DOMAIN = makeState2();
-var S_DOMAIN_DOT = makeState2();
-var S_TLD = makeState2(_multi.URL);
-var S_TLD_COLON = makeState2();
-var S_TLD_PORT = makeState2(_multi.URL);
-var S_URL = makeState2(_multi.URL);
-var S_URL_NON_ACCEPTING = makeState2();
-var S_URL_OPENBRACE = makeState2();
-var S_URL_OPENBRACKET = makeState2();
-var S_URL_OPENANGLEBRACKET = makeState2();
-var S_URL_OPENPAREN = makeState2();
-var S_URL_OPENBRACE_Q = makeState2(_multi.URL);
-var S_URL_OPENBRACKET_Q = makeState2(_multi.URL);
-var S_URL_OPENANGLEBRACKET_Q = makeState2(_multi.URL);
-var S_URL_OPENPAREN_Q = makeState2(_multi.URL);
-var S_URL_OPENBRACE_SYMS = makeState2();
-var S_URL_OPENBRACKET_SYMS = makeState2();
-var S_URL_OPENANGLEBRACKET_SYMS = makeState2();
-var S_URL_OPENPAREN_SYMS = makeState2();
-var S_EMAIL_DOMAIN = makeState2();
-var S_EMAIL_DOMAIN_DOT = makeState2();
-var S_EMAIL = makeState2(_multi.EMAIL);
-var S_EMAIL_COLON = makeState2();
-var S_EMAIL_PORT = makeState2(_multi.EMAIL);
-var S_MAILTO_EMAIL = makeState2(_multi.MAILTOEMAIL);
-var S_MAILTO_EMAIL_NON_ACCEPTING = makeState2();
-var S_LOCALPART = makeState2();
-var S_LOCALPART_AT = makeState2();
-var S_LOCALPART_DOT = makeState2();
-var S_NL = makeState2(_multi.NL);
-S_START.on(_text.NL, S_NL).on(_text.PROTOCOL, S_PROTOCOL).on(_text.MAILTO, S_MAILTO).on(_text.SLASH, S_PROTOCOL_SLASH);
-S_PROTOCOL.on(_text.SLASH, S_PROTOCOL_SLASH);
-S_PROTOCOL_SLASH.on(_text.SLASH, S_PROTOCOL_SLASH_SLASH);
-S_START.on(_text.TLD, S_DOMAIN).on(_text.DOMAIN, S_DOMAIN).on(_text.LOCALHOST, S_TLD).on(_text.NUM, S_DOMAIN);
-S_PROTOCOL_SLASH_SLASH.on(_text.TLD, S_URL).on(_text.DOMAIN, S_URL).on(_text.NUM, S_URL).on(_text.LOCALHOST, S_URL);
-S_DOMAIN.on(_text.DOT, S_DOMAIN_DOT);
-S_EMAIL_DOMAIN.on(_text.DOT, S_EMAIL_DOMAIN_DOT);
-S_DOMAIN_DOT.on(_text.TLD, S_TLD).on(_text.DOMAIN, S_DOMAIN).on(_text.NUM, S_DOMAIN).on(_text.LOCALHOST, S_DOMAIN);
-S_EMAIL_DOMAIN_DOT.on(_text.TLD, S_EMAIL).on(_text.DOMAIN, S_EMAIL_DOMAIN).on(_text.NUM, S_EMAIL_DOMAIN).on(_text.LOCALHOST, S_EMAIL_DOMAIN);
-S_TLD.on(_text.DOT, S_DOMAIN_DOT);
-S_EMAIL.on(_text.DOT, S_EMAIL_DOMAIN_DOT);
-S_TLD.on(_text.COLON, S_TLD_COLON).on(_text.SLASH, S_URL);
-S_TLD_COLON.on(_text.NUM, S_TLD_PORT);
-S_TLD_PORT.on(_text.SLASH, S_URL);
-S_EMAIL.on(_text.COLON, S_EMAIL_COLON);
-S_EMAIL_COLON.on(_text.NUM, S_EMAIL_PORT);
-var qsAccepting = [_text.DOMAIN, _text.AT, _text.LOCALHOST, _text.NUM, _text.PLUS, _text.POUND, _text.PROTOCOL, _text.SLASH, _text.TLD, _text.UNDERSCORE, _text.SYM, _text.AMPERSAND];
-var qsNonAccepting = [_text.COLON, _text.DOT, _text.QUERY, _text.PUNCTUATION, _text.CLOSEBRACE, _text.CLOSEBRACKET, _text.CLOSEANGLEBRACKET, _text.CLOSEPAREN, _text.OPENBRACE, _text.OPENBRACKET, _text.OPENANGLEBRACKET, _text.OPENPAREN];
-S_URL.on(_text.OPENBRACE, S_URL_OPENBRACE).on(_text.OPENBRACKET, S_URL_OPENBRACKET).on(_text.OPENANGLEBRACKET, S_URL_OPENANGLEBRACKET).on(_text.OPENPAREN, S_URL_OPENPAREN);
-S_URL_NON_ACCEPTING.on(_text.OPENBRACE, S_URL_OPENBRACE).on(_text.OPENBRACKET, S_URL_OPENBRACKET).on(_text.OPENANGLEBRACKET, S_URL_OPENANGLEBRACKET).on(_text.OPENPAREN, S_URL_OPENPAREN);
-S_URL_OPENBRACE.on(_text.CLOSEBRACE, S_URL);
-S_URL_OPENBRACKET.on(_text.CLOSEBRACKET, S_URL);
-S_URL_OPENANGLEBRACKET.on(_text.CLOSEANGLEBRACKET, S_URL);
-S_URL_OPENPAREN.on(_text.CLOSEPAREN, S_URL);
-S_URL_OPENBRACE_Q.on(_text.CLOSEBRACE, S_URL);
-S_URL_OPENBRACKET_Q.on(_text.CLOSEBRACKET, S_URL);
-S_URL_OPENANGLEBRACKET_Q.on(_text.CLOSEANGLEBRACKET, S_URL);
-S_URL_OPENPAREN_Q.on(_text.CLOSEPAREN, S_URL);
-S_URL_OPENBRACE_SYMS.on(_text.CLOSEBRACE, S_URL);
-S_URL_OPENBRACKET_SYMS.on(_text.CLOSEBRACKET, S_URL);
-S_URL_OPENANGLEBRACKET_SYMS.on(_text.CLOSEANGLEBRACKET, S_URL);
-S_URL_OPENPAREN_SYMS.on(_text.CLOSEPAREN, S_URL);
-S_URL_OPENBRACE.on(qsAccepting, S_URL_OPENBRACE_Q);
-S_URL_OPENBRACKET.on(qsAccepting, S_URL_OPENBRACKET_Q);
-S_URL_OPENANGLEBRACKET.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q);
-S_URL_OPENPAREN.on(qsAccepting, S_URL_OPENPAREN_Q);
-S_URL_OPENBRACE.on(qsNonAccepting, S_URL_OPENBRACE_SYMS);
-S_URL_OPENBRACKET.on(qsNonAccepting, S_URL_OPENBRACKET_SYMS);
-S_URL_OPENANGLEBRACKET.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_SYMS);
-S_URL_OPENPAREN.on(qsNonAccepting, S_URL_OPENPAREN_SYMS);
-S_URL_OPENBRACE_Q.on(qsAccepting, S_URL_OPENBRACE_Q);
-S_URL_OPENBRACKET_Q.on(qsAccepting, S_URL_OPENBRACKET_Q);
-S_URL_OPENANGLEBRACKET_Q.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q);
-S_URL_OPENPAREN_Q.on(qsAccepting, S_URL_OPENPAREN_Q);
-S_URL_OPENBRACE_Q.on(qsNonAccepting, S_URL_OPENBRACE_Q);
-S_URL_OPENBRACKET_Q.on(qsNonAccepting, S_URL_OPENBRACKET_Q);
-S_URL_OPENANGLEBRACKET_Q.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_Q);
-S_URL_OPENPAREN_Q.on(qsNonAccepting, S_URL_OPENPAREN_Q);
-S_URL_OPENBRACE_SYMS.on(qsAccepting, S_URL_OPENBRACE_Q);
-S_URL_OPENBRACKET_SYMS.on(qsAccepting, S_URL_OPENBRACKET_Q);
-S_URL_OPENANGLEBRACKET_SYMS.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q);
-S_URL_OPENPAREN_SYMS.on(qsAccepting, S_URL_OPENPAREN_Q);
-S_URL_OPENBRACE_SYMS.on(qsNonAccepting, S_URL_OPENBRACE_SYMS);
-S_URL_OPENBRACKET_SYMS.on(qsNonAccepting, S_URL_OPENBRACKET_SYMS);
-S_URL_OPENANGLEBRACKET_SYMS.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_SYMS);
-S_URL_OPENPAREN_SYMS.on(qsNonAccepting, S_URL_OPENPAREN_SYMS);
-S_URL.on(qsAccepting, S_URL);
-S_URL_NON_ACCEPTING.on(qsAccepting, S_URL);
-S_URL.on(qsNonAccepting, S_URL_NON_ACCEPTING);
-S_URL_NON_ACCEPTING.on(qsNonAccepting, S_URL_NON_ACCEPTING);
-S_MAILTO.on(_text.TLD, S_MAILTO_EMAIL).on(_text.DOMAIN, S_MAILTO_EMAIL).on(_text.NUM, S_MAILTO_EMAIL).on(_text.LOCALHOST, S_MAILTO_EMAIL);
-S_MAILTO_EMAIL.on(qsAccepting, S_MAILTO_EMAIL).on(qsNonAccepting, S_MAILTO_EMAIL_NON_ACCEPTING);
-S_MAILTO_EMAIL_NON_ACCEPTING.on(qsAccepting, S_MAILTO_EMAIL).on(qsNonAccepting, S_MAILTO_EMAIL_NON_ACCEPTING);
-var localpartAccepting = [_text.DOMAIN, _text.NUM, _text.PLUS, _text.POUND, _text.QUERY, _text.UNDERSCORE, _text.SYM, _text.AMPERSAND, _text.TLD];
-S_DOMAIN.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT);
-S_TLD.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT);
-S_DOMAIN_DOT.on(localpartAccepting, S_LOCALPART);
-S_LOCALPART.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT).on(_text.DOT, S_LOCALPART_DOT);
-S_LOCALPART_DOT.on(localpartAccepting, S_LOCALPART);
-S_LOCALPART_AT.on(_text.TLD, S_EMAIL_DOMAIN).on(_text.DOMAIN, S_EMAIL_DOMAIN).on(_text.LOCALHOST, S_EMAIL);
-var run$1 = function run2(tokens) {
- var len = tokens.length;
- var cursor = 0;
- var multis = [];
- var textTokens = [];
- while (cursor < len) {
- var state2 = S_START;
- var secondState = null;
- var nextState = null;
- var multiLength = 0;
- var latestAccepting = null;
- var sinceAccepts = -1;
- while (cursor < len && !(secondState = state2.next(tokens[cursor]))) {
- textTokens.push(tokens[cursor++]);
- }
- while (cursor < len && (nextState = secondState || state2.next(tokens[cursor]))) {
- secondState = null;
- state2 = nextState;
- if (state2.accepts()) {
- sinceAccepts = 0;
- latestAccepting = state2;
- } else if (sinceAccepts >= 0) {
- sinceAccepts++;
- }
- cursor++;
- multiLength++;
- }
- if (sinceAccepts < 0) {
- for (var i = cursor - multiLength; i < cursor; i++) {
- textTokens.push(tokens[i]);
- }
- } else {
- if (textTokens.length > 0) {
- multis.push(new _multi.TEXT(textTokens));
- textTokens = [];
+function tokenizeTable(effects, ok, nok) {
+ const self2 = this;
+ let size2 = 0;
+ let sizeB = 0;
+ let seen;
+ return start;
+ function start(code2) {
+ let index = self2.events.length - 1;
+ while (index > -1) {
+ const type = self2.events[index][1].type;
+ if (type === "lineEnding" || type === "linePrefix")
+ index--;
+ else
+ break;
+ }
+ const tail = index > -1 ? self2.events[index][1].type : null;
+ const next = tail === "tableHead" || tail === "tableRow" ? bodyRowStart : headRowBefore;
+ if (next === bodyRowStart && self2.parser.lazy[self2.now().line]) {
+ return nok(code2);
+ }
+ return next(code2);
+ }
+ function headRowBefore(code2) {
+ effects.enter("tableHead");
+ effects.enter("tableRow");
+ return headRowStart(code2);
+ }
+ function headRowStart(code2) {
+ if (code2 === 124) {
+ return headRowBreak(code2);
+ }
+ seen = true;
+ sizeB += 1;
+ return headRowBreak(code2);
+ }
+ function headRowBreak(code2) {
+ if (code2 === null) {
+ return nok(code2);
+ }
+ if (markdownLineEnding(code2)) {
+ if (sizeB > 1) {
+ sizeB = 0;
+ self2.interrupt = true;
+ effects.exit("tableRow");
+ effects.enter("lineEnding");
+ effects.consume(code2);
+ effects.exit("lineEnding");
+ return headDelimiterStart;
+ }
+ return nok(code2);
+ }
+ if (markdownSpace(code2)) {
+ return factorySpace(effects, headRowBreak, "whitespace")(code2);
+ }
+ sizeB += 1;
+ if (seen) {
+ seen = false;
+ size2 += 1;
+ }
+ if (code2 === 124) {
+ effects.enter("tableCellDivider");
+ effects.consume(code2);
+ effects.exit("tableCellDivider");
+ seen = true;
+ return headRowBreak;
+ }
+ effects.enter("data");
+ return headRowData(code2);
+ }
+ function headRowData(code2) {
+ if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {
+ effects.exit("data");
+ return headRowBreak(code2);
+ }
+ effects.consume(code2);
+ return code2 === 92 ? headRowEscape : headRowData;
+ }
+ function headRowEscape(code2) {
+ if (code2 === 92 || code2 === 124) {
+ effects.consume(code2);
+ return headRowData;
+ }
+ return headRowData(code2);
+ }
+ function headDelimiterStart(code2) {
+ self2.interrupt = false;
+ if (self2.parser.lazy[self2.now().line]) {
+ return nok(code2);
+ }
+ effects.enter("tableDelimiterRow");
+ seen = false;
+ if (markdownSpace(code2)) {
+ return factorySpace(
+ effects,
+ headDelimiterBefore,
+ "linePrefix",
+ self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
+ )(code2);
+ }
+ return headDelimiterBefore(code2);
+ }
+ function headDelimiterBefore(code2) {
+ if (code2 === 45 || code2 === 58) {
+ return headDelimiterValueBefore(code2);
+ }
+ if (code2 === 124) {
+ seen = true;
+ effects.enter("tableCellDivider");
+ effects.consume(code2);
+ effects.exit("tableCellDivider");
+ return headDelimiterCellBefore;
+ }
+ return headDelimiterNok(code2);
+ }
+ function headDelimiterCellBefore(code2) {
+ if (markdownSpace(code2)) {
+ return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code2);
+ }
+ return headDelimiterValueBefore(code2);
+ }
+ function headDelimiterValueBefore(code2) {
+ if (code2 === 58) {
+ sizeB += 1;
+ seen = true;
+ effects.enter("tableDelimiterMarker");
+ effects.consume(code2);
+ effects.exit("tableDelimiterMarker");
+ return headDelimiterLeftAlignmentAfter;
+ }
+ if (code2 === 45) {
+ sizeB += 1;
+ return headDelimiterLeftAlignmentAfter(code2);
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ return headDelimiterCellAfter(code2);
+ }
+ return headDelimiterNok(code2);
+ }
+ function headDelimiterLeftAlignmentAfter(code2) {
+ if (code2 === 45) {
+ effects.enter("tableDelimiterFiller");
+ return headDelimiterFiller(code2);
+ }
+ return headDelimiterNok(code2);
+ }
+ function headDelimiterFiller(code2) {
+ if (code2 === 45) {
+ effects.consume(code2);
+ return headDelimiterFiller;
+ }
+ if (code2 === 58) {
+ seen = true;
+ effects.exit("tableDelimiterFiller");
+ effects.enter("tableDelimiterMarker");
+ effects.consume(code2);
+ effects.exit("tableDelimiterMarker");
+ return headDelimiterRightAlignmentAfter;
+ }
+ effects.exit("tableDelimiterFiller");
+ return headDelimiterRightAlignmentAfter(code2);
+ }
+ function headDelimiterRightAlignmentAfter(code2) {
+ if (markdownSpace(code2)) {
+ return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code2);
+ }
+ return headDelimiterCellAfter(code2);
+ }
+ function headDelimiterCellAfter(code2) {
+ if (code2 === 124) {
+ return headDelimiterBefore(code2);
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ if (!seen || size2 !== sizeB) {
+ return headDelimiterNok(code2);
+ }
+ effects.exit("tableDelimiterRow");
+ effects.exit("tableHead");
+ return ok(code2);
+ }
+ return headDelimiterNok(code2);
+ }
+ function headDelimiterNok(code2) {
+ return nok(code2);
+ }
+ function bodyRowStart(code2) {
+ effects.enter("tableRow");
+ return bodyRowBreak(code2);
+ }
+ function bodyRowBreak(code2) {
+ if (code2 === 124) {
+ effects.enter("tableCellDivider");
+ effects.consume(code2);
+ effects.exit("tableCellDivider");
+ return bodyRowBreak;
+ }
+ if (code2 === null || markdownLineEnding(code2)) {
+ effects.exit("tableRow");
+ return ok(code2);
+ }
+ if (markdownSpace(code2)) {
+ return factorySpace(effects, bodyRowBreak, "whitespace")(code2);
+ }
+ effects.enter("data");
+ return bodyRowData(code2);
+ }
+ function bodyRowData(code2) {
+ if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {
+ effects.exit("data");
+ return bodyRowBreak(code2);
+ }
+ effects.consume(code2);
+ return code2 === 92 ? bodyRowEscape : bodyRowData;
+ }
+ function bodyRowEscape(code2) {
+ if (code2 === 92 || code2 === 124) {
+ effects.consume(code2);
+ return bodyRowData;
+ }
+ return bodyRowData(code2);
+ }
+}
+function resolveTable(events, context) {
+ let index = -1;
+ let inFirstCellAwaitingPipe = true;
+ let rowKind = 0;
+ let lastCell = [0, 0, 0, 0];
+ let cell = [0, 0, 0, 0];
+ let afterHeadAwaitingFirstBodyRow = false;
+ let lastTableEnd = 0;
+ let currentTable;
+ let currentBody;
+ let currentCell;
+ const map = new EditMap();
+ while (++index < events.length) {
+ const event = events[index];
+ const token = event[1];
+ if (event[0] === "enter") {
+ if (token.type === "tableHead") {
+ afterHeadAwaitingFirstBodyRow = false;
+ if (lastTableEnd !== 0) {
+ flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
+ currentBody = void 0;
+ lastTableEnd = 0;
+ }
+ currentTable = {
+ type: "table",
+ start: Object.assign({}, token.start),
+ end: Object.assign({}, token.end)
+ };
+ map.add(index, 0, [["enter", currentTable, context]]);
+ } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
+ inFirstCellAwaitingPipe = true;
+ currentCell = void 0;
+ lastCell = [0, 0, 0, 0];
+ cell = [0, index + 1, 0, 0];
+ if (afterHeadAwaitingFirstBodyRow) {
+ afterHeadAwaitingFirstBodyRow = false;
+ currentBody = {
+ type: "tableBody",
+ start: Object.assign({}, token.start),
+ end: Object.assign({}, token.end)
+ };
+ map.add(index, 0, [["enter", currentBody, context]]);
+ }
+ rowKind = token.type === "tableDelimiterRow" ? 2 : currentBody ? 3 : 1;
+ } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
+ inFirstCellAwaitingPipe = false;
+ if (cell[2] === 0) {
+ if (lastCell[1] !== 0) {
+ cell[0] = cell[1];
+ currentCell = flushCell(
+ map,
+ context,
+ lastCell,
+ rowKind,
+ void 0,
+ currentCell
+ );
+ lastCell = [0, 0, 0, 0];
+ }
+ cell[2] = index;
+ }
+ } else if (token.type === "tableCellDivider") {
+ if (inFirstCellAwaitingPipe) {
+ inFirstCellAwaitingPipe = false;
+ } else {
+ if (lastCell[1] !== 0) {
+ cell[0] = cell[1];
+ currentCell = flushCell(
+ map,
+ context,
+ lastCell,
+ rowKind,
+ void 0,
+ currentCell
+ );
+ }
+ lastCell = cell;
+ cell = [lastCell[1], index, 0, 0];
+ }
+ }
+ } else if (token.type === "tableHead") {
+ afterHeadAwaitingFirstBodyRow = true;
+ lastTableEnd = index;
+ } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
+ lastTableEnd = index;
+ if (lastCell[1] !== 0) {
+ cell[0] = cell[1];
+ currentCell = flushCell(
+ map,
+ context,
+ lastCell,
+ rowKind,
+ index,
+ currentCell
+ );
+ } else if (cell[1] !== 0) {
+ currentCell = flushCell(map, context, cell, rowKind, index, currentCell);
}
- cursor -= sinceAccepts;
- multiLength -= sinceAccepts;
- var MULTI = latestAccepting.emit();
- multis.push(new MULTI(tokens.slice(cursor - multiLength, cursor)));
+ rowKind = 0;
+ } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
+ cell[3] = index;
}
}
- if (textTokens.length > 0) {
- multis.push(new _multi.TEXT(textTokens));
+ if (lastTableEnd !== 0) {
+ flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
}
- return multis;
-};
-parser$1.State = _state.TokenState;
-parser$1.TOKENS = MULTI_TOKENS;
-parser$1.run = run$1;
-parser$1.start = S_START;
-linkify.__esModule = true;
-linkify.tokenize = linkify.test = linkify.scanner = linkify.parser = linkify.options = linkify.inherits = linkify.find = void 0;
-var _class = _class$4;
-var _options = options$1;
-var options = _interopRequireWildcard(_options);
-var _scanner = scanner$1;
-var scanner = _interopRequireWildcard(_scanner);
-var _parser = parser$1;
-var parser = _interopRequireWildcard(_parser);
-function _interopRequireWildcard(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key))
- newObj[key] = obj[key];
- }
+ map.consume(context.events);
+ index = -1;
+ while (++index < context.events.length) {
+ const event = context.events[index];
+ if (event[0] === "enter" && event[1].type === "table") {
+ event[1]._align = gfmTableAlign(context.events, index);
}
- newObj.default = obj;
- return newObj;
}
+ return events;
}
-if (!Array.isArray) {
- Array.isArray = function(arg) {
- return Object.prototype.toString.call(arg) === "[object Array]";
+function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
+ const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData";
+ const valueName = "tableContent";
+ if (range[0] !== 0) {
+ previousCell.end = Object.assign({}, getPoint(context.events, range[0]));
+ map.add(range[0], 0, [["exit", previousCell, context]]);
+ }
+ const now = getPoint(context.events, range[1]);
+ previousCell = {
+ type: groupName,
+ start: Object.assign({}, now),
+ end: Object.assign({}, now)
};
-}
-var tokenize = function tokenize2(str) {
- return parser.run(scanner.run(str));
+ map.add(range[1], 0, [["enter", previousCell, context]]);
+ if (range[2] !== 0) {
+ const relatedStart = getPoint(context.events, range[2]);
+ const relatedEnd = getPoint(context.events, range[3]);
+ const valueToken = {
+ type: valueName,
+ start: Object.assign({}, relatedStart),
+ end: Object.assign({}, relatedEnd)
+ };
+ map.add(range[2], 0, [["enter", valueToken, context]]);
+ if (rowKind !== 2) {
+ const start = context.events[range[2]];
+ const end = context.events[range[3]];
+ start[1].end = Object.assign({}, end[1].end);
+ start[1].type = "chunkText";
+ start[1].contentType = "text";
+ if (range[3] > range[2] + 1) {
+ const a = range[2] + 1;
+ const b = range[3] - range[2] - 1;
+ map.add(a, b, []);
+ }
+ }
+ map.add(range[3] + 1, 0, [["exit", valueToken, context]]);
+ }
+ if (rowEnd !== void 0) {
+ previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));
+ map.add(rowEnd, 0, [["exit", previousCell, context]]);
+ previousCell = void 0;
+ }
+ return previousCell;
+}
+function flushTableEnd(map, context, index, table, tableBody) {
+ const exits = [];
+ const related = getPoint(context.events, index);
+ if (tableBody) {
+ tableBody.end = Object.assign({}, related);
+ exits.push(["exit", tableBody, context]);
+ }
+ table.end = Object.assign({}, related);
+ exits.push(["exit", table, context]);
+ map.add(index + 1, 0, exits);
+}
+function getPoint(events, index) {
+ const event = events[index];
+ const side = event[0] === "enter" ? "start" : "end";
+ return event[1][side];
+}
+const reFlow = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi;
+const reText = new RegExp("^" + reFlow.source, "i");
+const gfmTagfilterHtml = {
+ exit: {
+ htmlFlowData(token) {
+ exitHtmlData.call(this, token, reFlow);
+ },
+ htmlTextData(token) {
+ exitHtmlData.call(this, token, reText);
+ }
+ }
};
-var find = function find2(str) {
- var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
- var tokens = tokenize(str);
- var filtered = [];
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.isLink && (!type || token.type === type)) {
- filtered.push(token.toObject());
+function exitHtmlData(token, filter) {
+ let value = this.sliceSerialize(token);
+ if (this.options.allowDangerousHtml) {
+ value = value.replace(filter, "<$1$2");
+ }
+ this.raw(this.encode(value));
+}
+const gfmTaskListItemHtml = {
+ enter: {
+ taskListCheck() {
+ this.tag('");
+ },
+ taskListCheckValueChecked() {
+ this.tag('checked="" ');
}
}
- return filtered;
};
-var test4 = function test5(str) {
- var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
- var tokens = tokenize(str);
- return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].type === type);
+const tasklistCheck = {
+ tokenize: tokenizeTasklistCheck
};
-linkify.find = find;
-linkify.inherits = _class.inherits;
-linkify.options = options;
-linkify.parser = parser;
-linkify.scanner = scanner;
-linkify.test = test4;
-linkify.tokenize = tokenize;
-var linkifyjs = linkify;
-var formatString$1 = (text2, doLinkify, textFormatting) => {
- const typeMarkdown = {
- bold: textFormatting.bold,
- italic: textFormatting.italic,
- strike: textFormatting.strike,
- underline: textFormatting.underline,
- multilineCode: textFormatting.multilineCode,
- inlineCode: textFormatting.inlineCode
+const gfmTaskListItem = {
+ text: {
+ [91]: tasklistCheck
+ }
+};
+function tokenizeTasklistCheck(effects, ok, nok) {
+ const self2 = this;
+ return open;
+ function open(code2) {
+ if (self2.previous !== null || !self2._gfmTasklistFirstContentOfListItem) {
+ return nok(code2);
+ }
+ effects.enter("taskListCheck");
+ effects.enter("taskListCheckMarker");
+ effects.consume(code2);
+ effects.exit("taskListCheckMarker");
+ return inside;
+ }
+ function inside(code2) {
+ if (markdownLineEndingOrSpace(code2)) {
+ effects.enter("taskListCheckValueUnchecked");
+ effects.consume(code2);
+ effects.exit("taskListCheckValueUnchecked");
+ return close;
+ }
+ if (code2 === 88 || code2 === 120) {
+ effects.enter("taskListCheckValueChecked");
+ effects.consume(code2);
+ effects.exit("taskListCheckValueChecked");
+ return close;
+ }
+ return nok(code2);
+ }
+ function close(code2) {
+ if (code2 === 93) {
+ effects.enter("taskListCheckMarker");
+ effects.consume(code2);
+ effects.exit("taskListCheckMarker");
+ effects.exit("taskListCheck");
+ return after;
+ }
+ return nok(code2);
+ }
+ function after(code2) {
+ if (markdownLineEnding(code2)) {
+ return ok(code2);
+ }
+ if (markdownSpace(code2)) {
+ return effects.check(
+ {
+ tokenize: spaceThenNonSpace
+ },
+ ok,
+ nok
+ )(code2);
+ }
+ return nok(code2);
+ }
+}
+function spaceThenNonSpace(effects, ok, nok) {
+ return factorySpace(effects, after, "whitespace");
+ function after(code2) {
+ return code2 === null ? nok(code2) : ok(code2);
+ }
+}
+function gfm(options) {
+ return combineExtensions([
+ gfmAutolinkLiteral,
+ gfmFootnote(),
+ gfmStrikethrough(options),
+ gfmTable,
+ gfmTaskListItem
+ ]);
+}
+function gfmHtml(options) {
+ return combineHtmlExtensions([
+ gfmAutolinkLiteralHtml,
+ gfmFootnoteHtml(options),
+ gfmStrikethroughHtml,
+ gfmTableHtml,
+ gfmTagfilterHtml,
+ gfmTaskListItemHtml
+ ]);
+}
+const codes = {
+ carriageReturn: -5,
+ lineFeed: -4,
+ carriageReturnLineFeed: -3,
+ horizontalTab: -2,
+ virtualSpace: -1,
+ eof: null,
+ nul: 0,
+ soh: 1,
+ stx: 2,
+ etx: 3,
+ eot: 4,
+ enq: 5,
+ ack: 6,
+ bel: 7,
+ bs: 8,
+ ht: 9,
+ lf: 10,
+ vt: 11,
+ ff: 12,
+ cr: 13,
+ so: 14,
+ si: 15,
+ dle: 16,
+ dc1: 17,
+ dc2: 18,
+ dc3: 19,
+ dc4: 20,
+ nak: 21,
+ syn: 22,
+ etb: 23,
+ can: 24,
+ em: 25,
+ sub: 26,
+ esc: 27,
+ fs: 28,
+ gs: 29,
+ rs: 30,
+ us: 31,
+ space: 32,
+ exclamationMark: 33,
+ quotationMark: 34,
+ numberSign: 35,
+ dollarSign: 36,
+ percentSign: 37,
+ ampersand: 38,
+ apostrophe: 39,
+ leftParenthesis: 40,
+ rightParenthesis: 41,
+ asterisk: 42,
+ plusSign: 43,
+ comma: 44,
+ dash: 45,
+ dot: 46,
+ slash: 47,
+ digit0: 48,
+ digit1: 49,
+ digit2: 50,
+ digit3: 51,
+ digit4: 52,
+ digit5: 53,
+ digit6: 54,
+ digit7: 55,
+ digit8: 56,
+ digit9: 57,
+ colon: 58,
+ semicolon: 59,
+ lessThan: 60,
+ equalsTo: 61,
+ greaterThan: 62,
+ questionMark: 63,
+ atSign: 64,
+ uppercaseA: 65,
+ uppercaseB: 66,
+ uppercaseC: 67,
+ uppercaseD: 68,
+ uppercaseE: 69,
+ uppercaseF: 70,
+ uppercaseG: 71,
+ uppercaseH: 72,
+ uppercaseI: 73,
+ uppercaseJ: 74,
+ uppercaseK: 75,
+ uppercaseL: 76,
+ uppercaseM: 77,
+ uppercaseN: 78,
+ uppercaseO: 79,
+ uppercaseP: 80,
+ uppercaseQ: 81,
+ uppercaseR: 82,
+ uppercaseS: 83,
+ uppercaseT: 84,
+ uppercaseU: 85,
+ uppercaseV: 86,
+ uppercaseW: 87,
+ uppercaseX: 88,
+ uppercaseY: 89,
+ uppercaseZ: 90,
+ leftSquareBracket: 91,
+ backslash: 92,
+ rightSquareBracket: 93,
+ caret: 94,
+ underscore: 95,
+ graveAccent: 96,
+ lowercaseA: 97,
+ lowercaseB: 98,
+ lowercaseC: 99,
+ lowercaseD: 100,
+ lowercaseE: 101,
+ lowercaseF: 102,
+ lowercaseG: 103,
+ lowercaseH: 104,
+ lowercaseI: 105,
+ lowercaseJ: 106,
+ lowercaseK: 107,
+ lowercaseL: 108,
+ lowercaseM: 109,
+ lowercaseN: 110,
+ lowercaseO: 111,
+ lowercaseP: 112,
+ lowercaseQ: 113,
+ lowercaseR: 114,
+ lowercaseS: 115,
+ lowercaseT: 116,
+ lowercaseU: 117,
+ lowercaseV: 118,
+ lowercaseW: 119,
+ lowercaseX: 120,
+ lowercaseY: 121,
+ lowercaseZ: 122,
+ leftCurlyBrace: 123,
+ verticalBar: 124,
+ rightCurlyBrace: 125,
+ tilde: 126,
+ del: 127,
+ degree: 176,
+ byteOrderMarker: 65279,
+ replacementCharacter: 65533
+};
+const underlineTokenize = (effects, ok, nok) => {
+ const inside = (code2) => {
+ if (code2 === codes.carriageReturn || code2 === codes.lineFeed || code2 === codes.carriageReturnLineFeed || code2 === codes.eof) {
+ return nok(code2);
+ }
+ if (code2 === codes.backslash) {
+ effects.consume(code2);
+ return insideEscape;
+ }
+ if (code2 === codes.degree) {
+ effects.exit("underlineContent");
+ effects.enter("underlineMarker");
+ effects.consume(code2);
+ effects.exit("underlineMarker");
+ effects.exit("underline");
+ return ok;
+ }
+ effects.consume(code2);
+ return inside;
};
- const pseudoMarkdown = {
- [typeMarkdown.bold]: {
- end: "\\" + typeMarkdown.bold,
- allowed_chars: ".",
- type: "bold"
- },
- [typeMarkdown.italic]: {
- end: typeMarkdown.italic,
- allowed_chars: ".",
- type: "italic"
- },
- [typeMarkdown.strike]: {
- end: typeMarkdown.strike,
- allowed_chars: ".",
- type: "strike"
- },
- [typeMarkdown.underline]: {
- end: typeMarkdown.underline,
- allowed_chars: ".",
- type: "underline"
- },
- [typeMarkdown.multilineCode]: {
- end: typeMarkdown.multilineCode,
- allowed_chars: "(.|\n)",
- type: "multiline-code"
- },
- [typeMarkdown.inlineCode]: {
- end: typeMarkdown.inlineCode,
- allowed_chars: ".",
- type: "inline-code"
- },
- "": {
- allowed_chars: ".",
- end: " ",
- type: "tag"
+ const insideEscape = (code2) => {
+ if (code2 === codes.backslash || code2 === codes.degree) {
+ effects.consume(code2);
+ return inside;
}
+ return inside(code2);
+ };
+ const begin = (code2) => code2 === codes.degree ? nok(code2) : inside(code2);
+ return (code2) => {
+ effects.enter("underline");
+ effects.enter("underlineMarker");
+ effects.consume(code2);
+ effects.exit("underlineMarker");
+ effects.enter("underlineContent", { contentType: "string" });
+ return begin;
};
- const json = compileToJSON(text2, pseudoMarkdown);
- const html = compileToHTML(json, pseudoMarkdown);
- const result = [].concat.apply([], html);
- if (doLinkify)
- linkifyResult(result);
- return result;
};
-function compileToJSON(str, pseudoMarkdown) {
- let result = [];
- let minIndexOf = -1;
- let minIndexOfKey = null;
- let links = linkifyjs.find(str);
- let minIndexFromLink = false;
- if (links.length > 0) {
- minIndexOf = str.indexOf(links[0].value);
- minIndexFromLink = true;
- }
- Object.keys(pseudoMarkdown).forEach((startingValue) => {
- const io = str.indexOf(startingValue);
- if (io >= 0 && (minIndexOf < 0 || io < minIndexOf)) {
- minIndexOf = io;
- minIndexOfKey = startingValue;
- minIndexFromLink = false;
+const underlineConstruct = { name: "underline", tokenize: underlineTokenize };
+const underline = { text: { 176: underlineConstruct } };
+const underlineHtml = {
+ enter: {
+ underline() {
+ this.tag("");
+ }
+ },
+ exit: {
+ underline() {
+ this.tag("");
}
- });
- if (minIndexFromLink && minIndexOfKey !== -1) {
- let strLeft = str.substr(0, minIndexOf);
- let strLink = str.substr(minIndexOf, links[0].value.length);
- let strRight = str.substr(minIndexOf + links[0].value.length);
- result.push(strLeft);
- result.push(strLink);
- result = result.concat(compileToJSON(strRight, pseudoMarkdown));
- return result;
}
- if (minIndexOfKey) {
- let strLeft = str.substr(0, minIndexOf);
- const char = minIndexOfKey;
- let strRight = str.substr(minIndexOf + char.length);
- if (str.replace(/\s/g, "").length === char.length * 2) {
- return [str];
- }
- const match = strRight.match(
- new RegExp(
- "^(" + (pseudoMarkdown[char].allowed_chars || ".") + "*" + (pseudoMarkdown[char].end ? "?" : "") + ")" + (pseudoMarkdown[char].end ? "(" + pseudoMarkdown[char].end + ")" : ""),
- "m"
- )
- );
- if (!match || !match[1]) {
- strLeft = strLeft + char;
- result.push(strLeft);
- } else {
- if (strLeft) {
- result.push(strLeft);
- }
- const object = {
- start: char,
- content: compileToJSON(match[1], pseudoMarkdown),
- end: match[2],
- type: pseudoMarkdown[char].type
- };
- result.push(object);
- strRight = strRight.substr(match[0].length);
+};
+const usertagTokenize = (effects, ok, nok) => {
+ const inside = (code2) => {
+ if (code2 === codes.carriageReturn || code2 === codes.lineFeed || code2 === codes.carriageReturnLineFeed || code2 === codes.eof) {
+ return nok(code2);
+ }
+ if (code2 === codes.backslash) {
+ effects.consume(code2);
+ return insideEscape;
+ }
+ if (code2 === codes.greaterThan) {
+ effects.exit("usertagContent");
+ effects.enter("usertagMarker");
+ effects.consume(code2);
+ effects.exit("usertagMarker");
+ effects.exit("usertag");
+ return ok;
+ }
+ effects.consume(code2);
+ return inside;
+ };
+ const insideEscape = (code2) => {
+ if (code2 === codes.backslash || code2 === codes.greaterThan) {
+ effects.consume(code2);
+ return inside;
}
- result = result.concat(compileToJSON(strRight, pseudoMarkdown));
- return result;
- } else {
- if (str) {
- return [str];
- } else {
- return [];
+ return inside(code2);
+ };
+ const begin = (code2) => {
+ if (code2 === codes.atSign) {
+ effects.consume(code2);
+ effects.exit("usertagMarker");
+ effects.enter("usertagContent");
+ return inside;
+ }
+ return nok(code2);
+ };
+ return (code2) => {
+ effects.enter("usertag");
+ effects.enter("usertagMarker");
+ effects.consume(code2);
+ return begin;
+ };
+};
+const usertagConstruct = { name: "usertag", tokenize: usertagTokenize };
+const usertag = { text: { 60: usertagConstruct } };
+const usertagHtml = (users) => ({
+ exit: {
+ usertagContent(token) {
+ const userId = this.sliceSerialize(token);
+ this.tag(``);
+ const user = users.find((user2) => user2._id === userId);
+ this.raw(`@${this.encode(user ? user.username : userId)}`);
+ this.tag("");
}
}
-}
-function compileToHTML(json, pseudoMarkdown) {
- const result = [];
- json.forEach((item) => {
- if (typeof item === "string") {
- result.push({ types: [], value: item });
- } else {
- if (pseudoMarkdown[item.start]) {
- result.push(parseContent(item));
+});
+var markdown = (text2, { textFormatting }) => {
+ if (textFormatting) {
+ let gfmDisabled = [];
+ if (!textFormatting.linkify) {
+ gfmDisabled = ["literalAutolink", "literalAutolinkEmail"];
+ }
+ const markdown2 = micromark(
+ text2.replaceAll("", "<@").replaceAll(" ", ">"),
+ {
+ extensions: [
+ {
+ ...gfm(),
+ disable: { null: gfmDisabled }
+ },
+ underline,
+ usertag
+ ],
+ htmlExtensions: [
+ gfmHtml(),
+ underlineHtml,
+ usertagHtml(textFormatting.users)
+ ]
}
+ );
+ if (textFormatting.singleLine) {
+ const element2 = document.createElement("div");
+ element2.innerHTML = markdown2;
+ return [
+ {
+ types: [],
+ value: element2.innerText
+ }
+ ];
}
- });
- return result;
-}
-function parseContent(item) {
- const result = [];
- iterateContent(item, result, []);
- return result;
-}
-function iterateContent(item, result, types) {
- item.content.forEach((it) => {
- if (typeof it === "string") {
- result.push({
- types: removeDuplicates(types.concat([item.type])),
- value: it
- });
- } else {
- iterateContent(
- it,
- result,
- removeDuplicates([it.type].concat([item.type]).concat(types))
- );
+ return [
+ {
+ types: ["markdown"],
+ value: markdown2
+ }
+ ];
+ }
+ return [
+ {
+ types: [],
+ value: text2
}
- });
-}
-function removeDuplicates(items) {
- return [...new Set(items)];
-}
-function linkifyResult(array) {
- const result = [];
- array.forEach((arr) => {
- const links = linkifyjs.find(arr.value);
- if (links.length) {
- const spaces = arr.value.replace(links[0].value, "");
- result.push({ types: arr.types, value: spaces });
- arr.types = ["url"].concat(arr.types);
- arr.href = links[0].href;
- arr.value = links[0].value;
- }
- result.push(arr);
- });
- return result;
-}
+ ];
+};
const IMAGE_TYPES = ["png", "jpg", "jpeg", "webp", "svg", "gif"];
const VIDEO_TYPES = ["mp4", "video/ogg", "webm", "quicktime"];
const AUDIO_TYPES = ["mp3", "audio/ogg", "wav", "mpeg"];
@@ -6480,35 +11913,32 @@ const _sfc_main$n = {
},
emits: ["open-user-tag"],
computed: {
- linkifiedMessage() {
+ parsedMessage() {
if (this.deleted) {
return [{ value: this.textMessages.MESSAGE_DELETED }];
}
- const message = formatString$1(
- this.formatTags(this.content),
- this.linkify && !this.linkOptions.disabled,
- this.textFormatting
- );
+ let options;
+ if (!this.textFormatting.disabled) {
+ options = {
+ textFormatting: {
+ linkify: this.linkify,
+ linkOptions: this.linkOptions,
+ singleLine: this.singleLine,
+ reply: this.reply,
+ users: this.users,
+ ...this.textFormatting
+ }
+ };
+ } else {
+ options = {};
+ }
+ const message = markdown(this.content, options);
message.forEach((m) => {
- m.url = this.checkType(m, "url");
- m.bold = this.checkType(m, "bold");
- m.italic = this.checkType(m, "italic");
- m.strike = this.checkType(m, "strike");
- m.underline = this.checkType(m, "underline");
- m.inline = this.checkType(m, "inline-code");
- m.multiline = this.checkType(m, "multiline-code");
+ m.markdown = this.checkType(m, "markdown");
m.tag = this.checkType(m, "tag");
m.image = this.checkImageType(m);
- m.value = this.replaceEmojiByElement(m.value);
});
return message;
- },
- formattedContent() {
- if (this.deleted) {
- return this.textMessages.MESSAGE_DELETED;
- } else {
- return this.formatTags(this.content);
- }
}
},
methods: {
@@ -6536,92 +11966,42 @@ const _sfc_main$n = {
image.removeEventListener("load", onLoad);
}
},
- formatTags(content) {
- const firstTag = "";
- const secondTag = " ";
- const usertags = [...content.matchAll(new RegExp(firstTag, "gi"))].map(
- (a) => a.index
- );
- const initialContent = content;
- usertags.forEach((index) => {
- const userId = initialContent.substring(
- index + firstTag.length,
- initialContent.indexOf(secondTag, index)
- );
- const user = this.users.find((user2) => user2._id === userId);
- content = content.replaceAll(userId, `@${(user == null ? void 0 : user.username) || "unknown"}`);
- });
- return content;
- },
- openTag(message) {
- if (!this.singleLine && this.checkType(message, "tag")) {
- const user = this.users.find(
- (u) => message.value.indexOf(u.username) !== -1
- );
+ openTag(event) {
+ const userId = event.target.getAttribute("data-user-id");
+ if (!this.singleLine && userId) {
+ const user = this.users.find((u) => String(u._id) === userId);
this.$emit("open-user-tag", user);
}
- },
- replaceEmojiByElement(value) {
- let emojiSize;
- if (this.singleLine) {
- emojiSize = 16;
- } else {
- const onlyEmojis = this.containsOnlyEmojis();
- emojiSize = onlyEmojis ? 28 : 20;
- }
- return value.replaceAll(
- /[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/gu,
- (v) => {
- return `${v}`;
- }
- );
- },
- containsOnlyEmojis() {
- const onlyEmojis = this.content.replace(
- new RegExp("[\0-\u1EEFf]", "g"),
- ""
- );
- const visibleChars = this.content.replace(
- new RegExp("[\n\rs]+|( )+", "g"),
- ""
- );
- return onlyEmojis.length === visibleChars.length;
}
}
};
-const _hoisted_1$n = { class: "vac-image-link-container" };
-const _hoisted_2$k = { class: "vac-image-link-message" };
-const _hoisted_3$h = ["innerHTML"];
-const _hoisted_4$g = ["innerHTML"];
+const _hoisted_1$n = ["innerHTML"];
+const _hoisted_2$k = { class: "vac-image-link-container" };
+const _hoisted_3$h = { class: "vac-image-link-message" };
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
const _component_svg_icon = resolveComponent("svg-icon");
return openBlock(), createElementBlock("div", {
class: normalizeClass(["vac-format-message-wrapper", { "vac-text-ellipsis": $props.singleLine }])
}, [
- !$props.textFormatting.disabled ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass({ "vac-text-ellipsis": $props.singleLine })
- }, [
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.linkifiedMessage, (message, i) => {
- return openBlock(), createElementBlock("div", {
- key: i,
- class: "vac-format-container"
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.parsedMessage, (message, i) => {
+ return openBlock(), createElementBlock(Fragment, { key: i }, [
+ message.markdown ? (openBlock(), createElementBlock("div", {
+ key: 0,
+ class: "markdown",
+ onClick: _cache[0] || (_cache[0] = (...args) => $options.openTag && $options.openTag(...args)),
+ innerHTML: message.value
+ }, null, 8, _hoisted_1$n)) : (openBlock(), createElementBlock("div", {
+ key: 1,
+ class: normalizeClass(["vac-format-container", { "vac-text-ellipsis": $props.singleLine }])
}, [
(openBlock(), createBlock(resolveDynamicComponent(message.url ? "a" : "span"), {
class: normalizeClass({
"vac-text-ellipsis": $props.singleLine,
- "vac-text-bold": message.bold,
- "vac-text-italic": $props.deleted || message.italic,
- "vac-text-strike": message.strike,
- "vac-text-underline": message.underline,
- "vac-text-inline-code": !$props.singleLine && message.inline,
- "vac-text-multiline-code": !$props.singleLine && message.multiline,
"vac-text-tag": !$props.singleLine && !$props.reply && message.tag
}),
href: message.href,
target: message.href ? $props.linkOptions.target : null,
- rel: message.href ? $props.linkOptions.rel : null,
- onClick: ($event) => $options.openTag(message)
+ rel: message.href ? $props.linkOptions.rel : null
}, {
default: withCtx(() => [
$props.deleted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -6638,7 +12018,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
),
createTextVNode(" " + toDisplayString($props.textMessages.MESSAGE_DELETED), 1)
], 64)) : message.url && message.image ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- createBaseVNode("div", _hoisted_1$n, [
+ createBaseVNode("div", _hoisted_2$k, [
createBaseVNode("div", {
class: "vac-image-link",
style: normalizeStyle({
@@ -6647,22 +12027,16 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
})
}, null, 4)
]),
- createBaseVNode("div", _hoisted_2$k, [
- createBaseVNode("span", null, toDisplayString(message.value), 1)
- ])
- ], 64)) : (openBlock(), createElementBlock("span", {
- key: 2,
- innerHTML: message.value
- }, null, 8, _hoisted_3$h))
+ createBaseVNode("div", _hoisted_3$h, toDisplayString(message.value), 1)
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
+ createTextVNode(toDisplayString(message.value), 1)
+ ], 64))
]),
_: 2
- }, 1032, ["class", "href", "target", "rel", "onClick"]))
- ]);
- }), 128))
- ], 2)) : (openBlock(), createElementBlock("div", {
- key: 1,
- innerHTML: $options.formattedContent
- }, null, 8, _hoisted_4$g))
+ }, 1032, ["class", "href", "target", "rel"]))
+ ], 2))
+ ], 64);
+ }), 128))
], 2);
}
var FormatMessage = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n]]);
@@ -6701,8 +12075,8 @@ const onFauxIframeClick = ({ el, event, handler, middleware }) => {
}, 0);
};
const onEvent = ({ el, event, handler, middleware }) => {
- const path = event.path || event.composedPath && event.composedPath();
- const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target);
+ const path2 = event.path || event.composedPath && event.composedPath();
+ const isClickOutside = path2 ? path2.indexOf(el) < 0 : !el.contains(event.target);
if (!isClickOutside) {
return;
}
@@ -6829,19 +12203,19 @@ const _sfc_main$m = {
const isTyping = this.typingUsers;
if (isTyping)
return isTyping;
- const content = this.room.lastMessage.content;
+ const content2 = this.room.lastMessage.content;
if (this.room.users.length <= 2) {
- return content;
+ return content2;
}
const user = this.room.users.find(
(user2) => user2._id === this.room.lastMessage.senderId
);
if (this.room.lastMessage.username) {
- return `${this.room.lastMessage.username} - ${content}`;
+ return `${this.room.lastMessage.username} - ${content2}`;
} else if (!user || user._id === this.currentUserId) {
- return content;
+ return content2;
}
- return `${user.username} - ${content}`;
+ return `${user.username} - ${content2}`;
},
userStatus() {
if (!this.room.users || this.room.users.length !== 2)
@@ -7035,8 +12409,8 @@ var filteredItems = (items, prop, val, startsWith = false) => {
return formatString(v[prop]).includes(formatString(val));
});
};
-function formatString(string) {
- return string.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
+function formatString(string2) {
+ return string2.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
}
const _sfc_main$l = {
name: "RoomsList",
@@ -7124,7 +12498,7 @@ const _sfc_main$l = {
}
const loader = this.$el.querySelector("#infinite-loader-rooms");
if (loader) {
- const options2 = {
+ const options = {
root: this.$el.querySelector("#rooms-list"),
rootMargin: `${this.scrollDistance}px`,
threshold: 0
@@ -7133,7 +12507,7 @@ const _sfc_main$l = {
if (entries[0].isIntersecting) {
this.loadMoreRooms();
}
- }, options2);
+ }, options);
this.observer.observe(loader);
}
},
@@ -7560,13 +12934,13 @@ function initialMigration(db) {
const openReqs = {};
const databaseCache = {};
const onCloseListeners = {};
-function handleOpenOrDeleteReq(resolve3, reject, req) {
+function handleOpenOrDeleteReq(resolve2, reject, req) {
req.onerror = () => reject(req.error);
req.onblocked = () => reject(new Error("IDB blocked"));
- req.onsuccess = () => resolve3(req.result);
+ req.onsuccess = () => resolve2(req.result);
}
async function createDatabase(dbName) {
- const db = await new Promise((resolve3, reject) => {
+ const db = await new Promise((resolve2, reject) => {
const req = indexedDB.open(dbName, DB_VERSION_CURRENT);
openReqs[dbName] = req;
req.onupgradeneeded = (e) => {
@@ -7574,7 +12948,7 @@ async function createDatabase(dbName) {
initialMigration(req.result);
}
};
- handleOpenOrDeleteReq(resolve3, reject, req);
+ handleOpenOrDeleteReq(resolve2, reject, req);
});
db.onclose = () => closeDatabase(dbName);
return db;
@@ -7586,14 +12960,14 @@ function openDatabase(dbName) {
return databaseCache[dbName];
}
function dbPromise(db, storeName, readOnlyOrReadWrite, cb) {
- return new Promise((resolve3, reject) => {
+ return new Promise((resolve2, reject) => {
const txn = db.transaction(storeName, readOnlyOrReadWrite, { durability: "relaxed" });
const store = typeof storeName === "string" ? txn.objectStore(storeName) : storeName.map((name) => txn.objectStore(name));
let res;
cb(store, txn, (result) => {
res = result;
});
- txn.oncomplete = () => resolve3(res);
+ txn.oncomplete = () => resolve2(res);
txn.onerror = () => reject(txn.error);
});
}
@@ -7614,10 +12988,10 @@ function closeDatabase(dbName) {
delete onCloseListeners[dbName];
}
function deleteDatabase(dbName) {
- return new Promise((resolve3, reject) => {
+ return new Promise((resolve2, reject) => {
closeDatabase(dbName);
const req = indexedDB.deleteDatabase(dbName);
- handleOpenOrDeleteReq(resolve3, reject, req);
+ handleOpenOrDeleteReq(resolve2, reject, req);
});
}
function addOnCloseListener(dbName, listener) {
@@ -7744,10 +13118,10 @@ function findCommonMembers(arrays, uniqByFunc) {
return results;
}
async function isEmpty(db) {
- return !await get2(db, STORE_KEYVALUE, KEY_URL);
+ return !await get(db, STORE_KEYVALUE, KEY_URL);
}
async function hasData(db, url, eTag) {
- const [oldETag, oldUrl] = await Promise.all([KEY_ETAG, KEY_URL].map((key) => get2(db, STORE_KEYVALUE, key)));
+ const [oldETag, oldUrl] = await Promise.all([KEY_ETAG, KEY_URL].map((key) => get(db, STORE_KEYVALUE, key)));
return oldETag === eTag && oldUrl === url;
}
async function doFullDatabaseScanForSingleResult(db, predicate) {
@@ -7859,7 +13233,7 @@ async function getEmojiByUnicode(db, unicode) {
getIDB(emojiStore.index(INDEX_SKIN_UNICODE), unicode, (result2) => cb(result2 || null));
}));
}
-function get2(db, storeName, key) {
+function get(db, storeName, key) {
return dbPromise(db, storeName, MODE_READONLY, (store, txn, cb) => getIDB(store, key, cb));
}
function set(db, storeName, key, value) {
@@ -7930,7 +13304,7 @@ function trie(arr, itemToTokens) {
valuesAtCoda.push(item);
}
}
- const search = (query, exact) => {
+ const search2 = (query, exact) => {
let currentMap = map;
for (let i = 0; i < query.length; i++) {
const char = query.charAt(i);
@@ -7960,7 +13334,7 @@ function trie(arr, itemToTokens) {
}
return results;
};
- return search;
+ return search2;
}
const requiredKeys$1 = [
"name",
@@ -7981,7 +13355,7 @@ function customEmojiIndex(customEmojis) {
const searchTrie = trie(customEmojis, emojiToTokens);
const searchByExactMatch = (_) => searchTrie(_, true);
const searchByPrefix = (_) => searchTrie(_, false);
- const search = (query) => {
+ const search2 = (query) => {
const tokens = extractTokens(query);
const intermediateResults = tokens.map((token, i) => (i < tokens.length - 1 ? searchByExactMatch : searchByPrefix)(token));
return findCommonMembers(intermediateResults, (_) => _.name).sort(sortByName);
@@ -7998,7 +13372,7 @@ function customEmojiIndex(customEmojis) {
const byName = (name) => nameToEmoji.get(name.toLowerCase());
return {
all,
- search,
+ search: search2,
byShortcode,
byName
};
@@ -8188,7 +13562,7 @@ class Database {
}
async getPreferredSkinTone() {
await this.ready();
- return await get2(this._db, STORE_KEYVALUE, KEY_PREFERRED_SKINTONE) || 0;
+ return await get(this._db, STORE_KEYVALUE, KEY_PREFERRED_SKINTONE) || 0;
}
async setPreferredSkinTone(skinTone) {
assertNumber(skinTone);
@@ -8232,14 +13606,14 @@ class Database {
}
function noop() {
}
-function run3(fn) {
+function run(fn) {
return fn();
}
function blank_object() {
return /* @__PURE__ */ Object.create(null);
}
function run_all(fns) {
- fns.forEach(run3);
+ fns.forEach(run);
}
function is_function(thing) {
return typeof thing === "function";
@@ -8276,9 +13650,9 @@ function element(name) {
function text(data) {
return document.createTextNode(data);
}
-function listen(node, event, handler, options2) {
- node.addEventListener(event, handler, options2);
- return () => node.removeEventListener(event, handler, options2);
+function listen(node, event, handler, options) {
+ node.addEventListener(event, handler, options);
+ return () => node.removeEventListener(event, handler, options);
}
function attr(node, attribute, value) {
if (value == null)
@@ -8378,9 +13752,9 @@ function destroy_block(block, lookup) {
block.d(1);
lookup.delete(block.key);
}
-function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block2, next2, get_context) {
+function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list2, lookup, node, destroy, create_each_block2, next, get_context) {
let o = old_blocks.length;
- let n = list.length;
+ let n = list2.length;
let i = o;
const old_indexes = {};
while (i--)
@@ -8390,7 +13764,7 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku
const deltas = /* @__PURE__ */ new Map();
i = n;
while (i--) {
- const child_ctx = get_context(ctx, list, i);
+ const child_ctx = get_context(ctx, list2, i);
const key = get_key(child_ctx);
let block = lookup.get(key);
if (!block) {
@@ -8407,9 +13781,9 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku
const did_move = /* @__PURE__ */ new Set();
function insert2(block) {
transition_in(block, 1);
- block.m(node, next2);
+ block.m(node, next);
lookup.set(block.key, block);
- next2 = block.first;
+ next = block.first;
n--;
}
while (o && n) {
@@ -8418,7 +13792,7 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku
const new_key = new_block.key;
const old_key = old_block.key;
if (new_block === old_block) {
- next2 = new_block.first;
+ next = new_block.first;
o--;
n--;
} else if (!new_lookup.has(old_key)) {
@@ -8450,7 +13824,7 @@ function mount_component(component, target, anchor, customElement) {
fragment && fragment.m(target, anchor);
if (!customElement) {
add_render_callback(() => {
- const new_on_destroy = on_mount.map(run3).filter(is_function);
+ const new_on_destroy = on_mount.map(run).filter(is_function);
if (on_destroy) {
on_destroy.push(...new_on_destroy);
} else {
@@ -8478,7 +13852,7 @@ function make_dirty(component, i) {
}
component.$$.dirty[i / 31 | 0] |= 1 << i % 31;
}
-function init(component, options2, instance2, create_fragment2, not_equal, props, append_styles, dirty = [-1]) {
+function init(component, options, instance2, create_fragment2, not_equal, props, append_styles, dirty = [-1]) {
const parent_component = current_component;
set_current_component(component);
const $$ = component.$$ = {
@@ -8497,11 +13871,11 @@ function init(component, options2, instance2, create_fragment2, not_equal, props
callbacks: blank_object(),
dirty,
skip_bound: false,
- root: options2.target || parent_component.$$.root
+ root: options.target || parent_component.$$.root
};
append_styles && append_styles($$.root);
let ready = false;
- $$.ctx = instance2 ? instance2(component, options2.props || {}, (i, ret, ...rest) => {
+ $$.ctx = instance2 ? instance2(component, options.props || {}, (i, ret, ...rest) => {
const value = rest.length ? rest[0] : ret;
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
if (!$$.skip_bound && $$.bound[i])
@@ -8515,11 +13889,11 @@ function init(component, options2, instance2, create_fragment2, not_equal, props
ready = true;
run_all($$.before_update);
$$.fragment = create_fragment2 ? create_fragment2($$.ctx) : false;
- if (options2.target) {
+ if (options.target) {
{
$$.fragment && $$.fragment.c();
}
- mount_component(component, options2.target, void 0, void 0);
+ mount_component(component, options.target, void 0, void 0);
flush();
}
set_current_component(parent_component);
@@ -8634,7 +14008,7 @@ function determineEmojiSupportLevel() {
}
return entries[0][1];
}
-const emojiSupportLevelPromise = new Promise((resolve3) => rIC(() => resolve3(determineEmojiSupportLevel())));
+const emojiSupportLevelPromise = new Promise((resolve2) => rIC(() => resolve2(determineEmojiSupportLevel())));
const supportedZwjEmojis = /* @__PURE__ */ new Map();
const VARIATION_SELECTOR = "\uFE0F";
const SKINTONE_MODIFIER = "\uD83C";
@@ -8741,32 +14115,32 @@ function uniq(arr) {
return uniqBy(arr, (_) => _);
}
const { Map: Map_1 } = globals;
-function get_each_context(ctx, list, i) {
+function get_each_context(ctx, list2, i) {
const child_ctx = ctx.slice();
- child_ctx[63] = list[i];
+ child_ctx[63] = list2[i];
child_ctx[65] = i;
return child_ctx;
}
-function get_each_context_1(ctx, list, i) {
+function get_each_context_1(ctx, list2, i) {
const child_ctx = ctx.slice();
- child_ctx[66] = list[i];
+ child_ctx[66] = list2[i];
child_ctx[65] = i;
return child_ctx;
}
-function get_each_context_2(ctx, list, i) {
+function get_each_context_2(ctx, list2, i) {
const child_ctx = ctx.slice();
- child_ctx[63] = list[i];
+ child_ctx[63] = list2[i];
child_ctx[65] = i;
return child_ctx;
}
-function get_each_context_3(ctx, list, i) {
+function get_each_context_3(ctx, list2, i) {
const child_ctx = ctx.slice();
- child_ctx[69] = list[i];
+ child_ctx[69] = list2[i];
return child_ctx;
}
-function get_each_context_4(ctx, list, i) {
+function get_each_context_4(ctx, list2, i) {
const child_ctx = ctx.slice();
- child_ctx[72] = list[i];
+ child_ctx[72] = list2[i];
child_ctx[65] = i;
return child_ctx;
}
@@ -9669,9 +15043,9 @@ function instance($$self, $$props, $$invalidate) {
if (!searchMode || !currentEmojis.length) {
return;
}
- const goToNextOrPrevious = (previous) => {
+ const goToNextOrPrevious = (previous2) => {
halt(event);
- $$invalidate(5, activeSearchItem = incrementOrDecrement(previous, activeSearchItem, currentEmojis));
+ $$invalidate(5, activeSearchItem = incrementOrDecrement(previous2, activeSearchItem, currentEmojis));
};
switch (event.key) {
case "ArrowDown":
@@ -10083,11 +15457,11 @@ function instance($$self, $$props, $$invalidate) {
];
}
class Picker extends SvelteComponent {
- constructor(options2) {
+ constructor(options) {
super();
init(
this,
- options2,
+ options,
instance,
create_fragment,
safe_not_equal,
@@ -10294,7 +15668,7 @@ const _sfc_main$j = {
padding-right: 2px;
padding-left: 2px;
}`;
- const search = `input.search {
+ const search2 = `input.search {
height: 32px;
font-size: 14px;
border-radius: 10rem;
@@ -10305,7 +15679,7 @@ const _sfc_main$j = {
color: var(--chat-color);
}`;
const style = document.createElement("style");
- style.textContent = picker + nav + searchBox + search;
+ style.textContent = picker + nav + searchBox + search2;
this.$refs.emojiPicker.shadowRoot.appendChild(style);
},
openEmoji(ev) {
@@ -11464,7 +16838,7 @@ function NewMDCT() {
-69618e-9 / 2384e-9
];
var NS = 12;
- var NL2 = 36;
+ var NL = 36;
var win = [
[
2382191739347913e-28,
@@ -12138,7 +17512,7 @@ function NewMDCT() {
mdct_short(mdct_enc, mdct_encPos);
} else {
var work = new_float$e(18);
- for (var k = -NL2 / 4; k < 0; k++) {
+ for (var k = -NL / 4; k < 0; k++) {
var a, b;
a = win[type][k + 27] * band1[k + 9][order[band]] + win[type][k + 36] * band1[8 - k][order[band]];
b = win[type][k + 9] * band0[k + 9][order[band]] - win[type][k + 18] * band0[8 - k][order[band]];
@@ -14662,11 +20036,11 @@ function PsyModel() {
}
b_frq[i] = sfreq * j;
for (var sfb = 0; sfb < sbmax; sfb++) {
- var i1, i2, start2, end;
+ var i1, i2, start, end;
var arg;
- start2 = scalepos[sfb];
+ start = scalepos[sfb];
end = scalepos[sfb + 1];
- i1 = 0 | Math.floor(0.5 + deltafreq * (start2 - 0.5));
+ i1 = 0 | Math.floor(0.5 + deltafreq * (start - 0.5));
if (i1 < 0)
i1 = 0;
i2 = 0 | Math.floor(0.5 + deltafreq * (end - 0.5));
@@ -19944,30 +25318,30 @@ function QuantizePVT() {
var gfc = gfp.internal_flags;
var samp_freq = gfp.out_samplerate;
for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {
- var start2 = gfc.scalefac_band.l[sfb];
+ var start = gfc.scalefac_band.l[sfb];
var end = gfc.scalefac_band.l[sfb + 1];
ATH_l[sfb] = Float.MAX_VALUE;
- for (var i = start2; i < end; i++) {
+ for (var i = start; i < end; i++) {
var freq = i * samp_freq / (2 * 576);
var ATH_f = ATHmdct(gfp, freq);
ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f);
}
}
for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {
- var start2 = gfc.scalefac_band.psfb21[sfb];
+ var start = gfc.scalefac_band.psfb21[sfb];
var end = gfc.scalefac_band.psfb21[sfb + 1];
ATH_psfb21[sfb] = Float.MAX_VALUE;
- for (var i = start2; i < end; i++) {
+ for (var i = start; i < end; i++) {
var freq = i * samp_freq / (2 * 576);
var ATH_f = ATHmdct(gfp, freq);
ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f);
}
}
for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {
- var start2 = gfc.scalefac_band.s[sfb];
+ var start = gfc.scalefac_band.s[sfb];
var end = gfc.scalefac_band.s[sfb + 1];
ATH_s[sfb] = Float.MAX_VALUE;
- for (var i = start2; i < end; i++) {
+ for (var i = start; i < end; i++) {
var freq = i * samp_freq / (2 * 192);
var ATH_f = ATHmdct(gfp, freq);
ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f);
@@ -19975,10 +25349,10 @@ function QuantizePVT() {
ATH_s[sfb] *= gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb];
}
for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {
- var start2 = gfc.scalefac_band.psfb12[sfb];
+ var start = gfc.scalefac_band.psfb12[sfb];
var end = gfc.scalefac_band.psfb12[sfb + 1];
ATH_psfb12[sfb] = Float.MAX_VALUE;
- for (var i = start2; i < end; i++) {
+ for (var i = start; i < end; i++) {
var freq = i * samp_freq / (2 * 192);
var ATH_f = ATHmdct(gfp, freq);
ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f);
@@ -20434,9 +25808,9 @@ function QuantizePVT() {
sfb2 = 22;
}
for (sfb = 0; sfb < sfb2; sfb++) {
- var start2 = gfc.scalefac_band.l[sfb];
+ var start = gfc.scalefac_band.l[sfb];
var end = gfc.scalefac_band.l[sfb + 1];
- var bw = end - start2;
+ var bw = end - start;
for (en0 = 0; j < end; j++)
en0 += cod_info.xr[j] * cod_info.xr[j];
en0 /= bw;
@@ -20460,11 +25834,11 @@ function QuantizePVT() {
if (cod_info.block_type == Encoder.SHORT_TYPE) {
sfb2 = sfb;
for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {
- var start2 = gfc.scalefac_band.s[sfb];
+ var start = gfc.scalefac_band.s[sfb];
var end = gfc.scalefac_band.s[sfb + 1];
- var bw = end - start2;
+ var bw = end - start;
for (var i = 0; i < 3; i++) {
- for (en0 = 0, l = start2; l < end; l++) {
+ for (en0 = 0, l = start; l < end; l++) {
en0 += cod_info.xr[j] * cod_info.xr[j];
j++;
}
@@ -21793,12 +27167,12 @@ function BitStream$1() {
}
return bits;
}
- function Huffmancode(gfc, tableindex, start2, end, gi) {
+ function Huffmancode(gfc, tableindex, start, end, gi) {
var h2 = Tables$1.ht[tableindex];
var bits = 0;
if (tableindex == 0)
return bits;
- for (var i = start2; i < end; i += 2) {
+ for (var i = start; i < end; i += 2) {
var cbits = 0;
var xbits = 0;
var linbits = h2.xlen;
@@ -22929,8 +28303,8 @@ function Lame$1() {
}
for (var i = 0; i < Encoder.PSFB21 + 1; i++) {
var size2 = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21]) / Encoder.PSFB21;
- var start2 = gfc.scalefac_band.l[21] + i * size2;
- gfc.scalefac_band.psfb21[i] = start2;
+ var start = gfc.scalefac_band.l[21] + i * size2;
+ gfc.scalefac_band.psfb21[i] = start;
}
gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576;
for (var i = 0; i < Encoder.SBMAX_s + 1; i++) {
@@ -22938,8 +28312,8 @@ function Lame$1() {
}
for (var i = 0; i < Encoder.PSFB12 + 1; i++) {
var size2 = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) / Encoder.PSFB12;
- var start2 = gfc.scalefac_band.s[12] + i * size2;
- gfc.scalefac_band.psfb12[i] = start2;
+ var start = gfc.scalefac_band.s[12] + i * size2;
+ gfc.scalefac_band.psfb12[i] = start;
}
gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192;
if (gfp.version == 1) {
@@ -24502,12 +29876,12 @@ function Quantize() {
if (cod_info.block_type != Encoder.SHORT_TYPE) {
var stop = false;
for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) {
- var start2 = gfc.scalefac_band.psfb21[gsfb];
+ var start = gfc.scalefac_band.psfb21[gsfb];
var end = gfc.scalefac_band.psfb21[gsfb + 1];
var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb], ath.floor);
if (gfc.nsPsy.longfact[21] > 1e-12)
ath21 *= gfc.nsPsy.longfact[21];
- for (var j = end - 1; j >= start2; j--) {
+ for (var j = end - 1; j >= start; j--) {
if (Math.abs(xr[j]) < ath21)
xr[j] = 0;
else {
@@ -24520,12 +29894,12 @@ function Quantize() {
for (var block = 0; block < 3; block++) {
var stop = false;
for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) {
- var start2 = gfc.scalefac_band.s[12] * 3 + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) * block + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);
- var end = start2 + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);
+ var start = gfc.scalefac_band.s[12] * 3 + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) * block + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);
+ var end = start + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);
var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb], ath.floor);
if (gfc.nsPsy.shortfact[12] > 1e-12)
ath12 *= gfc.nsPsy.shortfact[12];
- for (var j = end - 1; j >= start2; j--) {
+ for (var j = end - 1; j >= start; j--) {
if (Math.abs(xr[j]) < ath12)
xr[j] = 0;
else {
@@ -24581,10 +29955,10 @@ function Quantize() {
var ix = gfc.scalefac_band.l[cod_info.sfb_lmax];
System$1.arraycopy(cod_info.xr, 0, ixwork, 0, 576);
for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {
- var start2 = gfc.scalefac_band.s[sfb];
+ var start = gfc.scalefac_band.s[sfb];
var end = gfc.scalefac_band.s[sfb + 1];
for (var window2 = 0; window2 < 3; window2++) {
- for (var l = start2; l < end; l++) {
+ for (var l = start; l < end; l++) {
cod_info.xr[ix++] = ixwork[3 * l + window2];
}
}
@@ -24618,9 +29992,9 @@ function Quantize() {
var nBits;
var CurrentStep = gfc.CurrentStep[ch];
var flagGoneOver = false;
- var start2 = gfc.OldValue[ch];
+ var start = gfc.OldValue[ch];
var Direction = BinSearchDirection.BINSEARCH_NONE;
- cod_info.global_gain = start2;
+ cod_info.global_gain = start;
desired_rate -= cod_info.part2_length;
for (; ; ) {
var step;
@@ -24658,7 +30032,7 @@ function Quantize() {
cod_info.global_gain++;
nBits = tk.count_bits(gfc, xrpow, cod_info, null);
}
- gfc.CurrentStep[ch] = start2 - cod_info.global_gain >= 4 ? 4 : 2;
+ gfc.CurrentStep[ch] = start - cod_info.global_gain >= 4 ? 4 : 2;
gfc.OldValue[ch] = cod_info.global_gain;
cod_info.part2_3_length = nBits;
return nBits;
@@ -24681,7 +30055,7 @@ function Quantize() {
sfb = 6;
do {
var allowedNoise, trancateThreshold;
- var nsame, start2;
+ var nsame, start;
var width = gi.width[sfb];
j += width;
if (distort[sfb] >= 1)
@@ -24691,26 +30065,26 @@ function Quantize() {
continue;
allowedNoise = (1 - distort[sfb]) * l3_xmin[sfb];
trancateThreshold = 0;
- start2 = 0;
+ start = 0;
do {
var noise;
- for (nsame = 1; start2 + nsame < width; nsame++) {
+ for (nsame = 1; start + nsame < width; nsame++) {
if (BitStream.NEQ(
- work[start2 + j - width],
- work[start2 + j + nsame - width]
+ work[start + j - width],
+ work[start + j + nsame - width]
)) {
break;
}
}
- noise = work[start2 + j - width] * work[start2 + j - width] * nsame;
+ noise = work[start + j - width] * work[start + j - width] * nsame;
if (allowedNoise < noise) {
- if (start2 != 0)
- trancateThreshold = work[start2 + j - width - 1];
+ if (start != 0)
+ trancateThreshold = work[start + j - width - 1];
break;
}
allowedNoise -= noise;
- start2 += nsame;
- } while (start2 < width);
+ start += nsame;
+ } while (start < width);
if (BitStream.EQ(trancateThreshold, 0))
continue;
do {
@@ -26270,7 +31644,7 @@ function Mp3Encoder$1(channels, samplerate, kbps) {
var id3 = new ID3Tag();
var rv = new Reservoir();
var tak = new Takehiro();
- var parse = new Parse();
+ var parse2 = new Parse();
var mpg = new MPGLib();
lame.setModules(ga, bs, p2, qupvt, qu, vbr, ver, id3, mpg);
bs.setModules(ga, mpg, ver, vbr);
@@ -26281,8 +31655,8 @@ function Mp3Encoder$1(channels, samplerate, kbps) {
rv.setModules(bs);
tak.setModules(qupvt);
vbr.setModules(lame, bs, ver);
- gaud.setModules(parse, mpg);
- parse.setModules(ver, id3, p2);
+ gaud.setModules(parse2, mpg);
+ parse2.setModules(ver, id3, p2);
var gfp = lame.lame_init();
gfp.num_channels = channels;
gfp.in_samplerate = samplerate;
@@ -26371,14 +31745,14 @@ class Mp3Encoder {
}
}
class Recorder {
- constructor(options2 = {}) {
- this.beforeRecording = options2.beforeRecording;
- this.pauseRecording = options2.pauseRecording;
- this.afterRecording = options2.afterRecording;
- this.micFailed = options2.micFailed;
+ constructor(options = {}) {
+ this.beforeRecording = options.beforeRecording;
+ this.pauseRecording = options.pauseRecording;
+ this.afterRecording = options.afterRecording;
+ this.micFailed = options.micFailed;
this.encoderOptions = {
- bitRate: options2.bitRate,
- sampleRate: options2.sampleRate
+ bitRate: options.bitRate,
+ sampleRate: options.sampleRate
};
this.bufferSize = 4096;
this.records = [];
@@ -26509,6 +31883,7 @@ const _sfc_main$a = {
showEmojis: { type: Boolean, required: true },
showFooter: { type: Boolean, required: true },
acceptedFiles: { type: String, required: true },
+ captureFiles: { type: String, required: true },
textareaActionEnabled: { type: Boolean, required: true },
textareaAutoFocus: { type: Boolean, required: true },
userTagsEnabled: { type: Boolean, required: true },
@@ -27024,7 +32399,7 @@ const _hoisted_3$8 = { class: "vac-dot-audio-record-time" };
const _hoisted_4$8 = ["placeholder"];
const _hoisted_5$6 = { class: "vac-icon-textarea" };
const _hoisted_6$3 = { key: 1 };
-const _hoisted_7$3 = ["accept"];
+const _hoisted_7$3 = ["accept", "capture"];
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
const _component_room_emojis = resolveComponent("room-emojis");
const _component_room_users_tag = resolveComponent("room-users-tag");
@@ -27202,6 +32577,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
type: "file",
multiple: "",
accept: $props.acceptedFiles,
+ capture: $props.captureFiles,
style: { "display": "none" },
onChange: _cache[21] || (_cache[21] = ($event) => $options.onFileChange($event.target.files))
}, null, 40, _hoisted_7$3)) : createCommentVNode("", true),
@@ -28432,6 +33808,7 @@ const _sfc_main$2 = {
showNewMessagesDivider: { type: Boolean, required: true },
showFooter: { type: Boolean, required: true },
acceptedFiles: { type: String, required: true },
+ captureFiles: { type: String, required: true },
textFormatting: { type: Object, required: true },
linkOptions: { type: Object, required: true },
loadingRooms: { type: Boolean, required: true },
@@ -28543,7 +33920,7 @@ const _sfc_main$2 = {
}
const loader = this.$el.querySelector("#infinite-loader-messages");
if (loader) {
- const options2 = {
+ const options = {
root: this.$el.querySelector("#messages-list"),
rootMargin: `${this.scrollDistance}px`,
threshold: 0
@@ -28552,7 +33929,7 @@ const _sfc_main$2 = {
if (entries[0].isIntersecting) {
this.loadMoreMessages();
}
- }, options2);
+ }, options);
this.observer.observe(loader);
}
},
@@ -28635,7 +34012,11 @@ const _sfc_main$2 = {
return;
const autoScrollOffset = ref.offsetHeight + 60;
setTimeout(() => {
- const scrolledUp = this.getBottomScroll(this.$refs.scrollContainer) > autoScrollOffset;
+ const scrollContainer = this.$refs.scrollContainer;
+ let scrolledUp = false;
+ if (scrollContainer) {
+ scrolledUp = this.getBottomScroll(scrollContainer) > autoScrollOffset;
+ }
if (message.senderId === this.currentUserId) {
if (scrolledUp) {
if (this.autoScroll.send.newAfterScrollUp) {
@@ -28733,9 +34114,11 @@ const _sfc_main$2 = {
scrollToBottom() {
setTimeout(() => {
const element2 = this.$refs.scrollContainer;
- element2.classList.add("vac-scroll-smooth");
- element2.scrollTo({ top: element2.scrollHeight, behavior: "smooth" });
- setTimeout(() => element2.classList.remove("vac-scroll-smooth"));
+ if (element2) {
+ element2.classList.add("vac-scroll-smooth");
+ element2.scrollTo({ top: element2.scrollHeight, behavior: "smooth" });
+ setTimeout(() => element2.classList.remove("vac-scroll-smooth"));
+ }
}, 50);
},
openFile({ message, file }) {
@@ -28961,6 +34344,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
"show-emojis": $props.showEmojis,
"show-footer": $props.showFooter,
"accepted-files": $props.acceptedFiles,
+ "capture-files": $props.captureFiles,
"textarea-action-enabled": $props.textareaActionEnabled,
"textarea-auto-focus": $props.textareaAutoFocus,
"user-tags-enabled": $props.userTagsEnabled,
@@ -28988,7 +34372,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
])
};
})
- ]), 1032, ["room", "room-id", "room-message", "text-messages", "show-send-icon", "show-files", "show-audio", "show-emojis", "show-footer", "accepted-files", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "templates-text", "text-formatting", "link-options", "audio-bit-rate", "audio-sample-rate", "init-reply-message", "init-edit-message", "dropped-files", "emoji-data-source"])
+ ]), 1032, ["room", "room-id", "room-message", "text-messages", "show-send-icon", "show-files", "show-audio", "show-emojis", "show-footer", "accepted-files", "capture-files", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "templates-text", "text-formatting", "link-options", "audio-bit-rate", "audio-sample-rate", "init-reply-message", "init-edit-message", "dropped-files", "emoji-data-source"])
], 544)), [
[vShow, $props.isMobile && !$props.showRoomsList || !$props.isMobile || $props.singleRoom]
]);
@@ -29364,10 +34748,10 @@ const cssThemeVars = ({
header,
footer,
sidemenu,
- content,
+ content: content2,
dropdown,
message,
- markdown,
+ markdown: markdown2,
room,
emoji,
icons
@@ -29395,7 +34779,7 @@ const cssThemeVars = ({
"--chat-footer-bg-color-reply": footer.backgroundReply,
"--chat-footer-bg-color-tag-active": footer.backgroundTagActive,
"--chat-footer-bg-color-tag": footer.backgroundTag,
- "--chat-content-bg-color": content.background,
+ "--chat-content-bg-color": content2.background,
"--chat-sidemenu-bg-color": sidemenu.background,
"--chat-sidemenu-bg-color-hover": sidemenu.backgroundHover,
"--chat-sidemenu-bg-color-active": sidemenu.backgroundActive,
@@ -29440,10 +34824,10 @@ const cssThemeVars = ({
"--chat-message-bg-color-audio-progress": message.backgroundAudioProgress,
"--chat-message-bg-color-audio-progress-selector": message.backgroundAudioProgressSelector,
"--chat-message-color-file-extension": message.colorFileExtension,
- "--chat-markdown-bg": markdown.background,
- "--chat-markdown-border": markdown.border,
- "--chat-markdown-color": markdown.color,
- "--chat-markdown-color-multi": markdown.colorMulti,
+ "--chat-markdown-bg": markdown2.background,
+ "--chat-markdown-border": markdown2.border,
+ "--chat-markdown-color": markdown2.color,
+ "--chat-markdown-color-multi": markdown2.colorMulti,
"--chat-room-color-username": room.colorUsername,
"--chat-room-color-message": room.colorMessage,
"--chat-room-color-timestamp": room.colorTimestamp,
@@ -29482,7 +34866,7 @@ const cssThemeVars = ({
"--chat-icon-color-audio-confirm": icons.audioConfirm
};
};
-var _style_0 = '.vac-fade-spinner-enter-from{opacity:0}.vac-fade-spinner-enter-active{transition:opacity .8s}.vac-fade-spinner-leave-active{transition:opacity .2s;opacity:0}.vac-fade-image-enter-from{opacity:0}.vac-fade-image-enter-active{transition:opacity 1s}.vac-fade-image-leave-active{transition:opacity .5s;opacity:0}.vac-fade-message-enter-from{opacity:0}.vac-fade-message-enter-active{transition:opacity .5s}.vac-fade-message-leave-active{transition:opacity .2s;opacity:0}.vac-slide-left-enter-active,.vac-slide-right-enter-active{transition:all .3s ease;transition-property:transform,opacity}.vac-slide-left-leave-active,.vac-slide-right-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)!important;transition-property:transform,opacity}.vac-slide-left-enter-from,.vac-slide-left-leave-to{transform:translate(10px);opacity:0}.vac-slide-right-enter-from,.vac-slide-right-leave-to{transform:translate(-10px);opacity:0}.vac-slide-up-enter-active{transition:all .3s ease}.vac-slide-up-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.vac-slide-up-enter-from,.vac-slide-up-leave-to{transform:translateY(10px);opacity:0}.vac-bounce-enter-active{animation:vac-bounce-in .5s}.vac-bounce-leave-active{animation:vac-bounce-in .3s reverse}@keyframes vac-bounce-in{0%{transform:scale(0)}50%{transform:scale(1.05)}to{transform:scale(1)}}.vac-fade-preview-enter{opacity:0}.vac-fade-preview-enter-active{transition:opacity .1s}.vac-fade-preview-leave-active{transition:opacity .2s;opacity:0}.vac-bounce-preview-enter-active{animation:vac-bounce-image-in .4s}.vac-bounce-preview-leave-active{animation:vac-bounce-image-in .3s reverse}@keyframes vac-bounce-image-in{0%{transform:scale(.6)}to{transform:scale(1)}}.vac-menu-list{border-radius:4px;display:block;cursor:pointer;background:var(--chat-dropdown-bg-color);padding:6px 0}.vac-menu-list :hover{background:var(--chat-dropdown-bg-color-hover);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-list :not(:hover){transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;min-height:30px;padding:5px 16px;position:relative;white-space:nowrap;line-height:30px}.vac-menu-options{position:absolute;right:10px;top:20px;z-index:9999;min-width:150px;display:inline-block;border-radius:4px;font-size:14px;color:var(--chat-color);overflow-y:auto;overflow-x:hidden;contain:content;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-app-border{border:var(--chat-border-style)}.vac-app-border-t{border-top:var(--chat-border-style)}.vac-app-border-r{border-right:var(--chat-border-style)}.vac-app-border-b{border-bottom:var(--chat-border-style)}.vac-app-box-shadow{transition:all .5s;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-item-clickable{cursor:pointer}.vac-vertical-center{display:flex;align-items:center;height:100%}.vac-vertical-center .vac-vertical-container{width:100%;text-align:center}.vac-svg-button{max-height:30px;display:flex;cursor:pointer;transition:all .2s}.vac-svg-button:hover{transform:scale(1.1);opacity:.7}.vac-avatar{background-size:cover;background-position:center center;background-repeat:no-repeat;background-color:#ddd;height:42px;width:42px;min-height:42px;min-width:42px;margin-right:15px;border-radius:50%}.vac-blur-loading{filter:blur(3px)}.vac-badge-counter{height:13px;width:auto;min-width:13px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:3px;font-size:11px;font-weight:500}.vac-text-ellipsis{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-text-bold{font-weight:700}.vac-text-italic{font-style:italic}.vac-text-strike{text-decoration:line-through}.vac-text-underline{text-decoration:underline}.vac-text-inline-code{display:inline-block;font-size:12px;color:var(--chat-markdown-color);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:2px 0;padding:2px 3px}.vac-text-multiline-code{display:block;font-size:12px;color:var(--chat-markdown-color-multi);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:4px 0;padding:7px}.vac-text-tag{color:var(--chat-message-color-tag);cursor:pointer}.vac-file-container{display:flex;align-content:center;justify-content:center;flex-wrap:wrap;text-align:center;background:var(--chat-bg-color-input);border:var(--chat-border-style-input);border-radius:4px;padding:10px}.vac-file-container svg{height:28px;width:28px}.vac-file-container .vac-text-extension{font-size:12px;color:var(--chat-message-color-file-extension);margin-top:-2px}.vac-card-window{width:100%;display:block;max-width:100%;background:var(--chat-content-bg-color);color:var(--chat-color);overflow-wrap:break-word;white-space:normal;border:var(--chat-container-border);border-radius:var(--chat-container-border-radius);box-shadow:var(--chat-container-box-shadow);-webkit-tap-highlight-color:transparent}.vac-card-window *{font-family:inherit}.vac-card-window a{color:#0d579c;font-weight:500}.vac-card-window .vac-chat-container{height:100%;display:flex}.vac-card-window .vac-chat-container input{min-width:10px}.vac-card-window .vac-chat-container textarea,.vac-card-window .vac-chat-container input[type=text],.vac-card-window .vac-chat-container input[type=search]{-webkit-appearance:none}.vac-media-preview{position:fixed;top:0;left:0;z-index:99;width:100vw;height:100vh;display:flex;align-items:center;background-color:#000c;outline:none}.vac-media-preview .vac-media-preview-container{height:calc(100% - 140px);width:calc(100% - 80px);padding:70px 40px;margin:0 auto}.vac-media-preview .vac-image-preview{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:center}.vac-media-preview video{width:100%;height:100%}.vac-media-preview .vac-svg-button{position:absolute;top:30px;right:30px;transform:scale(1.4)}@media only screen and (max-width: 768px){.vac-media-preview .vac-svg-button{top:20px;right:20px;transform:scale(1.2)}.vac-media-preview .vac-media-preview-container{width:calc(100% - 40px);padding:70px 20px}}.vac-col-messages{position:relative;height:100%;flex:1;overflow:hidden;display:flex;flex-flow:column}.vac-col-messages .vac-container-center{height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.vac-col-messages .vac-room-empty{font-size:14px;color:#9ca6af;font-style:italic;line-height:20px;white-space:pre-line}.vac-col-messages .vac-room-empty div{padding:0 10%}.vac-col-messages .vac-container-scroll{background:var(--chat-content-bg-color);flex:1;overflow-y:auto;margin-right:1px;margin-top:65px;-webkit-overflow-scrolling:touch}.vac-col-messages .vac-container-scroll.vac-scroll-smooth{scroll-behavior:smooth}.vac-col-messages .vac-messages-container{padding:0 5px 5px}.vac-col-messages .vac-text-started{font-size:14px;color:var(--chat-message-color-started);font-style:italic;text-align:center;margin-top:25px;margin-bottom:20px}.vac-col-messages .vac-icon-scroll{position:absolute;bottom:80px;right:20px;padding:8px;background:var(--chat-bg-scroll-icon);border-radius:50%;box-shadow:0 1px 1px -1px #0003,0 1px 1px #00000024,0 1px 2px #0000001f;display:flex;cursor:pointer;z-index:10}.vac-col-messages .vac-icon-scroll svg{height:25px;width:25px}.vac-col-messages .vac-messages-count{position:absolute;top:-8px;left:11px;background-color:var(--chat-message-bg-color-scroll-counter);color:var(--chat-message-color-scroll-counter)}.vac-col-messages .vac-messages-hidden{opacity:0}@media only screen and (max-width: 768px){.vac-col-messages .vac-container-scroll{margin-top:50px}.vac-col-messages .vac-text-started{margin-top:20px}.vac-col-messages .vac-icon-scroll{bottom:70px}}.vac-room-header{position:absolute;display:flex;align-items:center;height:64px;width:100%;z-index:10;margin-right:1px;background:var(--chat-header-bg-color);border-top-right-radius:var(--chat-container-border-radius)}.vac-room-header .vac-room-wrapper{display:flex;align-items:center;min-width:0;height:100%;width:100%;padding:0 16px}.vac-room-header .vac-toggle-button{margin-right:15px}.vac-room-header .vac-toggle-button svg{height:26px;width:26px}.vac-room-header .vac-rotate-icon{transform:rotate(180deg)!important}.vac-room-header .vac-rotate-icon-init{transform:rotate(360deg)}.vac-room-header .vac-info-wrapper,.vac-room-header .vac-room-selection{display:flex;align-items:center;min-width:0;width:100%;height:100%}.vac-room-header .vac-room-selection .vac-selection-button{padding:8px 16px;color:var(--chat-color-button);background-color:var(--chat-bg-color-button);border-radius:4px;margin-right:10px;cursor:pointer;transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-button:hover{opacity:.7}.vac-room-header .vac-room-selection .vac-selection-button:active{opacity:.9}.vac-room-header .vac-room-selection .vac-selection-button .vac-selection-button-count{margin-left:6px;opacity:.9}.vac-room-header .vac-room-selection .vac-selection-cancel{display:flex;align-items:center;margin-left:auto;white-space:nowrap;color:var(--chat-color-button-clear);transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-cancel:hover{opacity:.7}.vac-room-header .vac-room-name{font-size:17px;font-weight:500;line-height:22px;color:var(--chat-header-color-name)}.vac-room-header .vac-room-info{font-size:13px;line-height:18px;color:var(--chat-header-color-info)}.vac-room-header .vac-room-options{margin-left:auto}@media only screen and (max-width: 768px){.vac-room-header{height:50px}.vac-room-header .vac-room-wrapper{padding:0 10px}.vac-room-header .vac-room-name{font-size:16px;line-height:22px}.vac-room-header .vac-room-info{font-size:12px;line-height:16px}.vac-room-header .vac-avatar{height:37px;width:37px;min-height:37px;min-width:37px}}.vac-room-footer{width:100%;border-bottom-right-radius:4px;z-index:10}.vac-box-footer{display:flex;position:relative;background:var(--chat-footer-bg-color);padding:10px 8px}.vac-textarea{max-height:300px;overflow-y:auto;height:20px;width:100%;line-height:20px;outline:0;resize:none;border-radius:20px;padding:12px 16px;box-sizing:content-box;font-size:16px;background:var(--chat-bg-color-input);color:var(--chat-color);caret-color:var(--chat-color-caret);border:var(--chat-border-style-input)}.vac-textarea::placeholder{color:var(--chat-color-placeholder);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-textarea-outline{border:1px solid var(--chat-border-color-input-selected);box-shadow:inset 0 0 0 1px var(--chat-border-color-input-selected)}.vac-icon-textarea,.vac-icon-textarea-left{display:flex;align-items:center}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea{margin-left:5px}.vac-icon-textarea-left{display:flex;align-items:center;margin-right:5px}.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea-left .vac-icon-microphone{fill:var(--chat-icon-color-microphone);margin:0 7px}.vac-icon-textarea-left .vac-dot-audio-record{height:15px;width:15px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-record);animation:vac-scaling .8s ease-in-out infinite alternate}@keyframes vac-scaling{0%{transform:scale(1);opacity:.4}to{transform:scale(1.1);opacity:1}}.vac-icon-textarea-left .vac-dot-audio-record-time{font-size:16px;color:var(--chat-color);margin-left:8px;width:45px}.vac-icon-textarea-left .vac-icon-audio-stop,.vac-icon-textarea-left .vac-icon-audio-confirm{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop svg,.vac-icon-textarea-left .vac-icon-audio-confirm svg{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop{margin-right:20px}.vac-icon-textarea-left .vac-icon-audio-stop #vac-icon-close-outline{fill:var(--chat-icon-color-audio-cancel)}.vac-icon-textarea-left .vac-icon-audio-confirm{margin-right:3px;margin-left:12px}.vac-icon-textarea-left .vac-icon-audio-confirm #vac-icon-checkmark{fill:var(--chat-icon-color-audio-confirm)}.vac-send-disabled,.vac-send-disabled svg{cursor:none!important;pointer-events:none!important;transform:none!important}@media only screen and (max-width: 768px){.vac-room-footer{width:100%}.vac-box-footer{padding:7px 2px 7px 7px}.vac-box-footer.vac-box-footer-border{border-top:var(--chat-border-style-input)}.vac-textarea{padding:7px;line-height:18px}.vac-textarea::placeholder{color:transparent}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 5px!important}}@media only screen and (max-height: 768px){.vac-textarea{max-height:120px}}.vac-emojis-container{width:calc(100% - 16px);padding:10px 8px;background:var(--chat-footer-bg-color);display:flex;align-items:center;overflow:auto}.vac-emojis-container .vac-emoji-element{padding:0 8px;font-size:30px;border-radius:4px;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-emojis-container .vac-emoji-element-active{background:var(--chat-footer-bg-color-tag-active)}@media only screen and (max-width: 768px){.vac-emojis-container{width:calc(100% - 10px);padding:7px 5px}.vac-emojis-container .vac-emoji-element{padding:0 7px;font-size:26px}}.vac-reply-container{display:flex;padding:10px 10px 0;background:var(--chat-footer-bg-color);align-items:center;width:calc(100% - 20px)}.vac-reply-container .vac-reply-box{width:100%;overflow:hidden;background:var(--chat-footer-bg-color-reply);border-radius:4px;padding:8px 10px}.vac-reply-container .vac-reply-info{overflow:hidden}.vac-reply-container .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-container .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content);white-space:pre-line}.vac-reply-container .vac-icon-reply{margin-left:10px}.vac-reply-container .vac-icon-reply svg{height:20px;width:20px}.vac-reply-container .vac-image-reply{max-height:100px;max-width:200px;margin:4px 10px 0 0;border-radius:4px}.vac-reply-container .vac-audio-reply{margin-right:10px}.vac-reply-container .vac-file-container{max-width:80px}@media only screen and (max-width: 768px){.vac-reply-container{padding:5px 8px;width:calc(100% - 16px)}}.vac-room-files-container{display:flex;align-items:center;padding:10px 6px 0;background:var(--chat-footer-bg-color)}.vac-room-files-container .vac-files-box{display:flex;overflow:auto;width:calc(100% - 30px)}.vac-room-files-container video{height:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-files-container .vac-icon-close{margin-left:auto}.vac-room-files-container .vac-icon-close svg{height:20px;width:20px}@media only screen and (max-width: 768px){.vac-files-container{padding:6px 4px 4px 2px}}.vac-room-file-container{display:flex;position:relative;margin:0 4px}.vac-room-file-container .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:100px;width:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-file-container .vac-file-container{height:80px;width:80px}.vac-room-file-container .vac-icon-remove{position:absolute;top:6px;left:6px;z-index:10}.vac-room-file-container .vac-icon-remove svg{height:20px;width:20px;border-radius:50%}.vac-room-file-container .vac-icon-remove:before{content:" ";position:absolute;width:100%;height:100%;background:rgba(0,0,0,.5);border-radius:50%;z-index:-1}.vac-tags-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-tags-container .vac-tags-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-tags-container .vac-tags-box-active{background:var(--chat-footer-bg-color-tag-active)}.vac-tags-container .vac-tags-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-tags-container .vac-tags-avatar{height:34px;width:34px;min-height:34px;min-width:34px}.vac-tags-container .vac-tags-username{font-size:14px}@media only screen and (max-width: 768px){.vac-tags-container .vac-tags-box{height:50px}.vac-tags-container .vac-tags-info{padding:0 12px}}.vac-template-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-template-container .vac-template-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-template-container .vac-template-active{background:var(--chat-footer-bg-color-tag-active)}.vac-template-container .vac-template-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-template-container .vac-template-tag{font-size:14px;font-weight:700;margin-right:10px}.vac-template-container .vac-template-text{font-size:14px}@media only screen and (max-width: 768px){.vac-template-container .vac-template-box{height:50px}.vac-template-container .vac-template-info{padding:0 12px}}.vac-rooms-container{display:flex;flex-flow:column;flex:0 0 25%;min-width:260px;max-width:500px;position:relative;background:var(--chat-sidemenu-bg-color);height:100%;border-top-left-radius:var(--chat-container-border-radius);border-bottom-left-radius:var(--chat-container-border-radius)}.vac-rooms-container.vac-rooms-container-full{flex:0 0 100%;max-width:100%}.vac-rooms-container .vac-rooms-empty{font-size:14px;color:#9ca6af;font-style:italic;text-align:center;margin:40px 0;line-height:20px;white-space:pre-line}.vac-rooms-container .vac-room-list{flex:1;position:relative;max-width:100%;cursor:pointer;padding:0 10px 5px;overflow-y:auto}.vac-rooms-container .vac-room-item{border-radius:8px;align-items:center;display:flex;flex:1 1 100%;margin-bottom:5px;padding:0 14px;position:relative;min-height:71px;transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-rooms-container .vac-room-item:hover{background:var(--chat-sidemenu-bg-color-hover)}.vac-rooms-container .vac-room-selected{color:var(--chat-sidemenu-color-active)!important;background:var(--chat-sidemenu-bg-color-active)!important}.vac-rooms-container .vac-room-selected:hover{background:var(--chat-sidemenu-bg-color-active)!important}@media only screen and (max-width: 768px){.vac-rooms-container .vac-room-list{padding:0 7px 5px}.vac-rooms-container .vac-room-item{min-height:60px;padding:0 8px}}.vac-room-container{display:flex;flex:1;align-items:center;width:100%}.vac-room-container .vac-name-container{flex:1}.vac-room-container .vac-title-container{display:flex;align-items:center;line-height:25px}.vac-room-container .vac-state-circle{width:9px;height:9px;border-radius:50%;background-color:var(--chat-room-color-offline);margin-right:6px;transition:.3s}.vac-room-container .vac-state-online{background-color:var(--chat-room-color-online)}.vac-room-container .vac-room-name{flex:1;color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-text-date{margin-left:5px;font-size:11px;color:var(--chat-room-color-timestamp)}.vac-room-container .vac-text-last{display:flex;align-items:center;font-size:12px;line-height:19px;color:var(--chat-room-color-message)}.vac-room-container .vac-message-new{color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-icon-check{display:flex;vertical-align:middle;height:14px;width:14px;margin-top:-2px;margin-right:2px}.vac-room-container .vac-icon-microphone{height:15px;width:15px;vertical-align:middle;margin:-3px 1px 0 -2px;fill:var(--chat-room-color-message)}.vac-room-container .vac-room-options-container{display:flex;margin-left:auto}.vac-room-container .vac-room-badge{background-color:var(--chat-room-bg-color-badge);color:var(--chat-room-color-badge);margin-left:5px}.vac-room-container .vac-list-room-options{height:19px;width:19px;align-items:center;margin-left:5px}.vac-box-empty{margin-top:10px}@media only screen and (max-width: 768px){.vac-box-empty{margin-top:7px}}.vac-box-search{position:sticky;display:flex;align-items:center;height:64px;padding:0 15px}.vac-box-search .vac-icon-search{display:flex;position:absolute;left:30px}.vac-box-search .vac-icon-search svg{width:18px;height:18px}.vac-box-search .vac-input{height:38px;width:100%;background:var(--chat-bg-color-input);color:var(--chat-color);font-size:15px;outline:0;caret-color:var(--chat-color-caret);padding:10px 10px 10px 40px;border:1px solid var(--chat-sidemenu-border-color-search);border-radius:20px}.vac-box-search .vac-input::placeholder{color:var(--chat-color-placeholder)}.vac-box-search .vac-add-icon{margin-left:auto;padding-left:10px}@media only screen and (max-width: 768px){.vac-box-search{height:58px}}.vac-message-wrapper .vac-card-info{border-radius:4px;text-align:center;margin:10px auto;font-size:12px;padding:4px;display:block;overflow-wrap:break-word;position:relative;white-space:normal;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-card-date{max-width:150px;font-weight:500;text-transform:uppercase;color:var(--chat-message-color-date);background-color:var(--chat-message-bg-color-date)}.vac-message-wrapper .vac-card-system{max-width:250px;padding:8px 4px;color:var(--chat-message-color-system);background-color:var(--chat-message-bg-color-system)}.vac-message-wrapper .vac-line-new{color:var(--chat-message-color-new-messages);position:relative;text-align:center;font-size:13px;padding:10px 0}.vac-message-wrapper .vac-line-new:after,.vac-message-wrapper .vac-line-new:before{border-top:1px solid var(--chat-message-color-new-messages);content:"";left:0;position:absolute;top:50%;width:calc(50% - 60px)}.vac-message-wrapper .vac-line-new:before{left:auto;right:0}.vac-message-wrapper .vac-message-box{display:flex;flex:0 0 50%;max-width:50%;justify-content:flex-start;line-height:1.4}.vac-message-wrapper .vac-avatar{height:28px;width:28px;min-height:28px;min-width:28px;margin:0 0 2px;align-self:flex-end}.vac-message-wrapper .vac-avatar-current-offset{margin-right:28px}.vac-message-wrapper .vac-avatar-offset{margin-left:28px}.vac-message-wrapper .vac-failure-container{position:relative;align-self:flex-end;height:20px;width:20px;margin:0 0 2px -4px;border-radius:50%;background-color:#f44336}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:6px}.vac-message-wrapper .vac-failure-container .vac-failure-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:15px;font-weight:700}.vac-message-wrapper .vac-message-container{position:relative;padding:2px 10px;align-items:end;min-width:100px;box-sizing:content-box}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-offset-current{margin-left:50%;justify-content:flex-end}.vac-message-wrapper .vac-message-card{background-color:var(--chat-message-bg-color);color:var(--chat-message-color);border-radius:8px;font-size:14px;padding:6px 9px 3px;white-space:pre-line;max-width:100%;-webkit-transition-property:box-shadow,opacity;transition-property:box-shadow,opacity;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);will-change:box-shadow;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-message-highlight{box-shadow:0 1px 2px -1px #0000001a,0 1px 2px -1px #0000001c,0 1px 5px -1px #0000001c}.vac-message-wrapper .vac-message-current{background-color:var(--chat-message-bg-color-me)!important}.vac-message-wrapper .vac-message-deleted{color:var(--chat-message-color-deleted)!important;font-size:13px!important;font-style:italic!important;background-color:var(--chat-message-bg-color-deleted)!important}.vac-message-wrapper .vac-message-selected{background-color:var(--chat-message-bg-color-selected)!important;transition:background-color .2s}.vac-message-wrapper .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:250px;width:250px;max-width:100%;border-radius:4px;margin:4px auto 5px;transition:.4s filter linear}.vac-message-wrapper .vac-text-username{font-size:13px;color:var(--chat-message-color-username);margin-bottom:2px}.vac-message-wrapper .vac-username-reply{margin-bottom:5px}.vac-message-wrapper .vac-text-timestamp{font-size:10px;color:var(--chat-message-color-timestamp);text-align:right}.vac-message-wrapper .vac-progress-time{float:left;margin:-2px 0 0 40px;color:var(--chat-color);font-size:12px}.vac-message-wrapper .vac-icon-edited{-webkit-box-align:center;align-items:center;display:-webkit-inline-box;display:inline-flex;justify-content:center;letter-spacing:normal;line-height:1;text-indent:0;vertical-align:middle;margin:0 4px 2px}.vac-message-wrapper .vac-icon-edited svg{height:12px;width:12px}.vac-message-wrapper .vac-icon-check{height:14px;width:14px;vertical-align:middle;margin:-3px -3px 0 3px}@media only screen and (max-width: 768px){.vac-message-wrapper .vac-message-container{padding:2px 3px 1px}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-message-box{flex:0 0 80%;max-width:80%}.vac-message-wrapper .vac-avatar{height:25px;width:25px;min-height:25px;min-width:25px;margin:0 6px 1px 0}.vac-message-wrapper .vac-avatar.vac-avatar-current{margin:0 0 1px 6px}.vac-message-wrapper .vac-avatar-current-offset{margin-right:31px}.vac-message-wrapper .vac-avatar-offset{margin-left:31px}.vac-message-wrapper .vac-failure-container{margin-left:2px}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:0}.vac-message-wrapper .vac-offset-current{margin-left:20%}.vac-message-wrapper .vac-progress-time{margin-left:37px}}.vac-audio-player{display:flex;margin:8px 0 5px}.vac-audio-player .vac-svg-button{max-width:18px;margin-left:7px}@media only screen and (max-width: 768px){.vac-audio-player{margin:4px 0 0}.vac-audio-player .vac-svg-button{max-width:16px;margin-left:5px}}.vac-player-bar{display:flex;align-items:center;max-width:calc(100% - 18px);margin-right:7px;margin-left:20px}.vac-player-bar .vac-player-progress{width:190px}.vac-player-bar .vac-player-progress .vac-line-container{position:relative;height:4px;border-radius:5px;background-color:var(--chat-message-bg-color-audio-line)}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-progress{position:absolute;height:inherit;background-color:var(--chat-message-bg-color-audio-progress);border-radius:inherit}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{position:absolute;top:-5px;margin-left:-7px;height:14px;width:14px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-progress-selector);transition:transform .25s}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot__active{transform:scale(1.2)}@media only screen and (max-width: 768px){.vac-player-bar{margin-right:5px}.vac-player-bar .vac-player-progress .vac-line-container{height:3px}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{height:12px;width:12px;top:-5px;margin-left:-5px}}.vac-message-actions-wrapper .vac-options-container{position:absolute;top:2px;right:10px;height:40px;width:70px;overflow:hidden;border-top-right-radius:8px}.vac-message-actions-wrapper .vac-blur-container{position:absolute;height:100%;width:100%;left:8px;bottom:10px;background:var(--chat-message-bg-color);filter:blur(3px);border-bottom-left-radius:8px}.vac-message-actions-wrapper .vac-options-me{background:var(--chat-message-bg-color-me)}.vac-message-actions-wrapper .vac-message-options{background:var(--chat-icon-bg-dropdown-message);border-radius:50%;position:absolute;top:7px;right:7px}.vac-message-actions-wrapper .vac-message-options svg{height:17px;width:17px;padding:5px;margin:-5px}.vac-message-actions-wrapper .vac-message-emojis{position:absolute;top:6px;right:30px}.vac-message-actions-wrapper .vac-menu-options{right:15px}.vac-message-actions-wrapper .vac-menu-left{right:-118px}@media only screen and (max-width: 768px){.vac-message-actions-wrapper .vac-options-container{right:3px}.vac-message-actions-wrapper .vac-menu-left{right:-50px}}.vac-message-files-container .vac-file-wrapper{position:relative;width:fit-content}.vac-message-files-container .vac-file-wrapper .vac-file-container{height:60px;width:60px;margin:3px 0 5px;cursor:pointer;transition:all .6s}.vac-message-files-container .vac-file-wrapper .vac-file-container:hover{opacity:.85}.vac-message-files-container .vac-file-wrapper .vac-file-container svg{height:30px;width:30px}.vac-message-files-container .vac-file-wrapper .vac-file-container.vac-file-container-progress{background-color:#0000004d}.vac-message-file-container{position:relative;z-index:0}.vac-message-file-container .vac-message-image-container{cursor:pointer}.vac-message-file-container .vac-image-buttons{position:absolute;width:100%;height:100%;border-radius:4px;background:linear-gradient(to bottom,rgba(0,0,0,0) 55%,rgba(0,0,0,.02) 60%,rgba(0,0,0,.05) 65%,rgba(0,0,0,.1) 70%,rgba(0,0,0,.2) 75%,rgba(0,0,0,.3) 80%,rgba(0,0,0,.5) 85%,rgba(0,0,0,.6) 90%,rgba(0,0,0,.7) 95%,rgba(0,0,0,.8) 100%)}.vac-message-file-container .vac-image-buttons svg{height:26px;width:26px}.vac-message-file-container .vac-image-buttons .vac-button-view,.vac-message-file-container .vac-image-buttons .vac-button-download{position:absolute;bottom:6px;left:7px}.vac-message-file-container .vac-image-buttons :first-child{left:40px}.vac-message-file-container .vac-image-buttons .vac-button-view{max-width:18px;bottom:8px}.vac-message-file-container .vac-video-container{width:350px;max-width:100%;margin:4px auto 5px;cursor:pointer}.vac-message-file-container .vac-video-container video{width:100%;height:100%;border-radius:4px}.vac-button-reaction{display:inline-flex;align-items:center;border:var(--chat-message-border-style-reaction);outline:none;background:var(--chat-message-bg-color-reaction);border-radius:4px;margin:4px 2px 0;transition:.3s;padding:0 5px;font-size:18px;line-height:23px}.vac-button-reaction span{font-size:11px;font-weight:500;min-width:7px;color:var(--chat-message-color-reaction-counter)}.vac-button-reaction:hover{border:var(--chat-message-border-style-reaction-hover);background:var(--chat-message-bg-color-reaction-hover);cursor:pointer}.vac-button-reaction.vac-reaction-me{border:var(--chat-message-border-style-reaction-me);background:var(--chat-message-bg-color-reaction-me)}.vac-button-reaction.vac-reaction-me span{color:var(--chat-message-color-reaction-counter-me)}.vac-button-reaction.vac-reaction-me:hover{border:var(--chat-message-border-style-reaction-hover-me);background:var(--chat-message-bg-color-reaction-hover-me)}.vac-reply-message{background:var(--chat-message-bg-color-reply);border-radius:4px;margin:-1px -5px 8px;padding:8px 10px}.vac-reply-message .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-message .vac-image-reply-container{width:70px}.vac-reply-message .vac-image-reply-container .vac-message-image-reply{height:70px;width:70px;margin:4px auto 3px}.vac-reply-message .vac-video-reply-container{width:200px;max-width:100%}.vac-reply-message .vac-video-reply-container video{width:100%;height:100%;border-radius:4px}.vac-reply-message .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content)}.vac-reply-message .vac-file-container{height:60px;width:60px}.vac-emoji-wrapper{position:relative;display:flex}.vac-emoji-wrapper .vac-emoji-reaction svg{height:19px;width:19px}.vac-emoji-wrapper .vac-emoji-picker{position:absolute;z-index:9999;bottom:32px;right:10px;width:300px;padding-top:4px;overflow:scroll;box-sizing:border-box;border-radius:.5rem;background:var(--chat-emoji-bg-color);box-shadow:0 1px 2px -2px #0000001a,0 1px 2px -1px #0000001a,0 1px 2px 1px #0000001a;scrollbar-width:none}.vac-emoji-wrapper .vac-emoji-picker::-webkit-scrollbar{display:none}.vac-emoji-wrapper .vac-emoji-picker.vac-picker-reaction{position:fixed;top:initial;right:initial}.vac-emoji-wrapper .vac-emoji-picker emoji-picker{height:100%;width:100%;--emoji-size: 1.2rem;--background: var(--chat-emoji-bg-color);--emoji-padding: .4rem;--border-color: var(--chat-sidemenu-border-color-search);--button-hover-background: var(--chat-sidemenu-bg-color-hover);--button-active-background: var(--chat-sidemenu-bg-color-hover)}.vac-format-message-wrapper .vac-format-container{display:inline}.vac-format-message-wrapper .vac-icon-deleted{height:14px;width:14px;vertical-align:middle;margin:-2px 2px 0 0;fill:var(--chat-message-color-deleted)}.vac-format-message-wrapper .vac-icon-deleted.vac-icon-deleted-room{margin:-3px 1px 0 0;fill:var(--chat-room-color-message)}.vac-format-message-wrapper .vac-image-link-container{background-color:var(--chat-message-bg-color-media);padding:8px;margin:2px auto;border-radius:4px}.vac-format-message-wrapper .vac-image-link{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:contain;background-position:center center!important;background-repeat:no-repeat!important;height:150px;width:150px;max-width:100%;border-radius:4px;margin:0 auto}.vac-format-message-wrapper .vac-image-link-message{max-width:166px;font-size:12px}.vac-loader-wrapper.vac-container-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-loader-wrapper.vac-container-top{padding:21px}.vac-loader-wrapper.vac-container-top #vac-circle{height:20px;width:20px}.vac-loader-wrapper #vac-circle{margin:auto;height:28px;width:28px;border:3px rgba(0,0,0,.25) solid;border-top:3px var(--chat-color-spinner) solid;border-right:3px var(--chat-color-spinner) solid;border-bottom:3px var(--chat-color-spinner) solid;border-radius:50%;-webkit-animation:vac-spin 1s infinite linear;animation:vac-spin 1s infinite linear}@media only screen and (max-width: 768px){.vac-loader-wrapper #vac-circle{height:24px;width:24px}.vac-loader-wrapper.vac-container-top{padding:18px}.vac-loader-wrapper.vac-container-top #vac-circle{height:16px;width:16px}}@-webkit-keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#vac-icon-search{fill:var(--chat-icon-color-search)}#vac-icon-add{fill:var(--chat-icon-color-add)}#vac-icon-toggle{fill:var(--chat-icon-color-toggle)}#vac-icon-menu{fill:var(--chat-icon-color-menu)}#vac-icon-close{fill:var(--chat-icon-color-close)}#vac-icon-close-image{fill:var(--chat-icon-color-close-image)}#vac-icon-file{fill:var(--chat-icon-color-file)}#vac-icon-paperclip{fill:var(--chat-icon-color-paperclip)}#vac-icon-close-outline{fill:var(--chat-icon-color-close-outline)}#vac-icon-close-outline-preview{fill:var(--chat-icon-color-close-preview)}#vac-icon-send{fill:var(--chat-icon-color-send)}#vac-icon-send-disabled{fill:var(--chat-icon-color-send-disabled)}#vac-icon-emoji{fill:var(--chat-icon-color-emoji)}#vac-icon-emoji-reaction{fill:var(--chat-icon-color-emoji-reaction)}#vac-icon-document{fill:var(--chat-icon-color-document)}#vac-icon-pencil{fill:var(--chat-icon-color-pencil)}#vac-icon-checkmark,#vac-icon-double-checkmark{fill:var(--chat-icon-color-checkmark)}#vac-icon-checkmark-seen,#vac-icon-double-checkmark-seen{fill:var(--chat-icon-color-checkmark-seen)}#vac-icon-eye{fill:var(--chat-icon-color-eye)}#vac-icon-dropdown-message{fill:var(--chat-icon-color-dropdown-message)}#vac-icon-dropdown-room{fill:var(--chat-icon-color-dropdown-room)}#vac-icon-dropdown-scroll{fill:var(--chat-icon-color-dropdown-scroll)}#vac-icon-audio-play{fill:var(--chat-icon-color-audio-play)}#vac-icon-audio-pause{fill:var(--chat-icon-color-audio-pause)}.vac-progress-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-progress-wrapper circle{transition:stroke-dashoffset .35s;transform:rotate(-90deg);transform-origin:50% 50%}.vac-progress-wrapper .vac-progress-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:-1;margin-top:-2px;background-color:#000000b3;border-radius:50%}.vac-progress-wrapper .vac-progress-content .vac-progress-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:700;color:#fff}.vac-progress-wrapper .vac-progress-content .vac-progress-text .vac-progress-pourcent{font-size:9px;font-weight:400}\n';
+var _style_0 = '.vac-fade-spinner-enter-from{opacity:0}.vac-fade-spinner-enter-active{transition:opacity .8s}.vac-fade-spinner-leave-active{transition:opacity .2s;opacity:0}.vac-fade-image-enter-from{opacity:0}.vac-fade-image-enter-active{transition:opacity 1s}.vac-fade-image-leave-active{transition:opacity .5s;opacity:0}.vac-fade-message-enter-from{opacity:0}.vac-fade-message-enter-active{transition:opacity .5s}.vac-fade-message-leave-active{transition:opacity .2s;opacity:0}.vac-slide-left-enter-active,.vac-slide-right-enter-active{transition:all .3s ease;transition-property:transform,opacity}.vac-slide-left-leave-active,.vac-slide-right-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)!important;transition-property:transform,opacity}.vac-slide-left-enter-from,.vac-slide-left-leave-to{transform:translate(10px);opacity:0}.vac-slide-right-enter-from,.vac-slide-right-leave-to{transform:translate(-10px);opacity:0}.vac-slide-up-enter-active{transition:all .3s ease}.vac-slide-up-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.vac-slide-up-enter-from,.vac-slide-up-leave-to{transform:translateY(10px);opacity:0}.vac-bounce-enter-active{animation:vac-bounce-in .5s}.vac-bounce-leave-active{animation:vac-bounce-in .3s reverse}@keyframes vac-bounce-in{0%{transform:scale(0)}50%{transform:scale(1.05)}to{transform:scale(1)}}.vac-fade-preview-enter{opacity:0}.vac-fade-preview-enter-active{transition:opacity .1s}.vac-fade-preview-leave-active{transition:opacity .2s;opacity:0}.vac-bounce-preview-enter-active{animation:vac-bounce-image-in .4s}.vac-bounce-preview-leave-active{animation:vac-bounce-image-in .3s reverse}@keyframes vac-bounce-image-in{0%{transform:scale(.6)}to{transform:scale(1)}}.vac-menu-list{border-radius:4px;display:block;cursor:pointer;background:var(--chat-dropdown-bg-color);padding:6px 0}.vac-menu-list :hover{background:var(--chat-dropdown-bg-color-hover);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-list :not(:hover){transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;min-height:30px;padding:5px 16px;position:relative;white-space:nowrap;line-height:30px}.vac-menu-options{position:absolute;right:10px;top:20px;z-index:9999;min-width:150px;display:inline-block;border-radius:4px;font-size:14px;color:var(--chat-color);overflow-y:auto;overflow-x:hidden;contain:content;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-app-border{border:var(--chat-border-style)}.vac-app-border-t{border-top:var(--chat-border-style)}.vac-app-border-r{border-right:var(--chat-border-style)}.vac-app-border-b{border-bottom:var(--chat-border-style)}.vac-app-box-shadow{transition:all .5s;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-item-clickable{cursor:pointer}.vac-vertical-center{display:flex;align-items:center;height:100%}.vac-vertical-center .vac-vertical-container{width:100%;text-align:center}.vac-svg-button{max-height:30px;display:flex;cursor:pointer;transition:all .2s}.vac-svg-button:hover{transform:scale(1.1);opacity:.7}.vac-avatar{background-size:cover;background-position:center center;background-repeat:no-repeat;background-color:#ddd;height:42px;width:42px;min-height:42px;min-width:42px;margin-right:15px;border-radius:50%}.vac-blur-loading{filter:blur(3px)}.vac-badge-counter{height:13px;width:auto;min-width:13px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:3px;font-size:11px;font-weight:500}.vac-text-ellipsis{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-text-tag{color:var(--chat-message-color-tag);cursor:pointer}.vac-file-container{display:flex;align-content:center;justify-content:center;flex-wrap:wrap;text-align:center;background:var(--chat-bg-color-input);border:var(--chat-border-style-input);border-radius:4px;padding:10px}.vac-file-container svg{height:28px;width:28px}.vac-file-container .vac-text-extension{font-size:12px;color:var(--chat-message-color-file-extension);margin-top:-2px}.markdown p{margin:0}.markdown ol{display:flex;flex-direction:column;list-style-position:inside}.markdown ul{display:flex;flex-direction:column}.markdown code{display:block;font-size:12px;color:var(--chat-markdown-color-multi);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:4px 0;padding:7px}.markdown p code{display:inline-block;font-size:12px;color:var(--chat-markdown-color);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:2px 0;padding:2px 3px}.vac-card-window{width:100%;display:block;max-width:100%;background:var(--chat-content-bg-color);color:var(--chat-color);overflow-wrap:break-word;white-space:normal;border:var(--chat-container-border);border-radius:var(--chat-container-border-radius);box-shadow:var(--chat-container-box-shadow);-webkit-tap-highlight-color:transparent}.vac-card-window *{font-family:inherit}.vac-card-window a{color:#0d579c;font-weight:500}.vac-card-window .vac-chat-container{height:100%;display:flex}.vac-card-window .vac-chat-container input{min-width:10px}.vac-card-window .vac-chat-container textarea,.vac-card-window .vac-chat-container input[type=text],.vac-card-window .vac-chat-container input[type=search]{-webkit-appearance:none}.vac-media-preview{position:fixed;top:0;left:0;z-index:99;width:100vw;height:100vh;display:flex;align-items:center;background-color:#000c;outline:none}.vac-media-preview .vac-media-preview-container{height:calc(100% - 140px);width:calc(100% - 80px);padding:70px 40px;margin:0 auto}.vac-media-preview .vac-image-preview{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:center}.vac-media-preview video{width:100%;height:100%}.vac-media-preview .vac-svg-button{position:absolute;top:30px;right:30px;transform:scale(1.4)}@media only screen and (max-width: 768px){.vac-media-preview .vac-svg-button{top:20px;right:20px;transform:scale(1.2)}.vac-media-preview .vac-media-preview-container{width:calc(100% - 40px);padding:70px 20px}}.vac-col-messages{position:relative;height:100%;flex:1;overflow:hidden;display:flex;flex-flow:column}.vac-col-messages .vac-container-center{height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.vac-col-messages .vac-room-empty{font-size:14px;color:#9ca6af;font-style:italic;line-height:20px;white-space:pre-line}.vac-col-messages .vac-room-empty div{padding:0 10%}.vac-col-messages .vac-container-scroll{background:var(--chat-content-bg-color);flex:1;overflow-y:auto;margin-right:1px;margin-top:65px;-webkit-overflow-scrolling:touch}.vac-col-messages .vac-container-scroll.vac-scroll-smooth{scroll-behavior:smooth}.vac-col-messages .vac-messages-container{padding:0 5px 5px}.vac-col-messages .vac-text-started{font-size:14px;color:var(--chat-message-color-started);font-style:italic;text-align:center;margin-top:25px;margin-bottom:20px}.vac-col-messages .vac-icon-scroll{position:absolute;bottom:80px;right:20px;padding:8px;background:var(--chat-bg-scroll-icon);border-radius:50%;box-shadow:0 1px 1px -1px #0003,0 1px 1px #00000024,0 1px 2px #0000001f;display:flex;cursor:pointer;z-index:10}.vac-col-messages .vac-icon-scroll svg{height:25px;width:25px}.vac-col-messages .vac-messages-count{position:absolute;top:-8px;left:11px;background-color:var(--chat-message-bg-color-scroll-counter);color:var(--chat-message-color-scroll-counter)}.vac-col-messages .vac-messages-hidden{opacity:0}@media only screen and (max-width: 768px){.vac-col-messages .vac-container-scroll{margin-top:50px}.vac-col-messages .vac-text-started{margin-top:20px}.vac-col-messages .vac-icon-scroll{bottom:70px}}.vac-room-header{position:absolute;display:flex;align-items:center;height:64px;width:100%;z-index:10;margin-right:1px;background:var(--chat-header-bg-color);border-top-right-radius:var(--chat-container-border-radius)}.vac-room-header .vac-room-wrapper{display:flex;align-items:center;min-width:0;height:100%;width:100%;padding:0 16px}.vac-room-header .vac-toggle-button{margin-right:15px}.vac-room-header .vac-toggle-button svg{height:26px;width:26px}.vac-room-header .vac-rotate-icon{transform:rotate(180deg)!important}.vac-room-header .vac-rotate-icon-init{transform:rotate(360deg)}.vac-room-header .vac-info-wrapper,.vac-room-header .vac-room-selection{display:flex;align-items:center;min-width:0;width:100%;height:100%}.vac-room-header .vac-room-selection .vac-selection-button{padding:8px 16px;color:var(--chat-color-button);background-color:var(--chat-bg-color-button);border-radius:4px;margin-right:10px;cursor:pointer;transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-button:hover{opacity:.7}.vac-room-header .vac-room-selection .vac-selection-button:active{opacity:.9}.vac-room-header .vac-room-selection .vac-selection-button .vac-selection-button-count{margin-left:6px;opacity:.9}.vac-room-header .vac-room-selection .vac-selection-cancel{display:flex;align-items:center;margin-left:auto;white-space:nowrap;color:var(--chat-color-button-clear);transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-cancel:hover{opacity:.7}.vac-room-header .vac-room-name{font-size:17px;font-weight:500;line-height:22px;color:var(--chat-header-color-name)}.vac-room-header .vac-room-info{font-size:13px;line-height:18px;color:var(--chat-header-color-info)}.vac-room-header .vac-room-options{margin-left:auto}@media only screen and (max-width: 768px){.vac-room-header{height:50px}.vac-room-header .vac-room-wrapper{padding:0 10px}.vac-room-header .vac-room-name{font-size:16px;line-height:22px}.vac-room-header .vac-room-info{font-size:12px;line-height:16px}.vac-room-header .vac-avatar{height:37px;width:37px;min-height:37px;min-width:37px}}.vac-room-footer{width:100%;border-bottom-right-radius:4px;z-index:10}.vac-box-footer{display:flex;position:relative;background:var(--chat-footer-bg-color);padding:10px 8px}.vac-textarea{max-height:300px;overflow-y:auto;height:20px;width:100%;line-height:20px;outline:0;resize:none;border-radius:20px;padding:12px 16px;box-sizing:content-box;font-size:16px;background:var(--chat-bg-color-input);color:var(--chat-color);caret-color:var(--chat-color-caret);border:var(--chat-border-style-input)}.vac-textarea::placeholder{color:var(--chat-color-placeholder);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-textarea-outline{border:1px solid var(--chat-border-color-input-selected);box-shadow:inset 0 0 0 1px var(--chat-border-color-input-selected)}.vac-icon-textarea,.vac-icon-textarea-left{display:flex;align-items:center}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea{margin-left:5px}.vac-icon-textarea-left{display:flex;align-items:center;margin-right:5px}.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea-left .vac-icon-microphone{fill:var(--chat-icon-color-microphone);margin:0 7px}.vac-icon-textarea-left .vac-dot-audio-record{height:15px;width:15px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-record);animation:vac-scaling .8s ease-in-out infinite alternate}@keyframes vac-scaling{0%{transform:scale(1);opacity:.4}to{transform:scale(1.1);opacity:1}}.vac-icon-textarea-left .vac-dot-audio-record-time{font-size:16px;color:var(--chat-color);margin-left:8px;width:45px}.vac-icon-textarea-left .vac-icon-audio-stop,.vac-icon-textarea-left .vac-icon-audio-confirm{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop svg,.vac-icon-textarea-left .vac-icon-audio-confirm svg{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop{margin-right:20px}.vac-icon-textarea-left .vac-icon-audio-stop #vac-icon-close-outline{fill:var(--chat-icon-color-audio-cancel)}.vac-icon-textarea-left .vac-icon-audio-confirm{margin-right:3px;margin-left:12px}.vac-icon-textarea-left .vac-icon-audio-confirm #vac-icon-checkmark{fill:var(--chat-icon-color-audio-confirm)}.vac-send-disabled,.vac-send-disabled svg{cursor:none!important;pointer-events:none!important;transform:none!important}@media only screen and (max-width: 768px){.vac-room-footer{width:100%}.vac-box-footer{padding:7px 2px 7px 7px}.vac-box-footer.vac-box-footer-border{border-top:var(--chat-border-style-input)}.vac-textarea{padding:7px;line-height:18px}.vac-textarea::placeholder{color:transparent}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 5px!important}}@media only screen and (max-height: 768px){.vac-textarea{max-height:120px}}.vac-emojis-container{width:calc(100% - 16px);padding:10px 8px;background:var(--chat-footer-bg-color);display:flex;align-items:center;overflow:auto}.vac-emojis-container .vac-emoji-element{padding:0 8px;font-size:30px;border-radius:4px;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-emojis-container .vac-emoji-element-active{background:var(--chat-footer-bg-color-tag-active)}@media only screen and (max-width: 768px){.vac-emojis-container{width:calc(100% - 10px);padding:7px 5px}.vac-emojis-container .vac-emoji-element{padding:0 7px;font-size:26px}}.vac-reply-container{display:flex;padding:10px 10px 0;background:var(--chat-footer-bg-color);align-items:center;width:calc(100% - 20px)}.vac-reply-container .vac-reply-box{width:100%;overflow:hidden;background:var(--chat-footer-bg-color-reply);border-radius:4px;padding:8px 10px}.vac-reply-container .vac-reply-info{overflow:hidden}.vac-reply-container .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-container .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content);white-space:pre-line}.vac-reply-container .vac-icon-reply{margin-left:10px}.vac-reply-container .vac-icon-reply svg{height:20px;width:20px}.vac-reply-container .vac-image-reply{max-height:100px;max-width:200px;margin:4px 10px 0 0;border-radius:4px}.vac-reply-container .vac-audio-reply{margin-right:10px}.vac-reply-container .vac-file-container{max-width:80px}@media only screen and (max-width: 768px){.vac-reply-container{padding:5px 8px;width:calc(100% - 16px)}}.vac-room-files-container{display:flex;align-items:center;padding:10px 6px 0;background:var(--chat-footer-bg-color)}.vac-room-files-container .vac-files-box{display:flex;overflow:auto;width:calc(100% - 30px)}.vac-room-files-container video{height:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-files-container .vac-icon-close{margin-left:auto}.vac-room-files-container .vac-icon-close svg{height:20px;width:20px}@media only screen and (max-width: 768px){.vac-files-container{padding:6px 4px 4px 2px}}.vac-room-file-container{display:flex;position:relative;margin:0 4px}.vac-room-file-container .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:100px;width:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-file-container .vac-file-container{height:80px;width:80px}.vac-room-file-container .vac-icon-remove{position:absolute;top:6px;left:6px;z-index:10}.vac-room-file-container .vac-icon-remove svg{height:20px;width:20px;border-radius:50%}.vac-room-file-container .vac-icon-remove:before{content:" ";position:absolute;width:100%;height:100%;background:rgba(0,0,0,.5);border-radius:50%;z-index:-1}.vac-tags-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-tags-container .vac-tags-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-tags-container .vac-tags-box-active{background:var(--chat-footer-bg-color-tag-active)}.vac-tags-container .vac-tags-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-tags-container .vac-tags-avatar{height:34px;width:34px;min-height:34px;min-width:34px}.vac-tags-container .vac-tags-username{font-size:14px}@media only screen and (max-width: 768px){.vac-tags-container .vac-tags-box{height:50px}.vac-tags-container .vac-tags-info{padding:0 12px}}.vac-template-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-template-container .vac-template-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-template-container .vac-template-active{background:var(--chat-footer-bg-color-tag-active)}.vac-template-container .vac-template-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-template-container .vac-template-tag{font-size:14px;font-weight:700;margin-right:10px}.vac-template-container .vac-template-text{font-size:14px}@media only screen and (max-width: 768px){.vac-template-container .vac-template-box{height:50px}.vac-template-container .vac-template-info{padding:0 12px}}.vac-rooms-container{display:flex;flex-flow:column;flex:0 0 25%;min-width:260px;max-width:500px;position:relative;background:var(--chat-sidemenu-bg-color);height:100%;border-top-left-radius:var(--chat-container-border-radius);border-bottom-left-radius:var(--chat-container-border-radius)}.vac-rooms-container.vac-rooms-container-full{flex:0 0 100%;max-width:100%}.vac-rooms-container .vac-rooms-empty{font-size:14px;color:#9ca6af;font-style:italic;text-align:center;margin:40px 0;line-height:20px;white-space:pre-line}.vac-rooms-container .vac-room-list{flex:1;position:relative;max-width:100%;cursor:pointer;padding:0 10px 5px;overflow-y:auto}.vac-rooms-container .vac-room-item{border-radius:8px;align-items:center;display:flex;flex:1 1 100%;margin-bottom:5px;padding:0 14px;position:relative;min-height:71px;transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-rooms-container .vac-room-item:hover{background:var(--chat-sidemenu-bg-color-hover)}.vac-rooms-container .vac-room-selected{color:var(--chat-sidemenu-color-active)!important;background:var(--chat-sidemenu-bg-color-active)!important}.vac-rooms-container .vac-room-selected:hover{background:var(--chat-sidemenu-bg-color-active)!important}@media only screen and (max-width: 768px){.vac-rooms-container .vac-room-list{padding:0 7px 5px}.vac-rooms-container .vac-room-item{min-height:60px;padding:0 8px}}.vac-room-container{display:flex;flex:1;align-items:center;width:100%}.vac-room-container .vac-name-container{flex:1}.vac-room-container .vac-title-container{display:flex;align-items:center;line-height:25px}.vac-room-container .vac-state-circle{width:9px;height:9px;border-radius:50%;background-color:var(--chat-room-color-offline);margin-right:6px;transition:.3s}.vac-room-container .vac-state-online{background-color:var(--chat-room-color-online)}.vac-room-container .vac-room-name{flex:1;color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-text-date{margin-left:5px;font-size:11px;color:var(--chat-room-color-timestamp)}.vac-room-container .vac-text-last{display:flex;align-items:center;font-size:12px;line-height:19px;color:var(--chat-room-color-message)}.vac-room-container .vac-message-new{color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-icon-check{display:flex;vertical-align:middle;height:14px;width:14px;margin-top:-2px;margin-right:2px}.vac-room-container .vac-icon-microphone{height:15px;width:15px;vertical-align:middle;margin:-3px 1px 0 -2px;fill:var(--chat-room-color-message)}.vac-room-container .vac-room-options-container{display:flex;margin-left:auto}.vac-room-container .vac-room-badge{background-color:var(--chat-room-bg-color-badge);color:var(--chat-room-color-badge);margin-left:5px}.vac-room-container .vac-list-room-options{height:19px;width:19px;align-items:center;margin-left:5px}.vac-box-empty{margin-top:10px}@media only screen and (max-width: 768px){.vac-box-empty{margin-top:7px}}.vac-box-search{position:sticky;display:flex;align-items:center;height:64px;padding:0 15px}.vac-box-search .vac-icon-search{display:flex;position:absolute;left:30px}.vac-box-search .vac-icon-search svg{width:18px;height:18px}.vac-box-search .vac-input{height:38px;width:100%;background:var(--chat-bg-color-input);color:var(--chat-color);font-size:15px;outline:0;caret-color:var(--chat-color-caret);padding:10px 10px 10px 40px;border:1px solid var(--chat-sidemenu-border-color-search);border-radius:20px}.vac-box-search .vac-input::placeholder{color:var(--chat-color-placeholder)}.vac-box-search .vac-add-icon{margin-left:auto;padding-left:10px}@media only screen and (max-width: 768px){.vac-box-search{height:58px}}.vac-message-wrapper .vac-card-info{border-radius:4px;text-align:center;margin:10px auto;font-size:12px;padding:4px;display:block;overflow-wrap:break-word;position:relative;white-space:normal;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-card-date{max-width:150px;font-weight:500;text-transform:uppercase;color:var(--chat-message-color-date);background-color:var(--chat-message-bg-color-date)}.vac-message-wrapper .vac-card-system{max-width:250px;padding:8px 4px;color:var(--chat-message-color-system);background-color:var(--chat-message-bg-color-system)}.vac-message-wrapper .vac-line-new{color:var(--chat-message-color-new-messages);position:relative;text-align:center;font-size:13px;padding:10px 0}.vac-message-wrapper .vac-line-new:after,.vac-message-wrapper .vac-line-new:before{border-top:1px solid var(--chat-message-color-new-messages);content:"";left:0;position:absolute;top:50%;width:calc(50% - 60px)}.vac-message-wrapper .vac-line-new:before{left:auto;right:0}.vac-message-wrapper .vac-message-box{display:flex;flex:0 0 50%;max-width:50%;justify-content:flex-start;line-height:1.4}.vac-message-wrapper .vac-avatar{height:28px;width:28px;min-height:28px;min-width:28px;margin:0 0 2px;align-self:flex-end}.vac-message-wrapper .vac-avatar-current-offset{margin-right:28px}.vac-message-wrapper .vac-avatar-offset{margin-left:28px}.vac-message-wrapper .vac-failure-container{position:relative;align-self:flex-end;height:20px;width:20px;margin:0 0 2px -4px;border-radius:50%;background-color:#f44336}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:6px}.vac-message-wrapper .vac-failure-container .vac-failure-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:15px;font-weight:700}.vac-message-wrapper .vac-message-container{position:relative;padding:2px 10px;align-items:end;min-width:100px;box-sizing:content-box}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-offset-current{margin-left:50%;justify-content:flex-end}.vac-message-wrapper .vac-message-card{background-color:var(--chat-message-bg-color);color:var(--chat-message-color);border-radius:8px;font-size:14px;padding:6px 9px 3px;white-space:pre-line;max-width:100%;-webkit-transition-property:box-shadow,opacity;transition-property:box-shadow,opacity;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);will-change:box-shadow;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-message-highlight{box-shadow:0 1px 2px -1px #0000001a,0 1px 2px -1px #0000001c,0 1px 5px -1px #0000001c}.vac-message-wrapper .vac-message-current{background-color:var(--chat-message-bg-color-me)!important}.vac-message-wrapper .vac-message-deleted{color:var(--chat-message-color-deleted)!important;font-size:13px!important;font-style:italic!important;background-color:var(--chat-message-bg-color-deleted)!important}.vac-message-wrapper .vac-message-selected{background-color:var(--chat-message-bg-color-selected)!important;transition:background-color .2s}.vac-message-wrapper .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:250px;width:250px;max-width:100%;border-radius:4px;margin:4px auto 5px;transition:.4s filter linear}.vac-message-wrapper .vac-text-username{font-size:13px;color:var(--chat-message-color-username);margin-bottom:2px}.vac-message-wrapper .vac-username-reply{margin-bottom:5px}.vac-message-wrapper .vac-text-timestamp{font-size:10px;color:var(--chat-message-color-timestamp);text-align:right}.vac-message-wrapper .vac-progress-time{float:left;margin:-2px 0 0 40px;color:var(--chat-color);font-size:12px}.vac-message-wrapper .vac-icon-edited{-webkit-box-align:center;align-items:center;display:-webkit-inline-box;display:inline-flex;justify-content:center;letter-spacing:normal;line-height:1;text-indent:0;vertical-align:middle;margin:0 4px 2px}.vac-message-wrapper .vac-icon-edited svg{height:12px;width:12px}.vac-message-wrapper .vac-icon-check{height:14px;width:14px;vertical-align:middle;margin:-3px -3px 0 3px}@media only screen and (max-width: 768px){.vac-message-wrapper .vac-message-container{padding:2px 3px 1px}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-message-box{flex:0 0 80%;max-width:80%}.vac-message-wrapper .vac-avatar{height:25px;width:25px;min-height:25px;min-width:25px;margin:0 6px 1px 0}.vac-message-wrapper .vac-avatar.vac-avatar-current{margin:0 0 1px 6px}.vac-message-wrapper .vac-avatar-current-offset{margin-right:31px}.vac-message-wrapper .vac-avatar-offset{margin-left:31px}.vac-message-wrapper .vac-failure-container{margin-left:2px}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:0}.vac-message-wrapper .vac-offset-current{margin-left:20%}.vac-message-wrapper .vac-progress-time{margin-left:37px}}.vac-audio-player{display:flex;margin:8px 0 5px}.vac-audio-player .vac-svg-button{max-width:18px;margin-left:7px}@media only screen and (max-width: 768px){.vac-audio-player{margin:4px 0 0}.vac-audio-player .vac-svg-button{max-width:16px;margin-left:5px}}.vac-player-bar{display:flex;align-items:center;max-width:calc(100% - 18px);margin-right:7px;margin-left:20px}.vac-player-bar .vac-player-progress{width:190px}.vac-player-bar .vac-player-progress .vac-line-container{position:relative;height:4px;border-radius:5px;background-color:var(--chat-message-bg-color-audio-line)}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-progress{position:absolute;height:inherit;background-color:var(--chat-message-bg-color-audio-progress);border-radius:inherit}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{position:absolute;top:-5px;margin-left:-7px;height:14px;width:14px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-progress-selector);transition:transform .25s}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot__active{transform:scale(1.2)}@media only screen and (max-width: 768px){.vac-player-bar{margin-right:5px}.vac-player-bar .vac-player-progress .vac-line-container{height:3px}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{height:12px;width:12px;top:-5px;margin-left:-5px}}.vac-message-actions-wrapper .vac-options-container{position:absolute;top:2px;right:10px;height:40px;width:70px;overflow:hidden;border-top-right-radius:8px}.vac-message-actions-wrapper .vac-blur-container{position:absolute;height:100%;width:100%;left:8px;bottom:10px;background:var(--chat-message-bg-color);filter:blur(3px);border-bottom-left-radius:8px}.vac-message-actions-wrapper .vac-options-me{background:var(--chat-message-bg-color-me)}.vac-message-actions-wrapper .vac-message-options{background:var(--chat-icon-bg-dropdown-message);border-radius:50%;position:absolute;top:7px;right:7px}.vac-message-actions-wrapper .vac-message-options svg{height:17px;width:17px;padding:5px;margin:-5px}.vac-message-actions-wrapper .vac-message-emojis{position:absolute;top:6px;right:30px}.vac-message-actions-wrapper .vac-menu-options{right:15px}.vac-message-actions-wrapper .vac-menu-left{right:-118px}@media only screen and (max-width: 768px){.vac-message-actions-wrapper .vac-options-container{right:3px}.vac-message-actions-wrapper .vac-menu-left{right:-50px}}.vac-message-files-container .vac-file-wrapper{position:relative;width:fit-content}.vac-message-files-container .vac-file-wrapper .vac-file-container{height:60px;width:60px;margin:3px 0 5px;cursor:pointer;transition:all .6s}.vac-message-files-container .vac-file-wrapper .vac-file-container:hover{opacity:.85}.vac-message-files-container .vac-file-wrapper .vac-file-container svg{height:30px;width:30px}.vac-message-files-container .vac-file-wrapper .vac-file-container.vac-file-container-progress{background-color:#0000004d}.vac-message-file-container{position:relative;z-index:0}.vac-message-file-container .vac-message-image-container{cursor:pointer}.vac-message-file-container .vac-image-buttons{position:absolute;width:100%;height:100%;border-radius:4px;background:linear-gradient(to bottom,rgba(0,0,0,0) 55%,rgba(0,0,0,.02) 60%,rgba(0,0,0,.05) 65%,rgba(0,0,0,.1) 70%,rgba(0,0,0,.2) 75%,rgba(0,0,0,.3) 80%,rgba(0,0,0,.5) 85%,rgba(0,0,0,.6) 90%,rgba(0,0,0,.7) 95%,rgba(0,0,0,.8) 100%)}.vac-message-file-container .vac-image-buttons svg{height:26px;width:26px}.vac-message-file-container .vac-image-buttons .vac-button-view,.vac-message-file-container .vac-image-buttons .vac-button-download{position:absolute;bottom:6px;left:7px}.vac-message-file-container .vac-image-buttons :first-child{left:40px}.vac-message-file-container .vac-image-buttons .vac-button-view{max-width:18px;bottom:8px}.vac-message-file-container .vac-video-container{width:350px;max-width:100%;margin:4px auto 5px;cursor:pointer}.vac-message-file-container .vac-video-container video{width:100%;height:100%;border-radius:4px}.vac-button-reaction{display:inline-flex;align-items:center;border:var(--chat-message-border-style-reaction);outline:none;background:var(--chat-message-bg-color-reaction);border-radius:4px;margin:4px 2px 0;transition:.3s;padding:0 5px;font-size:18px;line-height:23px}.vac-button-reaction span{font-size:11px;font-weight:500;min-width:7px;color:var(--chat-message-color-reaction-counter)}.vac-button-reaction:hover{border:var(--chat-message-border-style-reaction-hover);background:var(--chat-message-bg-color-reaction-hover);cursor:pointer}.vac-button-reaction.vac-reaction-me{border:var(--chat-message-border-style-reaction-me);background:var(--chat-message-bg-color-reaction-me)}.vac-button-reaction.vac-reaction-me span{color:var(--chat-message-color-reaction-counter-me)}.vac-button-reaction.vac-reaction-me:hover{border:var(--chat-message-border-style-reaction-hover-me);background:var(--chat-message-bg-color-reaction-hover-me)}.vac-reply-message{background:var(--chat-message-bg-color-reply);border-radius:4px;margin:-1px -5px 8px;padding:8px 10px}.vac-reply-message .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-message .vac-image-reply-container{width:70px}.vac-reply-message .vac-image-reply-container .vac-message-image-reply{height:70px;width:70px;margin:4px auto 3px}.vac-reply-message .vac-video-reply-container{width:200px;max-width:100%}.vac-reply-message .vac-video-reply-container video{width:100%;height:100%;border-radius:4px}.vac-reply-message .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content)}.vac-reply-message .vac-file-container{height:60px;width:60px}.vac-emoji-wrapper{position:relative;display:flex}.vac-emoji-wrapper .vac-emoji-reaction svg{height:19px;width:19px}.vac-emoji-wrapper .vac-emoji-picker{position:absolute;z-index:9999;bottom:32px;right:10px;width:300px;padding-top:4px;overflow:scroll;box-sizing:border-box;border-radius:.5rem;background:var(--chat-emoji-bg-color);box-shadow:0 1px 2px -2px #0000001a,0 1px 2px -1px #0000001a,0 1px 2px 1px #0000001a;scrollbar-width:none}.vac-emoji-wrapper .vac-emoji-picker::-webkit-scrollbar{display:none}.vac-emoji-wrapper .vac-emoji-picker.vac-picker-reaction{position:fixed;top:initial;right:initial}.vac-emoji-wrapper .vac-emoji-picker emoji-picker{height:100%;width:100%;--emoji-size: 1.2rem;--background: var(--chat-emoji-bg-color);--emoji-padding: .4rem;--border-color: var(--chat-sidemenu-border-color-search);--button-hover-background: var(--chat-sidemenu-bg-color-hover);--button-active-background: var(--chat-sidemenu-bg-color-hover)}.vac-format-message-wrapper .vac-format-container{display:inline}.vac-format-message-wrapper .vac-icon-deleted{height:14px;width:14px;vertical-align:middle;margin:-2px 2px 0 0;fill:var(--chat-message-color-deleted)}.vac-format-message-wrapper .vac-icon-deleted.vac-icon-deleted-room{margin:-3px 1px 0 0;fill:var(--chat-room-color-message)}.vac-format-message-wrapper .vac-image-link-container{background-color:var(--chat-message-bg-color-media);padding:8px;margin:2px auto;border-radius:4px}.vac-format-message-wrapper .vac-image-link{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:contain;background-position:center center!important;background-repeat:no-repeat!important;height:150px;width:150px;max-width:100%;border-radius:4px;margin:0 auto}.vac-format-message-wrapper .vac-image-link-message{max-width:166px;font-size:12px}.vac-loader-wrapper.vac-container-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-loader-wrapper.vac-container-top{padding:21px}.vac-loader-wrapper.vac-container-top #vac-circle{height:20px;width:20px}.vac-loader-wrapper #vac-circle{margin:auto;height:28px;width:28px;border:3px rgba(0,0,0,.25) solid;border-top:3px var(--chat-color-spinner) solid;border-right:3px var(--chat-color-spinner) solid;border-bottom:3px var(--chat-color-spinner) solid;border-radius:50%;-webkit-animation:vac-spin 1s infinite linear;animation:vac-spin 1s infinite linear}@media only screen and (max-width: 768px){.vac-loader-wrapper #vac-circle{height:24px;width:24px}.vac-loader-wrapper.vac-container-top{padding:18px}.vac-loader-wrapper.vac-container-top #vac-circle{height:16px;width:16px}}@-webkit-keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#vac-icon-search{fill:var(--chat-icon-color-search)}#vac-icon-add{fill:var(--chat-icon-color-add)}#vac-icon-toggle{fill:var(--chat-icon-color-toggle)}#vac-icon-menu{fill:var(--chat-icon-color-menu)}#vac-icon-close{fill:var(--chat-icon-color-close)}#vac-icon-close-image{fill:var(--chat-icon-color-close-image)}#vac-icon-file{fill:var(--chat-icon-color-file)}#vac-icon-paperclip{fill:var(--chat-icon-color-paperclip)}#vac-icon-close-outline{fill:var(--chat-icon-color-close-outline)}#vac-icon-close-outline-preview{fill:var(--chat-icon-color-close-preview)}#vac-icon-send{fill:var(--chat-icon-color-send)}#vac-icon-send-disabled{fill:var(--chat-icon-color-send-disabled)}#vac-icon-emoji{fill:var(--chat-icon-color-emoji)}#vac-icon-emoji-reaction{fill:var(--chat-icon-color-emoji-reaction)}#vac-icon-document{fill:var(--chat-icon-color-document)}#vac-icon-pencil{fill:var(--chat-icon-color-pencil)}#vac-icon-checkmark,#vac-icon-double-checkmark{fill:var(--chat-icon-color-checkmark)}#vac-icon-checkmark-seen,#vac-icon-double-checkmark-seen{fill:var(--chat-icon-color-checkmark-seen)}#vac-icon-eye{fill:var(--chat-icon-color-eye)}#vac-icon-dropdown-message{fill:var(--chat-icon-color-dropdown-message)}#vac-icon-dropdown-room{fill:var(--chat-icon-color-dropdown-room)}#vac-icon-dropdown-scroll{fill:var(--chat-icon-color-dropdown-scroll)}#vac-icon-audio-play{fill:var(--chat-icon-color-audio-play)}#vac-icon-audio-pause{fill:var(--chat-icon-color-audio-pause)}.vac-progress-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-progress-wrapper circle{transition:stroke-dashoffset .35s;transform:rotate(-90deg);transform-origin:50% 50%}.vac-progress-wrapper .vac-progress-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:-1;margin-top:-2px;background-color:#000000b3;border-radius:50%}.vac-progress-wrapper .vac-progress-content .vac-progress-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:700;color:#fff}.vac-progress-wrapper .vac-progress-content .vac-progress-text .vac-progress-pourcent{font-size:9px;font-weight:400}\n';
const _sfc_main = {
name: "ChatContainer",
components: {
@@ -29549,13 +34933,7 @@ const _sfc_main = {
textFormatting: {
type: [Object, String],
default: () => ({
- disabled: false,
- italic: "_",
- bold: "*",
- strike: "~",
- underline: "\xB0",
- multilineCode: "```",
- inlineCode: "`"
+ disabled: false
})
},
linkOptions: {
@@ -29570,6 +34948,7 @@ const _sfc_main = {
roomMessage: { type: String, default: "" },
scrollDistance: { type: Number, default: 60 },
acceptedFiles: { type: String, default: "*" },
+ captureFiles: { type: String, default: "" },
templatesText: { type: [Array, String], default: () => [] },
mediaPreviewEnabled: { type: [Boolean, String], default: true },
usernameOptions: {
@@ -29809,10 +35188,10 @@ const _sfc_main = {
return val === "true" || val === true;
},
castArray(val) {
- return !val ? [] : Array.isArray(val) ? val : JSON.parse(val);
+ return !val ? [] : Array.isArray(val) ? val : typeof val === "object" ? [val] : JSON.parse(val);
},
castObject(val) {
- return !val ? {} : typeof val === "object" ? val : JSON.parse(val);
+ return typeof val === "object" ? val : !val ? {} : JSON.parse(val);
},
updateResponsive() {
this.isMobile = window.innerWidth < Number(this.responsiveBreakpoint);
@@ -29841,8 +35220,8 @@ const _sfc_main = {
searchRoom(val) {
this.$emit("search-room", { value: val, roomId: this.room.roomId });
},
- fetchMessages(options2) {
- this.$emit("fetch-messages", { room: this.room, options: options2 });
+ fetchMessages(options) {
+ this.$emit("fetch-messages", { room: this.room, options });
},
sendMessage(message) {
this.$emit("send-message", { ...message, roomId: this.room.roomId });
@@ -29992,6 +35371,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
"emojis-suggestion-enabled": $options.emojisSuggestionEnabledCasted,
"scroll-distance": $props.scrollDistance,
"accepted-files": $props.acceptedFiles,
+ "capture-files": $props.captureFiles,
"templates-text": $options.templatesTextCasted,
"username-options": $options.usernameOptionsCasted,
"emoji-data-source": $props.emojiDataSource,
@@ -30019,7 +35399,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
])
};
})
- ]), 1032, ["current-user-id", "rooms", "room-id", "load-first-room", "messages", "room-message", "messages-loaded", "menu-actions", "message-actions", "message-selection-actions", "auto-scroll", "show-send-icon", "show-files", "show-audio", "audio-bit-rate", "audio-sample-rate", "show-emojis", "show-reaction-emojis", "show-new-messages-divider", "show-footer", "text-messages", "single-room", "show-rooms-list", "text-formatting", "link-options", "is-mobile", "loading-rooms", "room-info-enabled", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "scroll-distance", "accepted-files", "templates-text", "username-options", "emoji-data-source", "onToggleRoomsList", "onRoomInfo", "onFetchMessages", "onSendMessage", "onEditMessage", "onDeleteMessage", "onOpenFile", "onOpenUserTag", "onOpenFailedMessage", "onMenuActionHandler", "onMessageActionHandler", "onMessageSelectionActionHandler", "onSendMessageReaction", "onTypingMessage", "onTextareaActionHandler"])
+ ]), 1032, ["current-user-id", "rooms", "room-id", "load-first-room", "messages", "room-message", "messages-loaded", "menu-actions", "message-actions", "message-selection-actions", "auto-scroll", "show-send-icon", "show-files", "show-audio", "audio-bit-rate", "audio-sample-rate", "show-emojis", "show-reaction-emojis", "show-new-messages-divider", "show-footer", "text-messages", "single-room", "show-rooms-list", "text-formatting", "link-options", "is-mobile", "loading-rooms", "room-info-enabled", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "scroll-distance", "accepted-files", "capture-files", "templates-text", "username-options", "emoji-data-source", "onToggleRoomsList", "onRoomInfo", "onFetchMessages", "onSendMessage", "onEditMessage", "onDeleteMessage", "onOpenFile", "onOpenUserTag", "onOpenFailedMessage", "onMenuActionHandler", "onMessageActionHandler", "onMessageSelectionActionHandler", "onSendMessageReaction", "onTypingMessage", "onTextareaActionHandler"])
]),
createVNode(Transition, {
name: "vac-fade-preview",
diff --git a/dist/vue-advanced-chat.umd.js b/dist/vue-advanced-chat.umd.js
index 50a10ce4..0bf78b05 100644
--- a/dist/vue-advanced-chat.umd.js
+++ b/dist/vue-advanced-chat.umd.js
@@ -1,19 +1,18 @@
-(function(va,mr){typeof exports=="object"&&typeof module!="undefined"?mr(exports):typeof define=="function"&&define.amd?define(["exports"],mr):(va=typeof globalThis!="undefined"?globalThis:va||self,mr(va["vue-advanced-chat"]={}))})(this,function(va){"use strict";function mr(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}const Mu=()=>{},Au=Object.assign,Eu=Object.prototype.hasOwnProperty,hn=(e,t)=>Eu.call(e,t),Ws=Array.isArray,vn=e=>xl(e)==="[object Map]",Tu=e=>typeof e=="function",ku=e=>typeof e=="string",Mi=e=>typeof e=="symbol",_n=e=>e!==null&&typeof e=="object",Ru=Object.prototype.toString,xl=e=>Ru.call(e),Ou=e=>xl(e).slice(8,-1),Ai=e=>ku(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wl=(e,t)=>!Object.is(e,t),Iu=(e,t,s)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:s})};let ks;class Cu{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&ks&&(this.parent=ks,this.index=(ks.scopes||(ks.scopes=[])).push(this)-1)}run(t){if(this.active){const s=ks;try{return ks=this,t()}finally{ks=s}}}on(){ks=this}off(){ks=this.parent}stop(t){if(this.active){let s,a;for(s=0,a=this.effects.length;s{const t=new Set(e);return t.w=0,t.n=0,t},Sl=e=>(e.w&Qs)>0,Ml=e=>(e.n&Qs)>0,Lu=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let s=0;for(let a=0;a{(l==="length"||l>=a)&&u.push(g)});else switch(s!==void 0&&u.push(o.get(s)),t){case"add":Ws(e)?Ai(s)&&u.push(o.get("length")):(u.push(o.get(_a)),vn(e)&&u.push(o.get(Ri)));break;case"delete":Ws(e)||(u.push(o.get(_a)),vn(e)&&u.push(o.get(Ri)));break;case"set":vn(e)&&u.push(o.get(_a));break}if(u.length===1)u[0]&&Ii(u[0]);else{const g=[];for(const l of u)l&&g.push(...l);Ii(Ei(g))}}function Ii(e,t){const s=Ws(e)?e:[...e];for(const a of s)a.computed&&kl(a);for(const a of s)a.computed||kl(a)}function kl(e,t){(e!==ys||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ju=mr("__proto__,__v_isRef,__isVue"),Rl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Mi)),Hu=Ci(),Fu=Ci(!1,!0),Pu=Ci(!0),Ol=Uu();function Uu(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...s){const a=mt(this);for(let r=0,o=this.length;r{e[t]=function(...s){za();const a=mt(this)[t].apply(this,s);return Ya(),a}}),e}function Ci(e=!1,t=!1){return function(a,n,r){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_isShallow")return t;if(n==="__v_raw"&&r===(e?t?sd:Pl:t?Fl:Hl).get(a))return a;const o=Ws(a);if(!e&&o&&hn(Ol,n))return Reflect.get(Ol,n,r);const u=Reflect.get(a,n,r);return(Mi(n)?Rl.has(n):ju(n))||(e||ns(a,"get",n),t)?u:Kt(u)?o&&Ai(n)?u:u.value:_n(u)?e?Ul(u):Ni(u):u}}const Du=Il(),qu=Il(!0);function Il(e=!1){return function(s,a,n,r){let o=s[a];if(vr(o)&&Kt(o)&&!Kt(n))return!1;if(!e&&!vr(n)&&(Hi(n)||(n=mt(n),o=mt(o)),!Ws(s)&&Kt(o)&&!Kt(n)))return o.value=n,!0;const u=Ws(s)&&Ai(a)?Number(a)e,pn=e=>Reflect.getPrototypeOf(e);function gn(e,t,s=!1,a=!1){e=e.__v_raw;const n=mt(e),r=mt(t);s||(t!==r&&ns(n,"get",t),ns(n,"get",r));const{has:o}=pn(n),u=a?Bi:s?Pi:Fi;if(o.call(n,t))return u(e.get(t));if(o.call(n,r))return u(e.get(r));e!==n&&e.get(t)}function bn(e,t=!1){const s=this.__v_raw,a=mt(s),n=mt(e);return t||(e!==n&&ns(a,"has",e),ns(a,"has",n)),e===n?s.has(e):s.has(e)||s.has(n)}function yn(e,t=!1){return e=e.__v_raw,!t&&ns(mt(e),"iterate",_a),Reflect.get(e,"size",e)}function Bl(e){e=mt(e);const t=mt(this);return pn(t).has.call(t,e)||(t.add(e),qs(t,"add",e,e)),this}function Ll(e,t){t=mt(t);const s=mt(this),{has:a,get:n}=pn(s);let r=a.call(s,e);r||(e=mt(e),r=a.call(s,e));const o=n.call(s,e);return s.set(e,t),r?wl(t,o)&&qs(s,"set",e,t):qs(s,"add",e,t),this}function Nl(e){const t=mt(this),{has:s,get:a}=pn(t);let n=s.call(t,e);n||(e=mt(e),n=s.call(t,e)),a&&a.call(t,e);const r=t.delete(e);return n&&qs(t,"delete",e,void 0),r}function jl(){const e=mt(this),t=e.size!==0,s=e.clear();return t&&qs(e,"clear",void 0,void 0),s}function xn(e,t){return function(a,n){const r=this,o=r.__v_raw,u=mt(o),g=t?Bi:e?Pi:Fi;return!e&&ns(u,"iterate",_a),o.forEach((l,p)=>a.call(n,g(l),g(p),r))}}function wn(e,t,s){return function(...a){const n=this.__v_raw,r=mt(n),o=vn(r),u=e==="entries"||e===Symbol.iterator&&o,g=e==="keys"&&o,l=n[e](...a),p=s?Bi:t?Pi:Fi;return!t&&ns(r,"iterate",g?Ri:_a),{next(){const{value:c,done:M}=l.next();return M?{value:c,done:M}:{value:u?[p(c[0]),p(c[1])]:p(c),done:M}},[Symbol.iterator](){return this}}}}function $s(e){return function(...t){return e==="delete"?!1:this}}function Gu(){const e={get(r){return gn(this,r)},get size(){return yn(this)},has:bn,add:Bl,set:Ll,delete:Nl,clear:jl,forEach:xn(!1,!1)},t={get(r){return gn(this,r,!1,!0)},get size(){return yn(this)},has:bn,add:Bl,set:Ll,delete:Nl,clear:jl,forEach:xn(!1,!0)},s={get(r){return gn(this,r,!0)},get size(){return yn(this,!0)},has(r){return bn.call(this,r,!0)},add:$s("add"),set:$s("set"),delete:$s("delete"),clear:$s("clear"),forEach:xn(!0,!1)},a={get(r){return gn(this,r,!0,!0)},get size(){return yn(this,!0)},has(r){return bn.call(this,r,!0)},add:$s("add"),set:$s("set"),delete:$s("delete"),clear:$s("clear"),forEach:xn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=wn(r,!1,!1),s[r]=wn(r,!0,!1),t[r]=wn(r,!1,!0),a[r]=wn(r,!0,!0)}),[e,s,t,a]}const[Zu,Wu,Qu,Ju]=Gu();function Li(e,t){const s=t?e?Ju:Qu:e?Wu:Zu;return(a,n,r)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?a:Reflect.get(hn(s,n)&&n in a?s:a,n,r)}const $u={get:Li(!1,!1)},ed={get:Li(!1,!0)},td={get:Li(!0,!1)},Hl=new WeakMap,Fl=new WeakMap,Pl=new WeakMap,sd=new WeakMap;function ad(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rd(e){return e.__v_skip||!Object.isExtensible(e)?0:ad(Ou(e))}function Ni(e){return vr(e)?e:ji(e,!1,Cl,$u,Hl)}function nd(e){return ji(e,!1,Ku,ed,Fl)}function Ul(e){return ji(e,!0,Xu,td,Pl)}function ji(e,t,s,a,n){if(!_n(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=n.get(e);if(r)return r;const o=rd(e);if(o===0)return e;const u=new Proxy(e,o===2?a:s);return n.set(e,u),u}function Xa(e){return vr(e)?Xa(e.__v_raw):!!(e&&e.__v_isReactive)}function vr(e){return!!(e&&e.__v_isReadonly)}function Hi(e){return!!(e&&e.__v_isShallow)}function Dl(e){return Xa(e)||vr(e)}function mt(e){const t=e&&e.__v_raw;return t?mt(t):e}function ql(e){return Iu(e,"__v_skip",!0),e}const Fi=e=>_n(e)?Ni(e):e,Pi=e=>_n(e)?Ul(e):e;function id(e){Js&&ys&&(e=mt(e),Tl(e.dep||(e.dep=Ei())))}function od(e,t){e=mt(e),e.dep&&Ii(e.dep)}function Kt(e){return!!(e&&e.__v_isRef===!0)}function ld(e){return Kt(e)?e.value:e}const cd={get:(e,t,s)=>ld(Reflect.get(e,t,s)),set:(e,t,s,a)=>{const n=e[t];return Kt(n)&&!Kt(s)?(n.value=s,!0):Reflect.set(e,t,s,a)}};function Vl(e){return Xa(e)?e:new Proxy(e,cd)}class ud{constructor(t,s,a,n){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Oi(t,()=>{this._dirty||(this._dirty=!0,od(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=a}get value(){const t=mt(this);return id(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function dd(e,t,s=!1){let a,n;const r=Tu(e);return r?(a=e,n=Mu):(a=e.get,n=e.set),new ud(a,n,r||!n,s)}function fd(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}function Et(e){if(lt(e)){const t={};for(let s=0;s{if(s){const a=s.split(hd);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function at(e){let t="";if(Gt(e))t=e;else if(lt(e))for(let s=0;sGt(e)?e:e==null?"":lt(e)||Zt(e)&&(e.toString===Zl||!nt(e.toString))?JSON.stringify(e,zl,2):String(e),zl=(e,t)=>t&&t.__v_isRef?zl(e,t.value):Xl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[a,n])=>(s[`${a} =>`]=n,s),{})}:Kl(t)?{[`Set(${t.size})`]:[...t.values()]}:Zt(t)&&!lt(t)&&!Wl(t)?String(t):t,xt={},Ka=[],Rs=()=>{},_d=()=>!1,pd=/^on[^a-z]/,Ui=e=>pd.test(e),Yl=e=>e.startsWith("onUpdate:"),is=Object.assign,Di=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},gd=Object.prototype.hasOwnProperty,ht=(e,t)=>gd.call(e,t),lt=Array.isArray,Xl=e=>qi(e)==="[object Map]",Kl=e=>qi(e)==="[object Set]",nt=e=>typeof e=="function",Gt=e=>typeof e=="string",Zt=e=>e!==null&&typeof e=="object",Gl=e=>Zt(e)&&nt(e.then)&&nt(e.catch),Zl=Object.prototype.toString,qi=e=>Zl.call(e),Wl=e=>qi(e)==="[object Object]",Sn=fd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mn=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},bd=/-(\w)/g,Os=Mn(e=>e.replace(bd,(t,s)=>s?s.toUpperCase():"")),yd=/\B([A-Z])/g,An=Mn(e=>e.replace(yd,"-$1").toLowerCase()),Vi=Mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),zi=Mn(e=>e?`on${Vi(e)}`:""),Ql=(e,t)=>!Object.is(e,t),Yi=(e,t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:s})},xd=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Jl;const wd=()=>Jl||(Jl=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function ea(e,t,s,a){let n;try{n=a?e(...a):e()}catch(r){En(r,t,s)}return n}function ms(e,t,s,a){if(nt(e)){const r=ea(e,t,s,a);return r&&Gl(r)&&r.catch(o=>{En(o,t,s)}),r}const n=[];for(let r=0;r>>1;br(os[a])Vs&&os.splice(t,1)}function a0(e,t,s,a){lt(e)?s.push(...e):(!t||!t.includes(e,e.allowRecurse?a+1:a))&&s.push(e),s0()}function Ed(e){a0(e,pr,_r,Ga)}function Td(e){a0(e,ta,gr,Za)}function kn(e,t=null){if(_r.length){for(Zi=t,pr=[...new Set(_r)],_r.length=0,Ga=0;Gabr(s)-br(a)),Za=0;Zae.id==null?1/0:e.id;function n0(e){Ki=!1,Tn=!0,kn(e),os.sort((s,a)=>br(s)-br(a));const t=Rs;try{for(Vs=0;VsA.trim())),c&&(n=s.map(xd))}let u,g=a[u=zi(t)]||a[u=zi(Os(t))];!g&&r&&(g=a[u=zi(An(t))]),g&&ms(g,e,6,n);const l=a[u+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,ms(l,e,6,n)}}function i0(e,t,s=!1){const a=t.emitsCache,n=a.get(e);if(n!==void 0)return n;const r=e.emits;let o={},u=!1;if(!nt(e)){const g=l=>{const p=i0(l,t,!0);p&&(u=!0,is(o,p))};!s&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}return!r&&!u?(a.set(e,null),null):(lt(r)?r.forEach(g=>o[g]=null):is(o,r),a.set(e,o),o)}function Rn(e,t){return!e||!Ui(t)?!1:(t=t.slice(2).replace(/Once$/,""),ht(e,t[0].toLowerCase()+t.slice(1))||ht(e,An(t))||ht(e,t))}let Dt=null,o0=null;function On(e){const t=Dt;return Dt=e,o0=e&&e.type.__scopeId||null,t}function Ge(e,t=Dt,s){if(!t||e._n)return e;const a=(...n)=>{a._d&&P0(-1);const r=On(t),o=e(...n);return On(r),a._d&&P0(1),o};return a._n=!0,a._c=!0,a._d=!0,a}function A4(){}function Wi(e){const{type:t,vnode:s,proxy:a,withProxy:n,props:r,propsOptions:[o],slots:u,attrs:g,emit:l,render:p,renderCache:c,data:M,setupState:A,ctx:i,inheritAttrs:H}=e;let B,N;const m=On(e);try{if(s.shapeFlag&4){const C=n||a;B=Is(p.call(C,C,c,r,A,M,i)),N=g}else{const C=t;B=Is(C.length>1?C(r,{attrs:g,slots:u,emit:l}):C(r,null)),N=t.props?g:Rd(g)}}catch(C){Sr.length=0,En(C,e,1),B=Ie(vs)}let R=B;if(N&&H!==!1){const C=Object.keys(N),{shapeFlag:T}=R;C.length&&T&7&&(o&&C.some(Yl)&&(N=Od(N,o)),R=sa(R,N))}return s.dirs&&(R=sa(R),R.dirs=R.dirs?R.dirs.concat(s.dirs):s.dirs),s.transition&&(R.transition=s.transition),B=R,On(m),B}const Rd=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ui(s))&&((t||(t={}))[s]=e[s]);return t},Od=(e,t)=>{const s={};for(const a in e)(!Yl(a)||!(a.slice(9)in t))&&(s[a]=e[a]);return s};function Id(e,t,s){const{props:a,children:n,component:r}=e,{props:o,children:u,patchFlag:g}=t,l=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&g>=0){if(g&1024)return!0;if(g&16)return a?l0(a,o,l):!!o;if(g&8){const p=t.dynamicProps;for(let c=0;ce.__isSuspense;function Ld(e,t){t&&t.pendingBranch?lt(e)?t.effects.push(...e):t.effects.push(e):Td(e)}function Nd(e,t){if(Ft){let s=Ft.provides;const a=Ft.parent&&Ft.parent.provides;a===s&&(s=Ft.provides=Object.create(a)),s[e]=t}}function Qi(e,t,s=!1){const a=Ft||Dt;if(a){const n=a.parent==null?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return s&&nt(t)?t.call(a.proxy):t}}const c0={};function Ji(e,t,s){return u0(e,t,s)}function u0(e,t,{immediate:s,deep:a,flush:n,onTrack:r,onTrigger:o}=xt){const u=Ft;let g,l=!1,p=!1;if(Kt(e)?(g=()=>e.value,l=Hi(e)):Xa(e)?(g=()=>e,a=!0):lt(e)?(p=!0,l=e.some(N=>Xa(N)||Hi(N)),g=()=>e.map(N=>{if(Kt(N))return N.value;if(Xa(N))return pa(N);if(nt(N))return ea(N,u,2)})):nt(e)?t?g=()=>ea(e,u,2):g=()=>{if(!(u&&u.isUnmounted))return c&&c(),ms(e,u,3,[M])}:g=Rs,t&&a){const N=g;g=()=>pa(N())}let c,M=N=>{c=B.onStop=()=>{ea(N,u,4)}};if(Ar)return M=Rs,t?s&&ms(t,u,3,[g(),p?[]:void 0,M]):g(),Rs;let A=p?[]:c0;const i=()=>{if(!!B.active)if(t){const N=B.run();(a||l||(p?N.some((m,R)=>Ql(m,A[R])):Ql(N,A)))&&(c&&c(),ms(t,u,3,[N,A===c0?void 0:A,M]),A=N)}else B.run()};i.allowRecurse=!!t;let H;n==="sync"?H=i:n==="post"?H=()=>Jt(i,u&&u.suspense):H=()=>Ed(i);const B=new Oi(g,H);return t?s?i():A=B.run():n==="post"?Jt(B.run.bind(B),u&&u.suspense):B.run(),()=>{B.stop(),u&&u.scope&&Di(u.scope.effects,B)}}function jd(e,t,s){const a=this.proxy,n=Gt(e)?e.includes(".")?d0(a,e):()=>a[e]:e.bind(a,a);let r;nt(t)?r=t:(r=t.handler,s=t);const o=Ft;Wa(this);const u=u0(n,r.bind(a),s);return o?Wa(o):wa(),u}function d0(e,t){const s=t.split(".");return()=>{let a=e;for(let n=0;n{pa(s,t)});else if(Wl(e))for(const s in e)pa(e[s],t);return e}function f0(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return p0(()=>{e.isMounted=!0}),b0(()=>{e.isUnmounting=!0}),e}const hs=[Function,Array],m0={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hs,onEnter:hs,onAfterEnter:hs,onEnterCancelled:hs,onBeforeLeave:hs,onLeave:hs,onAfterLeave:hs,onLeaveCancelled:hs,onBeforeAppear:hs,onAppear:hs,onAfterAppear:hs,onAppearCancelled:hs},setup(e,{slots:t}){const s=q0(),a=f0();let n;return()=>{const r=t.default&&eo(t.default(),!0);if(!r||!r.length)return;let o=r[0];if(r.length>1){for(const H of r)if(H.type!==vs){o=H;break}}const u=mt(e),{mode:g}=u;if(a.isLeaving)return $i(o);const l=v0(o);if(!l)return $i(o);const p=yr(l,u,a,s);xr(l,p);const c=s.subTree,M=c&&v0(c);let A=!1;const{getTransitionKey:i}=l.type;if(i){const H=i();n===void 0?n=H:H!==n&&(n=H,A=!0)}if(M&&M.type!==vs&&(!xa(l,M)||A)){const H=yr(M,u,a,s);if(xr(M,H),g==="out-in")return a.isLeaving=!0,H.afterLeave=()=>{a.isLeaving=!1,s.update()},$i(o);g==="in-out"&&l.type!==vs&&(H.delayLeave=(B,N,m)=>{const R=h0(a,M);R[String(M.key)]=M,B._leaveCb=()=>{N(),B._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=m})}return o}}};function h0(e,t){const{leavingVNodes:s}=e;let a=s.get(t.type);return a||(a=Object.create(null),s.set(t.type,a)),a}function yr(e,t,s,a){const{appear:n,mode:r,persisted:o=!1,onBeforeEnter:u,onEnter:g,onAfterEnter:l,onEnterCancelled:p,onBeforeLeave:c,onLeave:M,onAfterLeave:A,onLeaveCancelled:i,onBeforeAppear:H,onAppear:B,onAfterAppear:N,onAppearCancelled:m}=t,R=String(e.key),C=h0(s,e),T=(E,w)=>{E&&ms(E,a,9,w)},L=(E,w)=>{const h=w[1];T(E,w),lt(E)?E.every(b=>b.length<=1)&&h():E.length<=1&&h()},f={mode:r,persisted:o,beforeEnter(E){let w=u;if(!s.isMounted)if(n)w=H||u;else return;E._leaveCb&&E._leaveCb(!0);const h=C[R];h&&xa(e,h)&&h.el._leaveCb&&h.el._leaveCb(),T(w,[E])},enter(E){let w=g,h=l,b=p;if(!s.isMounted)if(n)w=B||g,h=N||l,b=m||p;else return;let _=!1;const v=E._enterCb=x=>{_||(_=!0,x?T(b,[E]):T(h,[E]),f.delayedLeave&&f.delayedLeave(),E._enterCb=void 0)};w?L(w,[E,v]):v()},leave(E,w){const h=String(e.key);if(E._enterCb&&E._enterCb(!0),s.isUnmounting)return w();T(c,[E]);let b=!1;const _=E._leaveCb=v=>{b||(b=!0,w(),v?T(i,[E]):T(A,[E]),E._leaveCb=void 0,C[h]===e&&delete C[h])};C[h]=e,M?L(M,[E,_]):_()},clone(E){return yr(E,t,s,a)}};return f}function $i(e){if(In(e))return e=sa(e),e.children=null,e}function v0(e){return In(e)?e.children?e.children[0]:void 0:e}function xr(e,t){e.shapeFlag&6&&e.component?xr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function eo(e,t=!1,s){let a=[],n=0;for(let r=0;r1)for(let r=0;r!!e.type.__asyncLoader,In=e=>e.type.__isKeepAlive;function Fd(e,t){_0(e,"a",t)}function Pd(e,t){_0(e,"da",t)}function _0(e,t,s=Ft){const a=e.__wdc||(e.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Cn(t,a,s),s){let n=s.parent;for(;n&&n.parent;)In(n.parent.vnode)&&Ud(a,t,s,n),n=n.parent}}function Ud(e,t,s,a){const n=Cn(t,e,a,!0);y0(()=>{Di(a[t],n)},s)}function Cn(e,t,s=Ft,a=!1){if(s){const n=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...o)=>{if(s.isUnmounted)return;za(),Wa(s);const u=ms(t,s,e,o);return wa(),Ya(),u});return a?n.unshift(r):n.push(r),r}}const zs=e=>(t,s=Ft)=>(!Ar||e==="sp")&&Cn(e,t,s),Dd=zs("bm"),p0=zs("m"),qd=zs("bu"),g0=zs("u"),b0=zs("bum"),y0=zs("um"),Vd=zs("sp"),zd=zs("rtg"),Yd=zs("rtc");function Xd(e,t=Ft){Cn("ec",e,t)}function Ys(e,t){const s=Dt;if(s===null)return e;const a=Pn(s)||s.proxy,n=e.dirs||(e.dirs=[]);for(let r=0;rt(o,u,void 0,r&&r[u]));else{const o=Object.keys(e);n=new Array(o.length);for(let u=0,g=o.length;ujn(t)?!(t.type===vs||t.type===ut&&!S0(t.children)):!0)?e:null}const ao=e=>e?V0(e)?Pn(e)||e.proxy:ao(e.parent):null,Ln=is(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ao(e.parent),$root:e=>ao(e.root),$emit:e=>e.emit,$options:e=>E0(e),$forceUpdate:e=>e.f||(e.f=()=>t0(e.update)),$nextTick:e=>e.n||(e.n=e0.bind(e.proxy)),$watch:e=>jd.bind(e)}),Zd={get({_:e},t){const{ctx:s,setupState:a,data:n,props:r,accessCache:o,type:u,appContext:g}=e;let l;if(t[0]!=="$"){const A=o[t];if(A!==void 0)switch(A){case 1:return a[t];case 2:return n[t];case 4:return s[t];case 3:return r[t]}else{if(a!==xt&&ht(a,t))return o[t]=1,a[t];if(n!==xt&&ht(n,t))return o[t]=2,n[t];if((l=e.propsOptions[0])&&ht(l,t))return o[t]=3,r[t];if(s!==xt&&ht(s,t))return o[t]=4,s[t];ro&&(o[t]=0)}}const p=Ln[t];let c,M;if(p)return t==="$attrs"&&ns(e,"get",t),p(e);if((c=u.__cssModules)&&(c=c[t]))return c;if(s!==xt&&ht(s,t))return o[t]=4,s[t];if(M=g.config.globalProperties,ht(M,t))return M[t]},set({_:e},t,s){const{data:a,setupState:n,ctx:r}=e;return n!==xt&&ht(n,t)?(n[t]=s,!0):a!==xt&&ht(a,t)?(a[t]=s,!0):ht(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:a,appContext:n,propsOptions:r}},o){let u;return!!s[o]||e!==xt&&ht(e,o)||t!==xt&&ht(t,o)||(u=r[0])&&ht(u,o)||ht(a,o)||ht(Ln,o)||ht(n.config.globalProperties,o)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ht(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};let ro=!0;function Wd(e){const t=E0(e),s=e.proxy,a=e.ctx;ro=!1,t.beforeCreate&&M0(t.beforeCreate,e,"bc");const{data:n,computed:r,methods:o,watch:u,provide:g,inject:l,created:p,beforeMount:c,mounted:M,beforeUpdate:A,updated:i,activated:H,deactivated:B,beforeDestroy:N,beforeUnmount:m,destroyed:R,unmounted:C,render:T,renderTracked:L,renderTriggered:f,errorCaptured:E,serverPrefetch:w,expose:h,inheritAttrs:b,components:_,directives:v,filters:x}=t;if(l&&Qd(l,a,null,e.appContext.config.unwrapInjectedRef),o)for(const X in o){const P=o[X];nt(P)&&(a[X]=P.bind(s))}if(n){const X=n.call(s,s);Zt(X)&&(e.data=Ni(X))}if(ro=!0,r)for(const X in r){const P=r[X],V=nt(P)?P.bind(s,s):nt(P.get)?P.get.bind(s,s):Rs,d=!nt(P)&&nt(P.set)?P.set.bind(s):Rs,S=Mf({get:V,set:d});Object.defineProperty(a,X,{enumerable:!0,configurable:!0,get:()=>S.value,set:Z=>S.value=Z})}if(u)for(const X in u)A0(u[X],a,s,X);if(g){const X=nt(g)?g.call(s):g;Reflect.ownKeys(X).forEach(P=>{Nd(P,X[P])})}p&&M0(p,e,"c");function j(X,P){lt(P)?P.forEach(V=>X(V.bind(s))):P&&X(P.bind(s))}if(j(Dd,c),j(p0,M),j(qd,A),j(g0,i),j(Fd,H),j(Pd,B),j(Xd,E),j(Yd,L),j(zd,f),j(b0,m),j(y0,C),j(Vd,w),lt(h))if(h.length){const X=e.exposed||(e.exposed={});h.forEach(P=>{Object.defineProperty(X,P,{get:()=>s[P],set:V=>s[P]=V})})}else e.exposed||(e.exposed={});T&&e.render===Rs&&(e.render=T),b!=null&&(e.inheritAttrs=b),_&&(e.components=_),v&&(e.directives=v)}function Qd(e,t,s=Rs,a=!1){lt(e)&&(e=no(e));for(const n in e){const r=e[n];let o;Zt(r)?"default"in r?o=Qi(r.from||n,r.default,!0):o=Qi(r.from||n):o=Qi(r),Kt(o)&&a?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:u=>o.value=u}):t[n]=o}}function M0(e,t,s){ms(lt(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,s)}function A0(e,t,s,a){const n=a.includes(".")?d0(s,a):()=>s[a];if(Gt(e)){const r=t[e];nt(r)&&Ji(n,r)}else if(nt(e))Ji(n,e.bind(s));else if(Zt(e))if(lt(e))e.forEach(r=>A0(r,t,s,a));else{const r=nt(e.handler)?e.handler.bind(s):t[e.handler];nt(r)&&Ji(n,r,e)}}function E0(e){const t=e.type,{mixins:s,extends:a}=t,{mixins:n,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,u=r.get(t);let g;return u?g=u:!n.length&&!s&&!a?g=t:(g={},n.length&&n.forEach(l=>Nn(g,l,o,!0)),Nn(g,t,o)),r.set(t,g),g}function Nn(e,t,s,a=!1){const{mixins:n,extends:r}=t;r&&Nn(e,r,s,!0),n&&n.forEach(o=>Nn(e,o,s,!0));for(const o in t)if(!(a&&o==="expose")){const u=Jd[o]||s&&s[o];e[o]=u?u(e[o],t[o]):t[o]}return e}const Jd={data:T0,props:ba,emits:ba,methods:ba,computed:ba,beforeCreate:Wt,created:Wt,beforeMount:Wt,mounted:Wt,beforeUpdate:Wt,updated:Wt,beforeDestroy:Wt,beforeUnmount:Wt,destroyed:Wt,unmounted:Wt,activated:Wt,deactivated:Wt,errorCaptured:Wt,serverPrefetch:Wt,components:ba,directives:ba,watch:ef,provide:T0,inject:$d};function T0(e,t){return t?e?function(){return is(nt(e)?e.call(this,this):e,nt(t)?t.call(this,this):t)}:t:e}function $d(e,t){return ba(no(e),no(t))}function no(e){if(lt(e)){const t={};for(let s=0;s0)&&!(o&16)){if(o&8){const p=e.vnode.dynamicProps;for(let c=0;c{g=!0;const[M,A]=R0(c,t,!0);is(o,M),A&&u.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!r&&!g)return a.set(e,Ka),Ka;if(lt(r))for(let p=0;p-1,A[1]=H<0||i-1||ht(A,"default"))&&u.push(c)}}}const l=[o,u];return a.set(e,l),l}function O0(e){return e[0]!=="$"}function I0(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function C0(e,t){return I0(e)===I0(t)}function B0(e,t){return lt(t)?t.findIndex(s=>C0(s,e)):nt(t)&&C0(t,e)?0:-1}const L0=e=>e[0]==="_"||e==="$stable",oo=e=>lt(e)?e.map(Is):[Is(e)],af=(e,t,s)=>{if(t._n)return t;const a=Ge((...n)=>oo(t(...n)),s);return a._c=!1,a},N0=(e,t,s)=>{const a=e._ctx;for(const n in e){if(L0(n))continue;const r=e[n];if(nt(r))t[n]=af(n,r,a);else if(r!=null){const o=oo(r);t[n]=()=>o}}},j0=(e,t)=>{const s=oo(t);e.slots.default=()=>s},rf=(e,t)=>{if(e.vnode.shapeFlag&32){const s=t._;s?(e.slots=mt(t),Xi(t,"_",s)):N0(t,e.slots={})}else e.slots={},t&&j0(e,t);Xi(e.slots,Hn,1)},nf=(e,t,s)=>{const{vnode:a,slots:n}=e;let r=!0,o=xt;if(a.shapeFlag&32){const u=t._;u?s&&u===1?r=!1:(is(n,t),!s&&u===1&&delete n._):(r=!t.$stable,N0(t,n)),o=t}else t&&(j0(e,t),o={default:1});if(r)for(const u in n)!L0(u)&&!(u in o)&&delete n[u]};function H0(){return{app:null,config:{isNativeTag:_d,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let of=0;function lf(e,t){return function(a,n=null){nt(a)||(a=Object.assign({},a)),n!=null&&!Zt(n)&&(n=null);const r=H0(),o=new Set;let u=!1;const g=r.app={_uid:of++,_component:a,_props:n,_container:null,_context:r,_instance:null,version:Ef,get config(){return r.config},set config(l){},use(l,...p){return o.has(l)||(l&&nt(l.install)?(o.add(l),l.install(g,...p)):nt(l)&&(o.add(l),l(g,...p))),g},mixin(l){return r.mixins.includes(l)||r.mixins.push(l),g},component(l,p){return p?(r.components[l]=p,g):r.components[l]},directive(l,p){return p?(r.directives[l]=p,g):r.directives[l]},mount(l,p,c){if(!u){const M=Ie(a,n);return M.appContext=r,p&&t?t(M,l):e(M,l,c),u=!0,g._container=l,l.__vue_app__=g,Pn(M.component)||M.component.proxy}},unmount(){u&&(e(null,g._container),delete g._container.__vue_app__)},provide(l,p){return r.provides[l]=p,g}};return g}}function lo(e,t,s,a,n=!1){if(lt(e)){e.forEach((M,A)=>lo(M,t&&(lt(t)?t[A]:t),s,a,n));return}if(wr(a)&&!n)return;const r=a.shapeFlag&4?Pn(a.component)||a.component.proxy:a.el,o=n?null:r,{i:u,r:g}=e,l=t&&t.r,p=u.refs===xt?u.refs={}:u.refs,c=u.setupState;if(l!=null&&l!==g&&(Gt(l)?(p[l]=null,ht(c,l)&&(c[l]=null)):Kt(l)&&(l.value=null)),nt(g))ea(g,u,12,[o,p]);else{const M=Gt(g),A=Kt(g);if(M||A){const i=()=>{if(e.f){const H=M?p[g]:g.value;n?lt(H)&&Di(H,r):lt(H)?H.includes(r)||H.push(r):M?(p[g]=[r],ht(c,g)&&(c[g]=p[g])):(g.value=[r],e.k&&(p[e.k]=g.value))}else M?(p[g]=o,ht(c,g)&&(c[g]=o)):A&&(g.value=o,e.k&&(p[e.k]=o))};o?(i.id=-1,Jt(i,s)):i()}}}const Jt=Ld;function cf(e){return uf(e)}function uf(e,t){const s=wd();s.__VUE__=!0;const{insert:a,remove:n,patchProp:r,createElement:o,createText:u,createComment:g,setText:l,setElementText:p,parentNode:c,nextSibling:M,setScopeId:A=Rs,cloneNode:i,insertStaticContent:H}=e,B=(U,z,te,le=null,ue=null,xe=null,Ee=!1,be=null,Se=!!z.dynamicChildren)=>{if(U===z)return;U&&!xa(U,z)&&(le=Ue(U),W(U,ue,xe,!0),U=null),z.patchFlag===-2&&(Se=!1,z.dynamicChildren=null);const{type:me,ref:Fe,shapeFlag:Ne}=z;switch(me){case co:N(U,z,te,le);break;case vs:m(U,z,te,le);break;case uo:U==null&&R(z,te,le,Ee);break;case ut:v(U,z,te,le,ue,xe,Ee,be,Se);break;default:Ne&1?L(U,z,te,le,ue,xe,Ee,be,Se):Ne&6?x(U,z,te,le,ue,xe,Ee,be,Se):(Ne&64||Ne&128)&&me.process(U,z,te,le,ue,xe,Ee,be,Se,fe)}Fe!=null&&ue&&lo(Fe,U&&U.ref,xe,z||U,!z)},N=(U,z,te,le)=>{if(U==null)a(z.el=u(z.children),te,le);else{const ue=z.el=U.el;z.children!==U.children&&l(ue,z.children)}},m=(U,z,te,le)=>{U==null?a(z.el=g(z.children||""),te,le):z.el=U.el},R=(U,z,te,le)=>{[U.el,U.anchor]=H(U.children,z,te,le,U.el,U.anchor)},C=({el:U,anchor:z},te,le)=>{let ue;for(;U&&U!==z;)ue=M(U),a(U,te,le),U=ue;a(z,te,le)},T=({el:U,anchor:z})=>{let te;for(;U&&U!==z;)te=M(U),n(U),U=te;n(z)},L=(U,z,te,le,ue,xe,Ee,be,Se)=>{Ee=Ee||z.type==="svg",U==null?f(z,te,le,ue,xe,Ee,be,Se):h(U,z,ue,xe,Ee,be,Se)},f=(U,z,te,le,ue,xe,Ee,be)=>{let Se,me;const{type:Fe,props:Ne,shapeFlag:Pe,transition:De,patchFlag:Ze,dirs:ce}=U;if(U.el&&i!==void 0&&Ze===-1)Se=U.el=i(U.el);else{if(Se=U.el=o(U.type,xe,Ne&&Ne.is,Ne),Pe&8?p(Se,U.children):Pe&16&&w(U.children,Se,null,le,ue,xe&&Fe!=="foreignObject",Ee,be),ce&&ga(U,null,le,"created"),Ne){for(const $ in Ne)$!=="value"&&!Sn($)&&r(Se,$,null,Ne[$],xe,U.children,le,ue,he);"value"in Ne&&r(Se,"value",null,Ne.value),(me=Ne.onVnodeBeforeMount)&&Cs(me,le,U)}E(Se,U,U.scopeId,Ee,le)}ce&&ga(U,null,le,"beforeMount");const ye=(!ue||ue&&!ue.pendingBranch)&&De&&!De.persisted;ye&&De.beforeEnter(Se),a(Se,z,te),((me=Ne&&Ne.onVnodeMounted)||ye||ce)&&Jt(()=>{me&&Cs(me,le,U),ye&&De.enter(Se),ce&&ga(U,null,le,"mounted")},ue)},E=(U,z,te,le,ue)=>{if(te&&A(U,te),le)for(let xe=0;xe{for(let me=Se;me{const be=z.el=U.el;let{patchFlag:Se,dynamicChildren:me,dirs:Fe}=z;Se|=U.patchFlag&16;const Ne=U.props||xt,Pe=z.props||xt;let De;te&&ya(te,!1),(De=Pe.onVnodeBeforeUpdate)&&Cs(De,te,z,U),Fe&&ga(z,U,te,"beforeUpdate"),te&&ya(te,!0);const Ze=ue&&z.type!=="foreignObject";if(me?b(U.dynamicChildren,me,be,te,le,Ze,xe):Ee||V(U,z,be,null,te,le,Ze,xe,!1),Se>0){if(Se&16)_(be,z,Ne,Pe,te,le,ue);else if(Se&2&&Ne.class!==Pe.class&&r(be,"class",null,Pe.class,ue),Se&4&&r(be,"style",Ne.style,Pe.style,ue),Se&8){const ce=z.dynamicProps;for(let ye=0;ye{De&&Cs(De,te,z,U),Fe&&ga(z,U,te,"updated")},le)},b=(U,z,te,le,ue,xe,Ee)=>{for(let be=0;be{if(te!==le){for(const be in le){if(Sn(be))continue;const Se=le[be],me=te[be];Se!==me&&be!=="value"&&r(U,be,me,Se,Ee,z.children,ue,xe,he)}if(te!==xt)for(const be in te)!Sn(be)&&!(be in le)&&r(U,be,te[be],null,Ee,z.children,ue,xe,he);"value"in le&&r(U,"value",te.value,le.value)}},v=(U,z,te,le,ue,xe,Ee,be,Se)=>{const me=z.el=U?U.el:u(""),Fe=z.anchor=U?U.anchor:u("");let{patchFlag:Ne,dynamicChildren:Pe,slotScopeIds:De}=z;De&&(be=be?be.concat(De):De),U==null?(a(me,te,le),a(Fe,te,le),w(z.children,te,Fe,ue,xe,Ee,be,Se)):Ne>0&&Ne&64&&Pe&&U.dynamicChildren?(b(U.dynamicChildren,Pe,te,ue,xe,Ee,be),(z.key!=null||ue&&z===ue.subTree)&&F0(U,z,!0)):V(U,z,te,Fe,ue,xe,Ee,be,Se)},x=(U,z,te,le,ue,xe,Ee,be,Se)=>{z.slotScopeIds=be,U==null?z.shapeFlag&512?ue.ctx.activate(z,te,le,Ee,Se):y(z,te,le,ue,xe,Ee,Se):j(U,z,Se)},y=(U,z,te,le,ue,xe,Ee)=>{const be=U.component=pf(U,le,ue);if(In(U)&&(be.ctx.renderer=fe),gf(be),be.asyncDep){if(ue&&ue.registerDep(be,X),!U.el){const Se=be.subTree=Ie(vs);m(null,Se,z,te)}return}X(be,U,z,te,ue,xe,Ee)},j=(U,z,te)=>{const le=z.component=U.component;if(Id(U,z,te))if(le.asyncDep&&!le.asyncResolved){P(le,z,te);return}else le.next=z,Ad(le.update),le.update();else z.el=U.el,le.vnode=z},X=(U,z,te,le,ue,xe,Ee)=>{const be=()=>{if(U.isMounted){let{next:Fe,bu:Ne,u:Pe,parent:De,vnode:Ze}=U,ce=Fe,ye;ya(U,!1),Fe?(Fe.el=Ze.el,P(U,Fe,Ee)):Fe=Ze,Ne&&Yi(Ne),(ye=Fe.props&&Fe.props.onVnodeBeforeUpdate)&&Cs(ye,De,Fe,Ze),ya(U,!0);const $=Wi(U),Ce=U.subTree;U.subTree=$,B(Ce,$,c(Ce.el),Ue(Ce),U,ue,xe),Fe.el=$.el,ce===null&&Cd(U,$.el),Pe&&Jt(Pe,ue),(ye=Fe.props&&Fe.props.onVnodeUpdated)&&Jt(()=>Cs(ye,De,Fe,Ze),ue)}else{let Fe;const{el:Ne,props:Pe}=z,{bm:De,m:Ze,parent:ce}=U,ye=wr(z);if(ya(U,!1),De&&Yi(De),!ye&&(Fe=Pe&&Pe.onVnodeBeforeMount)&&Cs(Fe,ce,z),ya(U,!0),Ne&&it){const $=()=>{U.subTree=Wi(U),it(Ne,U.subTree,U,ue,null)};ye?z.type.__asyncLoader().then(()=>!U.isUnmounted&&$()):$()}else{const $=U.subTree=Wi(U);B(null,$,te,le,U,ue,xe),z.el=$.el}if(Ze&&Jt(Ze,ue),!ye&&(Fe=Pe&&Pe.onVnodeMounted)){const $=z;Jt(()=>Cs(Fe,ce,$),ue)}(z.shapeFlag&256||ce&&wr(ce.vnode)&&ce.vnode.shapeFlag&256)&&U.a&&Jt(U.a,ue),U.isMounted=!0,z=te=le=null}},Se=U.effect=new Oi(be,()=>t0(me),U.scope),me=U.update=()=>Se.run();me.id=U.uid,ya(U,!0),me()},P=(U,z,te)=>{z.component=U;const le=U.vnode.props;U.vnode=z,U.next=null,sf(U,z.props,le,te),nf(U,z.children,te),za(),kn(void 0,U.update),Ya()},V=(U,z,te,le,ue,xe,Ee,be,Se=!1)=>{const me=U&&U.children,Fe=U?U.shapeFlag:0,Ne=z.children,{patchFlag:Pe,shapeFlag:De}=z;if(Pe>0){if(Pe&128){S(me,Ne,te,le,ue,xe,Ee,be,Se);return}else if(Pe&256){d(me,Ne,te,le,ue,xe,Ee,be,Se);return}}De&8?(Fe&16&&he(me,ue,xe),Ne!==me&&p(te,Ne)):Fe&16?De&16?S(me,Ne,te,le,ue,xe,Ee,be,Se):he(me,ue,xe,!0):(Fe&8&&p(te,""),De&16&&w(Ne,te,le,ue,xe,Ee,be,Se))},d=(U,z,te,le,ue,xe,Ee,be,Se)=>{U=U||Ka,z=z||Ka;const me=U.length,Fe=z.length,Ne=Math.min(me,Fe);let Pe;for(Pe=0;PeFe?he(U,ue,xe,!0,!1,Ne):w(z,te,le,ue,xe,Ee,be,Se,Ne)},S=(U,z,te,le,ue,xe,Ee,be,Se)=>{let me=0;const Fe=z.length;let Ne=U.length-1,Pe=Fe-1;for(;me<=Ne&&me<=Pe;){const De=U[me],Ze=z[me]=Se?ra(z[me]):Is(z[me]);if(xa(De,Ze))B(De,Ze,te,null,ue,xe,Ee,be,Se);else break;me++}for(;me<=Ne&&me<=Pe;){const De=U[Ne],Ze=z[Pe]=Se?ra(z[Pe]):Is(z[Pe]);if(xa(De,Ze))B(De,Ze,te,null,ue,xe,Ee,be,Se);else break;Ne--,Pe--}if(me>Ne){if(me<=Pe){const De=Pe+1,Ze=DePe)for(;me<=Ne;)W(U[me],ue,xe,!0),me++;else{const De=me,Ze=me,ce=new Map;for(me=Ze;me<=Pe;me++){const Y=z[me]=Se?ra(z[me]):Is(z[me]);Y.key!=null&&ce.set(Y.key,me)}let ye,$=0;const Ce=Pe-Ze+1;let k=!1,I=0;const D=new Array(Ce);for(me=0;me=Ce){W(Y,ue,xe,!0);continue}let F;if(Y.key!=null)F=ce.get(Y.key);else for(ye=Ze;ye<=Pe;ye++)if(D[ye-Ze]===0&&xa(Y,z[ye])){F=ye;break}F===void 0?W(Y,ue,xe,!0):(D[F-Ze]=me+1,F>=I?I=F:k=!0,B(Y,z[F],te,null,ue,xe,Ee,be,Se),$++)}const q=k?df(D):Ka;for(ye=q.length-1,me=Ce-1;me>=0;me--){const Y=Ze+me,F=z[Y],G=Y+1{const{el:xe,type:Ee,transition:be,children:Se,shapeFlag:me}=U;if(me&6){Z(U.component.subTree,z,te,le);return}if(me&128){U.suspense.move(z,te,le);return}if(me&64){Ee.move(U,z,te,fe);return}if(Ee===ut){a(xe,z,te);for(let Ne=0;Nebe.enter(xe),ue);else{const{leave:Ne,delayLeave:Pe,afterLeave:De}=be,Ze=()=>a(xe,z,te),ce=()=>{Ne(xe,()=>{Ze(),De&&De()})};Pe?Pe(xe,Ze,ce):ce()}else a(xe,z,te)},W=(U,z,te,le=!1,ue=!1)=>{const{type:xe,props:Ee,ref:be,children:Se,dynamicChildren:me,shapeFlag:Fe,patchFlag:Ne,dirs:Pe}=U;if(be!=null&&lo(be,null,te,U,!0),Fe&256){z.ctx.deactivate(U);return}const De=Fe&1&&Pe,Ze=!wr(U);let ce;if(Ze&&(ce=Ee&&Ee.onVnodeBeforeUnmount)&&Cs(ce,z,U),Fe&6)Ae(U.component,te,le);else{if(Fe&128){U.suspense.unmount(te,le);return}De&&ga(U,null,z,"beforeUnmount"),Fe&64?U.type.remove(U,z,te,ue,fe,le):me&&(xe!==ut||Ne>0&&Ne&64)?he(me,z,te,!1,!0):(xe===ut&&Ne&384||!ue&&Fe&16)&&he(Se,z,te),le&&de(U)}(Ze&&(ce=Ee&&Ee.onVnodeUnmounted)||De)&&Jt(()=>{ce&&Cs(ce,z,U),De&&ga(U,null,z,"unmounted")},te)},de=U=>{const{type:z,el:te,anchor:le,transition:ue}=U;if(z===ut){Me(te,le);return}if(z===uo){T(U);return}const xe=()=>{n(te),ue&&!ue.persisted&&ue.afterLeave&&ue.afterLeave()};if(U.shapeFlag&1&&ue&&!ue.persisted){const{leave:Ee,delayLeave:be}=ue,Se=()=>Ee(te,xe);be?be(U.el,xe,Se):Se()}else xe()},Me=(U,z)=>{let te;for(;U!==z;)te=M(U),n(U),U=te;n(z)},Ae=(U,z,te)=>{const{bum:le,scope:ue,update:xe,subTree:Ee,um:be}=U;le&&Yi(le),ue.stop(),xe&&(xe.active=!1,W(Ee,U,z,te)),be&&Jt(be,z),Jt(()=>{U.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},he=(U,z,te,le=!1,ue=!1,xe=0)=>{for(let Ee=xe;EeU.shapeFlag&6?Ue(U.component.subTree):U.shapeFlag&128?U.suspense.next():M(U.anchor||U.el),Le=(U,z,te)=>{U==null?z._vnode&&W(z._vnode,null,null,!0):B(z._vnode||null,U,z,null,null,null,te),r0(),z._vnode=U},fe={p:B,um:W,m:Z,r:de,mt:y,mc:w,pc:V,pbc:b,n:Ue,o:e};let Ke,it;return t&&([Ke,it]=t(fe)),{render:Le,hydrate:Ke,createApp:lf(Le,Ke)}}function ya({effect:e,update:t},s){e.allowRecurse=t.allowRecurse=s}function F0(e,t,s=!1){const a=e.children,n=t.children;if(lt(a)&<(n))for(let r=0;r>1,e[s[u]]0&&(t[a]=s[r-1]),s[r]=a)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=t[o];return s}const ff=e=>e.__isTeleport,ut=Symbol(void 0),co=Symbol(void 0),vs=Symbol(void 0),uo=Symbol(void 0),Sr=[];let xs=null;function Q(e=!1){Sr.push(xs=e?null:[])}function mf(){Sr.pop(),xs=Sr[Sr.length-1]||null}let Mr=1;function P0(e){Mr+=e}function U0(e){return e.dynamicChildren=Mr>0?xs||Ka:null,mf(),Mr>0&&xs&&xs.push(e),e}function ne(e,t,s,a,n,r){return U0(ge(e,t,s,a,n,r,!0))}function vt(e,t,s,a,n){return U0(Ie(e,t,s,a,n,!0))}function jn(e){return e?e.__v_isVNode===!0:!1}function xa(e,t){return e.type===t.type&&e.key===t.key}const Hn="__vInternal",D0=({key:e})=>e!=null?e:null,Fn=({ref:e,ref_key:t,ref_for:s})=>e!=null?Gt(e)||Kt(e)||nt(e)?{i:Dt,r:e,k:t,f:!!s}:e:null;function ge(e,t=null,s=null,a=0,n=null,r=e===ut?0:1,o=!1,u=!1){const g={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&D0(t),ref:t&&Fn(t),scopeId:o0,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:a,dynamicProps:n,dynamicChildren:null,appContext:null};return u?(fo(g,s),r&128&&e.normalize(g)):s&&(g.shapeFlag|=Gt(s)?8:16),Mr>0&&!o&&xs&&(g.patchFlag>0||r&6)&&g.patchFlag!==32&&xs.push(g),g}const Ie=hf;function hf(e,t=null,s=null,a=0,n=null,r=!1){if((!e||e===x0)&&(e=vs),jn(e)){const u=sa(e,t,!0);return s&&fo(u,s),Mr>0&&!r&&xs&&(u.shapeFlag&6?xs[xs.indexOf(e)]=u:xs.push(u)),u.patchFlag|=-2,u}if(Sf(e)&&(e=e.__vccOpts),t){t=_t(t);let{class:u,style:g}=t;u&&!Gt(u)&&(t.class=at(u)),Zt(g)&&(Dl(g)&&!lt(g)&&(g=is({},g)),t.style=Et(g))}const o=Gt(e)?1:Bd(e)?128:ff(e)?64:Zt(e)?4:nt(e)?2:0;return ge(e,t,s,a,n,o,r,!0)}function _t(e){return e?Dl(e)||Hn in e?is({},e):e:null}function sa(e,t,s=!1){const{props:a,ref:n,patchFlag:r,children:o}=e,u=t?mo(a||{},t):a;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&D0(u),ref:t&&t.ref?s&&n?lt(n)?n.concat(Fn(t)):[n,Fn(t)]:Fn(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ut?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sa(e.ssContent),ssFallback:e.ssFallback&&sa(e.ssFallback),el:e.el,anchor:e.anchor}}function aa(e=" ",t=0){return Ie(co,null,e,t)}function ke(e="",t=!1){return t?(Q(),vt(vs,null,e)):Ie(vs,null,e)}function Is(e){return e==null||typeof e=="boolean"?Ie(vs):lt(e)?Ie(ut,null,e.slice()):typeof e=="object"?ra(e):Ie(co,null,String(e))}function ra(e){return e.el===null||e.memo?e:sa(e)}function fo(e,t){let s=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(lt(t))s=16;else if(typeof t=="object")if(a&65){const n=t.default;n&&(n._c&&(n._d=!1),fo(e,n()),n._c&&(n._d=!0));return}else{s=32;const n=t._;!n&&!(Hn in t)?t._ctx=Dt:n===3&&Dt&&(Dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else nt(t)?(t={default:t,_ctx:Dt},s=32):(t=String(t),a&64?(s=16,t=[aa(t)]):s=8);e.children=t,e.shapeFlag|=s}function mo(...e){const t={};for(let s=0;sFt||Dt,Wa=e=>{Ft=e,e.scope.on()},wa=()=>{Ft&&Ft.scope.off(),Ft=null};function V0(e){return e.vnode.shapeFlag&4}let Ar=!1;function gf(e,t=!1){Ar=t;const{props:s,children:a}=e.vnode,n=V0(e);tf(e,s,n,t),rf(e,a);const r=n?bf(e,t):void 0;return Ar=!1,r}function bf(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=ql(new Proxy(e.ctx,Zd));const{setup:a}=s;if(a){const n=e.setupContext=a.length>1?xf(e):null;Wa(e),za();const r=ea(a,e,0,[e.props,n]);if(Ya(),wa(),Gl(r)){if(r.then(wa,wa),t)return r.then(o=>{z0(e,o,t)}).catch(o=>{En(o,e,0)});e.asyncDep=r}else z0(e,r,t)}else X0(e,t)}function z0(e,t,s){nt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Zt(t)&&(e.setupState=Vl(t)),X0(e,s)}let Y0;function X0(e,t,s){const a=e.type;if(!e.render){if(!t&&Y0&&!a.render){const n=a.template;if(n){const{isCustomElement:r,compilerOptions:o}=e.appContext.config,{delimiters:u,compilerOptions:g}=a,l=is(is({isCustomElement:r,delimiters:u},o),g);a.render=Y0(n,l)}}e.render=a.render||Rs}Wa(e),za(),Wd(e),Ya(),wa()}function yf(e){return new Proxy(e.attrs,{get(t,s){return ns(e,"get","$attrs"),t[s]}})}function xf(e){const t=a=>{e.exposed=a||{}};let s;return{get attrs(){return s||(s=yf(e))},slots:e.slots,emit:e.emit,expose:t}}function Pn(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Vl(ql(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ln)return Ln[s](e)}}))}function wf(e,t=!0){return nt(e)?e.displayName||e.name:e.name||t&&e.__name}function Sf(e){return nt(e)&&"__vccOpts"in e}const Mf=(e,t)=>dd(e,t,Ar);function Af(e,t,s){const a=arguments.length;return a===2?Zt(t)&&!lt(t)?jn(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(a>3?s=Array.prototype.slice.call(arguments,2):a===3&&jn(s)&&(s=[s]),Ie(e,t,s))}const Ef="3.2.37";function Tf(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}const kf=Tf("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function K0(e){return!!e||e===""}const Rf=/^on[^a-z]/,Of=e=>Rf.test(e),If=e=>e.startsWith("onUpdate:"),Er=Object.assign,Tr=Array.isArray,Cf=e=>typeof e=="function",ho=e=>typeof e=="string",Bf=e=>e!==null&&typeof e=="object",vo=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Lf=/-(\w)/g,G0=vo(e=>e.replace(Lf,(t,s)=>s?s.toUpperCase():"")),Nf=/\B([A-Z])/g,Qa=vo(e=>e.replace(Nf,"-$1").toLowerCase()),jf=vo(e=>e.charAt(0).toUpperCase()+e.slice(1)),_o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hf="http://www.w3.org/2000/svg",Sa=typeof document!="undefined"?document:null,Z0=Sa&&Sa.createElement("template"),Ff={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,a)=>{const n=t?Sa.createElementNS(Hf,e):Sa.createElement(e,s?{is:s}:void 0);return e==="select"&&a&&a.multiple!=null&&n.setAttribute("multiple",a.multiple),n},createText:e=>Sa.createTextNode(e),createComment:e=>Sa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,s,a,n,r){const o=s?s.previousSibling:t.lastChild;if(n&&(n===r||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),s),!(n===r||!(n=n.nextSibling)););else{Z0.innerHTML=a?``:e;const u=Z0.content;if(a){const g=u.firstChild;for(;g.firstChild;)u.appendChild(g.firstChild);u.removeChild(g)}t.insertBefore(u,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};function Pf(e,t,s){const a=e._vtc;a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}function Uf(e,t,s){const a=e.style,n=ho(s);if(s&&!n){for(const r in s)po(a,r,s[r]);if(t&&!ho(t))for(const r in t)s[r]==null&&po(a,r,"")}else{const r=a.display;n?t!==s&&(a.cssText=s):t&&e.removeAttribute("style"),"_vod"in e&&(a.display=r)}}const W0=/\s*!important$/;function po(e,t,s){if(Tr(s))s.forEach(a=>po(e,t,a));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const a=Df(e,t);W0.test(s)?e.setProperty(Qa(a),s.replace(W0,""),"important"):e[a]=s}}const Q0=["Webkit","Moz","ms"],go={};function Df(e,t){const s=go[t];if(s)return s;let a=Os(t);if(a!=="filter"&&a in e)return go[t]=a;a=jf(a);for(let n=0;n{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const s=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(s&&Number(s[1])<=53)}return[e,t]})();let bo=0;const Yf=Promise.resolve(),Xf=()=>{bo=0},Kf=()=>bo||(Yf.then(Xf),bo=$0());function Gf(e,t,s,a){e.addEventListener(t,s,a)}function Zf(e,t,s,a){e.removeEventListener(t,s,a)}function Wf(e,t,s,a,n=null){const r=e._vei||(e._vei={}),o=r[t];if(a&&o)o.value=a;else{const[u,g]=Qf(t);if(a){const l=r[t]=Jf(a,n);Gf(e,u,l,g)}else o&&(Zf(e,u,o,g),r[t]=void 0)}}const ec=/(?:Once|Passive|Capture)$/;function Qf(e){let t;if(ec.test(e)){t={};let s;for(;s=e.match(ec);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[Qa(e.slice(2)),t]}function Jf(e,t){const s=a=>{const n=a.timeStamp||$0();(zf||n>=s.attached-1)&&ms($f(a,s.value),t,5,[a])};return s.value=e,s.attached=Kf(),s}function $f(e,t){if(Tr(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(a=>n=>!n._stopped&&a&&a(n))}else return t}const tc=/^on[a-z]/,em=(e,t,s,a,n=!1,r,o,u,g)=>{t==="class"?Pf(e,a,n):t==="style"?Uf(e,s,a):Of(t)?If(t)||Wf(e,t,s,a,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):tm(e,t,a,n))?Vf(e,t,a,r,o,u,g):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),qf(e,t,a,n))};function tm(e,t,s,a){return a?!!(t==="innerHTML"||t==="textContent"||t in e&&tc.test(t)&&Cf(s)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||tc.test(t)&&ho(s)?!1:t in e}function sm(e,t){const s=Hd(e);class a extends yo{constructor(r){super(s,r,t)}}return a.def=s,a}const am=typeof HTMLElement!="undefined"?HTMLElement:class{};class yo extends am{constructor(t,s={},a){super(),this._def=t,this._props=s,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&a?a(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,e0(()=>{this._connected||(hc(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let a=0;a{for(const n of a)this._setAttr(n.attributeName)}).observe(this,{attributes:!0});const t=a=>{const{props:n,styles:r}=a,o=!Tr(n),u=n?o?Object.keys(n):n:[];let g;if(o)for(const l in this._props){const p=n[l];(p===Number||p&&p.type===Number)&&(this._props[l]=_o(this._props[l]),(g||(g=Object.create(null)))[l]=!0)}this._numberProps=g;for(const l of Object.keys(this))l[0]!=="_"&&this._setProp(l,this[l],!0,!1);for(const l of u.map(G0))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(p){this._setProp(l,p)}});this._applyStyles(r),this._update()},s=this._def.__asyncLoader;s?s().then(t):t(this._def)}_setAttr(t){let s=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(s=_o(s)),this._setProp(G0(t),s,!1)}_getProp(t){return this._props[t]}_setProp(t,s,a=!0,n=!0){s!==this._props[t]&&(this._props[t]=s,n&&this._instance&&this._update(),a&&(s===!0?this.setAttribute(Qa(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(Qa(t),s+""):s||this.removeAttribute(Qa(t))))}_update(){hc(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Ie(this._def,Er({},this._props));return this._instance||(t.ce=s=>{this._instance=s,s.isCE=!0,s.emit=(n,...r)=>{this.dispatchEvent(new CustomEvent(n,{detail:r}))};let a=this;for(;a=a&&(a.parentNode||a.host);)if(a instanceof yo){s.parent=a._instance;break}}),t}_applyStyles(t){t&&t.forEach(s=>{const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)})}}const na="transition",kr="animation",Lt=(e,{slots:t})=>Af(m0,rc(e),t);Lt.displayName="Transition";const sc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rm=Lt.props=Er({},m0.props,sc),Ma=(e,t=[])=>{Tr(e)?e.forEach(s=>s(...t)):e&&e(...t)},ac=e=>e?Tr(e)?e.some(t=>t.length>1):e.length>1:!1;function rc(e){const t={};for(const _ in e)_ in sc||(t[_]=e[_]);if(e.css===!1)return t;const{name:s="v",type:a,duration:n,enterFromClass:r=`${s}-enter-from`,enterActiveClass:o=`${s}-enter-active`,enterToClass:u=`${s}-enter-to`,appearFromClass:g=r,appearActiveClass:l=o,appearToClass:p=u,leaveFromClass:c=`${s}-leave-from`,leaveActiveClass:M=`${s}-leave-active`,leaveToClass:A=`${s}-leave-to`}=e,i=nm(n),H=i&&i[0],B=i&&i[1],{onBeforeEnter:N,onEnter:m,onEnterCancelled:R,onLeave:C,onLeaveCancelled:T,onBeforeAppear:L=N,onAppear:f=m,onAppearCancelled:E=R}=t,w=(_,v,x)=>{ia(_,v?p:u),ia(_,v?l:o),x&&x()},h=(_,v)=>{_._isLeaving=!1,ia(_,c),ia(_,A),ia(_,M),v&&v()},b=_=>(v,x)=>{const y=_?f:m,j=()=>w(v,_,x);Ma(y,[v,j]),nc(()=>{ia(v,_?g:r),Xs(v,_?p:u),ac(y)||ic(v,a,H,j)})};return Er(t,{onBeforeEnter(_){Ma(N,[_]),Xs(_,r),Xs(_,o)},onBeforeAppear(_){Ma(L,[_]),Xs(_,g),Xs(_,l)},onEnter:b(!1),onAppear:b(!0),onLeave(_,v){_._isLeaving=!0;const x=()=>h(_,v);Xs(_,c),uc(),Xs(_,M),nc(()=>{!_._isLeaving||(ia(_,c),Xs(_,A),ac(C)||ic(_,a,B,x))}),Ma(C,[_,x])},onEnterCancelled(_){w(_,!1),Ma(R,[_])},onAppearCancelled(_){w(_,!0),Ma(E,[_])},onLeaveCancelled(_){h(_),Ma(T,[_])}})}function nm(e){if(e==null)return null;if(Bf(e))return[xo(e.enter),xo(e.leave)];{const t=xo(e);return[t,t]}}function xo(e){return _o(e)}function Xs(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e._vtc||(e._vtc=new Set)).add(t)}function ia(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const{_vtc:s}=e;s&&(s.delete(t),s.size||(e._vtc=void 0))}function nc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let im=0;function ic(e,t,s,a){const n=e._endId=++im,r=()=>{n===e._endId&&a()};if(s)return setTimeout(r,s);const{type:o,timeout:u,propCount:g}=oc(e,t);if(!o)return a();const l=o+"end";let p=0;const c=()=>{e.removeEventListener(l,M),r()},M=A=>{A.target===e&&++p>=g&&c()};setTimeout(()=>{p(s[i]||"").split(", "),n=a(na+"Delay"),r=a(na+"Duration"),o=lc(n,r),u=a(kr+"Delay"),g=a(kr+"Duration"),l=lc(u,g);let p=null,c=0,M=0;t===na?o>0&&(p=na,c=o,M=r.length):t===kr?l>0&&(p=kr,c=l,M=g.length):(c=Math.max(o,l),p=c>0?o>l?na:kr:null,M=p?p===na?r.length:g.length:0);const A=p===na&&/\b(transform|all)(,|$)/.test(s[na+"Property"]);return{type:p,timeout:c,propCount:M,hasTransform:A}}function lc(e,t){for(;e.lengthcc(s)+cc(e[a])))}function cc(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function uc(){return document.body.offsetHeight}const dc=new WeakMap,fc=new WeakMap,wo={name:"TransitionGroup",props:Er({},rm,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=q0(),a=f0();let n,r;return g0(()=>{if(!n.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!um(n[0].el,s.vnode.el,o))return;n.forEach(om),n.forEach(lm);const u=n.filter(cm);uc(),u.forEach(g=>{const l=g.el,p=l.style;Xs(l,o),p.transform=p.webkitTransform=p.transitionDuration="";const c=l._moveCb=M=>{M&&M.target!==l||(!M||/transform$/.test(M.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,ia(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=mt(e),u=rc(o);let g=o.tag||ut;n=r,r=t.default?eo(t.default()):[];for(let l=0;l{o.split(/\s+/).forEach(u=>u&&a.classList.remove(u))}),s.split(/\s+/).forEach(o=>o&&a.classList.add(o)),a.style.display="none";const n=t.nodeType===1?t:t.parentNode;n.appendChild(a);const{hasTransform:r}=oc(a);return n.removeChild(a),r}const dm=["ctrl","shift","alt","meta"],fm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dm.some(s=>e[`${s}Key`]&&!t.includes(s))},Bs=(e,t)=>(s,...a)=>{for(let n=0;ns=>{if(!("key"in s))return;const a=Qa(s.key);if(t.some(n=>n===a||mm[n]===a))return e(s)},Un={beforeMount(e,{value:t},{transition:s}){e._vod=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Rr(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:a}){!t!=!s&&(a?t?(a.beforeEnter(e),Rr(e,!0),a.enter(e)):a.leave(e,()=>{Rr(e,!1)}):Rr(e,t))},beforeUnmount(e,{value:t}){Rr(e,t)}};function Rr(e,t){e.style.display=t?e._vod:"none"}const hm=Er({patchProp:em},Ff);let mc;function vm(){return mc||(mc=cf(hm))}const hc=(...e)=>{vm().render(...e)};var wt=(e,t)=>{const s=e.__vccOpts||e;for(const[a,n]of t)s[a]=n;return s};const _m={name:"AppLoader",props:{show:{type:Boolean,default:!1},infinite:{type:Boolean,default:!1},type:{type:String,required:!0},messageId:{type:String,default:""}}},pm=ge("div",{id:"vac-circle"},null,-1),gm=ge("div",{id:"vac-circle"},null,-1),bm=ge("div",{id:"vac-circle"},null,-1),ym=ge("div",{id:"vac-circle"},null,-1),xm=ge("div",{id:"vac-circle"},null,-1),wm=ge("div",{id:"vac-circle"},null,-1);function Sm(e,t,s,a,n,r){return Q(),vt(Lt,{name:"vac-fade-spinner",appear:""},{default:Ge(()=>[s.show?(Q(),ne("div",{key:0,class:at(["vac-loader-wrapper",{"vac-container-center":!s.infinite,"vac-container-top":s.infinite}])},[s.type==="rooms"?Re(e.$slots,"spinner-icon-rooms",{key:0},()=>[pm]):ke("",!0),s.type==="infinite-rooms"?Re(e.$slots,"spinner-icon-infinite-rooms",{key:1},()=>[gm]):ke("",!0),s.type==="message-file"?Re(e.$slots,"spinner-icon-message-file_"+s.messageId,{key:2},()=>[bm]):ke("",!0),s.type==="room-file"?Re(e.$slots,"spinner-icon-room-file",{key:3},()=>[ym]):ke("",!0),s.type==="messages"?Re(e.$slots,"spinner-icon-messages",{key:4},()=>[xm]):ke("",!0),s.type==="infinite-messages"?Re(e.$slots,"spinner-icon-infinite-messages",{key:5},()=>[wm]):ke("",!0)],2)):ke("",!0)]),_:3})}var Dn=wt(_m,[["render",Sm]]);const Mm={name:"SvgIcon",props:{name:{type:String,default:null},param:{type:String,default:null}},data(){return{svgItem:{search:{path:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},add:{path:"M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},toggle:{path:"M5,13L9,17L7.6,18.42L1.18,12L7.6,5.58L9,7L5,11H21V13H5M21,6V8H11V6H21M21,16V18H11V16H21Z"},menu:{path:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"},close:{path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},file:{path:"M14,17H7V15H14M17,13H7V11H17M17,9H7V7H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"},paperclip:{path:"M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z"},"close-outline":{path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},send:{path:"M2,21L23,12L2,3V10L17,12L2,14V21Z"},emoji:{path:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"},document:{path:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"},pencil:{path:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},checkmark:{path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},"double-checkmark":{path:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"},eye:{path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},dropdown:{path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},deleted:{path:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"},microphone:{size:"large",path:"M432.8,216.4v39.2c0,45.2-15.3,84.3-45.2,118.4c-29.8,33.2-67.3,52.8-111.6,57.9v40.9h78.4c5.1,0,10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6c0,5.1-1.7,10.2-6,13.6c-4.3,4.3-8.5,6-13.6,6H157.6c-5.1,0-10.2-1.7-13.6-6c-4.3-4.3-6-8.5-6-13.6c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6H236v-40.9c-44.3-5.1-81.8-23.9-111.6-57.9s-45.2-73.3-45.2-118.4v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6s10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6v39.2c0,37.5,13.6,70.7,40,97.1s59.6,40,97.1,40s70.7-13.6,97.1-40c26.4-26.4,40-59.6,40-97.1v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6c5.1,0,10.2,1.7,13.6,6C430.2,206.2,432.8,211.3,432.8,216.4z M353.5,98v157.6c0,27.3-9.4,50.3-29,69c-19.6,19.6-42.6,29-69,29s-50.3-9.4-69-29c-19.6-19.6-29-42.6-29-69V98c0-27.3,9.4-50.3,29-69c19.6-19.6,42.6-29,69-29s50.3,9.4,69,29C344.2,47.7,353.5,71.6,353.5,98z"},"audio-play":{size:"medium",path:"M43.331,21.237L7.233,0.397c-0.917-0.529-2.044-0.529-2.96,0c-0.916,0.528-1.48,1.505-1.48,2.563v41.684 c0,1.058,0.564,2.035,1.48,2.563c0.458,0.268,0.969,0.397,1.48,0.397c0.511,0,1.022-0.133,1.48-0.397l36.098-20.84 c0.918-0.529,1.479-1.506,1.479-2.564S44.247,21.767,43.331,21.237z"},"audio-pause":{size:"medium",path:"M17.991,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C4.729,2.969,7.698,0,11.36,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z",path2:"M42.877,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C29.616,2.969,32.585,0,36.246,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z"}}}},computed:{svgId(){const e=this.param?"-"+this.param:"";return`vac-icon-${this.name}${e}`},size(){const e=this.svgItem[this.name];return e.size==="large"?512:e.size==="medium"?48:24}}},Am=["viewBox"],Em=["id","d"],Tm=["id","d"];function km(e,t,s,a,n,r){return Q(),ne("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"24",height:"24",viewBox:`0 0 ${r.size} ${r.size}`},[ge("path",{id:r.svgId,d:n.svgItem[s.name].path},null,8,Em),n.svgItem[s.name].path2?(Q(),ne("path",{key:0,id:r.svgId,d:n.svgItem[s.name].path2},null,8,Tm)):ke("",!0)],8,Am)}var Ut=wt(Mm,[["render",km]]);const Rm={name:"RoomsSearch",components:{SvgIcon:Ut},props:{textMessages:{type:Object,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0}},emits:["search-room","add-room"],computed:{showSearchBar(){return this.showSearch||this.showAddRoom}}},Om={key:0,class:"vac-icon-search"},Im=["placeholder"];function Cm(e,t,s,a,n,r){const o=Xe("svg-icon");return Q(),ne("div",{class:at({"vac-box-search":r.showSearchBar,"vac-box-empty":!r.showSearchBar})},[s.showSearch?(Q(),ne(ut,{key:0},[!s.loadingRooms&&s.rooms.length?(Q(),ne("div",Om,[Re(e.$slots,"search-icon",{},()=>[Ie(o,{name:"search"})])])):ke("",!0),!s.loadingRooms&&s.rooms.length?(Q(),ne("input",{key:1,type:"search",placeholder:s.textMessages.SEARCH,autocomplete:"off",class:"vac-input",onInput:t[0]||(t[0]=u=>e.$emit("search-room",u))},null,40,Im)):ke("",!0)],64)):ke("",!0),s.showAddRoom?(Q(),ne("div",{key:1,class:"vac-svg-button vac-add-icon",onClick:t[1]||(t[1]=u=>e.$emit("add-room"))},[Re(e.$slots,"add-icon",{},()=>[Ie(o,{name:"add"})])])):ke("",!0)],2)}var Bm=wt(Rm,[["render",Cm]]),qt={},Ja={};Ja.__esModule=!0,Ja.inherits=Lm;function Lm(e,t){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=Object.create(e.prototype);for(var n in s)a[n]=s[n];return a.constructor=t,t.prototype=a,t}var Or={};Or.__esModule=!0;var Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls={defaultProtocol:"http",events:null,format:_c,formatHref:_c,nl2br:!1,tagName:"a",target:Hm,validate:!0,ignoreTags:[],attributes:null,className:"linkified"};Or.defaults=ls,Or.Options=vc,Or.contains=jm;function vc(e){e=e||{},this.defaultProtocol=e.hasOwnProperty("defaultProtocol")?e.defaultProtocol:ls.defaultProtocol,this.events=e.hasOwnProperty("events")?e.events:ls.events,this.format=e.hasOwnProperty("format")?e.format:ls.format,this.formatHref=e.hasOwnProperty("formatHref")?e.formatHref:ls.formatHref,this.nl2br=e.hasOwnProperty("nl2br")?e.nl2br:ls.nl2br,this.tagName=e.hasOwnProperty("tagName")?e.tagName:ls.tagName,this.target=e.hasOwnProperty("target")?e.target:ls.target,this.validate=e.hasOwnProperty("validate")?e.validate:ls.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||ls.attributes,this.className=e.hasOwnProperty("className")?e.className:e.linkClass||ls.className;for(var t=e.hasOwnProperty("ignoreTags")?e.ignoreTags:ls.ignoreTags,s=0;s1&&arguments[1]!==void 0?arguments[1]:null,a=this.next(new t(""));return a===this.defaultTransition?(a=new this.constructor(s),this.on(t,a)):s&&(a.T=s),a},test:function(t,s){return t instanceof s}});function Pm(e,t,s,a){for(var n=0,r=e.length,o=t,u=[],g=void 0;n=r)return[];for(;n"),mh=St(")"),hh=St("&");qe.Base=Eo,qe.DOMAIN=qm,qe.AT=Vm,qe.COLON=zm,qe.DOT=Ym,qe.PUNCTUATION=Xm,qe.LOCALHOST=Km,qe.NL=Gm,qe.NUM=Zm,qe.PLUS=Wm,qe.POUND=Qm,qe.QUERY=eh,qe.PROTOCOL=Jm,qe.MAILTO=$m,qe.SLASH=th,qe.UNDERSCORE=sh,qe.SYM=ah,qe.TLD=rh,qe.WS=nh,qe.OPENBRACE=ih,qe.OPENBRACKET=oh,qe.OPENANGLEBRACKET=lh,qe.OPENPAREN=ch,qe.CLOSEBRACE=uh,qe.CLOSEBRACKET=dh,qe.CLOSEANGLEBRACKET=fh,qe.CLOSEPAREN=mh,qe.AMPERSAND=hh,Ls.__esModule=!0,Ls.start=Ls.run=Ls.TOKENS=Ls.State=void 0;var oa=Ks,rt=qe,vh=_h(rt);function _h(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}var bc="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),To="0123456789".split(""),Vn="0123456789abcdefghijklmnopqrstuvwxyz".split(""),yc=[" ","\f","\r"," ","\v","\xA0","\u1680","\u180E"],Qt=[],bt=function(t){return new oa.CharacterState(t)},_s=bt(),ko=bt(rt.NUM),$a=bt(rt.DOMAIN),Ir=bt(),Ro=bt(rt.WS);_s.on("@",bt(rt.AT)).on(".",bt(rt.DOT)).on("+",bt(rt.PLUS)).on("#",bt(rt.POUND)).on("?",bt(rt.QUERY)).on("/",bt(rt.SLASH)).on("_",bt(rt.UNDERSCORE)).on(":",bt(rt.COLON)).on("{",bt(rt.OPENBRACE)).on("[",bt(rt.OPENBRACKET)).on("<",bt(rt.OPENANGLEBRACKET)).on("(",bt(rt.OPENPAREN)).on("}",bt(rt.CLOSEBRACE)).on("]",bt(rt.CLOSEBRACKET)).on(">",bt(rt.CLOSEANGLEBRACKET)).on(")",bt(rt.CLOSEPAREN)).on("&",bt(rt.AMPERSAND)).on([",",";","!",'"',"'"],bt(rt.PUNCTUATION)),_s.on(`
-`,bt(rt.NL)).on(yc,Ro),Ro.on(yc,Ro);for(var Oo=0;Oo=0&&p++,g++,r++;if(!(p<0)){r-=p,g-=p;var c=l.emit();n.push(new c(t.substr(r-g,g)))}}return n},Ah=_s;Ls.State=oa.CharacterState,Ls.TOKENS=vh,Ls.run=Mh,Ls.start=Ah;var Ns={},$t={};$t.__esModule=!0,$t.URL=$t.TEXT=$t.NL=$t.EMAIL=$t.MAILTOEMAIL=$t.Base=void 0;var er=qn,Cr=Ja,Br=qe;function Eh(e){return e instanceof Br.DOMAIN||e instanceof Br.TLD}var Ea=(0,er.createTokenClass)();Ea.prototype={type:"token",isLink:!1,toString:function(){for(var t=[],s=0;s0&&arguments[0]!==void 0?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(t)}}};var Th=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"email",isLink:!0}),kh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Rh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"text"}),Oh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"nl"}),Ih=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"http",s=!1,a=!1,n=this.v,r=[],o=0;n[o]instanceof Br.PROTOCOL;)s=!0,r.push(n[o].toString().toLowerCase()),o++;for(;n[o]instanceof Br.SLASH;)a=!0,r.push(n[o].toString()),o++;for(;Eh(n[o]);)r.push(n[o].toString().toLowerCase()),o++;for(;o=0&&c++,a++,l++;if(c<0)for(var M=a-l;M0&&(n.push(new es.TEXT(r)),r=[]),a-=c,l-=c;var A=p.emit();n.push(new A(t.slice(a-l,a)))}}return r.length>0&&n.push(new es.TEXT(r)),n};Ns.State=Ac.TokenState,Ns.TOKENS=Ch,Ns.run=jh,Ns.start=Xn,qt.__esModule=!0,qt.tokenize=qt.test=qt.scanner=qt.parser=qt.options=qt.inherits=qt.find=void 0;var Hh=Ja,Fh=Or,Ph=No(Fh),Uh=Ls,Bc=No(Uh),Dh=Ns,Lc=No(Dh);function No(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});var jo=function(t){return Lc.run(Bc.run(t))},qh=function(t){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=jo(t),n=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:null,a=jo(t);return a.length===1&&a[0].isLink&&(!s||a[0].type===s)};qt.find=qh,qt.inherits=Hh.inherits,qt.options=Ph,qt.parser=Lc,qt.scanner=Bc,qt.test=Vh,qt.tokenize=jo;var Nc=qt,zh=(e,t,s)=>{const a={bold:s.bold,italic:s.italic,strike:s.strike,underline:s.underline,multilineCode:s.multilineCode,inlineCode:s.inlineCode},n={[a.bold]:{end:"\\"+a.bold,allowed_chars:".",type:"bold"},[a.italic]:{end:a.italic,allowed_chars:".",type:"italic"},[a.strike]:{end:a.strike,allowed_chars:".",type:"strike"},[a.underline]:{end:a.underline,allowed_chars:".",type:"underline"},[a.multilineCode]:{end:a.multilineCode,allowed_chars:`(.|
-)`,type:"multiline-code"},[a.inlineCode]:{end:a.inlineCode,allowed_chars:".",type:"inline-code"},"":{allowed_chars:".",end:" ",type:"tag"}},r=Wn(e,n),o=Yh(r,n),u=[].concat.apply([],o);return t&&Kh(u),u};function Wn(e,t){let s=[],a=-1,n=null,r=Nc.find(e),o=!1;if(r.length>0&&(a=e.indexOf(r[0].value),o=!0),Object.keys(t).forEach(u=>{const g=e.indexOf(u);g>=0&&(a<0||g{typeof a=="string"?s.push({types:[],value:a}):t[a.start]&&s.push(Xh(a))}),s}function Xh(e){const t=[];return jc(e,t,[]),t}function jc(e,t,s){e.content.forEach(a=>{typeof a=="string"?t.push({types:Hc(s.concat([e.type])),value:a}):jc(a,t,Hc([a.type].concat([e.type]).concat(s)))})}function Hc(e){return[...new Set(e)]}function Kh(e){const t=[];return e.forEach(s=>{const a=Nc.find(s.value);if(a.length){const n=s.value.replace(a[0].value,"");t.push({types:s.types,value:n}),s.types=["url"].concat(s.types),s.href=a[0].href,s.value=a[0].value}t.push(s)}),t}const Ho=["png","jpg","jpeg","webp","svg","gif"],Fc=["mp4","video/ogg","webm","quicktime"],Gh=["mp3","audio/ogg","wav","mpeg"],Zh={name:"FormatMessage",components:{SvgIcon:Ut},props:{messageId:{type:String,default:""},roomId:{type:String,default:""},roomList:{type:Boolean,default:!1},content:{type:[String,Number],required:!0},deleted:{type:Boolean,default:!1},users:{type:Array,default:()=>[]},linkify:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!1},reply:{type:Boolean,default:!1},textFormatting:{type:Object,required:!0},textMessages:{type:Object,default:()=>{}},linkOptions:{type:Object,required:!0}},emits:["open-user-tag"],computed:{linkifiedMessage(){if(this.deleted)return[{value:this.textMessages.MESSAGE_DELETED}];const e=zh(this.formatTags(this.content),this.linkify&&!this.linkOptions.disabled,this.textFormatting);return e.forEach(t=>{t.url=this.checkType(t,"url"),t.bold=this.checkType(t,"bold"),t.italic=this.checkType(t,"italic"),t.strike=this.checkType(t,"strike"),t.underline=this.checkType(t,"underline"),t.inline=this.checkType(t,"inline-code"),t.multiline=this.checkType(t,"multiline-code"),t.tag=this.checkType(t,"tag"),t.image=this.checkImageType(t),t.value=this.replaceEmojiByElement(t.value)}),e},formattedContent(){return this.deleted?this.textMessages.MESSAGE_DELETED:this.formatTags(this.content)}},methods:{checkType(e,t){return e.types&&e.types.indexOf(t)!==-1},checkImageType(e){let t=e.value.lastIndexOf(".");e.value.lastIndexOf("/")>t&&(t=-1);const a=e.value.substring(t+1,e.value.length),n=t>0&&Ho.some(r=>a.toLowerCase().includes(r));return n&&this.setImageSize(e),n},setImageSize(e){const t=new Image;t.src=e.value,t.addEventListener("load",s);function s(a){const n=a.path[0].width/150;e.height=Math.round(a.path[0].height/n)+"px",t.removeEventListener("load",s)}},formatTags(e){const t="",s=" ",a=[...e.matchAll(new RegExp(t,"gi"))].map(r=>r.index),n=e;return a.forEach(r=>{const o=n.substring(r+t.length,n.indexOf(s,r)),u=this.users.find(g=>g._id===o);e=e.replaceAll(o,`@${(u==null?void 0:u.username)||"unknown"}`)}),e},openTag(e){if(!this.singleLine&&this.checkType(e,"tag")){const t=this.users.find(s=>e.value.indexOf(s.username)!==-1);this.$emit("open-user-tag",t)}},replaceEmojiByElement(e){let t;return this.singleLine?t=16:t=this.containsOnlyEmojis()?28:20,e.replaceAll(/[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/gu,s=>`${s}`)},containsOnlyEmojis(){const e=this.content.replace(new RegExp("[\0-\u1EEFf]","g"),""),t=this.content.replace(new RegExp(`[
-\rs]+|( )+`,"g"),"");return e.length===t.length}}},Wh={class:"vac-image-link-container"},Qh={class:"vac-image-link-message"},Jh=["innerHTML"],$h=["innerHTML"];function e2(e,t,s,a,n,r){const o=Xe("svg-icon");return Q(),ne("div",{class:at(["vac-format-message-wrapper",{"vac-text-ellipsis":s.singleLine}])},[s.textFormatting.disabled?(Q(),ne("div",{key:1,innerHTML:r.formattedContent},null,8,$h)):(Q(),ne("div",{key:0,class:at({"vac-text-ellipsis":s.singleLine})},[(Q(!0),ne(ut,null,tt(r.linkifiedMessage,(u,g)=>(Q(),ne("div",{key:g,class:"vac-format-container"},[(Q(),vt(Gd(u.url?"a":"span"),{class:at({"vac-text-ellipsis":s.singleLine,"vac-text-bold":u.bold,"vac-text-italic":s.deleted||u.italic,"vac-text-strike":u.strike,"vac-text-underline":u.underline,"vac-text-inline-code":!s.singleLine&&u.inline,"vac-text-multiline-code":!s.singleLine&&u.multiline,"vac-text-tag":!s.singleLine&&!s.reply&&u.tag}),href:u.href,target:u.href?s.linkOptions.target:null,rel:u.href?s.linkOptions.rel:null,onClick:l=>r.openTag(u)},{default:Ge(()=>[s.deleted?(Q(),ne(ut,{key:0},[Re(e.$slots,s.roomList?"deleted-icon-room_"+s.roomId:"deleted-icon_"+s.messageId,{},()=>[Ie(o,{name:"deleted",class:at(["vac-icon-deleted",{"vac-icon-deleted-room":s.roomList}])},null,8,["class"])]),aa(" "+Je(s.textMessages.MESSAGE_DELETED),1)],64)):u.url&&u.image?(Q(),ne(ut,{key:1},[ge("div",Wh,[ge("div",{class:"vac-image-link",style:Et({"background-image":`url('${u.value}')`,height:u.height})},null,4)]),ge("div",Qh,[ge("span",null,Je(u.value),1)])],64)):(Q(),ne("span",{key:2,innerHTML:u.value},null,8,Jh))]),_:2},1032,["class","href","target","rel","onClick"]))]))),128))],2))],2)}var Yr=wt(Zh,[["render",e2]]);const Ca="__v-click-outside",Pc=typeof window!="undefined",t2=typeof navigator!="undefined",s2=Pc&&("ontouchstart"in window||t2&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],a2=e=>{const t=typeof e=="function";if(!t&&typeof e!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:t?e:e.handler,middleware:e.middleware||(s=>s),events:e.events||s2,isActive:e.isActive!==!1,detectIframe:e.detectIframe!==!1,capture:Boolean(e.capture)}},Uc=({event:e,handler:t,middleware:s})=>{s(e)&&t(e)},r2=({el:e,event:t,handler:s,middleware:a})=>{setTimeout(()=>{const{activeElement:n}=document;n&&n.tagName==="IFRAME"&&!e.contains(n)&&Uc({event:t,handler:s,middleware:a})},0)},n2=({el:e,event:t,handler:s,middleware:a})=>{const n=t.path||t.composedPath&&t.composedPath();(n?n.indexOf(e)<0:!e.contains(t.target))&&Uc({event:t,handler:s,middleware:a})},Dc=(e,{value:t})=>{const{events:s,handler:a,middleware:n,isActive:r,detectIframe:o,capture:u}=a2(t);if(!!r){if(e[Ca]=s.map(g=>({event:g,srcTarget:document.documentElement,handler:l=>n2({el:e,event:l,handler:a,middleware:n}),capture:u})),o){const g={event:"blur",srcTarget:window,handler:l=>r2({el:e,event:l,handler:a,middleware:n}),capture:u};e[Ca]=[...e[Ca],g]}e[Ca].forEach(({event:g,srcTarget:l,handler:p})=>setTimeout(()=>{!e[Ca]||l.addEventListener(g,p,u)},0))}},qc=e=>{(e[Ca]||[]).forEach(({event:s,srcTarget:a,handler:n,capture:r})=>a.removeEventListener(s,n,r)),delete e[Ca]};var Qn=Pc?{beforeMount:Dc,updated:(e,{value:t,oldValue:s})=>{JSON.stringify(t)!==JSON.stringify(s)&&(qc(e),Dc(e,{value:t}))},unmounted:qc}:{},Vc=(e,t,s)=>{if(e.typingUsers&&e.typingUsers.length){const a=e.users.filter(n=>{if(n._id!==t&&e.typingUsers.indexOf(n._id)!==-1&&!(n.status&&n.status.state==="offline"))return!0});return a.length?e.users.length===2?s.IS_TYPING:a.map(n=>n.username).join(", ")+" "+s.IS_TYPING:void 0}};function Xr(e,t){if(!(!t||!t.type))return e.some(s=>t.type.toLowerCase().includes(s))}function ar(e){return Xr(Ho,e)}function Kr(e){return Xr(Fc,e)}function zc(e){return Xr(Ho,e)||Xr(Fc,e)}function Jn(e){return Xr(Gh,e)}const i2={name:"RoomsContent",components:{SvgIcon:Ut,FormatMessage:Yr},directives:{clickOutside:Qn},props:{currentUserId:{type:[String,Number],required:!0},room:{type:Object,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},textMessages:{type:Object,required:!0},roomActions:{type:Array,required:!0}},emits:["room-action-handler"],data(){return{roomMenuOpened:null}},computed:{getLastMessage(){const e=this.typingUsers;if(e)return e;const t=this.room.lastMessage.content;if(this.room.users.length<=2)return t;const s=this.room.users.find(a=>a._id===this.room.lastMessage.senderId);return this.room.lastMessage.username?`${this.room.lastMessage.username} - ${t}`:!s||s._id===this.currentUserId?t:`${s.username} - ${t}`},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(t=>t._id!==this.currentUserId);return e&&e.status?e.status.state:null},typingUsers(){return Vc(this.room,this.currentUserId,this.textMessages)},isMessageCheckmarkVisible(){return!this.typingUsers&&this.room.lastMessage&&!this.room.lastMessage.deleted&&this.room.lastMessage.senderId===this.currentUserId&&(this.room.lastMessage.saved||this.room.lastMessage.distributed||this.room.lastMessage.seen)},formattedDuration(){var t,s;const e=(s=(t=this.room.lastMessage)==null?void 0:t.files)==null?void 0:s[0];if(e){if(!e.duration)return`${e.name}.${e.extension}`;let a=Math.floor(e.duration);return(a-(a%=60))/60+(a>9?":":":0")+a}return""},isAudio(){return this.room.lastMessage.files?Jn(this.room.lastMessage.files[0]):!1}},methods:{roomActionHandler(e){this.closeRoomMenu(),this.$emit("room-action-handler",{action:e,roomId:this.room.roomId})},closeRoomMenu(){this.roomMenuOpened=null}}},o2={class:"vac-room-container"},l2={class:"vac-name-container vac-text-ellipsis"},c2={class:"vac-title-container"},u2={class:"vac-room-name vac-text-ellipsis"},d2={key:1,class:"vac-text-date"},f2={key:0},m2={key:1,class:"vac-text-ellipsis"},h2={key:3,class:"vac-text-ellipsis"},v2={class:"vac-room-options-container"},_2={key:0,class:"vac-badge-counter vac-room-badge"},p2={key:0,class:"vac-menu-options"},g2={class:"vac-menu-list"},b2=["onClick"];function y2(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Xe("format-message"),g=Bn("click-outside");return Q(),ne("div",o2,[Re(e.$slots,"room-list-item_"+s.room.roomId,{},()=>[Re(e.$slots,"room-list-avatar_"+s.room.roomId,{},()=>[s.room.avatar?(Q(),ne("div",{key:0,class:"vac-avatar",style:Et({"background-image":`url('${s.room.avatar}')`})},null,4)):ke("",!0)]),ge("div",l2,[ge("div",c2,[r.userStatus?(Q(),ne("div",{key:0,class:at(["vac-state-circle",{"vac-state-online":r.userStatus==="online"}])},null,2)):ke("",!0),ge("div",u2,Je(s.room.roomName),1),s.room.lastMessage?(Q(),ne("div",d2,Je(s.room.lastMessage.timestamp),1)):ke("",!0)]),ge("div",{class:at(["vac-text-last",{"vac-message-new":s.room.lastMessage&&s.room.lastMessage.new&&!r.typingUsers}])},[r.isMessageCheckmarkVisible?(Q(),ne("span",f2,[Re(e.$slots,"checkmark-icon_"+s.room.roomId,{},()=>[Ie(o,{name:s.room.lastMessage.distributed?"double-checkmark":"checkmark",param:s.room.lastMessage.seen?"seen":"",class:"vac-icon-check"},null,8,["name","param"])])])):ke("",!0),s.room.lastMessage&&!s.room.lastMessage.deleted&&r.isAudio?(Q(),ne("div",m2,[Re(e.$slots,"microphone-icon_"+s.room.roomId,{},()=>[Ie(o,{name:"microphone",class:"vac-icon-microphone"})]),aa(" "+Je(r.formattedDuration),1)])):s.room.lastMessage?(Q(),vt(u,{key:2,"message-id":s.room.lastMessage._id,"room-id":s.room.roomId,"room-list":!0,content:r.getLastMessage,deleted:!!s.room.lastMessage.deleted&&!r.typingUsers,users:s.room.users,"text-messages":s.textMessages,linkify:!1,"text-formatting":s.textFormatting,"link-options":s.linkOptions,"single-line":!0},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["message-id","room-id","content","deleted","users","text-messages","text-formatting","link-options"])):ke("",!0),!s.room.lastMessage&&r.typingUsers?(Q(),ne("div",h2,Je(r.typingUsers),1)):ke("",!0),ge("div",v2,[s.room.unreadCount?(Q(),ne("div",_2,Je(s.room.unreadCount),1)):ke("",!0),Re(e.$slots,"room-list-options_"+s.room.roomId,{},()=>[s.roomActions.length?(Q(),ne("div",{key:0,class:"vac-svg-button vac-list-room-options",onClick:t[0]||(t[0]=Bs(l=>n.roomMenuOpened=s.room.roomId,["stop"]))},[Re(e.$slots,"room-list-options-icon_"+s.room.roomId,{},()=>[Ie(o,{name:"dropdown",param:"room"})])])):ke("",!0),s.roomActions.length?(Q(),vt(Lt,{key:1,name:"vac-slide-left"},{default:Ge(()=>[n.roomMenuOpened===s.room.roomId?Ys((Q(),ne("div",p2,[ge("div",g2,[(Q(!0),ne(ut,null,tt(s.roomActions,l=>(Q(),ne("div",{key:l.name},[ge("div",{class:"vac-menu-item",onClick:Bs(p=>r.roomActionHandler(l),["stop"])},Je(l.title),9,b2)]))),128))])])),[[g,r.closeRoomMenu]]):ke("",!0)]),_:1})):ke("",!0)])])],2)])])])}var x2=wt(i2,[["render",y2]]),Fo=(e,t,s,a=!1)=>!s||s===""?e:e.filter(n=>a?$n(n[t]).startsWith($n(s)):$n(n[t]).includes($n(s)));function $n(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const w2={name:"RoomsList",components:{Loader:Dn,RoomsSearch:Bm,RoomContent:x2},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},showRoomsList:{type:Boolean,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},isMobile:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0},roomsLoaded:{type:Boolean,required:!0},room:{type:Object,required:!0},customSearchRoomEnabled:{type:[Boolean,String],default:!1},roomActions:{type:Array,required:!0},scrollDistance:{type:Number,required:!0}},emits:["add-room","search-room","room-action-handler","loading-more-rooms","fetch-room","fetch-more-rooms"],data(){return{filteredRooms:this.rooms||[],observer:null,showLoader:!0,loadingMoreRooms:!1,selectedRoomId:""}},watch:{rooms:{deep:!0,handler(e,t){this.filteredRooms=e,(e.length!==t.length||this.roomsLoaded)&&(this.loadingMoreRooms=!1)}},loadingRooms(e){e||setTimeout(()=>this.initIntersectionObserver())},loadingMoreRooms(e){this.$emit("loading-more-rooms",e)},roomsLoaded:{immediate:!0,handler(e){e&&(this.loadingMoreRooms=!1,this.loadingRooms||(this.showLoader=!1))}},room:{immediate:!0,handler(e){e&&!this.isMobile&&(this.selectedRoomId=e.roomId)}}},methods:{initIntersectionObserver(){this.observer&&(this.showLoader=!0,this.observer.disconnect());const e=this.$el.querySelector("#infinite-loader-rooms");if(e){const t={root:this.$el.querySelector("#rooms-list"),rootMargin:`${this.scrollDistance}px`,threshold:0};this.observer=new IntersectionObserver(s=>{s[0].isIntersecting&&this.loadMoreRooms()},t),this.observer.observe(e)}},searchRoom(e){this.customSearchRoomEnabled?this.$emit("search-room",e.target.value):this.filteredRooms=Fo(this.rooms,"roomName",e.target.value)},openRoom(e){e.roomId===this.room.roomId&&!this.isMobile||(this.isMobile||(this.selectedRoomId=e.roomId),this.$emit("fetch-room",{room:e}))},loadMoreRooms(){if(!this.loadingMoreRooms){if(this.roomsLoaded){this.loadingMoreRooms=!1,this.showLoader=!1;return}this.$emit("fetch-more-rooms"),this.loadingMoreRooms=!0}}}},S2={key:0,class:"vac-rooms-empty"},M2={key:1,id:"rooms-list",class:"vac-room-list"},A2=["id","onClick"],E2={key:0,id:"infinite-loader-rooms"};function T2(e,t,s,a,n,r){const o=Xe("rooms-search"),u=Xe("loader"),g=Xe("room-content");return Ys((Q(),ne("div",{class:at(["vac-rooms-container",{"vac-rooms-container-full":s.isMobile,"vac-app-border-r":!s.isMobile}])},[Re(e.$slots,"rooms-header"),Re(e.$slots,"rooms-list-search",{},()=>[Ie(o,{rooms:s.rooms,"loading-rooms":s.loadingRooms,"text-messages":s.textMessages,"show-search":s.showSearch,"show-add-room":s.showAddRoom,onSearchRoom:r.searchRoom,onAddRoom:t[0]||(t[0]=l=>e.$emit("add-room"))},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["rooms","loading-rooms","text-messages","show-search","show-add-room","onSearchRoom"])]),Ie(u,{show:s.loadingRooms,type:"rooms"},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["show"]),!s.loadingRooms&&!s.rooms.length?(Q(),ne("div",S2,[Re(e.$slots,"rooms-empty",{},()=>[aa(Je(s.textMessages.ROOMS_EMPTY),1)])])):ke("",!0),s.loadingRooms?ke("",!0):(Q(),ne("div",M2,[(Q(!0),ne(ut,null,tt(n.filteredRooms,l=>(Q(),ne("div",{id:l.roomId,key:l.roomId,class:at(["vac-room-item",{"vac-room-selected":n.selectedRoomId===l.roomId}]),onClick:p=>r.openRoom(l)},[Ie(g,{"current-user-id":s.currentUserId,room:l,"text-formatting":s.textFormatting,"link-options":s.linkOptions,"text-messages":s.textMessages,"room-actions":s.roomActions,onRoomActionHandler:t[1]||(t[1]=p=>e.$emit("room-action-handler",p))},gt({_:2},[tt(e.$slots,(p,c)=>({name:c,fn:Ge(M=>[Re(e.$slots,c,pt(_t(M)))])}))]),1032,["current-user-id","room","text-formatting","link-options","text-messages","room-actions"])],10,A2))),128)),Ie(Lt,{name:"vac-fade-message"},{default:Ge(()=>[s.rooms.length&&!s.loadingRooms?(Q(),ne("div",E2,[Ie(u,{show:n.showLoader,infinite:!0,type:"infinite-rooms"},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["show"])])):ke("",!0)]),_:3})]))],2)),[[Un,s.showRoomsList]])}var k2=wt(w2,[["render",T2]]);const R2={name:"RoomHeader",components:{SvgIcon:Ut},directives:{clickOutside:Qn},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},singleRoom:{type:Boolean,required:!0},showRoomsList:{type:Boolean,required:!0},isMobile:{type:Boolean,required:!0},roomInfoEnabled:{type:Boolean,required:!0},menuActions:{type:Array,required:!0},room:{type:Object,required:!0},messageSelectionEnabled:{type:Boolean,required:!0},messageSelectionActions:{type:Array,required:!0},selectedMessagesTotal:{type:Number,required:!0}},emits:["toggle-rooms-list","room-info","menu-action-handler","cancel-message-selection","message-selection-action-handler"],data(){return{menuOpened:!1,messageSelectionAnimationEnded:!0}},computed:{typingUsers(){return Vc(this.room,this.currentUserId,this.textMessages)},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(s=>s._id!==this.currentUserId);if(!(e!=null&&e.status))return;let t="";return e.status.state==="online"?t=this.textMessages.IS_ONLINE:e.status.lastChanged&&(t=this.textMessages.LAST_SEEN+e.status.lastChanged),t}},watch:{messageSelectionEnabled(e){e?this.messageSelectionAnimationEnded=!1:setTimeout(()=>{this.messageSelectionAnimationEnded=!0},300)}},methods:{menuActionHandler(e){this.closeMenu(),this.$emit("menu-action-handler",e)},closeMenu(){this.menuOpened=!1},messageSelectionActionHandler(e){this.$emit("message-selection-action-handler",e)}}},O2={class:"vac-room-header vac-app-border-b"},I2={class:"vac-room-wrapper"},C2={key:0,class:"vac-room-selection"},B2=["id"],L2=["onClick"],N2={class:"vac-selection-button-count"},j2={class:"vac-text-ellipsis"},H2={class:"vac-room-name vac-text-ellipsis"},F2={key:0,class:"vac-room-info vac-text-ellipsis"},P2={key:1,class:"vac-room-info vac-text-ellipsis"},U2={key:0,class:"vac-menu-options"},D2={class:"vac-menu-list"},q2=["onClick"];function V2(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Bn("click-outside");return Q(),ne("div",O2,[Re(e.$slots,"room-header",{},()=>[ge("div",I2,[Ie(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.messageSelectionEnabled?(Q(),ne("div",C2,[(Q(!0),ne(ut,null,tt(s.messageSelectionActions,g=>(Q(),ne("div",{id:g.name,key:g.name},[ge("div",{class:"vac-selection-button",onClick:l=>r.messageSelectionActionHandler(g)},[aa(Je(g.title)+" ",1),ge("span",N2,Je(s.selectedMessagesTotal),1)],8,L2)],8,B2))),128)),ge("div",{class:"vac-selection-cancel vac-item-clickable",onClick:t[0]||(t[0]=g=>e.$emit("cancel-message-selection"))},Je(s.textMessages.CANCEL_SELECT_MESSAGE),1)])):ke("",!0)]),_:1}),!s.messageSelectionEnabled&&n.messageSelectionAnimationEnded?(Q(),ne(ut,{key:0},[s.singleRoom?ke("",!0):(Q(),ne("div",{key:0,class:at(["vac-svg-button vac-toggle-button",{"vac-rotate-icon-init":!s.isMobile,"vac-rotate-icon":!s.showRoomsList&&!s.isMobile}]),onClick:t[1]||(t[1]=g=>e.$emit("toggle-rooms-list"))},[Re(e.$slots,"toggle-icon",{},()=>[Ie(o,{name:"toggle"})])],2)),ge("div",{class:at(["vac-info-wrapper",{"vac-item-clickable":s.roomInfoEnabled}]),onClick:t[2]||(t[2]=g=>e.$emit("room-info"))},[Re(e.$slots,"room-header-avatar",{},()=>[s.room.avatar?(Q(),ne("div",{key:0,class:"vac-avatar",style:Et({"background-image":`url('${s.room.avatar}')`})},null,4)):ke("",!0)]),Re(e.$slots,"room-header-info",{},()=>[ge("div",j2,[ge("div",H2,Je(s.room.roomName),1),r.typingUsers?(Q(),ne("div",F2,Je(r.typingUsers),1)):(Q(),ne("div",P2,Je(r.userStatus),1))])])],2),s.room.roomId?Re(e.$slots,"room-options",{key:1},()=>[s.menuActions.length?(Q(),ne("div",{key:0,class:"vac-svg-button vac-room-options",onClick:t[3]||(t[3]=g=>n.menuOpened=!n.menuOpened)},[Re(e.$slots,"menu-icon",{},()=>[Ie(o,{name:"menu"})])])):ke("",!0),s.menuActions.length?(Q(),vt(Lt,{key:1,name:"vac-slide-left"},{default:Ge(()=>[n.menuOpened?Ys((Q(),ne("div",U2,[ge("div",D2,[(Q(!0),ne(ut,null,tt(s.menuActions,g=>(Q(),ne("div",{key:g.name},[ge("div",{class:"vac-menu-item",onClick:l=>r.menuActionHandler(g)},Je(g.title),9,q2)]))),128))])])),[[u,r.closeMenu]]):ke("",!0)]),_:1})):ke("",!0)]):ke("",!0)],64)):ke("",!0)])])])}var z2=wt(R2,[["render",V2]]);function ei(e){if(typeof e!="string"||!e)throw new Error("expected a non-empty string, got: "+e)}function Po(e){if(typeof e!="number")throw new Error("expected a number, got: "+e)}const Y2=1,X2=1,Ba="emoji",rr="keyvalue",Uo="favorites",K2="tokens",Yc="tokens",G2="unicode",Xc="count",Z2="group",W2="order",Kc="group-order",Do="eTag",ti="url",Gc="skinTone",nr="readonly",qo="readwrite",Zc="skinUnicodes",Q2="skinUnicodes",J2="https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",$2="en";function ev(e,t){const s=new Set,a=[];for(const n of e){const r=t(n);s.has(r)||(s.add(r),a.push(n))}return a}function Wc(e){return ev(e,t=>t.unicode)}function tv(e){function t(s,a,n){const r=a?e.createObjectStore(s,{keyPath:a}):e.createObjectStore(s);if(n)for(const[o,[u,g]]of Object.entries(n))r.createIndex(o,u,{multiEntry:g});return r}t(rr),t(Ba,G2,{[Yc]:[K2,!0],[Kc]:[[Z2,W2]],[Zc]:[Q2,!0]}),t(Uo,void 0,{[Xc]:[""]})}const Vo={},si={},ai={};function Qc(e,t,s){s.onerror=()=>t(s.error),s.onblocked=()=>t(new Error("IDB blocked")),s.onsuccess=()=>e(s.result)}async function sv(e){const t=await new Promise((s,a)=>{const n=indexedDB.open(e,Y2);Vo[e]=n,n.onupgradeneeded=r=>{r.oldVersionzo(e),t}function av(e){return si[e]||(si[e]=sv(e)),si[e]}function Gs(e,t,s,a){return new Promise((n,r)=>{const o=e.transaction(t,s,{durability:"relaxed"}),u=typeof t=="string"?o.objectStore(t):t.map(l=>o.objectStore(l));let g;a(u,o,l=>{g=l}),o.oncomplete=()=>n(g),o.onerror=()=>r(o.error)})}function zo(e){const t=Vo[e],s=t&&t.result;if(s){s.close();const a=ai[e];if(a)for(const n of a)n()}delete Vo[e],delete si[e],delete ai[e]}function rv(e){return new Promise((t,s)=>{zo(e);const a=indexedDB.deleteDatabase(e);Qc(t,s,a)})}function nv(e,t){let s=ai[e];s||(s=ai[e]=[]),s.push(t)}const iv=new Set([":D","XD",":'D","O:)",":X",":P",";P","XP",":L",":Z",":j","8D","XO","8)",":B",":O",":S",":'o","Dx","X(","D:",":C",">0)",":3","3","<3","\\M/",":E","8#"]);function ir(e){return e.split(/[\s_]+/).map(t=>!t.match(/\w/)||iv.has(t)?t.toLowerCase():t.replace(/[)(:,]/g,"").replace(/’/g,"'").toLowerCase()).filter(Boolean)}const ov=2;function Jc(e){return e.filter(Boolean).map(t=>t.toLowerCase()).filter(t=>t.length>=ov)}function lv(e){return e.map(({annotation:s,emoticon:a,group:n,order:r,shortcodes:o,skins:u,tags:g,emoji:l,version:p})=>{const c=[...new Set(Jc([...(o||[]).map(ir).flat(),...g.map(ir).flat(),...ir(s),a]))].sort(),M={annotation:s,group:n,order:r,tags:g,tokens:c,unicode:l,version:p};if(a&&(M.emoticon=a),o&&(M.shortcodes=o),u){M.skinTones=[],M.skinUnicodes=[],M.skinVersions=[];for(const{tone:A,emoji:i,version:H}of u)M.skinTones.push(A),M.skinUnicodes.push(i),M.skinVersions.push(H)}return M})}function $c(e,t,s,a){e[t](s).onsuccess=n=>a&&a(n.target.result)}function La(e,t,s){$c(e,"get",t,s)}function e1(e,t,s){$c(e,"getAll",t,s)}function Yo(e){e.commit&&e.commit()}function cv(e,t){let s=e[0];for(let a=1;at(n)&&(s=n)}return s}function t1(e,t){const s=cv(e,n=>n.length),a=[];for(const n of s)e.some(r=>r.findIndex(o=>t(o)===t(n))===-1)||a.push(n);return a}async function uv(e){return!await Xo(e,rr,ti)}async function dv(e,t,s){const[a,n]=await Promise.all([Do,ti].map(r=>Xo(e,rr,r)));return a===s&&n===t}async function fv(e,t){return Gs(e,Ba,nr,(a,n,r)=>{let o;const u=()=>{a.getAll(o&&IDBKeyRange.lowerBound(o,!0),50).onsuccess=g=>{const l=g.target.result;for(const p of l)if(o=p.unicode,t(p))return r(p);if(l.length<50)return r();u()}};u()})}async function s1(e,t,s,a){try{const n=lv(t);await Gs(e,[Ba,rr],qo,([r,o],u)=>{let g,l,p=0;function c(){++p===2&&M()}function M(){if(!(g===a&&l===s)){r.clear();for(const A of n)r.put(A);o.put(a,Do),o.put(s,ti),Yo(u)}}La(o,Do,A=>{g=A,c()}),La(o,ti,A=>{l=A,c()})})}finally{}}async function mv(e,t){return Gs(e,Ba,nr,(s,a,n)=>{const r=IDBKeyRange.bound([t,0],[t+1,0],!1,!0);e1(s.index(Kc),r,n)})}async function a1(e,t){const s=Jc(ir(t));return s.length?Gs(e,Ba,nr,(a,n,r)=>{const o=[],u=()=>{o.length===s.length&&g()},g=()=>{const l=t1(o,p=>p.unicode);r(l.sort((p,c)=>p.order{o.push(M),u()})}}):[]}async function hv(e,t){const s=await a1(e,t);return s.length?s.filter(a=>(a.shortcodes||[]).map(r=>r.toLowerCase()).includes(t.toLowerCase()))[0]||null:await fv(e,n=>(n.shortcodes||[]).includes(t.toLowerCase()))||null}async function vv(e,t){return Gs(e,Ba,nr,(s,a,n)=>La(s,t,r=>{if(r)return n(r);La(s.index(Zc),t,o=>n(o||null))}))}function Xo(e,t,s){return Gs(e,t,nr,(a,n,r)=>La(a,s,r))}function _v(e,t,s,a){return Gs(e,t,qo,(n,r)=>{n.put(a,s),Yo(r)})}function pv(e,t){return Gs(e,Uo,qo,(s,a)=>La(s,t,n=>{s.put((n||0)+1,t),Yo(a)}))}function gv(e,t,s){return s===0?[]:Gs(e,[Uo,Ba],nr,([a,n],r,o)=>{const u=[];a.index(Xc).openCursor(void 0,"prev").onsuccess=g=>{const l=g.target.result;if(!l)return o(u);function p(A){if(u.push(A),u.length===s)return o(u);l.continue()}const c=l.primaryKey,M=t.byName(c);if(M)return p(M);La(n,c,A=>{if(A)return p(A);l.continue()})}})}const ri="";function bv(e,t){const s=new Map;for(const n of e){const r=t(n);for(const o of r){let u=s;for(let l=0;l{let o=s;for(let l=0;lc[0]!(a in e[0])));if(!t||s)throw new Error("Custom emojis are in the wrong format")}function r1(e){xv(e);const t=(M,A)=>M.name.toLowerCase()[...new Set((M.shortcodes||[]).map(A=>ir(A)).flat())]),r=M=>n(M,!0),o=M=>n(M,!1),u=M=>{const A=ir(M),i=A.map((H,B)=>(BH.name).sort(t)},g=new Map,l=new Map;for(const M of e){l.set(M.name.toLowerCase(),M);for(const A of M.shortcodes||[])g.set(A.toLowerCase(),M)}return{all:s,search:u,byShortcode:M=>g.get(M.toLowerCase()),byName:M=>l.get(M.toLowerCase())}}function Gr(e){if(!e)return e;if(delete e.tokens,e.skinTones){const t=e.skinTones.length;e.skins=Array(t);for(let s=0;s!(t in e[0])))throw new Error("Emoji data is in the wrong format")}function i1(e,t){if(Math.floor(e.status/100)!==2)throw new Error("Failed to fetch: "+t+": "+e.status)}async function Mv(e){const t=await fetch(e,{method:"HEAD"});i1(t,e);const s=t.headers.get("etag");return n1(s),s}async function Ko(e){const t=await fetch(e);i1(t,e);const s=t.headers.get("etag");n1(s);const a=await t.json();return Sv(a),[s,a]}function Av(e){for(var t="",s=new Uint8Array(e),a=s.byteLength,n=-1;++n(this._ready||(this._ready=this._init()),this._ready);await t(),this._db||await t()}async getEmojiByGroup(t){return Po(t),await this.ready(),Wc(await mv(this._db,t)).map(Gr)}async getEmojiBySearchQuery(t){ei(t),await this.ready();const s=this._custom.search(t),a=Wc(await a1(this._db,t)).map(Gr);return[...s,...a]}async getEmojiByShortcode(t){ei(t),await this.ready();const s=this._custom.byShortcode(t);return s||Gr(await hv(this._db,t))}async getEmojiByUnicodeOrName(t){ei(t),await this.ready();const s=this._custom.byName(t);return s||Gr(await vv(this._db,t))}async getPreferredSkinTone(){return await this.ready(),await Xo(this._db,rr,Gc)||0}async setPreferredSkinTone(t){return Po(t),await this.ready(),_v(this._db,rr,Gc,t)}async incrementFavoriteEmojiCount(t){return ei(t),await this.ready(),pv(this._db,t)}async getTopFavoriteEmoji(t){return Po(t),await this.ready(),(await gv(this._db,this._custom,t)).map(Gr)}set customEmoji(t){this._custom=r1(t)}get customEmoji(){return this._custom.all}async _shutdown(){await this.ready();try{await this._lazyUpdate}catch{}}_clear(){this._db=this._ready=this._lazyUpdate=void 0}async close(){await this._shutdown(),await zo(this._dbName)}async delete(){await this._shutdown(),await rv(this._dbName)}}function Zr(){}function c1(e){return e()}function u1(){return Object.create(null)}function Wr(e){e.forEach(c1)}function d1(e){return typeof e=="function"}function Rv(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ni;function ii(e,t){return ni||(ni=document.createElement("a")),ni.href=t,e===ni.href}function Ov(e){return Object.keys(e).length===0}function Iv(e){return e&&d1(e.destroy)?e.destroy:Zr}function Mt(e,t){e.appendChild(t)}function ws(e,t,s){e.insertBefore(t,s||null)}function Ss(e){e.parentNode.removeChild(e)}function yt(e){return document.createElement(e)}function js(e){return document.createTextNode(e)}function Ms(e,t,s,a){return e.addEventListener(t,s,a),()=>e.removeEventListener(t,s,a)}function se(e,t,s){s==null?e.removeAttribute(t):e.getAttribute(t)!==s&&e.setAttribute(t,s)}function Hs(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function f1(e,t){e.value=t==null?"":t}function ca(e,t,s,a){s===null?e.style.removeProperty(t):e.style.setProperty(t,s,a?"important":"")}let Go;function Qr(e){Go=e}const Jr=[],or=[],oi=[],m1=[],h1=Promise.resolve();let Zo=!1;function v1(){Zo||(Zo=!0,h1.then(_1))}function Cv(){return v1(),h1}function Wo(e){oi.push(e)}const Qo=new Set;let li=0;function _1(){const e=Go;do{for(;lim.get(w)?(C.add(E),T(L)):(R.add(w),M--):(g(f,o),M--)}for(;M--;){const L=e[M];N.has(L.key)||g(L,o)}for(;A;)T(B[A-1]);return B}function Hv(e,t,s,a){const{fragment:n,on_mount:r,on_destroy:o,after_update:u}=e.$$;n&&n.m(t,s),a||Wo(()=>{const g=r.map(c1).filter(d1);o?o.push(...g):Wr(g),e.$$.on_mount=[]}),u.forEach(Wo)}function Fv(e,t){const s=e.$$;s.fragment!==null&&(Wr(s.on_destroy),s.fragment&&s.fragment.d(t),s.on_destroy=s.fragment=null,s.ctx=[])}function Pv(e,t){e.$$.dirty[0]===-1&&(Jr.push(e),v1(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=A.length?A[0]:M;return l.ctx&&n(l.ctx[c],l.ctx[c]=i)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](i),p&&Pv(e,c)),M}):[],l.update(),p=!0,Wr(l.before_update),l.fragment=a?a(l.ctx):!1,t.target&&(l.fragment&&l.fragment.c(),Hv(e,t.target,void 0,void 0),_1()),Qr(g)}class Dv{$destroy(){Fv(this,1),this.$destroy=Zr}$on(t,s){const a=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return a.push(s),()=>{const n=a.indexOf(s);n!==-1&&a.splice(n,1)}}$set(t){this.$$set&&!Ov(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const p1=[[-1,"\u2728","custom"],[0,"\u{1F600}","smileys-emotion"],[1,"\u{1F44B}","people-body"],[3,"\u{1F431}","animals-nature"],[4,"\u{1F34E}","food-drink"],[5,"\u{1F3E0}\uFE0F","travel-places"],[6,"\u26BD","activities"],[7,"\u{1F4DD}","objects"],[8,"\u26D4\uFE0F","symbols"],[9,"\u{1F3C1}","flags"]].map(([e,t,s])=>({id:e,emoji:t,name:s})),ci=p1.slice(1),qv=p1[0],Vv=2,g1=6,b1=typeof requestIdleCallback=="function"?requestIdleCallback:setTimeout;function y1(e){return e.unicode.includes("\u200D")}const zv={"\u{1FAE0}":14,"\u{1F972}":13.1,"\u{1F97B}":12.1,"\u{1F970}":11,"\u{1F929}":5,"\u{1F471}\u200D\u2640\uFE0F":4,"\u{1F923}":3,"\u{1F441}\uFE0F\u200D\u{1F5E8}\uFE0F":2,"\u{1F600}":1,"\u{1F610}\uFE0F":.7,"\u{1F603}":.6},Yv=1e3,Xv="\u{1F590}\uFE0F",Kv=8,Gv=["\u{1F60A}","\u{1F612}","\u2665\uFE0F","\u{1F44D}\uFE0F","\u{1F60D}","\u{1F602}","\u{1F62D}","\u263A\uFE0F","\u{1F614}","\u{1F629}","\u{1F60F}","\u{1F495}","\u{1F64C}","\u{1F618}"],x1='"Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',Zv=(e,t)=>et?1:0,w1=(e,t)=>{const s=document.createElement("canvas");s.width=s.height=1;const a=s.getContext("2d");return a.textBaseline="top",a.font=`100px ${x1}`,a.fillStyle=t,a.scale(.01,.01),a.fillText(e,0,0),a.getImageData(0,0,1,1).data},Wv=(e,t)=>{const s=[...e].join(","),a=[...t].join(",");return s===a&&!s.startsWith("0,0,0,")};function Qv(e){const t=w1(e,"#000"),s=w1(e,"#fff");return t&&s&&Wv(t,s)}function Jv(){const e=Object.entries(zv);try{for(const[t,s]of e)if(Qv(t))return s}catch{}finally{}return e[0][1]}const Jo=new Promise(e=>b1(()=>e(Jv()))),$o=new Map,$v="\uFE0F",e_="\uD83C",t_="\u200D",s_=127995,a_=57339;function r_(e,t){if(t===0)return e;const s=e.indexOf(t_);return s!==-1?e.substring(0,s)+String.fromCodePoint(s_+t-1)+e.substring(s):(e.endsWith($v)&&(e=e.substring(0,e.length-1)),e+e_+String.fromCodePoint(a_+t-1))}function ua(e){e.preventDefault(),e.stopPropagation()}function el(e,t,s){return t+=e?-1:1,t<0?t=s.length-1:t>=s.length&&(t=0),t}function S1(e,t){const s=new Set,a=[];for(const n of e){const r=t(n);s.has(r)||(s.add(r),a.push(n))}return a}function n_(e,t){const s=a=>{const n={};for(const r of a)typeof r.tone=="number"&&r.version<=t&&(n[r.tone]=r.unicode);return n};return e.map(({unicode:a,skins:n,shortcodes:r,url:o,name:u,category:g})=>({unicode:a,name:u,shortcodes:r,url:o,category:g,id:a||u,skins:n&&s(n),title:(r||[]).join(", ")}))}const ui=requestAnimationFrame;let i_=typeof ResizeObserver=="function";function o_(e,t){let s;return i_?(s=new ResizeObserver(a=>t(a[0].contentRect.width)),s.observe(e)):ui(()=>t(e.getBoundingClientRect().width)),{destroy(){s&&s.disconnect()}}}function M1(e){{const t=document.createRange();return t.selectNode(e.firstChild),t.getBoundingClientRect().width}}let tl;function l_(e,t,s){for(const a of e){const n=s(a),r=M1(n);typeof tl=="undefined"&&(tl=M1(t));const o=r/1.8t)}const{Map:tn}=jv;function A1(e,t,s){const a=e.slice();return a[63]=t[s],a[65]=s,a}function E1(e,t,s){const a=e.slice();return a[66]=t[s],a[65]=s,a}function T1(e,t,s){const a=e.slice();return a[63]=t[s],a[65]=s,a}function k1(e,t,s){const a=e.slice();return a[69]=t[s],a}function R1(e,t,s){const a=e.slice();return a[72]=t[s],a[65]=s,a}function O1(e,t){let s,a=t[72]+"",n,r,o,u,g,l;return{key:e,first:null,c(){s=yt("div"),n=js(a),se(s,"id",r="skintone-"+t[65]),se(s,"class",o="emoji hide-focus "+(t[65]===t[20]?"active":"")),se(s,"aria-selected",u=t[65]===t[20]),se(s,"role","option"),se(s,"title",g=t[0].skinTones[t[65]]),se(s,"tabindex","-1"),se(s,"aria-label",l=t[0].skinTones[t[65]]),this.first=s},m(p,c){ws(p,s,c),Mt(s,n)},p(p,c){t=p,c[0]&512&&a!==(a=t[72]+"")&&Hs(n,a),c[0]&512&&r!==(r="skintone-"+t[65])&&se(s,"id",r),c[0]&1049088&&o!==(o="emoji hide-focus "+(t[65]===t[20]?"active":""))&&se(s,"class",o),c[0]&1049088&&u!==(u=t[65]===t[20])&&se(s,"aria-selected",u),c[0]&513&&g!==(g=t[0].skinTones[t[65]])&&se(s,"title",g),c[0]&513&&l!==(l=t[0].skinTones[t[65]])&&se(s,"aria-label",l)},d(p){p&&Ss(s)}}}function I1(e,t){let s,a,n=t[69].emoji+"",r,o,u,g,l,p,c;function M(){return t[49](t[69])}return{key:e,first:null,c(){s=yt("button"),a=yt("div"),r=js(n),se(a,"class","nav-emoji emoji"),se(s,"role","tab"),se(s,"class","nav-button"),se(s,"aria-controls",o="tab-"+t[69].id),se(s,"aria-label",u=t[0].categories[t[69].name]),se(s,"aria-selected",g=!t[4]&&t[13].id===t[69].id),se(s,"title",l=t[0].categories[t[69].name]),this.first=s},m(A,i){ws(A,s,i),Mt(s,a),Mt(a,r),p||(c=Ms(s,"click",M),p=!0)},p(A,i){t=A,i[0]&4096&&n!==(n=t[69].emoji+"")&&Hs(r,n),i[0]&4096&&o!==(o="tab-"+t[69].id)&&se(s,"aria-controls",o),i[0]&4097&&u!==(u=t[0].categories[t[69].name])&&se(s,"aria-label",u),i[0]&12304&&g!==(g=!t[4]&&t[13].id===t[69].id)&&se(s,"aria-selected",g),i[0]&4097&&l!==(l=t[0].categories[t[69].name])&&se(s,"title",l)},d(A){A&&Ss(s),p=!1,c()}}}function u_(e){let t,s;return{c(){t=yt("img"),se(t,"class","custom-emoji"),ii(t.src,s=e[63].url)||se(t,"src",s),se(t,"alt",""),se(t,"loading","lazy")},m(a,n){ws(a,t,n)},p(a,n){n[0]&32768&&!ii(t.src,s=a[63].url)&&se(t,"src",s)},d(a){a&&Ss(t)}}}function d_(e){let t=e[27](e[63],e[8])+"",s;return{c(){s=js(t)},m(a,n){ws(a,s,n)},p(a,n){n[0]&33024&&t!==(t=a[27](a[63],a[8])+"")&&Hs(s,t)},d(a){a&&Ss(s)}}}function C1(e,t){let s,a,n,r,o,u,g;function l(M,A){return M[63].unicode?d_:u_}let p=l(t),c=p(t);return{key:e,first:null,c(){s=yt("button"),c.c(),se(s,"role",a=t[4]?"option":"menuitem"),se(s,"aria-selected",n=t[4]?t[65]==t[5]:""),se(s,"aria-label",r=t[28](t[63],t[8])),se(s,"title",o=t[63].title),se(s,"class",u="emoji "+(t[4]&&t[65]===t[5]?"active":"")),se(s,"id",g="emo-"+t[63].id),this.first=s},m(M,A){ws(M,s,A),c.m(s,null)},p(M,A){t=M,p===(p=l(t))&&c?c.p(t,A):(c.d(1),c=p(t),c&&(c.c(),c.m(s,null))),A[0]&16&&a!==(a=t[4]?"option":"menuitem")&&se(s,"role",a),A[0]&32816&&n!==(n=t[4]?t[65]==t[5]:"")&&se(s,"aria-selected",n),A[0]&33024&&r!==(r=t[28](t[63],t[8]))&&se(s,"aria-label",r),A[0]&32768&&o!==(o=t[63].title)&&se(s,"title",o),A[0]&32816&&u!==(u="emoji "+(t[4]&&t[65]===t[5]?"active":""))&&se(s,"class",u),A[0]&32768&&g!==(g="emo-"+t[63].id)&&se(s,"id",g)},d(M){M&&Ss(s),c.d()}}}function B1(e,t){let s,a=(t[4]?t[0].searchResultsLabel:t[66].category?t[66].category:t[15].length>1?t[0].categories.custom:t[0].categories[t[13].name])+"",n,r,o,u,g=[],l=new tn,p,c,M,A=t[66].emojis;const i=H=>H[63].id;for(let H=0;H1?t[0].categories.custom:t[0].categories[t[13].name])+"")&&Hs(n,a),B[0]&32768&&r!==(r="menu-label-"+t[65])&&se(s,"id",r),B[0]&32768&&o!==(o="category "+(t[15].length===1&&t[15][0].category===""?"gone":""))&&se(s,"class",o),B[0]&402686256&&(A=t[66].emojis,g=en(g,B,i,1,t,A,l,u,$r,C1,null,T1)),B[0]&16&&p!==(p=t[4]?"listbox":"menu")&&se(u,"role",p),B[0]&32768&&c!==(c="menu-label-"+t[65])&&se(u,"aria-labelledby",c),B[0]&16&&M!==(M=t[4]?"search-results":"")&&se(u,"id",M)},d(H){H&&Ss(s),H&&Ss(u);for(let B=0;Bce[72];for(let ce=0;cece[69].id;for(let ce=0;cece[66].category;for(let ce=0;cece[63].id;for(let ce=0;ce{A.getRootNode().getElementById($).focus()},W=($,Ce)=>{A.dispatchEvent(new CustomEvent($,{detail:Ce,bubbles:!0,composed:!0}))},de=($,Ce)=>Ce&&$.skins&&$.skins[Ce]||$.unicode,Me=($,Ce)=>c_([$.name||de($,Ce),...$.shortcodes||[]]).join(", "),Ae=$=>/^skintone-/.test($.id);Jo.then($=>{$||s(18,m=n.emojiUnsupportedMessage)});function he($){return o_($,Ce=>{{const k=getComputedStyle(A),I=parseInt(k.getPropertyValue("--num-columns"),10),D=k.getPropertyValue("direction")==="rtl",Y=$.parentElement.getBoundingClientRect().width-Ce;s(46,x=I),s(25,j=Y),s(24,y=D)}})}function Ue($){const Ce=A.getRootNode();l_($,i,I=>Ce.getElementById(`emo-${I.id}`)),s(1,l=l)}function Le($){return!$.unicode||!y1($)||$o.get($.unicode)}async function fe($){const Ce=await Jo;return $.filter(({version:k})=>!k||k<=Ce)}async function Ke($){return n_($,await Jo)}async function it($){if(typeof $=="undefined")return[];const Ce=$===-1?o:await r.getEmojiByGroup($);return Ke(await fe(Ce))}async function U($){return Ke(await fe(await r.getEmojiBySearchQuery($)))}function z($){if(!B||!l.length)return;const Ce=k=>{ua($),s(5,N=el(k,N,l))};switch($.key){case"ArrowDown":return Ce(!1);case"ArrowUp":return Ce(!0);case"Enter":if(N!==-1)return ua($),ue(l[N].id);l.length&&s(5,N=0)}}function te($){s(2,c=""),s(44,M=""),s(5,N=-1),s(11,X=P.findIndex(Ce=>Ce.id===$.id))}function le($){const{target:Ce,key:k}=$,I=D=>{D&&(ua($),D.focus())};switch(k){case"ArrowLeft":return I(Ce.previousSibling);case"ArrowRight":return I(Ce.nextSibling);case"Home":return I(Ce.parentElement.firstChild);case"End":return I(Ce.parentElement.lastChild)}}async function ue($){const Ce=await r.getEmojiByUnicodeOrName($),k=[...l,..._].find(D=>D.id===$),I=k.unicode&&de(k,L);await r.incrementFavoriteEmojiCount($),W("emoji-click",{emoji:Ce,skinTone:L,...I&&{unicode:I},...k.name&&{name:k.name}})}async function xe($){const{target:Ce}=$;if(!Ce.classList.contains("emoji"))return;ua($);const k=Ce.id.substring(4);ue(k)}async function Ee($){const{target:Ce}=$;if(!Ae(Ce))return;ua($);const k=parseInt(Ce.id.slice(9),10);s(8,L=k),s(6,R=!1),Z("skintone-button"),W("skin-tone-change",{skinTone:k}),r.setPreferredSkinTone(k)}async function be($){s(6,R=!R),s(20,f=L),R&&(ua($),ui(()=>Z(`skintone-${f}`)))}function Se($){if(!R)return;const Ce=async k=>{ua($),s(20,f=k),await Cv(),Z(`skintone-${f}`)};switch($.key){case"ArrowUp":return Ce(el(!0,f,b));case"ArrowDown":return Ce(el(!1,f,b));case"Home":return Ce(0);case"End":return Ce(b.length-1);case"Enter":return Ee($);case"Escape":return ua($),s(6,R=!1),Z("skintone-button")}}function me($){if(!!R)switch($.key){case" ":return Ee($)}}async function Fe($){const{relatedTarget:Ce}=$;(!Ce||!Ae(Ce))&&s(6,R=!1)}function Ne(){c=this.value,s(2,c)}function Pe($){or[$?"unshift":"push"](()=>{T=$,s(7,T)})}const De=$=>te($);function Ze($){or[$?"unshift":"push"](()=>{H=$,s(3,H)})}function ce($){or[$?"unshift":"push"](()=>{i=$,s(17,i)})}function ye($){or[$?"unshift":"push"](()=>{A=$,s(16,A)})}return e.$$set=$=>{"skinToneEmoji"in $&&s(40,a=$.skinToneEmoji),"i18n"in $&&s(0,n=$.i18n),"database"in $&&s(39,r=$.database),"customEmoji"in $&&s(41,o=$.customEmoji),"customCategorySorting"in $&&s(42,u=$.customCategorySorting)},e.$$.update=()=>{if(e.$$.dirty[1]&1280&&o&&r&&s(39,r.customEmoji=o,r),e.$$.dirty[0]&1|e.$$.dirty[1]&256){async function $(){let Ce=!1;const k=setTimeout(()=>{Ce=!0,s(18,m=n.loadingMessage)},Yv);try{await r.ready(),s(14,d=!0)}catch(I){console.error(I),s(18,m=n.networkErrorMessage)}finally{clearTimeout(k),Ce&&(Ce=!1,s(18,m=""))}}r&&$()}if(e.$$.dirty[0]&6144|e.$$.dirty[1]&1024&&(o&&o.length?s(12,P=[qv,...ci]):P!==ci&&(X&&s(11,X--,X),s(12,P=ci))),e.$$.dirty[0]&4&&b1(()=>{s(44,M=(c||"").trim()),s(5,N=-1)}),e.$$.dirty[0]&6144&&s(13,V=P[X]),e.$$.dirty[0]&24576|e.$$.dirty[1]&8192){async function $(){if(!d)s(1,l=[]),s(4,B=!1);else if(M.length>=Vv){const Ce=M,k=await U(Ce);Ce===M&&(s(1,l=k),s(4,B=!0))}else if(V){const Ce=V.id,k=await it(Ce);Ce===V.id&&(s(1,l=k),s(4,B=!1))}}$()}if(e.$$.dirty[0]&4112&&s(22,w=`
- --font-family: ${x1};
+(function(ur,dr){typeof exports=="object"&&typeof module!="undefined"?dr(exports):typeof define=="function"&&define.amd?define(["exports"],dr):(ur=typeof globalThis!="undefined"?globalThis:ur||self,dr(ur["vue-advanced-chat"]={}))})(this,function(ur){"use strict";function dr(e,t){const n=Object.create(null),r=e.split(",");for(let a=0;a!!n[a.toLowerCase()]:a=>!!n[a]}const qu=dr("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function jo(e){return!!e||e===""}function St(e){if(Qe(e)){const t={};for(let n=0;n{if(n){const r=n.split(Yu);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function rt(e){let t="";if(Nt(e))t=e;else if(Qe(e))for(let n=0;nNt(e)?e:e==null?"":Qe(e)||Ot(e)&&(e.toString===Po||!it(e.toString))?JSON.stringify(e,No,2):String(e),No=(e,t)=>t&&t.__v_isRef?No(e,t.value):Nr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,a])=>(n[`${r} =>`]=a,n),{})}:Ho(t)?{[`Set(${t.size})`]:[...t.values()]}:Ot(t)&&!Qe(t)&&!zo(t)?String(t):t,bt={},jr=[],vn=()=>{},Gu=()=>!1,Wu=/^on[^a-z]/,Pi=e=>Wu.test(e),Ga=e=>e.startsWith("onUpdate:"),jt=Object.assign,Wa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zu=Object.prototype.hasOwnProperty,lt=(e,t)=>Zu.call(e,t),Qe=Array.isArray,Nr=e=>zi(e)==="[object Map]",Ho=e=>zi(e)==="[object Set]",it=e=>typeof e=="function",Nt=e=>typeof e=="string",Za=e=>typeof e=="symbol",Ot=e=>e!==null&&typeof e=="object",Do=e=>Ot(e)&&it(e.then)&&it(e.catch),Po=Object.prototype.toString,zi=e=>Po.call(e),Qu=e=>zi(e).slice(8,-1),zo=e=>zi(e)==="[object Object]",Qa=e=>Nt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ui=dr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Vi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ju=/-(\w)/g,un=Vi(e=>e.replace(Ju,(t,n)=>n?n.toUpperCase():"")),$u=/\B([A-Z])/g,An=Vi(e=>e.replace($u,"-$1").toLowerCase()),qi=Vi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ja=Vi(e=>e?`on${qi(e)}`:""),Xi=(e,t)=>!Object.is(e,t),$a=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ki=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Uo;const e1=()=>Uo||(Uo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let En;class t1{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&En&&(this.parent=En,this.index=(En.scopes||(En.scopes=[])).push(this)-1)}run(t){if(this.active){const n=En;try{return En=this,t()}finally{En=n}}}on(){En=this}off(){En=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Vo=e=>(e.w&Gn)>0,qo=e=>(e.n&Gn)>0,r1=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(u==="length"||u>=r)&&l.push(f)});else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Qe(e)?Qa(n)&&l.push(s.get("length")):(l.push(s.get(fr)),Nr(e)&&l.push(s.get(rs)));break;case"delete":Qe(e)||(l.push(s.get(fr)),Nr(e)&&l.push(s.get(rs)));break;case"set":Nr(e)&&l.push(s.get(fr));break}if(l.length===1)l[0]&&as(l[0]);else{const f=[];for(const u of l)u&&f.push(...u);as(es(f))}}function as(e,t){const n=Qe(e)?e:[...e];for(const r of n)r.computed&&Go(r);for(const r of n)r.computed||Go(r)}function Go(e,t){(e!==gn||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const a1=dr("__proto__,__v_isRef,__isVue"),Wo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Za)),s1=ss(),o1=ss(!1,!0),l1=ss(!0),Zo=c1();function c1(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=mt(this);for(let i=0,s=this.length;i{e[t]=function(...n){Hr();const r=mt(this)[t].apply(this,n);return Dr(),r}}),e}function ss(e=!1,t=!1){return function(r,a,i){if(a==="__v_isReactive")return!e;if(a==="__v_isReadonly")return e;if(a==="__v_isShallow")return t;if(a==="__v_raw"&&i===(e?t?M1:al:t?il:rl).get(r))return r;const s=Qe(r);if(!e&&s&<(Zo,a))return Reflect.get(Zo,a,i);const l=Reflect.get(r,a,i);return(Za(a)?Wo.has(a):a1(a))||(e||nn(r,"get",a),t)?l:Kt(l)?s&&Qa(a)?l:l.value:Ot(l)?e?sl(l):cs(l):l}}const u1=Qo(),d1=Qo(!0);function Qo(e=!1){return function(n,r,a,i){let s=n[r];if(ri(s)&&Kt(s)&&!Kt(a))return!1;if(!e&&!ri(a)&&(ds(a)||(a=mt(a),s=mt(s)),!Qe(n)&&Kt(s)&&!Kt(a)))return s.value=a,!0;const l=Qe(n)&&Qa(r)?Number(r)e,Gi=e=>Reflect.getPrototypeOf(e);function Wi(e,t,n=!1,r=!1){e=e.__v_raw;const a=mt(e),i=mt(t);n||(t!==i&&nn(a,"get",t),nn(a,"get",i));const{has:s}=Gi(a),l=r?os:n?ms:fs;if(s.call(a,t))return l(e.get(t));if(s.call(a,i))return l(e.get(i));e!==a&&e.get(t)}function Zi(e,t=!1){const n=this.__v_raw,r=mt(n),a=mt(e);return t||(e!==a&&nn(r,"has",e),nn(r,"has",a)),e===a?n.has(e):n.has(e)||n.has(a)}function Qi(e,t=!1){return e=e.__v_raw,!t&&nn(mt(e),"iterate",fr),Reflect.get(e,"size",e)}function $o(e){e=mt(e);const t=mt(this);return Gi(t).has.call(t,e)||(t.add(e),Dn(t,"add",e,e)),this}function el(e,t){t=mt(t);const n=mt(this),{has:r,get:a}=Gi(n);let i=r.call(n,e);i||(e=mt(e),i=r.call(n,e));const s=a.call(n,e);return n.set(e,t),i?Xi(t,s)&&Dn(n,"set",e,t):Dn(n,"add",e,t),this}function tl(e){const t=mt(this),{has:n,get:r}=Gi(t);let a=n.call(t,e);a||(e=mt(e),a=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return a&&Dn(t,"delete",e,void 0),i}function nl(){const e=mt(this),t=e.size!==0,n=e.clear();return t&&Dn(e,"clear",void 0,void 0),n}function Ji(e,t){return function(r,a){const i=this,s=i.__v_raw,l=mt(s),f=t?os:e?ms:fs;return!e&&nn(l,"iterate",fr),s.forEach((u,h)=>r.call(a,f(u),f(h),i))}}function $i(e,t,n){return function(...r){const a=this.__v_raw,i=mt(a),s=Nr(i),l=e==="entries"||e===Symbol.iterator&&s,f=e==="keys"&&s,u=a[e](...r),h=n?os:t?ms:fs;return!t&&nn(i,"iterate",f?rs:fr),{next(){const{value:c,done:v}=u.next();return v?{value:c,done:v}:{value:l?[h(c[0]),h(c[1])]:h(c),done:v}},[Symbol.iterator](){return this}}}}function Zn(e){return function(...t){return e==="delete"?!1:this}}function v1(){const e={get(i){return Wi(this,i)},get size(){return Qi(this)},has:Zi,add:$o,set:el,delete:tl,clear:nl,forEach:Ji(!1,!1)},t={get(i){return Wi(this,i,!1,!0)},get size(){return Qi(this)},has:Zi,add:$o,set:el,delete:tl,clear:nl,forEach:Ji(!1,!0)},n={get(i){return Wi(this,i,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:Zn("add"),set:Zn("set"),delete:Zn("delete"),clear:Zn("clear"),forEach:Ji(!0,!1)},r={get(i){return Wi(this,i,!0,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:Zn("add"),set:Zn("set"),delete:Zn("delete"),clear:Zn("clear"),forEach:Ji(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=$i(i,!1,!1),n[i]=$i(i,!0,!1),t[i]=$i(i,!1,!0),r[i]=$i(i,!0,!0)}),[e,n,t,r]}const[g1,b1,x1,y1]=v1();function ls(e,t){const n=t?e?y1:x1:e?b1:g1;return(r,a,i)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?r:Reflect.get(lt(n,a)&&a in r?n:r,a,i)}const w1={get:ls(!1,!1)},k1={get:ls(!1,!0)},S1={get:ls(!0,!1)},rl=new WeakMap,il=new WeakMap,al=new WeakMap,M1=new WeakMap;function A1(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function E1(e){return e.__v_skip||!Object.isExtensible(e)?0:A1(Qu(e))}function cs(e){return ri(e)?e:us(e,!1,Jo,w1,rl)}function T1(e){return us(e,!1,p1,k1,il)}function sl(e){return us(e,!0,_1,S1,al)}function us(e,t,n,r,a){if(!Ot(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=a.get(e);if(i)return i;const s=E1(e);if(s===0)return e;const l=new Proxy(e,s===2?r:n);return a.set(e,l),l}function Pr(e){return ri(e)?Pr(e.__v_raw):!!(e&&e.__v_isReactive)}function ri(e){return!!(e&&e.__v_isReadonly)}function ds(e){return!!(e&&e.__v_isShallow)}function ol(e){return Pr(e)||ri(e)}function mt(e){const t=e&&e.__v_raw;return t?mt(t):e}function ll(e){return Yi(e,"__v_skip",!0),e}const fs=e=>Ot(e)?cs(e):e,ms=e=>Ot(e)?sl(e):e;function R1(e){Wn&&gn&&(e=mt(e),Ko(e.dep||(e.dep=es())))}function I1(e,t){e=mt(e),e.dep&&as(e.dep)}function Kt(e){return!!(e&&e.__v_isRef===!0)}function C1(e){return Kt(e)?e.value:e}const B1={get:(e,t,n)=>C1(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const a=e[t];return Kt(a)&&!Kt(n)?(a.value=n,!0):Reflect.set(e,t,n,r)}};function cl(e){return Pr(e)?e:new Proxy(e,B1)}class O1{constructor(t,n,r,a){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new is(t,()=>{this._dirty||(this._dirty=!0,I1(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=r}get value(){const t=mt(this);return R1(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function F1(e,t,n=!1){let r,a;const i=it(e);return i?(r=e,a=vn):(r=e.get,a=e.set),new O1(r,a,i||!a,n)}function Qn(e,t,n,r){let a;try{a=r?e(...r):e()}catch(i){ea(i,t,n)}return a}function dn(e,t,n,r){if(it(e)){const i=Qn(e,t,n,r);return i&&Do(i)&&i.catch(s=>{ea(s,t,n)}),i}const a=[];for(let i=0;i>>1;oi(rn[r])Pn&&rn.splice(t,1)}function hl(e,t,n,r){Qe(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),ml()}function H1(e){hl(e,ai,ii,zr)}function D1(e){hl(e,Jn,si,Ur)}function na(e,t=null){if(ii.length){for(ps=t,ai=[...new Set(ii)],ii.length=0,zr=0;zroi(n)-oi(r)),Ur=0;Ure.id==null?1/0:e.id;function pl(e){hs=!1,ta=!0,na(e),rn.sort((n,r)=>oi(n)-oi(r));const t=vn;try{for(Pn=0;Pn_.trim())),c&&(a=n.map(Ki))}let l,f=r[l=Ja(t)]||r[l=Ja(un(t))];!f&&i&&(f=r[l=Ja(An(t))]),f&&dn(f,e,6,a);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,dn(u,e,6,a)}}function vl(e,t,n=!1){const r=t.emitsCache,a=r.get(e);if(a!==void 0)return a;const i=e.emits;let s={},l=!1;if(!it(e)){const f=u=>{const h=vl(u,t,!0);h&&(l=!0,jt(s,h))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!l?(r.set(e,null),null):(Qe(i)?i.forEach(f=>s[f]=null):jt(s,i),r.set(e,s),s)}function ra(e,t){return!e||!Pi(t)?!1:(t=t.slice(2).replace(/Once$/,""),lt(e,t[0].toLowerCase()+t.slice(1))||lt(e,An(t))||lt(e,t))}let Ut=null,gl=null;function ia(e){const t=Ut;return Ut=e,gl=e&&e.type.__scopeId||null,t}function Ge(e,t=Ut,n){if(!t||e._n)return e;const r=(...a)=>{r._d&&Zl(-1);const i=ia(t),s=e(...a);return ia(i),r._d&&Zl(1),s};return r._n=!0,r._c=!0,r._d=!0,r}function n5(){}function vs(e){const{type:t,vnode:n,proxy:r,withProxy:a,props:i,propsOptions:[s],slots:l,attrs:f,emit:u,render:h,renderCache:c,data:v,setupState:_,ctx:o,inheritAttrs:j}=e;let O,I;const p=ia(e);try{if(n.shapeFlag&4){const F=a||r;O=Tn(h.call(F,F,c,i,_,v,o)),I=f}else{const F=t;O=Tn(F.length>1?F(i,{attrs:f,slots:l,emit:u}):F(i,null)),I=t.props?f:z1(f)}}catch(F){di.length=0,ea(F,e,1),O=Oe(mn)}let E=O;if(I&&j!==!1){const F=Object.keys(I),{shapeFlag:T}=E;F.length&&T&7&&(s&&F.some(Ga)&&(I=U1(I,s)),E=$n(E,I))}return n.dirs&&(E=$n(E),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&(E.transition=n.transition),O=E,ia(p),O}const z1=e=>{let t;for(const n in e)(n==="class"||n==="style"||Pi(n))&&((t||(t={}))[n]=e[n]);return t},U1=(e,t)=>{const n={};for(const r in e)(!Ga(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function V1(e,t,n){const{props:r,children:a,component:i}=e,{props:s,children:l,patchFlag:f}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return r?bl(r,s,u):!!s;if(f&8){const h=t.dynamicProps;for(let c=0;ce.__isSuspense;function Y1(e,t){t&&t.pendingBranch?Qe(e)?t.effects.push(...e):t.effects.push(e):D1(e)}function K1(e,t){if(Ht){let n=Ht.provides;const r=Ht.parent&&Ht.parent.provides;r===n&&(n=Ht.provides=Object.create(r)),n[e]=t}}function gs(e,t,n=!1){const r=Ht||Ut;if(r){const a=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(a&&e in a)return a[e];if(arguments.length>1)return n&&it(t)?t.call(r.proxy):t}}const xl={};function bs(e,t,n){return yl(e,t,n)}function yl(e,t,{immediate:n,deep:r,flush:a,onTrack:i,onTrigger:s}=bt){const l=Ht;let f,u=!1,h=!1;if(Kt(e)?(f=()=>e.value,u=ds(e)):Pr(e)?(f=()=>e,r=!0):Qe(e)?(h=!0,u=e.some(I=>Pr(I)||ds(I)),f=()=>e.map(I=>{if(Kt(I))return I.value;if(Pr(I))return mr(I);if(it(I))return Qn(I,l,2)})):it(e)?t?f=()=>Qn(e,l,2):f=()=>{if(!(l&&l.isUnmounted))return c&&c(),dn(e,l,3,[v])}:f=vn,t&&r){const I=f;f=()=>mr(I())}let c,v=I=>{c=O.onStop=()=>{Qn(I,l,4)}};if(mi)return v=vn,t?n&&dn(t,l,3,[f(),h?[]:void 0,v]):f(),vn;let _=h?[]:xl;const o=()=>{if(!!O.active)if(t){const I=O.run();(r||u||(h?I.some((p,E)=>Xi(p,_[E])):Xi(I,_)))&&(c&&c(),dn(t,l,3,[I,_===xl?void 0:_,v]),_=I)}else O.run()};o.allowRecurse=!!t;let j;a==="sync"?j=o:a==="post"?j=()=>Zt(o,l&&l.suspense):j=()=>H1(o);const O=new is(f,j);return t?n?o():_=O.run():a==="post"?Zt(O.run.bind(O),l&&l.suspense):O.run(),()=>{O.stop(),l&&l.scope&&Wa(l.scope.effects,O)}}function G1(e,t,n){const r=this.proxy,a=Nt(e)?e.includes(".")?wl(r,e):()=>r[e]:e.bind(r,r);let i;it(t)?i=t:(i=t.handler,n=t);const s=Ht;Vr(this);const l=yl(a,i.bind(r),n);return s?Vr(s):gr(),l}function wl(e,t){const n=t.split(".");return()=>{let r=e;for(let a=0;a{mr(n,t)});else if(zo(e))for(const n in e)mr(e[n],t);return e}function kl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Tl(()=>{e.isMounted=!0}),Il(()=>{e.isUnmounting=!0}),e}const fn=[Function,Array],Sl={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fn,onEnter:fn,onAfterEnter:fn,onEnterCancelled:fn,onBeforeLeave:fn,onLeave:fn,onAfterLeave:fn,onLeaveCancelled:fn,onBeforeAppear:fn,onAppear:fn,onAfterAppear:fn,onAppearCancelled:fn},setup(e,{slots:t}){const n=$l(),r=kl();let a;return()=>{const i=t.default&&ys(t.default(),!0);if(!i||!i.length)return;let s=i[0];if(i.length>1){for(const j of i)if(j.type!==mn){s=j;break}}const l=mt(e),{mode:f}=l;if(r.isLeaving)return xs(s);const u=Al(s);if(!u)return xs(s);const h=li(u,l,r,n);ci(u,h);const c=n.subTree,v=c&&Al(c);let _=!1;const{getTransitionKey:o}=u.type;if(o){const j=o();a===void 0?a=j:j!==a&&(a=j,_=!0)}if(v&&v.type!==mn&&(!vr(u,v)||_)){const j=li(v,l,r,n);if(ci(v,j),f==="out-in")return r.isLeaving=!0,j.afterLeave=()=>{r.isLeaving=!1,n.update()},xs(s);f==="in-out"&&u.type!==mn&&(j.delayLeave=(O,I,p)=>{const E=Ml(r,v);E[String(v.key)]=v,O._leaveCb=()=>{I(),O._leaveCb=void 0,delete h.delayedLeave},h.delayedLeave=p})}return s}}};function Ml(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function li(e,t,n,r){const{appear:a,mode:i,persisted:s=!1,onBeforeEnter:l,onEnter:f,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:c,onLeave:v,onAfterLeave:_,onLeaveCancelled:o,onBeforeAppear:j,onAppear:O,onAfterAppear:I,onAppearCancelled:p}=t,E=String(e.key),F=Ml(n,e),T=(A,S)=>{A&&dn(A,r,9,S)},R=(A,S)=>{const m=S[1];T(A,S),Qe(A)?A.every(x=>x.length<=1)&&m():A.length<=1&&m()},g={mode:i,persisted:s,beforeEnter(A){let S=l;if(!n.isMounted)if(a)S=j||l;else return;A._leaveCb&&A._leaveCb(!0);const m=F[E];m&&vr(e,m)&&m.el._leaveCb&&m.el._leaveCb(),T(S,[A])},enter(A){let S=f,m=u,x=h;if(!n.isMounted)if(a)S=O||f,m=I||u,x=p||h;else return;let b=!1;const y=A._enterCb=k=>{b||(b=!0,k?T(x,[A]):T(m,[A]),g.delayedLeave&&g.delayedLeave(),A._enterCb=void 0)};S?R(S,[A,y]):y()},leave(A,S){const m=String(e.key);if(A._enterCb&&A._enterCb(!0),n.isUnmounting)return S();T(c,[A]);let x=!1;const b=A._leaveCb=y=>{x||(x=!0,S(),y?T(o,[A]):T(_,[A]),A._leaveCb=void 0,F[m]===e&&delete F[m])};F[m]=e,v?R(v,[A,b]):b()},clone(A){return li(A,t,n,r)}};return g}function xs(e){if(aa(e))return e=$n(e),e.children=null,e}function Al(e){return aa(e)?e.children?e.children[0]:void 0:e}function ci(e,t){e.shapeFlag&6&&e.component?ci(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ys(e,t=!1,n){let r=[],a=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader,aa=e=>e.type.__isKeepAlive;function Z1(e,t){El(e,"a",t)}function Q1(e,t){El(e,"da",t)}function El(e,t,n=Ht){const r=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(sa(t,r,n),n){let a=n.parent;for(;a&&a.parent;)aa(a.parent.vnode)&&J1(r,t,n,a),a=a.parent}}function J1(e,t,n,r){const a=sa(t,e,r,!0);Cl(()=>{Wa(r[t],a)},n)}function sa(e,t,n=Ht,r=!1){if(n){const a=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Hr(),Vr(n);const l=dn(t,n,e,s);return gr(),Dr(),l});return r?a.unshift(i):a.push(i),i}}const zn=e=>(t,n=Ht)=>(!mi||e==="sp")&&sa(e,t,n),$1=zn("bm"),Tl=zn("m"),ed=zn("bu"),Rl=zn("u"),Il=zn("bum"),Cl=zn("um"),td=zn("sp"),nd=zn("rtg"),rd=zn("rtc");function id(e,t=Ht){sa("ec",e,t)}function Un(e,t){const n=Ut;if(n===null)return e;const r=ma(n)||n.proxy,a=e.dirs||(e.dirs=[]);for(let i=0;it(s,l,void 0,i&&i[l]));else{const s=Object.keys(e);a=new Array(s.length);for(let l=0,f=s.length;lua(t)?!(t.type===mn||t.type===ot&&!Fl(t.children)):!0)?e:null}const Ss=e=>e?e0(e)?ma(e)||e.proxy:Ss(e.parent):null,la=jt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ss(e.parent),$root:e=>Ss(e.root),$emit:e=>e.emit,$options:e=>Nl(e),$forceUpdate:e=>e.f||(e.f=()=>fl(e.update)),$nextTick:e=>e.n||(e.n=dl.bind(e.proxy)),$watch:e=>G1.bind(e)}),od={get({_:e},t){const{ctx:n,setupState:r,data:a,props:i,accessCache:s,type:l,appContext:f}=e;let u;if(t[0]!=="$"){const _=s[t];if(_!==void 0)switch(_){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return i[t]}else{if(r!==bt&<(r,t))return s[t]=1,r[t];if(a!==bt&<(a,t))return s[t]=2,a[t];if((u=e.propsOptions[0])&<(u,t))return s[t]=3,i[t];if(n!==bt&<(n,t))return s[t]=4,n[t];Ms&&(s[t]=0)}}const h=la[t];let c,v;if(h)return t==="$attrs"&&nn(e,"get",t),h(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==bt&<(n,t))return s[t]=4,n[t];if(v=f.config.globalProperties,lt(v,t))return v[t]},set({_:e},t,n){const{data:r,setupState:a,ctx:i}=e;return a!==bt&<(a,t)?(a[t]=n,!0):r!==bt&<(r,t)?(r[t]=n,!0):lt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,propsOptions:i}},s){let l;return!!n[s]||e!==bt&<(e,s)||t!==bt&<(t,s)||(l=i[0])&<(l,s)||lt(r,s)||lt(la,s)||lt(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:lt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let Ms=!0;function ld(e){const t=Nl(e),n=e.proxy,r=e.ctx;Ms=!1,t.beforeCreate&&Ll(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:s,watch:l,provide:f,inject:u,created:h,beforeMount:c,mounted:v,beforeUpdate:_,updated:o,activated:j,deactivated:O,beforeDestroy:I,beforeUnmount:p,destroyed:E,unmounted:F,render:T,renderTracked:R,renderTriggered:g,errorCaptured:A,serverPrefetch:S,expose:m,inheritAttrs:x,components:b,directives:y,filters:k}=t;if(u&&cd(u,r,null,e.appContext.config.unwrapInjectedRef),s)for(const Y in s){const P=s[Y];it(P)&&(r[Y]=P.bind(n))}if(a){const Y=a.call(n,n);Ot(Y)&&(e.data=cs(Y))}if(Ms=!0,i)for(const Y in i){const P=i[Y],V=it(P)?P.bind(n,n):it(P.get)?P.get.bind(n,n):vn,d=!it(P)&&it(P.set)?P.set.bind(n):vn,M=Ld({get:V,set:d});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>M.value,set:W=>M.value=W})}if(l)for(const Y in l)jl(l[Y],r,n,Y);if(f){const Y=it(f)?f.call(n):f;Reflect.ownKeys(Y).forEach(P=>{K1(P,Y[P])})}h&&Ll(h,e,"c");function H(Y,P){Qe(P)?P.forEach(V=>Y(V.bind(n))):P&&Y(P.bind(n))}if(H($1,c),H(Tl,v),H(ed,_),H(Rl,o),H(Z1,j),H(Q1,O),H(id,A),H(rd,R),H(nd,g),H(Il,p),H(Cl,F),H(td,S),Qe(m))if(m.length){const Y=e.exposed||(e.exposed={});m.forEach(P=>{Object.defineProperty(Y,P,{get:()=>n[P],set:V=>n[P]=V})})}else e.exposed||(e.exposed={});T&&e.render===vn&&(e.render=T),x!=null&&(e.inheritAttrs=x),b&&(e.components=b),y&&(e.directives=y)}function cd(e,t,n=vn,r=!1){Qe(e)&&(e=As(e));for(const a in e){const i=e[a];let s;Ot(i)?"default"in i?s=gs(i.from||a,i.default,!0):s=gs(i.from||a):s=gs(i),Kt(s)&&r?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>s.value,set:l=>s.value=l}):t[a]=s}}function Ll(e,t,n){dn(Qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function jl(e,t,n,r){const a=r.includes(".")?wl(n,r):()=>n[r];if(Nt(e)){const i=t[e];it(i)&&bs(a,i)}else if(it(e))bs(a,e.bind(n));else if(Ot(e))if(Qe(e))e.forEach(i=>jl(i,t,n,r));else{const i=it(e.handler)?e.handler.bind(n):t[e.handler];it(i)&&bs(a,i,e)}}function Nl(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,l=i.get(t);let f;return l?f=l:!a.length&&!n&&!r?f=t:(f={},a.length&&a.forEach(u=>ca(f,u,s,!0)),ca(f,t,s)),i.set(t,f),f}function ca(e,t,n,r=!1){const{mixins:a,extends:i}=t;i&&ca(e,i,n,!0),a&&a.forEach(s=>ca(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const l=ud[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const ud={data:Hl,props:_r,emits:_r,methods:_r,computed:_r,beforeCreate:Gt,created:Gt,beforeMount:Gt,mounted:Gt,beforeUpdate:Gt,updated:Gt,beforeDestroy:Gt,beforeUnmount:Gt,destroyed:Gt,unmounted:Gt,activated:Gt,deactivated:Gt,errorCaptured:Gt,serverPrefetch:Gt,components:_r,directives:_r,watch:fd,provide:Hl,inject:dd};function Hl(e,t){return t?e?function(){return jt(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function dd(e,t){return _r(As(e),As(t))}function As(e){if(Qe(e)){const t={};for(let n=0;n0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let c=0;c{f=!0;const[v,_]=Pl(c,t,!0);jt(s,v),_&&l.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!f)return r.set(e,jr),jr;if(Qe(i))for(let h=0;h-1,_[1]=j<0||o-1||lt(_,"default"))&&l.push(c)}}}const u=[s,l];return r.set(e,u),u}function zl(e){return e[0]!=="$"}function Ul(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Vl(e,t){return Ul(e)===Ul(t)}function ql(e,t){return Qe(t)?t.findIndex(n=>Vl(n,e)):it(t)&&Vl(t,e)?0:-1}const Xl=e=>e[0]==="_"||e==="$stable",Ts=e=>Qe(e)?e.map(Tn):[Tn(e)],_d=(e,t,n)=>{if(t._n)return t;const r=Ge((...a)=>Ts(t(...a)),n);return r._c=!1,r},Yl=(e,t,n)=>{const r=e._ctx;for(const a in e){if(Xl(a))continue;const i=e[a];if(it(i))t[a]=_d(a,i,r);else if(i!=null){const s=Ts(i);t[a]=()=>s}}},Kl=(e,t)=>{const n=Ts(t);e.slots.default=()=>n},pd=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=mt(t),Yi(t,"_",n)):Yl(t,e.slots={})}else e.slots={},t&&Kl(e,t);Yi(e.slots,da,1)},vd=(e,t,n)=>{const{vnode:r,slots:a}=e;let i=!0,s=bt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(jt(a,t),!n&&l===1&&delete a._):(i=!t.$stable,Yl(t,a)),s=t}else t&&(Kl(e,t),s={default:1});if(i)for(const l in a)!Xl(l)&&!(l in s)&&delete a[l]};function Gl(){return{app:null,config:{isNativeTag:Gu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let gd=0;function bd(e,t){return function(r,a=null){it(r)||(r=Object.assign({},r)),a!=null&&!Ot(a)&&(a=null);const i=Gl(),s=new Set;let l=!1;const f=i.app={_uid:gd++,_component:r,_props:a,_container:null,_context:i,_instance:null,version:Nd,get config(){return i.config},set config(u){},use(u,...h){return s.has(u)||(u&&it(u.install)?(s.add(u),u.install(f,...h)):it(u)&&(s.add(u),u(f,...h))),f},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),f},component(u,h){return h?(i.components[u]=h,f):i.components[u]},directive(u,h){return h?(i.directives[u]=h,f):i.directives[u]},mount(u,h,c){if(!l){const v=Oe(r,a);return v.appContext=i,h&&t?t(v,u):e(v,u,c),l=!0,f._container=u,u.__vue_app__=f,ma(v.component)||v.component.proxy}},unmount(){l&&(e(null,f._container),delete f._container.__vue_app__)},provide(u,h){return i.provides[u]=h,f}};return f}}function Rs(e,t,n,r,a=!1){if(Qe(e)){e.forEach((v,_)=>Rs(v,t&&(Qe(t)?t[_]:t),n,r,a));return}if(ui(r)&&!a)return;const i=r.shapeFlag&4?ma(r.component)||r.component.proxy:r.el,s=a?null:i,{i:l,r:f}=e,u=t&&t.r,h=l.refs===bt?l.refs={}:l.refs,c=l.setupState;if(u!=null&&u!==f&&(Nt(u)?(h[u]=null,lt(c,u)&&(c[u]=null)):Kt(u)&&(u.value=null)),it(f))Qn(f,l,12,[s,h]);else{const v=Nt(f),_=Kt(f);if(v||_){const o=()=>{if(e.f){const j=v?h[f]:f.value;a?Qe(j)&&Wa(j,i):Qe(j)?j.includes(i)||j.push(i):v?(h[f]=[i],lt(c,f)&&(c[f]=h[f])):(f.value=[i],e.k&&(h[e.k]=f.value))}else v?(h[f]=s,lt(c,f)&&(c[f]=s)):_&&(f.value=s,e.k&&(h[e.k]=s))};s?(o.id=-1,Zt(o,n)):o()}}}const Zt=Y1;function xd(e){return yd(e)}function yd(e,t){const n=e1();n.__VUE__=!0;const{insert:r,remove:a,patchProp:i,createElement:s,createText:l,createComment:f,setText:u,setElementText:h,parentNode:c,nextSibling:v,setScopeId:_=vn,cloneNode:o,insertStaticContent:j}=e,O=(z,X,ne,ce=null,de=null,Me=null,Ee=!1,ye=null,Ae=!!X.dynamicChildren)=>{if(z===X)return;z&&!vr(z,X)&&(ce=He(z),C(z,de,Me,!0),z=null),X.patchFlag===-2&&(Ae=!1,X.dynamicChildren=null);const{type:ge,ref:Pe,shapeFlag:je}=X;switch(ge){case Is:I(z,X,ne,ce);break;case mn:p(z,X,ne,ce);break;case Cs:z==null&&E(X,ne,ce,Ee);break;case ot:y(z,X,ne,ce,de,Me,Ee,ye,Ae);break;default:je&1?R(z,X,ne,ce,de,Me,Ee,ye,Ae):je&6?k(z,X,ne,ce,de,Me,Ee,ye,Ae):(je&64||je&128)&&ge.process(z,X,ne,ce,de,Me,Ee,ye,Ae,he)}Pe!=null&&de&&Rs(Pe,z&&z.ref,Me,X||z,!X)},I=(z,X,ne,ce)=>{if(z==null)r(X.el=l(X.children),ne,ce);else{const de=X.el=z.el;X.children!==z.children&&u(de,X.children)}},p=(z,X,ne,ce)=>{z==null?r(X.el=f(X.children||""),ne,ce):X.el=z.el},E=(z,X,ne,ce)=>{[z.el,z.anchor]=j(z.children,X,ne,ce,z.el,z.anchor)},F=({el:z,anchor:X},ne,ce)=>{let de;for(;z&&z!==X;)de=v(z),r(z,ne,ce),z=de;r(X,ne,ce)},T=({el:z,anchor:X})=>{let ne;for(;z&&z!==X;)ne=v(z),a(z),z=ne;a(X)},R=(z,X,ne,ce,de,Me,Ee,ye,Ae)=>{Ee=Ee||X.type==="svg",z==null?g(X,ne,ce,de,Me,Ee,ye,Ae):m(z,X,de,Me,Ee,ye,Ae)},g=(z,X,ne,ce,de,Me,Ee,ye)=>{let Ae,ge;const{type:Pe,props:je,shapeFlag:ze,transition:Ue,patchFlag:Ke,dirs:ue}=z;if(z.el&&o!==void 0&&Ke===-1)Ae=z.el=o(z.el);else{if(Ae=z.el=s(z.type,Me,je&&je.is,je),ze&8?h(Ae,z.children):ze&16&&S(z.children,Ae,null,ce,de,Me&&Pe!=="foreignObject",Ee,ye),ue&&hr(z,null,ce,"created"),je){for(const ee in je)ee!=="value"&&!Ui(ee)&&i(Ae,ee,null,je[ee],Me,z.children,ce,de,pe);"value"in je&&i(Ae,"value",null,je.value),(ge=je.onVnodeBeforeMount)&&Rn(ge,ce,z)}A(Ae,z,z.scopeId,Ee,ce)}ue&&hr(z,null,ce,"beforeMount");const we=(!de||de&&!de.pendingBranch)&&Ue&&!Ue.persisted;we&&Ue.beforeEnter(Ae),r(Ae,X,ne),((ge=je&&je.onVnodeMounted)||we||ue)&&Zt(()=>{ge&&Rn(ge,ce,z),we&&Ue.enter(Ae),ue&&hr(z,null,ce,"mounted")},de)},A=(z,X,ne,ce,de)=>{if(ne&&_(z,ne),ce)for(let Me=0;Me{for(let ge=Ae;ge{const ye=X.el=z.el;let{patchFlag:Ae,dynamicChildren:ge,dirs:Pe}=X;Ae|=z.patchFlag&16;const je=z.props||bt,ze=X.props||bt;let Ue;ne&&pr(ne,!1),(Ue=ze.onVnodeBeforeUpdate)&&Rn(Ue,ne,X,z),Pe&&hr(X,z,ne,"beforeUpdate"),ne&&pr(ne,!0);const Ke=de&&X.type!=="foreignObject";if(ge?x(z.dynamicChildren,ge,ye,ne,ce,Ke,Me):Ee||V(z,X,ye,null,ne,ce,Ke,Me,!1),Ae>0){if(Ae&16)b(ye,X,je,ze,ne,ce,de);else if(Ae&2&&je.class!==ze.class&&i(ye,"class",null,ze.class,de),Ae&4&&i(ye,"style",je.style,ze.style,de),Ae&8){const ue=X.dynamicProps;for(let we=0;we{Ue&&Rn(Ue,ne,X,z),Pe&&hr(X,z,ne,"updated")},ce)},x=(z,X,ne,ce,de,Me,Ee)=>{for(let ye=0;ye{if(ne!==ce){for(const ye in ce){if(Ui(ye))continue;const Ae=ce[ye],ge=ne[ye];Ae!==ge&&ye!=="value"&&i(z,ye,ge,Ae,Ee,X.children,de,Me,pe)}if(ne!==bt)for(const ye in ne)!Ui(ye)&&!(ye in ce)&&i(z,ye,ne[ye],null,Ee,X.children,de,Me,pe);"value"in ce&&i(z,"value",ne.value,ce.value)}},y=(z,X,ne,ce,de,Me,Ee,ye,Ae)=>{const ge=X.el=z?z.el:l(""),Pe=X.anchor=z?z.anchor:l("");let{patchFlag:je,dynamicChildren:ze,slotScopeIds:Ue}=X;Ue&&(ye=ye?ye.concat(Ue):Ue),z==null?(r(ge,ne,ce),r(Pe,ne,ce),S(X.children,ne,Pe,de,Me,Ee,ye,Ae)):je>0&&je&64&&ze&&z.dynamicChildren?(x(z.dynamicChildren,ze,ne,de,Me,Ee,ye),(X.key!=null||de&&X===de.subTree)&&Wl(z,X,!0)):V(z,X,ne,Pe,de,Me,Ee,ye,Ae)},k=(z,X,ne,ce,de,Me,Ee,ye,Ae)=>{X.slotScopeIds=ye,z==null?X.shapeFlag&512?de.ctx.activate(X,ne,ce,Ee,Ae):w(X,ne,ce,de,Me,Ee,Ae):H(z,X,Ae)},w=(z,X,ne,ce,de,Me,Ee)=>{const ye=z.component=Td(z,ce,de);if(aa(z)&&(ye.ctx.renderer=he),Rd(ye),ye.asyncDep){if(de&&de.registerDep(ye,Y),!z.el){const Ae=ye.subTree=Oe(mn);p(null,Ae,X,ne)}return}Y(ye,z,X,ne,de,Me,Ee)},H=(z,X,ne)=>{const ce=X.component=z.component;if(V1(z,X,ne))if(ce.asyncDep&&!ce.asyncResolved){P(ce,X,ne);return}else ce.next=X,N1(ce.update),ce.update();else X.el=z.el,ce.vnode=X},Y=(z,X,ne,ce,de,Me,Ee)=>{const ye=()=>{if(z.isMounted){let{next:Pe,bu:je,u:ze,parent:Ue,vnode:Ke}=z,ue=Pe,we;pr(z,!1),Pe?(Pe.el=Ke.el,P(z,Pe,Ee)):Pe=Ke,je&&$a(je),(we=Pe.props&&Pe.props.onVnodeBeforeUpdate)&&Rn(we,Ue,Pe,Ke),pr(z,!0);const ee=vs(z),Ce=z.subTree;z.subTree=ee,O(Ce,ee,c(Ce.el),He(Ce),z,de,Me),Pe.el=ee.el,ue===null&&q1(z,ee.el),ze&&Zt(ze,de),(we=Pe.props&&Pe.props.onVnodeUpdated)&&Zt(()=>Rn(we,Ue,Pe,Ke),de)}else{let Pe;const{el:je,props:ze}=X,{bm:Ue,m:Ke,parent:ue}=z,we=ui(X);if(pr(z,!1),Ue&&$a(Ue),!we&&(Pe=ze&&ze.onVnodeBeforeMount)&&Rn(Pe,ue,X),pr(z,!0),je&&at){const ee=()=>{z.subTree=vs(z),at(je,z.subTree,z,de,null)};we?X.type.__asyncLoader().then(()=>!z.isUnmounted&&ee()):ee()}else{const ee=z.subTree=vs(z);O(null,ee,ne,ce,z,de,Me),X.el=ee.el}if(Ke&&Zt(Ke,de),!we&&(Pe=ze&&ze.onVnodeMounted)){const ee=X;Zt(()=>Rn(Pe,ue,ee),de)}(X.shapeFlag&256||ue&&ui(ue.vnode)&&ue.vnode.shapeFlag&256)&&z.a&&Zt(z.a,de),z.isMounted=!0,X=ne=ce=null}},Ae=z.effect=new is(ye,()=>fl(ge),z.scope),ge=z.update=()=>Ae.run();ge.id=z.uid,pr(z,!0),ge()},P=(z,X,ne)=>{X.component=z;const ce=z.vnode.props;z.vnode=X,z.next=null,hd(z,X.props,ce,ne),vd(z,X.children,ne),Hr(),na(void 0,z.update),Dr()},V=(z,X,ne,ce,de,Me,Ee,ye,Ae=!1)=>{const ge=z&&z.children,Pe=z?z.shapeFlag:0,je=X.children,{patchFlag:ze,shapeFlag:Ue}=X;if(ze>0){if(ze&128){M(ge,je,ne,ce,de,Me,Ee,ye,Ae);return}else if(ze&256){d(ge,je,ne,ce,de,Me,Ee,ye,Ae);return}}Ue&8?(Pe&16&&pe(ge,de,Me),je!==ge&&h(ne,je)):Pe&16?Ue&16?M(ge,je,ne,ce,de,Me,Ee,ye,Ae):pe(ge,de,Me,!0):(Pe&8&&h(ne,""),Ue&16&&S(je,ne,ce,de,Me,Ee,ye,Ae))},d=(z,X,ne,ce,de,Me,Ee,ye,Ae)=>{z=z||jr,X=X||jr;const ge=z.length,Pe=X.length,je=Math.min(ge,Pe);let ze;for(ze=0;zePe?pe(z,de,Me,!0,!1,je):S(X,ne,ce,de,Me,Ee,ye,Ae,je)},M=(z,X,ne,ce,de,Me,Ee,ye,Ae)=>{let ge=0;const Pe=X.length;let je=z.length-1,ze=Pe-1;for(;ge<=je&&ge<=ze;){const Ue=z[ge],Ke=X[ge]=Ae?er(X[ge]):Tn(X[ge]);if(vr(Ue,Ke))O(Ue,Ke,ne,null,de,Me,Ee,ye,Ae);else break;ge++}for(;ge<=je&&ge<=ze;){const Ue=z[je],Ke=X[ze]=Ae?er(X[ze]):Tn(X[ze]);if(vr(Ue,Ke))O(Ue,Ke,ne,null,de,Me,Ee,ye,Ae);else break;je--,ze--}if(ge>je){if(ge<=ze){const Ue=ze+1,Ke=Ueze)for(;ge<=je;)C(z[ge],de,Me,!0),ge++;else{const Ue=ge,Ke=ge,ue=new Map;for(ge=Ke;ge<=ze;ge++){const K=X[ge]=Ae?er(X[ge]):Tn(X[ge]);K.key!=null&&ue.set(K.key,ge)}let we,ee=0;const Ce=ze-Ke+1;let B=!1,N=0;const U=new Array(Ce);for(ge=0;ge=Ce){C(K,de,Me,!0);continue}let D;if(K.key!=null)D=ue.get(K.key);else for(we=Ke;we<=ze;we++)if(U[we-Ke]===0&&vr(K,X[we])){D=we;break}D===void 0?C(K,de,Me,!0):(U[D-Ke]=ge+1,D>=N?N=D:B=!0,O(K,X[D],ne,null,de,Me,Ee,ye,Ae),ee++)}const q=B?wd(U):jr;for(we=q.length-1,ge=Ce-1;ge>=0;ge--){const K=Ke+ge,D=X[K],Z=K+1{const{el:Me,type:Ee,transition:ye,children:Ae,shapeFlag:ge}=z;if(ge&6){W(z.component.subTree,X,ne,ce);return}if(ge&128){z.suspense.move(X,ne,ce);return}if(ge&64){Ee.move(z,X,ne,he);return}if(Ee===ot){r(Me,X,ne);for(let je=0;jeye.enter(Me),de);else{const{leave:je,delayLeave:ze,afterLeave:Ue}=ye,Ke=()=>r(Me,X,ne),ue=()=>{je(Me,()=>{Ke(),Ue&&Ue()})};ze?ze(Me,Ke,ue):ue()}else r(Me,X,ne)},C=(z,X,ne,ce=!1,de=!1)=>{const{type:Me,props:Ee,ref:ye,children:Ae,dynamicChildren:ge,shapeFlag:Pe,patchFlag:je,dirs:ze}=z;if(ye!=null&&Rs(ye,null,ne,z,!0),Pe&256){X.ctx.deactivate(z);return}const Ue=Pe&1&&ze,Ke=!ui(z);let ue;if(Ke&&(ue=Ee&&Ee.onVnodeBeforeUnmount)&&Rn(ue,X,z),Pe&6)ve(z.component,ne,ce);else{if(Pe&128){z.suspense.unmount(ne,ce);return}Ue&&hr(z,null,X,"beforeUnmount"),Pe&64?z.type.remove(z,X,ne,de,he,ce):ge&&(Me!==ot||je>0&&je&64)?pe(ge,X,ne,!1,!0):(Me===ot&&je&384||!de&&Pe&16)&&pe(Ae,X,ne),ce&&me(z)}(Ke&&(ue=Ee&&Ee.onVnodeUnmounted)||Ue)&&Zt(()=>{ue&&Rn(ue,X,z),Ue&&hr(z,null,X,"unmounted")},ne)},me=z=>{const{type:X,el:ne,anchor:ce,transition:de}=z;if(X===ot){Se(ne,ce);return}if(X===Cs){T(z);return}const Me=()=>{a(ne),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(z.shapeFlag&1&&de&&!de.persisted){const{leave:Ee,delayLeave:ye}=de,Ae=()=>Ee(ne,Me);ye?ye(z.el,Me,Ae):Ae()}else Me()},Se=(z,X)=>{let ne;for(;z!==X;)ne=v(z),a(z),z=ne;a(X)},ve=(z,X,ne)=>{const{bum:ce,scope:de,update:Me,subTree:Ee,um:ye}=z;ce&&$a(ce),de.stop(),Me&&(Me.active=!1,C(Ee,z,X,ne)),ye&&Zt(ye,X),Zt(()=>{z.isUnmounted=!0},X),X&&X.pendingBranch&&!X.isUnmounted&&z.asyncDep&&!z.asyncResolved&&z.suspenseId===X.pendingId&&(X.deps--,X.deps===0&&X.resolve())},pe=(z,X,ne,ce=!1,de=!1,Me=0)=>{for(let Ee=Me;Eez.shapeFlag&6?He(z.component.subTree):z.shapeFlag&128?z.suspense.next():v(z.anchor||z.el),Te=(z,X,ne)=>{z==null?X._vnode&&C(X._vnode,null,null,!0):O(X._vnode||null,z,X,null,null,null,ne),_l(),X._vnode=z},he={p:O,um:C,m:W,r:me,mt:w,mc:S,pc:V,pbc:x,n:He,o:e};let Ve,at;return t&&([Ve,at]=t(he)),{render:Te,hydrate:Ve,createApp:bd(Te,Ve)}}function pr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Wl(e,t,n=!1){const r=e.children,a=t.children;if(Qe(r)&&Qe(a))for(let i=0;i>1,e[n[l]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}const kd=e=>e.__isTeleport,ot=Symbol(void 0),Is=Symbol(void 0),mn=Symbol(void 0),Cs=Symbol(void 0),di=[];let bn=null;function $(e=!1){di.push(bn=e?null:[])}function Sd(){di.pop(),bn=di[di.length-1]||null}let fi=1;function Zl(e){fi+=e}function Ql(e){return e.dynamicChildren=fi>0?bn||jr:null,Sd(),fi>0&&bn&&bn.push(e),e}function le(e,t,n,r,a,i){return Ql(ke(e,t,n,r,a,i,!0))}function ht(e,t,n,r,a){return Ql(Oe(e,t,n,r,a,!0))}function ua(e){return e?e.__v_isVNode===!0:!1}function vr(e,t){return e.type===t.type&&e.key===t.key}const da="__vInternal",Jl=({key:e})=>e!=null?e:null,fa=({ref:e,ref_key:t,ref_for:n})=>e!=null?Nt(e)||Kt(e)||it(e)?{i:Ut,r:e,k:t,f:!!n}:e:null;function ke(e,t=null,n=null,r=0,a=null,i=e===ot?0:1,s=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jl(t),ref:t&&fa(t),scopeId:gl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:a,dynamicChildren:null,appContext:null};return l?(Bs(f,n),i&128&&e.normalize(f)):n&&(f.shapeFlag|=Nt(n)?8:16),fi>0&&!s&&bn&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&bn.push(f),f}const Oe=Md;function Md(e,t=null,n=null,r=0,a=null,i=!1){if((!e||e===Bl)&&(e=mn),ua(e)){const l=$n(e,t,!0);return n&&Bs(l,n),fi>0&&!i&&bn&&(l.shapeFlag&6?bn[bn.indexOf(e)]=l:bn.push(l)),l.patchFlag|=-2,l}if(Fd(e)&&(e=e.__vccOpts),t){t=_t(t);let{class:l,style:f}=t;l&&!Nt(l)&&(t.class=rt(l)),Ot(f)&&(ol(f)&&!Qe(f)&&(f=jt({},f)),t.style=St(f))}const s=Nt(e)?1:X1(e)?128:kd(e)?64:Ot(e)?4:it(e)?2:0;return ke(e,t,n,r,a,s,i,!0)}function _t(e){return e?ol(e)||da in e?jt({},e):e:null}function $n(e,t,n=!1){const{props:r,ref:a,patchFlag:i,children:s}=e,l=t?Os(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Jl(l),ref:t&&t.ref?n&&a?Qe(a)?a.concat(fa(t)):[a,fa(t)]:fa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ot?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$n(e.ssContent),ssFallback:e.ssFallback&&$n(e.ssFallback),el:e.el,anchor:e.anchor}}function Vn(e=" ",t=0){return Oe(Is,null,e,t)}function Ie(e="",t=!1){return t?($(),ht(mn,null,e)):Oe(mn,null,e)}function Tn(e){return e==null||typeof e=="boolean"?Oe(mn):Qe(e)?Oe(ot,null,e.slice()):typeof e=="object"?er(e):Oe(Is,null,String(e))}function er(e){return e.el===null||e.memo?e:$n(e)}function Bs(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Qe(t))n=16;else if(typeof t=="object")if(r&65){const a=t.default;a&&(a._c&&(a._d=!1),Bs(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!(da in t)?t._ctx=Ut:a===3&&Ut&&(Ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:Ut},n=32):(t=String(t),r&64?(n=16,t=[Vn(t)]):n=8);e.children=t,e.shapeFlag|=n}function Os(...e){const t={};for(let n=0;nHt||Ut,Vr=e=>{Ht=e,e.scope.on()},gr=()=>{Ht&&Ht.scope.off(),Ht=null};function e0(e){return e.vnode.shapeFlag&4}let mi=!1;function Rd(e,t=!1){mi=t;const{props:n,children:r}=e.vnode,a=e0(e);md(e,n,a,t),pd(e,r);const i=a?Id(e,t):void 0;return mi=!1,i}function Id(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=ll(new Proxy(e.ctx,od));const{setup:r}=n;if(r){const a=e.setupContext=r.length>1?Bd(e):null;Vr(e),Hr();const i=Qn(r,e,0,[e.props,a]);if(Dr(),gr(),Do(i)){if(i.then(gr,gr),t)return i.then(s=>{t0(e,s,t)}).catch(s=>{ea(s,e,0)});e.asyncDep=i}else t0(e,i,t)}else r0(e,t)}function t0(e,t,n){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ot(t)&&(e.setupState=cl(t)),r0(e,n)}let n0;function r0(e,t,n){const r=e.type;if(!e.render){if(!t&&n0&&!r.render){const a=r.template;if(a){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:f}=r,u=jt(jt({isCustomElement:i,delimiters:l},s),f);r.render=n0(a,u)}}e.render=r.render||vn}Vr(e),Hr(),ld(e),Dr(),gr()}function Cd(e){return new Proxy(e.attrs,{get(t,n){return nn(e,"get","$attrs"),t[n]}})}function Bd(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=Cd(e))},slots:e.slots,emit:e.emit,expose:t}}function ma(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(cl(ll(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in la)return la[n](e)}}))}function Od(e,t=!0){return it(e)?e.displayName||e.name:e.name||t&&e.__name}function Fd(e){return it(e)&&"__vccOpts"in e}const Ld=(e,t)=>F1(e,t,mi);function jd(e,t,n){const r=arguments.length;return r===2?Ot(t)&&!Qe(t)?ua(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ua(n)&&(n=[n]),Oe(e,t,n))}const Nd="3.2.37",Hd="http://www.w3.org/2000/svg",br=typeof document!="undefined"?document:null,i0=br&&br.createElement("template"),Dd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const a=t?br.createElementNS(Hd,e):br.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:e=>br.createTextNode(e),createComment:e=>br.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>br.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,a,i){const s=n?n.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===i||!(a=a.nextSibling)););else{i0.innerHTML=r?``:e;const l=i0.content;if(r){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Pd(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function zd(e,t,n){const r=e.style,a=Nt(n);if(n&&!a){for(const i in n)Fs(r,i,n[i]);if(t&&!Nt(t))for(const i in t)n[i]==null&&Fs(r,i,"")}else{const i=r.display;a?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}const a0=/\s*!important$/;function Fs(e,t,n){if(Qe(n))n.forEach(r=>Fs(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Ud(e,t);a0.test(n)?e.setProperty(An(r),n.replace(a0,""),"important"):e[r]=n}}const s0=["Webkit","Moz","ms"],Ls={};function Ud(e,t){const n=Ls[t];if(n)return n;let r=un(t);if(r!=="filter"&&r in e)return Ls[t]=r;r=qi(r);for(let a=0;a{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let js=0;const Yd=Promise.resolve(),Kd=()=>{js=0},Gd=()=>js||(Yd.then(Kd),js=l0());function Wd(e,t,n,r){e.addEventListener(t,n,r)}function Zd(e,t,n,r){e.removeEventListener(t,n,r)}function Qd(e,t,n,r,a=null){const i=e._vei||(e._vei={}),s=i[t];if(r&&s)s.value=r;else{const[l,f]=Jd(t);if(r){const u=i[t]=$d(r,a);Wd(e,l,u,f)}else s&&(Zd(e,l,s,f),i[t]=void 0)}}const c0=/(?:Once|Passive|Capture)$/;function Jd(e){let t;if(c0.test(e)){t={};let n;for(;n=e.match(c0);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[An(e.slice(2)),t]}function $d(e,t){const n=r=>{const a=r.timeStamp||l0();(Xd||a>=n.attached-1)&&dn(ef(r,n.value),t,5,[r])};return n.value=e,n.attached=Gd(),n}function ef(e,t){if(Qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>a=>!a._stopped&&r&&r(a))}else return t}const u0=/^on[a-z]/,tf=(e,t,n,r,a=!1,i,s,l,f)=>{t==="class"?Pd(e,r,a):t==="style"?zd(e,n,r):Pi(t)?Ga(t)||Qd(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nf(e,t,r,a))?qd(e,t,r,i,s,l,f):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Vd(e,t,r,a))};function nf(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&u0.test(t)&&it(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||u0.test(t)&&Nt(n)?!1:t in e}function rf(e,t){const n=W1(e);class r extends Ns{constructor(i){super(n,i,t)}}return r.def=n,r}const af=typeof HTMLElement!="undefined"?HTMLElement:class{};class Ns extends af{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,dl(()=>{this._connected||(k0(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let r=0;r{for(const a of r)this._setAttr(a.attributeName)}).observe(this,{attributes:!0});const t=r=>{const{props:a,styles:i}=r,s=!Qe(a),l=a?s?Object.keys(a):a:[];let f;if(s)for(const u in this._props){const h=a[u];(h===Number||h&&h.type===Number)&&(this._props[u]=Ki(this._props[u]),(f||(f=Object.create(null)))[u]=!0)}this._numberProps=f;for(const u of Object.keys(this))u[0]!=="_"&&this._setProp(u,this[u],!0,!1);for(const u of l.map(un))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(h){this._setProp(u,h)}});this._applyStyles(i),this._update()},n=this._def.__asyncLoader;n?n().then(t):t(this._def)}_setAttr(t){let n=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(n=Ki(n)),this._setProp(un(t),n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,a=!0){n!==this._props[t]&&(this._props[t]=n,a&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(An(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(An(t),n+""):n||this.removeAttribute(An(t))))}_update(){k0(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Oe(this._def,jt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0,n.emit=(a,...i)=>{this.dispatchEvent(new CustomEvent(a,{detail:i}))};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof Ns){n.parent=r._instance;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}const tr="transition",hi="animation",Ct=(e,{slots:t})=>jd(Sl,m0(e),t);Ct.displayName="Transition";const d0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},sf=Ct.props=jt({},Sl.props,d0),xr=(e,t=[])=>{Qe(e)?e.forEach(n=>n(...t)):e&&e(...t)},f0=e=>e?Qe(e)?e.some(t=>t.length>1):e.length>1:!1;function m0(e){const t={};for(const b in e)b in d0||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:r,duration:a,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:f=i,appearActiveClass:u=s,appearToClass:h=l,leaveFromClass:c=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:_=`${n}-leave-to`}=e,o=of(a),j=o&&o[0],O=o&&o[1],{onBeforeEnter:I,onEnter:p,onEnterCancelled:E,onLeave:F,onLeaveCancelled:T,onBeforeAppear:R=I,onAppear:g=p,onAppearCancelled:A=E}=t,S=(b,y,k)=>{nr(b,y?h:l),nr(b,y?u:s),k&&k()},m=(b,y)=>{b._isLeaving=!1,nr(b,c),nr(b,_),nr(b,v),y&&y()},x=b=>(y,k)=>{const w=b?g:p,H=()=>S(y,b,k);xr(w,[y,H]),h0(()=>{nr(y,b?f:i),qn(y,b?h:l),f0(w)||_0(y,r,j,H)})};return jt(t,{onBeforeEnter(b){xr(I,[b]),qn(b,i),qn(b,s)},onBeforeAppear(b){xr(R,[b]),qn(b,f),qn(b,u)},onEnter:x(!1),onAppear:x(!0),onLeave(b,y){b._isLeaving=!0;const k=()=>m(b,y);qn(b,c),b0(),qn(b,v),h0(()=>{!b._isLeaving||(nr(b,c),qn(b,_),f0(F)||_0(b,r,O,k))}),xr(F,[b,k])},onEnterCancelled(b){S(b,!1),xr(E,[b])},onAppearCancelled(b){S(b,!0),xr(A,[b])},onLeaveCancelled(b){m(b),xr(T,[b])}})}function of(e){if(e==null)return null;if(Ot(e))return[Hs(e.enter),Hs(e.leave)];{const t=Hs(e);return[t,t]}}function Hs(e){return Ki(e)}function qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function nr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function h0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lf=0;function _0(e,t,n,r){const a=e._endId=++lf,i=()=>{a===e._endId&&r()};if(n)return setTimeout(i,n);const{type:s,timeout:l,propCount:f}=p0(e,t);if(!s)return r();const u=s+"end";let h=0;const c=()=>{e.removeEventListener(u,v),i()},v=_=>{_.target===e&&++h>=f&&c()};setTimeout(()=>{h(n[o]||"").split(", "),a=r(tr+"Delay"),i=r(tr+"Duration"),s=v0(a,i),l=r(hi+"Delay"),f=r(hi+"Duration"),u=v0(l,f);let h=null,c=0,v=0;t===tr?s>0&&(h=tr,c=s,v=i.length):t===hi?u>0&&(h=hi,c=u,v=f.length):(c=Math.max(s,u),h=c>0?s>u?tr:hi:null,v=h?h===tr?i.length:f.length:0);const _=h===tr&&/\b(transform|all)(,|$)/.test(n[tr+"Property"]);return{type:h,timeout:c,propCount:v,hasTransform:_}}function v0(e,t){for(;e.lengthg0(n)+g0(e[r])))}function g0(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function b0(){return document.body.offsetHeight}const x0=new WeakMap,y0=new WeakMap,Ds={name:"TransitionGroup",props:jt({},sf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=$l(),r=kl();let a,i;return Rl(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!ff(a[0].el,n.vnode.el,s))return;a.forEach(cf),a.forEach(uf);const l=a.filter(df);b0(),l.forEach(f=>{const u=f.el,h=u.style;qn(u,s),h.transform=h.webkitTransform=h.transitionDuration="";const c=u._moveCb=v=>{v&&v.target!==u||(!v||/transform$/.test(v.propertyName))&&(u.removeEventListener("transitionend",c),u._moveCb=null,nr(u,s))};u.addEventListener("transitionend",c)})}),()=>{const s=mt(e),l=m0(s);let f=s.tag||ot;a=i,i=t.default?ys(t.default()):[];for(let u=0;u{s.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(r);const{hasTransform:i}=p0(r);return a.removeChild(r),i}const mf=["ctrl","shift","alt","meta"],hf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>mf.some(n=>e[`${n}Key`]&&!t.includes(n))},In=(e,t)=>(n,...r)=>{for(let a=0;an=>{if(!("key"in n))return;const r=An(n.key);if(t.some(a=>a===r||_f[a]===r))return e(n)},ha={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):_i(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),_i(e,!0),r.enter(e)):r.leave(e,()=>{_i(e,!1)}):_i(e,t))},beforeUnmount(e,{value:t}){_i(e,t)}};function _i(e,t){e.style.display=t?e._vod:"none"}const pf=jt({patchProp:tf},Dd);let w0;function vf(){return w0||(w0=xd(pf))}const k0=(...e)=>{vf().render(...e)};var xt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n};const gf={name:"AppLoader",props:{show:{type:Boolean,default:!1},infinite:{type:Boolean,default:!1},type:{type:String,required:!0},messageId:{type:String,default:""}}},bf=ke("div",{id:"vac-circle"},null,-1),xf=ke("div",{id:"vac-circle"},null,-1),yf=ke("div",{id:"vac-circle"},null,-1),wf=ke("div",{id:"vac-circle"},null,-1),kf=ke("div",{id:"vac-circle"},null,-1),Sf=ke("div",{id:"vac-circle"},null,-1);function Mf(e,t,n,r,a,i){return $(),ht(Ct,{name:"vac-fade-spinner",appear:""},{default:Ge(()=>[n.show?($(),le("div",{key:0,class:rt(["vac-loader-wrapper",{"vac-container-center":!n.infinite,"vac-container-top":n.infinite}])},[n.type==="rooms"?Be(e.$slots,"spinner-icon-rooms",{key:0},()=>[bf]):Ie("",!0),n.type==="infinite-rooms"?Be(e.$slots,"spinner-icon-infinite-rooms",{key:1},()=>[xf]):Ie("",!0),n.type==="message-file"?Be(e.$slots,"spinner-icon-message-file_"+n.messageId,{key:2},()=>[yf]):Ie("",!0),n.type==="room-file"?Be(e.$slots,"spinner-icon-room-file",{key:3},()=>[wf]):Ie("",!0),n.type==="messages"?Be(e.$slots,"spinner-icon-messages",{key:4},()=>[kf]):Ie("",!0),n.type==="infinite-messages"?Be(e.$slots,"spinner-icon-infinite-messages",{key:5},()=>[Sf]):Ie("",!0)],2)):Ie("",!0)]),_:3})}var _a=xt(gf,[["render",Mf]]);const Af={name:"SvgIcon",props:{name:{type:String,default:null},param:{type:String,default:null}},data(){return{svgItem:{search:{path:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},add:{path:"M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},toggle:{path:"M5,13L9,17L7.6,18.42L1.18,12L7.6,5.58L9,7L5,11H21V13H5M21,6V8H11V6H21M21,16V18H11V16H21Z"},menu:{path:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"},close:{path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},file:{path:"M14,17H7V15H14M17,13H7V11H17M17,9H7V7H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"},paperclip:{path:"M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z"},"close-outline":{path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},send:{path:"M2,21L23,12L2,3V10L17,12L2,14V21Z"},emoji:{path:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"},document:{path:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"},pencil:{path:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},checkmark:{path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},"double-checkmark":{path:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"},eye:{path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},dropdown:{path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},deleted:{path:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"},microphone:{size:"large",path:"M432.8,216.4v39.2c0,45.2-15.3,84.3-45.2,118.4c-29.8,33.2-67.3,52.8-111.6,57.9v40.9h78.4c5.1,0,10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6c0,5.1-1.7,10.2-6,13.6c-4.3,4.3-8.5,6-13.6,6H157.6c-5.1,0-10.2-1.7-13.6-6c-4.3-4.3-6-8.5-6-13.6c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6H236v-40.9c-44.3-5.1-81.8-23.9-111.6-57.9s-45.2-73.3-45.2-118.4v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6s10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6v39.2c0,37.5,13.6,70.7,40,97.1s59.6,40,97.1,40s70.7-13.6,97.1-40c26.4-26.4,40-59.6,40-97.1v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6c5.1,0,10.2,1.7,13.6,6C430.2,206.2,432.8,211.3,432.8,216.4z M353.5,98v157.6c0,27.3-9.4,50.3-29,69c-19.6,19.6-42.6,29-69,29s-50.3-9.4-69-29c-19.6-19.6-29-42.6-29-69V98c0-27.3,9.4-50.3,29-69c19.6-19.6,42.6-29,69-29s50.3,9.4,69,29C344.2,47.7,353.5,71.6,353.5,98z"},"audio-play":{size:"medium",path:"M43.331,21.237L7.233,0.397c-0.917-0.529-2.044-0.529-2.96,0c-0.916,0.528-1.48,1.505-1.48,2.563v41.684 c0,1.058,0.564,2.035,1.48,2.563c0.458,0.268,0.969,0.397,1.48,0.397c0.511,0,1.022-0.133,1.48-0.397l36.098-20.84 c0.918-0.529,1.479-1.506,1.479-2.564S44.247,21.767,43.331,21.237z"},"audio-pause":{size:"medium",path:"M17.991,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C4.729,2.969,7.698,0,11.36,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z",path2:"M42.877,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C29.616,2.969,32.585,0,36.246,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z"}}}},computed:{svgId(){const e=this.param?"-"+this.param:"";return`vac-icon-${this.name}${e}`},size(){const e=this.svgItem[this.name];return e.size==="large"?512:e.size==="medium"?48:24}}},Ef=["viewBox"],Tf=["id","d"],Rf=["id","d"];function If(e,t,n,r,a,i){return $(),le("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"24",height:"24",viewBox:`0 0 ${i.size} ${i.size}`},[ke("path",{id:i.svgId,d:a.svgItem[n.name].path},null,8,Tf),a.svgItem[n.name].path2?($(),le("path",{key:0,id:i.svgId,d:a.svgItem[n.name].path2},null,8,Rf)):Ie("",!0)],8,Ef)}var zt=xt(Af,[["render",If]]);const Cf={name:"RoomsSearch",components:{SvgIcon:zt},props:{textMessages:{type:Object,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0}},emits:["search-room","add-room"],computed:{showSearchBar(){return this.showSearch||this.showAddRoom}}},Bf={key:0,class:"vac-icon-search"},Of=["placeholder"];function Ff(e,t,n,r,a,i){const s=Ye("svg-icon");return $(),le("div",{class:rt({"vac-box-search":i.showSearchBar,"vac-box-empty":!i.showSearchBar})},[n.showSearch?($(),le(ot,{key:0},[!n.loadingRooms&&n.rooms.length?($(),le("div",Bf,[Be(e.$slots,"search-icon",{},()=>[Oe(s,{name:"search"})])])):Ie("",!0),!n.loadingRooms&&n.rooms.length?($(),le("input",{key:1,type:"search",placeholder:n.textMessages.SEARCH,autocomplete:"off",class:"vac-input",onInput:t[0]||(t[0]=l=>e.$emit("search-room",l))},null,40,Of)):Ie("",!0)],64)):Ie("",!0),n.showAddRoom?($(),le("div",{key:1,class:"vac-svg-button vac-add-icon",onClick:t[1]||(t[1]=l=>e.$emit("add-room"))},[Be(e.$slots,"add-icon",{},()=>[Oe(s,{name:"add"})])])):Ie("",!0)],2)}var Lf=xt(Cf,[["render",Ff]]);const S0=document.createElement("i");function M0(e){const t="&"+e+";";S0.innerHTML=t;const n=S0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function an(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i0?(an(e,e.length,0,t),e):t}const Ps={}.hasOwnProperty;function A0(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}const Pf={'"':"quot","&":"amp","<":"lt",">":"gt"};function T0(e){return e.replace(/["&<>]/g,t);function t(n){return"&"+Pf[n]+";"}}function Cn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zf=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Wt=rr(/[A-Za-z]/),qt=rr(/[\dA-Za-z]/),Uf=rr(/[#-'*+\--9=?A-Z^-~]/);function pa(e){return e!==null&&(e<32||e===127)}const zs=rr(/\d/),Vf=rr(/[\dA-Fa-f]/),qf=rr(/[!-/:-@[-`{-~]/);function We(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function st(e){return e===-2||e===-1||e===32}const Us=rr(zf),qr=rr(/\s/);function rr(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function wr(e,t){const n=T0(Xf(e||""));if(!t)return n;const r=n.indexOf(":"),a=n.indexOf("?"),i=n.indexOf("#"),s=n.indexOf("/");return r<0||s>-1&&r>s||a>-1&&r>a||i>-1&&r>i||t.test(n.slice(0,r))?n:""}function Xf(e){const t=[];let n=-1,r=0,a=0;for(;++n55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="\uFFFD"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}const R0={}.hasOwnProperty,I0=/^(https?|ircs?|mailto|xmpp)$/i,Yf=/^https?$/i;function Kf(e){const t=e||{};let n=!0;const r={},a=[[]],i=[],s=[],f=E0([{enter:{blockQuote:k,codeFenced:P,codeFencedFenceInfo:O,codeFencedFenceMeta:O,codeIndented:M,codeText:q,content:Ee,definition:z,definitionDestinationString:ne,definitionLabelString:O,definitionTitleString:O,emphasis:N,htmlFlow:ee,htmlText:B,image:C,label:O,link:me,listItemMarker:m,listItemValue:S,listOrdered:g,listUnordered:A,paragraph:H,reference:O,resource:He,resourceDestinationString:Te,resourceTitleString:O,setextHeading:Ae,strong:U},exit:{atxHeading:Pe,atxHeadingSequence:ye,autolinkEmail:oe,autolinkProtocol:te,blockQuote:w,characterEscapeValue:Ue,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:se,codeFenced:W,codeFencedFence:d,codeFencedFenceInfo:V,codeFencedFenceMeta:I,codeFlowValue:ue,codeIndented:W,codeText:K,codeTextData:Ue,data:Ue,definition:Me,definitionDestinationString:ce,definitionLabelString:X,definitionTitleString:de,emphasis:D,hardBreakEscape:we,hardBreakTrailing:we,htmlFlow:Ce,htmlFlowData:Ue,htmlText:Ce,htmlTextData:Ue,image:at,label:ve,labelText:Se,lineEnding:Ke,link:at,listOrdered:x,listUnordered:b,paragraph:Y,reference:I,referenceString:pe,resource:I,resourceDestinationString:he,resourceTitleString:Ve,setextHeading:ze,setextHeadingLineSequence:je,setextHeadingText:ge,strong:Z,thematicBreak:J}}].concat(t.htmlExtensions||[])),u={tightStack:s,definitions:r},h={lineEndingIfNeeded:T,options:t,encode:R,raw:E,tag:p,buffer:O,resume:I,setData:o,getData:j};let c=t.defaultLineEnding;return v;function v(Q){let _e=-1,fe=0;const De=[];let re=[],Fe=[];for(;++_e"):y(),T(),p(""),o("expectFirstItem"),o("lastWasTag")}function x(){y(),s.pop(),F(),p("")}function b(){y(),s.pop(),F(),p("")}function y(){j("lastWasTag")&&!j("slurpAllLineEndings")&&T(),p(" "),o("slurpAllLineEndings")}function k(){s.push(!1),T(),p("")}function w(){s.pop(),T(),p("
"),o("slurpAllLineEndings")}function H(){s[s.length-1]||(T(),p("")),o("slurpAllLineEndings")}function Y(){s[s.length-1]?o("slurpAllLineEndings",!0):p("
")}function P(){T(),p(""),o("slurpOneLineEnding",!0)),o("fencesCount",Q+1)}function M(){T(),p("")}function W(){const Q=j("fencesCount");Q!==void 0&&Q<2&&u.tightStack.length>0&&!j("lastWasTag")&&F(),j("flowCodeSeenData")&&T(),p("
"),Q!==void 0&&Q<2&&T(),o("flowCodeSeenData"),o("fencesCount"),o("slurpOneLineEnding")}function C(){i.push({image:!0}),n=void 0}function me(){i.push({})}function Se(Q){i[i.length-1].labelId=this.sliceSerialize(Q)}function ve(){i[i.length-1].label=I()}function pe(Q){i[i.length-1].referenceId=this.sliceSerialize(Q)}function He(){O(),i[i.length-1].destination=""}function Te(){O(),o("ignoreEncode",!0)}function he(){i[i.length-1].destination=I(),o("ignoreEncode")}function Ve(){i[i.length-1].title=I()}function at(){let Q=i.length-1;const _e=i[Q],fe=_e.referenceId||_e.labelId,De=_e.destination===void 0?r[Cn(fe)]:_e;for(n=!0;Q--;)if(i[Q].image){n=void 0;break}_e.image?(p('
"):(p(">"),E(_e.label),p("
")),i.pop()}function z(){O(),i.push({})}function X(Q){I(),i[i.length-1].labelId=this.sliceSerialize(Q)}function ne(){O(),o("ignoreEncode",!0)}function ce(){i[i.length-1].destination=I(),o("ignoreEncode")}function de(){i[i.length-1].title=I()}function Me(){const Q=i[i.length-1],_e=Cn(Q.labelId);I(),R0.call(r,_e)||(r[_e]=i[i.length-1]),i.pop()}function Ee(){o("slurpAllLineEndings",!0)}function ye(Q){j("headingRank")||(o("headingRank",this.sliceSerialize(Q).length),T(),p(""))}function Ae(){O(),o("slurpAllLineEndings")}function ge(){o("slurpAllLineEndings",!0)}function Pe(){p(" "),o("headingRank")}function je(Q){o("headingRank",this.sliceSerialize(Q).charCodeAt(0)===61?1:2)}function ze(){const Q=I();T(),p(""),E(Q),p(" "),o("slurpAllLineEndings"),o("headingRank")}function Ue(Q){E(R(this.sliceSerialize(Q)))}function Ke(Q){if(!j("slurpAllLineEndings")){if(j("slurpOneLineEnding")){o("slurpOneLineEnding");return}if(j("inCodeText")){E(" ");return}E(R(this.sliceSerialize(Q)))}}function ue(Q){E(R(this.sliceSerialize(Q))),o("flowCodeSeenData",!0)}function we(){p("
")}function ee(){T(),B()}function Ce(){o("ignoreEncode")}function B(){t.allowDangerousHtml&&o("ignoreEncode",!0)}function N(){p("")}function U(){p("")}function q(){o("inCodeText",!0),p("")}function K(){o("inCodeText"),p("
")}function D(){p("")}function Z(){p("")}function J(){T(),p("
")}function G(Q){o("characterReferenceType",Q.type)}function se(Q){let _e=this.sliceSerialize(Q);_e=j("characterReferenceType")?Df(_e,j("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):M0(_e),E(R(_e)),o("characterReferenceType")}function te(Q){const _e=this.sliceSerialize(Q);p(''),E(R(_e)),p("")}function oe(Q){const _e=this.sliceSerialize(Q);p(''),E(R(_e)),p("")}}function ct(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(f){return st(f)?(e.enter(n),l(f)):t(f)}function l(f){return st(f)&&i++s))return;const g=t.events.length;let A=g,S,m;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(S){m=t.events[A][1].end;break}S=!0}for(I(r),R=g;RE;){const T=n[F];t.containerState=T[1],T[0].exit.call(t,e)}n.length=E}function p(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Jf(e,t,n){return ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function va(e){if(e===null||yt(e)||qr(e))return 1;if(Us(e))return 2}function ga(e,t,n){const r=[];let a=-1;for(;++a1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c=Object.assign({},e[r][1].end),v=Object.assign({},e[n][1].start);B0(c,-f),B0(v,f),s={type:f>1?"strongSequence":"emphasisSequence",start:c,end:Object.assign({},e[r][1].end)},l={type:f>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:v},i={type:f>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a={type:f>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},l.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Vt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Vt(u,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=Vt(u,ga(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Vt(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=Vt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,an(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n0&&st(R)?ct(e,p,"linePrefix",i+1)(R):p(R)}function p(R){return R===null||We(R)?e.check(j0,j,F)(R):(e.enter("codeFlowValue"),E(R))}function E(R){return R===null||We(R)?(e.exit("codeFlowValue"),p(R)):(e.consume(R),E)}function F(R){return e.exit("codeFenced"),t(R)}function T(R,g,A){let S=0;return m;function m(w){return R.enter("lineEnding"),R.consume(w),R.exit("lineEnding"),x}function x(w){return R.enter("codeFencedFence"),st(w)?ct(R,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):b(w)}function b(w){return w===l?(R.enter("codeFencedFenceSequence"),y(w)):A(w)}function y(w){return w===l?(S++,R.consume(w),y):S>=s?(R.exit("codeFencedFenceSequence"),st(w)?ct(R,k,"whitespace")(w):k(w)):A(w)}function k(w){return w===null||We(w)?(R.exit("codeFencedFence"),g(w)):A(w)}}}function um(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const qs={name:"codeIndented",tokenize:fm},dm={tokenize:mm,partial:!0};function fm(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),ct(e,i,"linePrefix",4+1)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?f(u):We(u)?e.attempt(dm,s,f)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||We(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function f(u){return e.exit("codeIndented"),t(u)}}function mm(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):We(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):ct(e,i,"linePrefix",4+1)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):We(s)?a(s):n(s)}}const hm={name:"codeText",tokenize:vm,resolve:_m,previous:pm};function _m(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function D0(e,t,n,r,a,i,s,l,f){const u=f||Number.POSITIVE_INFINITY;let h=0;return c;function c(I){return I===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(I),e.exit(i),v):I===null||I===32||I===41||pa(I)?n(I):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),j(I))}function v(I){return I===62?(e.enter(i),e.consume(I),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),_(I))}function _(I){return I===62?(e.exit("chunkString"),e.exit(l),v(I)):I===null||I===60||We(I)?n(I):(e.consume(I),I===92?o:_)}function o(I){return I===60||I===62||I===92?(e.consume(I),_):_(I)}function j(I){return!h&&(I===null||I===41||yt(I))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(I)):h999||_===null||_===91||_===93&&!f||_===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(_):_===93?(e.exit(i),e.enter(a),e.consume(_),e.exit(a),e.exit(r),t):We(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),c(_))}function c(_){return _===null||_===91||_===93||We(_)||l++>999?(e.exit("chunkString"),h(_)):(e.consume(_),f||(f=!st(_)),_===92?v:c)}function v(_){return _===91||_===92||_===93?(e.consume(_),l++,c):c(_)}}function z0(e,t,n,r,a,i){let s;return l;function l(v){return v===34||v===39||v===40?(e.enter(r),e.enter(a),e.consume(v),e.exit(a),s=v===40?41:v,f):n(v)}function f(v){return v===s?(e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):(e.enter(i),u(v))}function u(v){return v===s?(e.exit(i),f(s)):v===null?n(v):We(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ct(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===s||v===null||We(v)?(e.exit("chunkString"),u(v)):(e.consume(v),v===92?c:h)}function c(v){return v===s||v===92?(e.consume(v),h):h(v)}}function vi(e,t){let n;return r;function r(a){return We(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):st(a)?ct(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Sm={name:"definition",tokenize:Am},Mm={tokenize:Em,partial:!0};function Am(e,t,n){const r=this;let a;return i;function i(_){return e.enter("definition"),s(_)}function s(_){return P0.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(_)}function l(_){return a=Cn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),_===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),f):n(_)}function f(_){return yt(_)?vi(e,u)(_):u(_)}function u(_){return D0(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(_)}function h(_){return e.attempt(Mm,c,c)(_)}function c(_){return st(_)?ct(e,v,"whitespace")(_):v(_)}function v(_){return _===null||We(_)?(e.exit("definition"),r.parser.defined.push(a),t(_)):n(_)}}function Em(e,t,n){return r;function r(l){return yt(l)?vi(e,a)(l):n(l)}function a(l){return z0(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return st(l)?ct(e,s,"whitespace")(l):s(l)}function s(l){return l===null||We(l)?t(l):n(l)}}const Tm={name:"hardBreakEscape",tokenize:Rm};function Rm(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return We(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Im={name:"headingAtx",tokenize:Bm,resolve:Cm};function Cm(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},an(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function Bm(e,t,n){let r=0;return a;function a(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||yt(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||We(h)?(e.exit("atxHeading"),t(h)):st(h)?ct(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||yt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}const Om=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],U0=["pre","script","style","textarea"],Fm={name:"htmlFlow",tokenize:Hm,resolveTo:Nm,concrete:!0},Lm={tokenize:Pm,partial:!0},jm={tokenize:Dm,partial:!0};function Nm(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Hm(e,t,n){const r=this;let a,i,s,l,f;return u;function u(C){return h(C)}function h(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),v):C===47?(e.consume(C),i=!0,j):C===63?(e.consume(C),a=3,r.interrupt?t:d):Wt(C)?(e.consume(C),s=String.fromCharCode(C),O):n(C)}function v(C){return C===45?(e.consume(C),a=2,_):C===91?(e.consume(C),a=5,l=0,o):Wt(C)?(e.consume(C),a=4,r.interrupt?t:d):n(C)}function _(C){return C===45?(e.consume(C),r.interrupt?t:d):n(C)}function o(C){const me="CDATA[";return C===me.charCodeAt(l++)?(e.consume(C),l===me.length?r.interrupt?t:b:o):n(C)}function j(C){return Wt(C)?(e.consume(C),s=String.fromCharCode(C),O):n(C)}function O(C){if(C===null||C===47||C===62||yt(C)){const me=C===47,Se=s.toLowerCase();return!me&&!i&&U0.includes(Se)?(a=1,r.interrupt?t(C):b(C)):Om.includes(s.toLowerCase())?(a=6,me?(e.consume(C),I):r.interrupt?t(C):b(C)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):i?p(C):E(C))}return C===45||qt(C)?(e.consume(C),s+=String.fromCharCode(C),O):n(C)}function I(C){return C===62?(e.consume(C),r.interrupt?t:b):n(C)}function p(C){return st(C)?(e.consume(C),p):m(C)}function E(C){return C===47?(e.consume(C),m):C===58||C===95||Wt(C)?(e.consume(C),F):st(C)?(e.consume(C),E):m(C)}function F(C){return C===45||C===46||C===58||C===95||qt(C)?(e.consume(C),F):T(C)}function T(C){return C===61?(e.consume(C),R):st(C)?(e.consume(C),T):E(C)}function R(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),f=C,g):st(C)?(e.consume(C),R):A(C)}function g(C){return C===f?(e.consume(C),f=null,S):C===null||We(C)?n(C):(e.consume(C),g)}function A(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||yt(C)?T(C):(e.consume(C),A)}function S(C){return C===47||C===62||st(C)?E(C):n(C)}function m(C){return C===62?(e.consume(C),x):n(C)}function x(C){return C===null||We(C)?b(C):st(C)?(e.consume(C),x):n(C)}function b(C){return C===45&&a===2?(e.consume(C),H):C===60&&a===1?(e.consume(C),Y):C===62&&a===4?(e.consume(C),M):C===63&&a===3?(e.consume(C),d):C===93&&a===5?(e.consume(C),V):We(C)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Lm,W,y)(C)):C===null||We(C)?(e.exit("htmlFlowData"),y(C)):(e.consume(C),b)}function y(C){return e.check(jm,k,W)(C)}function k(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),w}function w(C){return C===null||We(C)?y(C):(e.enter("htmlFlowData"),b(C))}function H(C){return C===45?(e.consume(C),d):b(C)}function Y(C){return C===47?(e.consume(C),s="",P):b(C)}function P(C){if(C===62){const me=s.toLowerCase();return U0.includes(me)?(e.consume(C),M):b(C)}return Wt(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),P):b(C)}function V(C){return C===93?(e.consume(C),d):b(C)}function d(C){return C===62?(e.consume(C),M):C===45&&a===2?(e.consume(C),d):b(C)}function M(C){return C===null||We(C)?(e.exit("htmlFlowData"),W(C)):(e.consume(C),M)}function W(C){return e.exit("htmlFlow"),t(C)}}function Dm(e,t,n){const r=this;return a;function a(s){return We(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Pm(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(pi,t,n)}}const zm={name:"htmlText",tokenize:Um};function Um(e,t,n){const r=this;let a,i,s;return l;function l(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),f}function f(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),T):d===63?(e.consume(d),E):Wt(d)?(e.consume(d),A):n(d)}function u(d){return d===45?(e.consume(d),h):d===91?(e.consume(d),i=0,o):Wt(d)?(e.consume(d),p):n(d)}function h(d){return d===45?(e.consume(d),_):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),v):We(d)?(s=c,Y(d)):(e.consume(d),c)}function v(d){return d===45?(e.consume(d),_):c(d)}function _(d){return d===62?H(d):d===45?v(d):c(d)}function o(d){const M="CDATA[";return d===M.charCodeAt(i++)?(e.consume(d),i===M.length?j:o):n(d)}function j(d){return d===null?n(d):d===93?(e.consume(d),O):We(d)?(s=j,Y(d)):(e.consume(d),j)}function O(d){return d===93?(e.consume(d),I):j(d)}function I(d){return d===62?H(d):d===93?(e.consume(d),I):j(d)}function p(d){return d===null||d===62?H(d):We(d)?(s=p,Y(d)):(e.consume(d),p)}function E(d){return d===null?n(d):d===63?(e.consume(d),F):We(d)?(s=E,Y(d)):(e.consume(d),E)}function F(d){return d===62?H(d):E(d)}function T(d){return Wt(d)?(e.consume(d),R):n(d)}function R(d){return d===45||qt(d)?(e.consume(d),R):g(d)}function g(d){return We(d)?(s=g,Y(d)):st(d)?(e.consume(d),g):H(d)}function A(d){return d===45||qt(d)?(e.consume(d),A):d===47||d===62||yt(d)?S(d):n(d)}function S(d){return d===47?(e.consume(d),H):d===58||d===95||Wt(d)?(e.consume(d),m):We(d)?(s=S,Y(d)):st(d)?(e.consume(d),S):H(d)}function m(d){return d===45||d===46||d===58||d===95||qt(d)?(e.consume(d),m):x(d)}function x(d){return d===61?(e.consume(d),b):We(d)?(s=x,Y(d)):st(d)?(e.consume(d),x):S(d)}function b(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),a=d,y):We(d)?(s=b,Y(d)):st(d)?(e.consume(d),b):(e.consume(d),k)}function y(d){return d===a?(e.consume(d),a=void 0,w):d===null?n(d):We(d)?(s=y,Y(d)):(e.consume(d),y)}function k(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||yt(d)?S(d):(e.consume(d),k)}function w(d){return d===47||d===62||yt(d)?S(d):n(d)}function H(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function Y(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),P}function P(d){return st(d)?ct(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):V(d)}function V(d){return e.enter("htmlTextData"),s(d)}}const Xs={name:"labelEnd",tokenize:Gm,resolveTo:Km,resolveAll:Ym},Vm={tokenize:Wm},qm={tokenize:Zm},Xm={tokenize:Qm};function Ym(e){let t=-1;for(;++t=3&&(u===null||We(u))?(e.exit("thematicBreak"),t(u)):n(u)}function f(u){return u===a?(e.consume(u),r++,f):(e.exit("thematicBreakSequence"),st(u)?ct(e,l,"whitespace")(u):l(u))}}const Qt={name:"list",tokenize:sh,continuation:{tokenize:oh},exit:ch},ih={tokenize:uh,partial:!0},ah={tokenize:lh,partial:!0};function sh(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(_){const o=r.containerState.type||(_===42||_===43||_===45?"listUnordered":"listOrdered");if(o==="listUnordered"?!r.containerState.marker||_===r.containerState.marker:zs(_)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),o==="listUnordered")return e.enter("listItemPrefix"),_===42||_===45?e.check(ba,n,u)(_):u(_);if(!r.interrupt||_===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(_)}return n(_)}function f(_){return zs(_)&&++s<10?(e.consume(_),f):(!r.interrupt||s<2)&&(r.containerState.marker?_===r.containerState.marker:_===41||_===46)?(e.exit("listItemValue"),u(_)):n(_)}function u(_){return e.enter("listItemMarker"),e.consume(_),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||_,e.check(pi,r.interrupt?n:h,e.attempt(ih,v,c))}function h(_){return r.containerState.initialBlankLine=!0,i++,v(_)}function c(_){return st(_)?(e.enter("listItemPrefixWhitespace"),e.consume(_),e.exit("listItemPrefixWhitespace"),v):n(_)}function v(_){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(_)}}function oh(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(pi,a,i);function a(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ct(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!st(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ah,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ct(e,e.attempt(Qt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function lh(e,t,n){const r=this;return ct(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function ch(e){e.exit(this.containerState.type)}function uh(e,t,n){const r=this;return ct(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function a(i){const s=r.events[r.events.length-1];return!st(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const V0={name:"setextUnderline",tokenize:fh,resolveTo:dh};function dh(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function fh(e,t,n){const r=this;let a;return i;function i(u){let h=r.events.length,c;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){c=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),a=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===a?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),st(u)?ct(e,f,"lineSuffix")(u):f(u))}function f(u){return u===null||We(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const mh={tokenize:hh};function hh(e){const t=this,n=e.attempt(pi,r,e.attempt(this.parser.constructs.flowInitial,a,ct(e,e.attempt(this.parser.constructs.flow,a,e.attempt(bm,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _h={resolveAll:X0()},ph=q0("string"),vh=q0("text");function q0(e){return{tokenize:t,resolveAll:X0(e==="text"?gh:void 0)};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,l);return s;function s(h){return u(h)?i(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return u(h)?(n.exit("data"),i(h)):(n.consume(h),f)}function u(h){if(h===null)return!0;const c=a[h];let v=-1;if(c)for(;++v-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function yh(e,t){let n=-1;const r=[];let a;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Hh={exit:{literalAutolinkEmail:Ph,literalAutolinkHttp:zh,literalAutolinkWww:Dh}};function Dh(e){Ws.call(this,e,"http://")}function Ph(e){Ws.call(this,e,"mailto:")}function zh(e){Ws.call(this,e)}function Ws(e,t){const n=this.sliceSerialize(e);this.tag(''),this.raw(this.encode(n)),this.tag("")}const Uh={tokenize:Zh,partial:!0};function Vh(){return{document:{[91]:{tokenize:Kh,continuation:{tokenize:Gh},exit:Wh}},text:{[91]:{tokenize:Yh},[93]:{add:"after",tokenize:qh,resolveTo:Xh}}}}function qh(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;a--;){const f=r.events[a][1];if(f.type==="labelImage"){s=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!s||!s._balanced)return n(f);const u=Cn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function Xh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Yh(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,s;return l;function l(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),f}function f(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(i>999||c===93&&!s||c===null||c===91||yt(c))return n(c);if(c===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return a.includes(Cn(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return yt(c)||(s=!0),i++,e.consume(c),c===92?h:u}function h(c){return c===91||c===92||c===93?(e.consume(c),i++,u):u(c)}}function Kh(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0,l;return f;function f(o){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(o),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(o){return o===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(o),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(o)}function h(o){if(s>999||o===93&&!l||o===null||o===91||yt(o))return n(o);if(o===93){e.exit("chunkString");const j=e.exit("gfmFootnoteDefinitionLabelString");return i=Cn(r.sliceSerialize(j)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(o),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return yt(o)||(l=!0),s++,e.consume(o),o===92?c:h}function c(o){return o===91||o===92||o===93?(e.consume(o),s++,h):h(o)}function v(o){return o===58?(e.enter("definitionMarker"),e.consume(o),e.exit("definitionMarker"),a.includes(i)||a.push(i),ct(e,_,"gfmFootnoteDefinitionWhitespace")):n(o)}function _(o){return t(o)}}function Gh(e,t,n){return e.check(pi,t,e.attempt(Uh,t,n))}function Wh(e){e.exit("gfmFootnoteDefinition")}function Zh(e,t,n){const r=this;return ct(e,a,"gfmFootnoteDefinitionIndent",4+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}const Qh={}.hasOwnProperty,Jh={};function $h(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function e2(e){const t=e||Jh,n=t.label||"Footnotes",r=t.labelTagName||"h2",a=t.labelAttributes===null||t.labelAttributes===void 0?'class="sr-only"':t.labelAttributes,i=t.backLabel||$h,s=t.clobberPrefix===null||t.clobberPrefix===void 0?"user-content-":t.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let l=this.getData("gfmFootnoteDefinitions");const f=this.getData("gfmFootnoteDefinitionStack"),u=this.getData("tightStack"),h=f.pop(),c=this.resume();l||this.setData("gfmFootnoteDefinitions",l={}),Qh.call(l,h)||(l[h]=c),u.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(l){let f=this.getData("gfmFootnoteDefinitionStack");f||this.setData("gfmFootnoteDefinitionStack",f=[]),f.push(Cn(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let f=this.getData("gfmFootnoteCallOrder"),u=this.getData("gfmFootnoteCallCounts");const h=Cn(this.sliceSerialize(l));let c;this.resume(),f||this.setData("gfmFootnoteCallOrder",f=[]),u||this.setData("gfmFootnoteCallCounts",u={});const v=f.indexOf(h),_=wr(h.toLowerCase());v===-1?(f.push(h),u[h]=1,c=f.length):(u[h]++,c=v+1);const o=u[h];this.tag('1?"-"+o:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(c)+"")},null(){const l=this.getData("gfmFootnoteCallOrder")||[],f=this.getData("gfmFootnoteCallCounts")||{},u=this.getData("gfmFootnoteDefinitions")||{};let h=-1;for(l.length>0&&(this.lineEndingIfNeeded(),this.tag('<'+r+' id="footnote-label"'+(a?" "+a:"")+">"),this.raw(this.encode(n)),this.tag(""+r+">"),this.lineEndingIfNeeded(),this.tag(""));++h1?"-"+_:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof i=="string"?i:i(h,_))+'" class="data-footnote-backref">\u21A9'+(_>1?""+_+"":"")+"
");const j=o.join(" ");let O=!1;this.lineEndingIfNeeded(),this.tag(''),this.lineEndingIfNeeded(),this.tag(u[c].replace(/<\/p>(?:\r?\n|\r)?$/,I=>(O=!0," "+j+I))),O||(this.lineEndingIfNeeded(),this.tag(j)),this.lineEndingIfNeeded(),this.tag(" ")}l.length>0&&(this.lineEndingIfNeeded(),this.tag(""),this.lineEndingIfNeeded(),this.tag(""))}}}}const t2={enter:{strikethrough(){this.tag("")}},exit:{strikethrough(){this.tag("")}}};function n2(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{[126]:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(s,l){let f=-1;for(;++f1?f(o):(s.consume(o),c++,_);if(c<2&&!n)return f(o);const O=s.exit("strikethroughSequenceTemporary"),I=va(o);return O._open=!I||I===2&&Boolean(j),O._close=!j||j===2&&Boolean(I),l(o)}}}const Zs={none:"",left:' align="left"',right:' align="right"',center:' align="center"'},r2={enter:{table(e){const t=e._align;this.lineEndingIfNeeded(),this.tag(""),this.setData("tableAlign",t)},tableBody(){this.tag("")},tableData(){const e=this.getData("tableAlign"),t=this.getData("tableColumn"),n=Zs[e[t]];n===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag(""))},tableHead(){this.lineEndingIfNeeded(),this.tag("")},tableHeader(){const e=this.getData("tableAlign"),t=this.getData("tableColumn"),n=Zs[e[t]];this.lineEndingIfNeeded(),this.tag("")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag(" ")}},exit:{codeTextData(e){let t=this.sliceSerialize(e);this.getData("tableAlign")&&(t=t.replace(/\\([\\|])/g,i2)),this.raw(this.encode(t))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("
")},tableBody(){this.lineEndingIfNeeded(),this.tag("")},tableData(){const e=this.getData("tableAlign"),t=this.getData("tableColumn");t in e?(this.tag(""),this.setData("tableColumn",t+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("")},tableHeader(){const e=this.getData("tableColumn");this.tag(""),this.setData("tableColumn",e+1)},tableRow(){const e=this.getData("tableAlign");let t=this.getData("tableColumn");for(;t"),t++;this.setData("tableColumn",t),this.lineEndingIfNeeded(),this.tag("")}}};function i2(e,t){return t==="|"?t:e}class a2{constructor(){this.map=[]}add(t,n,r){s2(this,t,n,r)}consume(t){if(this.map.sort((i,s)=>i[0]-s[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let a=r.pop();for(;a;)t.push(...a),a=r.pop();this.map.length=0}}function s2(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a-1;){const k=r.events[x][1].type;if(k==="lineEnding"||k==="linePrefix")x--;else break}const b=x>-1?r.events[x][1].type:null,y=b==="tableHead"||b==="tableRow"?R:f;return y===R&&r.parser.lazy[r.now().line]?n(m):y(m)}function f(m){return e.enter("tableHead"),e.enter("tableRow"),u(m)}function u(m){return m===124||(s=!0,i+=1),h(m)}function h(m){return m===null?n(m):We(m)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_):n(m):st(m)?ct(e,h,"whitespace")(m):(i+=1,s&&(s=!1,a+=1),m===124?(e.enter("tableCellDivider"),e.consume(m),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),c(m)))}function c(m){return m===null||m===124||yt(m)?(e.exit("data"),h(m)):(e.consume(m),m===92?v:c)}function v(m){return m===92||m===124?(e.consume(m),c):c(m)}function _(m){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(m):(e.enter("tableDelimiterRow"),s=!1,st(m)?ct(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):o(m))}function o(m){return m===45||m===58?O(m):m===124?(s=!0,e.enter("tableCellDivider"),e.consume(m),e.exit("tableCellDivider"),j):T(m)}function j(m){return st(m)?ct(e,O,"whitespace")(m):O(m)}function O(m){return m===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(m),e.exit("tableDelimiterMarker"),I):m===45?(i+=1,I(m)):m===null||We(m)?F(m):T(m)}function I(m){return m===45?(e.enter("tableDelimiterFiller"),p(m)):T(m)}function p(m){return m===45?(e.consume(m),p):m===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(m),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(m))}function E(m){return st(m)?ct(e,F,"whitespace")(m):F(m)}function F(m){return m===124?o(m):m===null||We(m)?!s||a!==i?T(m):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(m)):T(m)}function T(m){return n(m)}function R(m){return e.enter("tableRow"),g(m)}function g(m){return m===124?(e.enter("tableCellDivider"),e.consume(m),e.exit("tableCellDivider"),g):m===null||We(m)?(e.exit("tableRow"),t(m)):st(m)?ct(e,g,"whitespace")(m):(e.enter("data"),A(m))}function A(m){return m===null||m===124||yt(m)?(e.exit("data"),g(m)):(e.consume(m),m===92?S:A)}function S(m){return m===92||m===124?(e.consume(m),A):A(m)}}function u2(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,f=0,u,h,c;const v=new a2;for(;++nn[2]+1){const o=n[2]+1,j=n[3]-n[2]-1;e.add(o,j,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return a!==void 0&&(i.end=Object.assign({},Xr(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function tc(e,t,n,r,a){const i=[],s=Xr(t.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function Xr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const nc=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,d2=new RegExp("^"+nc.source,"i"),f2={exit:{htmlFlowData(e){rc.call(this,e,nc)},htmlTextData(e){rc.call(this,e,d2)}}};function rc(e,t){let n=this.sliceSerialize(e);this.options.allowDangerousHtml&&(n=n.replace(t,"<$1$2")),this.raw(this.encode(n))}const m2={enter:{taskListCheck(){this.tag('")},taskListCheckValueChecked(){this.tag('checked="" ')}}},h2={tokenize:p2},_2={text:{[91]:h2}};function p2(e,t,n){const r=this;return a;function a(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),i)}function i(f){return yt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),s):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),s):n(f)}function s(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(f)}function l(f){return We(f)?t(f):st(f)?e.check({tokenize:v2},t,n)(f):n(f)}}function v2(e,t,n){return ct(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function g2(e){return A0([Rh,Vh(),n2(e),l2,_2])}function b2(e){return E0([Hh,e2(e),t2,r2,f2,m2])}const Dt={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,degree:176,byteOrderMarker:65279,replacementCharacter:65533},x2={text:{176:{name:"underline",tokenize:(e,t,n)=>{const r=s=>s===Dt.carriageReturn||s===Dt.lineFeed||s===Dt.carriageReturnLineFeed||s===Dt.eof?n(s):s===Dt.backslash?(e.consume(s),a):s===Dt.degree?(e.exit("underlineContent"),e.enter("underlineMarker"),e.consume(s),e.exit("underlineMarker"),e.exit("underline"),t):(e.consume(s),r),a=s=>s===Dt.backslash||s===Dt.degree?(e.consume(s),r):r(s),i=s=>s===Dt.degree?n(s):r(s);return s=>(e.enter("underline"),e.enter("underlineMarker"),e.consume(s),e.exit("underlineMarker"),e.enter("underlineContent",{contentType:"string"}),i)}}}},y2={enter:{underline(){this.tag("")}},exit:{underline(){this.tag("")}}},w2={text:{60:{name:"usertag",tokenize:(e,t,n)=>{const r=s=>s===Dt.carriageReturn||s===Dt.lineFeed||s===Dt.carriageReturnLineFeed||s===Dt.eof?n(s):s===Dt.backslash?(e.consume(s),a):s===Dt.greaterThan?(e.exit("usertagContent"),e.enter("usertagMarker"),e.consume(s),e.exit("usertagMarker"),e.exit("usertag"),t):(e.consume(s),r),a=s=>s===Dt.backslash||s===Dt.greaterThan?(e.consume(s),r):r(s),i=s=>s===Dt.atSign?(e.consume(s),e.exit("usertagMarker"),e.enter("usertagContent"),r):n(s);return s=>(e.enter("usertag"),e.enter("usertagMarker"),e.consume(s),i)}}}},k2=e=>({exit:{usertagContent(t){const n=this.sliceSerialize(t);this.tag(``);const r=e.find(a=>a._id===n);this.raw(`@${this.encode(r?r.username:n)}`),this.tag("")}}});var S2=(e,{textFormatting:t})=>{if(t){let n=[];t.linkify||(n=["literalAutolink","literalAutolinkEmail"]);const r=Ah(e.replaceAll("","<@").replaceAll(" ",">"),{extensions:[{...g2(),disable:{null:n}},x2,w2],htmlExtensions:[b2(),y2,k2(t.users)]});if(t.singleLine){const a=document.createElement("div");return a.innerHTML=r,[{types:[],value:a.innerText}]}return[{types:["markdown"],value:r}]}return[{types:[],value:e}]};const Qs=["png","jpg","jpeg","webp","svg","gif"],ic=["mp4","video/ogg","webm","quicktime"],M2=["mp3","audio/ogg","wav","mpeg"],A2={name:"FormatMessage",components:{SvgIcon:zt},props:{messageId:{type:String,default:""},roomId:{type:String,default:""},roomList:{type:Boolean,default:!1},content:{type:[String,Number],required:!0},deleted:{type:Boolean,default:!1},users:{type:Array,default:()=>[]},linkify:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!1},reply:{type:Boolean,default:!1},textFormatting:{type:Object,required:!0},textMessages:{type:Object,default:()=>{}},linkOptions:{type:Object,required:!0}},emits:["open-user-tag"],computed:{parsedMessage(){if(this.deleted)return[{value:this.textMessages.MESSAGE_DELETED}];let e;this.textFormatting.disabled?e={}:e={textFormatting:{linkify:this.linkify,linkOptions:this.linkOptions,singleLine:this.singleLine,reply:this.reply,users:this.users,...this.textFormatting}};const t=S2(this.content,e);return t.forEach(n=>{n.markdown=this.checkType(n,"markdown"),n.tag=this.checkType(n,"tag"),n.image=this.checkImageType(n)}),t}},methods:{checkType(e,t){return e.types&&e.types.indexOf(t)!==-1},checkImageType(e){let t=e.value.lastIndexOf(".");e.value.lastIndexOf("/")>t&&(t=-1);const r=e.value.substring(t+1,e.value.length),a=t>0&&Qs.some(i=>r.toLowerCase().includes(i));return a&&this.setImageSize(e),a},setImageSize(e){const t=new Image;t.src=e.value,t.addEventListener("load",n);function n(r){const a=r.path[0].width/150;e.height=Math.round(r.path[0].height/a)+"px",t.removeEventListener("load",n)}},openTag(e){const t=e.target.getAttribute("data-user-id");if(!this.singleLine&&t){const n=this.users.find(r=>String(r._id)===t);this.$emit("open-user-tag",n)}}}},E2=["innerHTML"],T2={class:"vac-image-link-container"},R2={class:"vac-image-link-message"};function I2(e,t,n,r,a,i){const s=Ye("svg-icon");return $(),le("div",{class:rt(["vac-format-message-wrapper",{"vac-text-ellipsis":n.singleLine}])},[($(!0),le(ot,null,tt(i.parsedMessage,(l,f)=>($(),le(ot,{key:f},[l.markdown?($(),le("div",{key:0,class:"markdown",onClick:t[0]||(t[0]=(...u)=>i.openTag&&i.openTag(...u)),innerHTML:l.value},null,8,E2)):($(),le("div",{key:1,class:rt(["vac-format-container",{"vac-text-ellipsis":n.singleLine}])},[($(),ht(sd(l.url?"a":"span"),{class:rt({"vac-text-ellipsis":n.singleLine,"vac-text-tag":!n.singleLine&&!n.reply&&l.tag}),href:l.href,target:l.href?n.linkOptions.target:null,rel:l.href?n.linkOptions.rel:null},{default:Ge(()=>[n.deleted?($(),le(ot,{key:0},[Be(e.$slots,n.roomList?"deleted-icon-room_"+n.roomId:"deleted-icon_"+n.messageId,{},()=>[Oe(s,{name:"deleted",class:rt(["vac-icon-deleted",{"vac-icon-deleted-room":n.roomList}])},null,8,["class"])]),Vn(" "+Je(n.textMessages.MESSAGE_DELETED),1)],64)):l.url&&l.image?($(),le(ot,{key:1},[ke("div",T2,[ke("div",{class:"vac-image-link",style:St({"background-image":`url('${l.value}')`,height:l.height})},null,4)]),ke("div",R2,Je(l.value),1)],64)):($(),le(ot,{key:2},[Vn(Je(l.value),1)],64))]),_:2},1032,["class","href","target","rel"]))],2))],64))),128))],2)}var gi=xt(A2,[["render",I2]]);const Sr="__v-click-outside",ac=typeof window!="undefined",C2=typeof navigator!="undefined",B2=ac&&("ontouchstart"in window||C2&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],O2=e=>{const t=typeof e=="function";if(!t&&typeof e!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:t?e:e.handler,middleware:e.middleware||(n=>n),events:e.events||B2,isActive:e.isActive!==!1,detectIframe:e.detectIframe!==!1,capture:Boolean(e.capture)}},sc=({event:e,handler:t,middleware:n})=>{n(e)&&t(e)},F2=({el:e,event:t,handler:n,middleware:r})=>{setTimeout(()=>{const{activeElement:a}=document;a&&a.tagName==="IFRAME"&&!e.contains(a)&&sc({event:t,handler:n,middleware:r})},0)},L2=({el:e,event:t,handler:n,middleware:r})=>{const a=t.path||t.composedPath&&t.composedPath();(a?a.indexOf(e)<0:!e.contains(t.target))&&sc({event:t,handler:n,middleware:r})},oc=(e,{value:t})=>{const{events:n,handler:r,middleware:a,isActive:i,detectIframe:s,capture:l}=O2(t);if(!!i){if(e[Sr]=n.map(f=>({event:f,srcTarget:document.documentElement,handler:u=>L2({el:e,event:u,handler:r,middleware:a}),capture:l})),s){const f={event:"blur",srcTarget:window,handler:u=>F2({el:e,event:u,handler:r,middleware:a}),capture:l};e[Sr]=[...e[Sr],f]}e[Sr].forEach(({event:f,srcTarget:u,handler:h})=>setTimeout(()=>{!e[Sr]||u.addEventListener(f,h,l)},0))}},lc=e=>{(e[Sr]||[]).forEach(({event:n,srcTarget:r,handler:a,capture:i})=>r.removeEventListener(n,a,i)),delete e[Sr]};var ya=ac?{beforeMount:oc,updated:(e,{value:t,oldValue:n})=>{JSON.stringify(t)!==JSON.stringify(n)&&(lc(e),oc(e,{value:t}))},unmounted:lc}:{},cc=(e,t,n)=>{if(e.typingUsers&&e.typingUsers.length){const r=e.users.filter(a=>{if(a._id!==t&&e.typingUsers.indexOf(a._id)!==-1&&!(a.status&&a.status.state==="offline"))return!0});return r.length?e.users.length===2?n.IS_TYPING:r.map(a=>a.username).join(", ")+" "+n.IS_TYPING:void 0}};function bi(e,t){if(!(!t||!t.type))return e.some(n=>t.type.toLowerCase().includes(n))}function Yr(e){return bi(Qs,e)}function xi(e){return bi(ic,e)}function uc(e){return bi(Qs,e)||bi(ic,e)}function wa(e){return bi(M2,e)}const j2={name:"RoomsContent",components:{SvgIcon:zt,FormatMessage:gi},directives:{clickOutside:ya},props:{currentUserId:{type:[String,Number],required:!0},room:{type:Object,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},textMessages:{type:Object,required:!0},roomActions:{type:Array,required:!0}},emits:["room-action-handler"],data(){return{roomMenuOpened:null}},computed:{getLastMessage(){const e=this.typingUsers;if(e)return e;const t=this.room.lastMessage.content;if(this.room.users.length<=2)return t;const n=this.room.users.find(r=>r._id===this.room.lastMessage.senderId);return this.room.lastMessage.username?`${this.room.lastMessage.username} - ${t}`:!n||n._id===this.currentUserId?t:`${n.username} - ${t}`},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(t=>t._id!==this.currentUserId);return e&&e.status?e.status.state:null},typingUsers(){return cc(this.room,this.currentUserId,this.textMessages)},isMessageCheckmarkVisible(){return!this.typingUsers&&this.room.lastMessage&&!this.room.lastMessage.deleted&&this.room.lastMessage.senderId===this.currentUserId&&(this.room.lastMessage.saved||this.room.lastMessage.distributed||this.room.lastMessage.seen)},formattedDuration(){var t,n;const e=(n=(t=this.room.lastMessage)==null?void 0:t.files)==null?void 0:n[0];if(e){if(!e.duration)return`${e.name}.${e.extension}`;let r=Math.floor(e.duration);return(r-(r%=60))/60+(r>9?":":":0")+r}return""},isAudio(){return this.room.lastMessage.files?wa(this.room.lastMessage.files[0]):!1}},methods:{roomActionHandler(e){this.closeRoomMenu(),this.$emit("room-action-handler",{action:e,roomId:this.room.roomId})},closeRoomMenu(){this.roomMenuOpened=null}}},N2={class:"vac-room-container"},H2={class:"vac-name-container vac-text-ellipsis"},D2={class:"vac-title-container"},P2={class:"vac-room-name vac-text-ellipsis"},z2={key:1,class:"vac-text-date"},U2={key:0},V2={key:1,class:"vac-text-ellipsis"},q2={key:3,class:"vac-text-ellipsis"},X2={class:"vac-room-options-container"},Y2={key:0,class:"vac-badge-counter vac-room-badge"},K2={key:0,class:"vac-menu-options"},G2={class:"vac-menu-list"},W2=["onClick"];function Z2(e,t,n,r,a,i){const s=Ye("svg-icon"),l=Ye("format-message"),f=oa("click-outside");return $(),le("div",N2,[Be(e.$slots,"room-list-item_"+n.room.roomId,{},()=>[Be(e.$slots,"room-list-avatar_"+n.room.roomId,{},()=>[n.room.avatar?($(),le("div",{key:0,class:"vac-avatar",style:St({"background-image":`url('${n.room.avatar}')`})},null,4)):Ie("",!0)]),ke("div",H2,[ke("div",D2,[i.userStatus?($(),le("div",{key:0,class:rt(["vac-state-circle",{"vac-state-online":i.userStatus==="online"}])},null,2)):Ie("",!0),ke("div",P2,Je(n.room.roomName),1),n.room.lastMessage?($(),le("div",z2,Je(n.room.lastMessage.timestamp),1)):Ie("",!0)]),ke("div",{class:rt(["vac-text-last",{"vac-message-new":n.room.lastMessage&&n.room.lastMessage.new&&!i.typingUsers}])},[i.isMessageCheckmarkVisible?($(),le("span",U2,[Be(e.$slots,"checkmark-icon_"+n.room.roomId,{},()=>[Oe(s,{name:n.room.lastMessage.distributed?"double-checkmark":"checkmark",param:n.room.lastMessage.seen?"seen":"",class:"vac-icon-check"},null,8,["name","param"])])])):Ie("",!0),n.room.lastMessage&&!n.room.lastMessage.deleted&&i.isAudio?($(),le("div",V2,[Be(e.$slots,"microphone-icon_"+n.room.roomId,{},()=>[Oe(s,{name:"microphone",class:"vac-icon-microphone"})]),Vn(" "+Je(i.formattedDuration),1)])):n.room.lastMessage?($(),ht(l,{key:2,"message-id":n.room.lastMessage._id,"room-id":n.room.roomId,"room-list":!0,content:i.getLastMessage,deleted:!!n.room.lastMessage.deleted&&!i.typingUsers,users:n.room.users,"text-messages":n.textMessages,linkify:!1,"text-formatting":n.textFormatting,"link-options":n.linkOptions,"single-line":!0},vt({_:2},[tt(e.$slots,(u,h)=>({name:h,fn:Ge(c=>[Be(e.$slots,h,pt(_t(c)))])}))]),1032,["message-id","room-id","content","deleted","users","text-messages","text-formatting","link-options"])):Ie("",!0),!n.room.lastMessage&&i.typingUsers?($(),le("div",q2,Je(i.typingUsers),1)):Ie("",!0),ke("div",X2,[n.room.unreadCount?($(),le("div",Y2,Je(n.room.unreadCount),1)):Ie("",!0),Be(e.$slots,"room-list-options_"+n.room.roomId,{},()=>[n.roomActions.length?($(),le("div",{key:0,class:"vac-svg-button vac-list-room-options",onClick:t[0]||(t[0]=In(u=>a.roomMenuOpened=n.room.roomId,["stop"]))},[Be(e.$slots,"room-list-options-icon_"+n.room.roomId,{},()=>[Oe(s,{name:"dropdown",param:"room"})])])):Ie("",!0),n.roomActions.length?($(),ht(Ct,{key:1,name:"vac-slide-left"},{default:Ge(()=>[a.roomMenuOpened===n.room.roomId?Un(($(),le("div",K2,[ke("div",G2,[($(!0),le(ot,null,tt(n.roomActions,u=>($(),le("div",{key:u.name},[ke("div",{class:"vac-menu-item",onClick:In(h=>i.roomActionHandler(u),["stop"])},Je(u.title),9,W2)]))),128))])])),[[f,i.closeRoomMenu]]):Ie("",!0)]),_:1})):Ie("",!0)])])],2)])])])}var Q2=xt(j2,[["render",Z2]]),Js=(e,t,n,r=!1)=>!n||n===""?e:e.filter(a=>r?ka(a[t]).startsWith(ka(n)):ka(a[t]).includes(ka(n)));function ka(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const J2={name:"RoomsList",components:{Loader:_a,RoomsSearch:Lf,RoomContent:Q2},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},showRoomsList:{type:Boolean,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},isMobile:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0},roomsLoaded:{type:Boolean,required:!0},room:{type:Object,required:!0},customSearchRoomEnabled:{type:[Boolean,String],default:!1},roomActions:{type:Array,required:!0},scrollDistance:{type:Number,required:!0}},emits:["add-room","search-room","room-action-handler","loading-more-rooms","fetch-room","fetch-more-rooms"],data(){return{filteredRooms:this.rooms||[],observer:null,showLoader:!0,loadingMoreRooms:!1,selectedRoomId:""}},watch:{rooms:{deep:!0,handler(e,t){this.filteredRooms=e,(e.length!==t.length||this.roomsLoaded)&&(this.loadingMoreRooms=!1)}},loadingRooms(e){e||setTimeout(()=>this.initIntersectionObserver())},loadingMoreRooms(e){this.$emit("loading-more-rooms",e)},roomsLoaded:{immediate:!0,handler(e){e&&(this.loadingMoreRooms=!1,this.loadingRooms||(this.showLoader=!1))}},room:{immediate:!0,handler(e){e&&!this.isMobile&&(this.selectedRoomId=e.roomId)}}},methods:{initIntersectionObserver(){this.observer&&(this.showLoader=!0,this.observer.disconnect());const e=this.$el.querySelector("#infinite-loader-rooms");if(e){const t={root:this.$el.querySelector("#rooms-list"),rootMargin:`${this.scrollDistance}px`,threshold:0};this.observer=new IntersectionObserver(n=>{n[0].isIntersecting&&this.loadMoreRooms()},t),this.observer.observe(e)}},searchRoom(e){this.customSearchRoomEnabled?this.$emit("search-room",e.target.value):this.filteredRooms=Js(this.rooms,"roomName",e.target.value)},openRoom(e){e.roomId===this.room.roomId&&!this.isMobile||(this.isMobile||(this.selectedRoomId=e.roomId),this.$emit("fetch-room",{room:e}))},loadMoreRooms(){if(!this.loadingMoreRooms){if(this.roomsLoaded){this.loadingMoreRooms=!1,this.showLoader=!1;return}this.$emit("fetch-more-rooms"),this.loadingMoreRooms=!0}}}},$2={key:0,class:"vac-rooms-empty"},e_={key:1,id:"rooms-list",class:"vac-room-list"},t_=["id","onClick"],n_={key:0,id:"infinite-loader-rooms"};function r_(e,t,n,r,a,i){const s=Ye("rooms-search"),l=Ye("loader"),f=Ye("room-content");return Un(($(),le("div",{class:rt(["vac-rooms-container",{"vac-rooms-container-full":n.isMobile,"vac-app-border-r":!n.isMobile}])},[Be(e.$slots,"rooms-header"),Be(e.$slots,"rooms-list-search",{},()=>[Oe(s,{rooms:n.rooms,"loading-rooms":n.loadingRooms,"text-messages":n.textMessages,"show-search":n.showSearch,"show-add-room":n.showAddRoom,onSearchRoom:i.searchRoom,onAddRoom:t[0]||(t[0]=u=>e.$emit("add-room"))},vt({_:2},[tt(e.$slots,(u,h)=>({name:h,fn:Ge(c=>[Be(e.$slots,h,pt(_t(c)))])}))]),1032,["rooms","loading-rooms","text-messages","show-search","show-add-room","onSearchRoom"])]),Oe(l,{show:n.loadingRooms,type:"rooms"},vt({_:2},[tt(e.$slots,(u,h)=>({name:h,fn:Ge(c=>[Be(e.$slots,h,pt(_t(c)))])}))]),1032,["show"]),!n.loadingRooms&&!n.rooms.length?($(),le("div",$2,[Be(e.$slots,"rooms-empty",{},()=>[Vn(Je(n.textMessages.ROOMS_EMPTY),1)])])):Ie("",!0),n.loadingRooms?Ie("",!0):($(),le("div",e_,[($(!0),le(ot,null,tt(a.filteredRooms,u=>($(),le("div",{id:u.roomId,key:u.roomId,class:rt(["vac-room-item",{"vac-room-selected":a.selectedRoomId===u.roomId}]),onClick:h=>i.openRoom(u)},[Oe(f,{"current-user-id":n.currentUserId,room:u,"text-formatting":n.textFormatting,"link-options":n.linkOptions,"text-messages":n.textMessages,"room-actions":n.roomActions,onRoomActionHandler:t[1]||(t[1]=h=>e.$emit("room-action-handler",h))},vt({_:2},[tt(e.$slots,(h,c)=>({name:c,fn:Ge(v=>[Be(e.$slots,c,pt(_t(v)))])}))]),1032,["current-user-id","room","text-formatting","link-options","text-messages","room-actions"])],10,t_))),128)),Oe(Ct,{name:"vac-fade-message"},{default:Ge(()=>[n.rooms.length&&!n.loadingRooms?($(),le("div",n_,[Oe(l,{show:a.showLoader,infinite:!0,type:"infinite-rooms"},vt({_:2},[tt(e.$slots,(u,h)=>({name:h,fn:Ge(c=>[Be(e.$slots,h,pt(_t(c)))])}))]),1032,["show"])])):Ie("",!0)]),_:3})]))],2)),[[ha,n.showRoomsList]])}var i_=xt(J2,[["render",r_]]);const a_={name:"RoomHeader",components:{SvgIcon:zt},directives:{clickOutside:ya},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},singleRoom:{type:Boolean,required:!0},showRoomsList:{type:Boolean,required:!0},isMobile:{type:Boolean,required:!0},roomInfoEnabled:{type:Boolean,required:!0},menuActions:{type:Array,required:!0},room:{type:Object,required:!0},messageSelectionEnabled:{type:Boolean,required:!0},messageSelectionActions:{type:Array,required:!0},selectedMessagesTotal:{type:Number,required:!0}},emits:["toggle-rooms-list","room-info","menu-action-handler","cancel-message-selection","message-selection-action-handler"],data(){return{menuOpened:!1,messageSelectionAnimationEnded:!0}},computed:{typingUsers(){return cc(this.room,this.currentUserId,this.textMessages)},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(n=>n._id!==this.currentUserId);if(!(e!=null&&e.status))return;let t="";return e.status.state==="online"?t=this.textMessages.IS_ONLINE:e.status.lastChanged&&(t=this.textMessages.LAST_SEEN+e.status.lastChanged),t}},watch:{messageSelectionEnabled(e){e?this.messageSelectionAnimationEnded=!1:setTimeout(()=>{this.messageSelectionAnimationEnded=!0},300)}},methods:{menuActionHandler(e){this.closeMenu(),this.$emit("menu-action-handler",e)},closeMenu(){this.menuOpened=!1},messageSelectionActionHandler(e){this.$emit("message-selection-action-handler",e)}}},s_={class:"vac-room-header vac-app-border-b"},o_={class:"vac-room-wrapper"},l_={key:0,class:"vac-room-selection"},c_=["id"],u_=["onClick"],d_={class:"vac-selection-button-count"},f_={class:"vac-text-ellipsis"},m_={class:"vac-room-name vac-text-ellipsis"},h_={key:0,class:"vac-room-info vac-text-ellipsis"},__={key:1,class:"vac-room-info vac-text-ellipsis"},p_={key:0,class:"vac-menu-options"},v_={class:"vac-menu-list"},g_=["onClick"];function b_(e,t,n,r,a,i){const s=Ye("svg-icon"),l=oa("click-outside");return $(),le("div",s_,[Be(e.$slots,"room-header",{},()=>[ke("div",o_,[Oe(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.messageSelectionEnabled?($(),le("div",l_,[($(!0),le(ot,null,tt(n.messageSelectionActions,f=>($(),le("div",{id:f.name,key:f.name},[ke("div",{class:"vac-selection-button",onClick:u=>i.messageSelectionActionHandler(f)},[Vn(Je(f.title)+" ",1),ke("span",d_,Je(n.selectedMessagesTotal),1)],8,u_)],8,c_))),128)),ke("div",{class:"vac-selection-cancel vac-item-clickable",onClick:t[0]||(t[0]=f=>e.$emit("cancel-message-selection"))},Je(n.textMessages.CANCEL_SELECT_MESSAGE),1)])):Ie("",!0)]),_:1}),!n.messageSelectionEnabled&&a.messageSelectionAnimationEnded?($(),le(ot,{key:0},[n.singleRoom?Ie("",!0):($(),le("div",{key:0,class:rt(["vac-svg-button vac-toggle-button",{"vac-rotate-icon-init":!n.isMobile,"vac-rotate-icon":!n.showRoomsList&&!n.isMobile}]),onClick:t[1]||(t[1]=f=>e.$emit("toggle-rooms-list"))},[Be(e.$slots,"toggle-icon",{},()=>[Oe(s,{name:"toggle"})])],2)),ke("div",{class:rt(["vac-info-wrapper",{"vac-item-clickable":n.roomInfoEnabled}]),onClick:t[2]||(t[2]=f=>e.$emit("room-info"))},[Be(e.$slots,"room-header-avatar",{},()=>[n.room.avatar?($(),le("div",{key:0,class:"vac-avatar",style:St({"background-image":`url('${n.room.avatar}')`})},null,4)):Ie("",!0)]),Be(e.$slots,"room-header-info",{},()=>[ke("div",f_,[ke("div",m_,Je(n.room.roomName),1),i.typingUsers?($(),le("div",h_,Je(i.typingUsers),1)):($(),le("div",__,Je(i.userStatus),1))])])],2),n.room.roomId?Be(e.$slots,"room-options",{key:1},()=>[n.menuActions.length?($(),le("div",{key:0,class:"vac-svg-button vac-room-options",onClick:t[3]||(t[3]=f=>a.menuOpened=!a.menuOpened)},[Be(e.$slots,"menu-icon",{},()=>[Oe(s,{name:"menu"})])])):Ie("",!0),n.menuActions.length?($(),ht(Ct,{key:1,name:"vac-slide-left"},{default:Ge(()=>[a.menuOpened?Un(($(),le("div",p_,[ke("div",v_,[($(!0),le(ot,null,tt(n.menuActions,f=>($(),le("div",{key:f.name},[ke("div",{class:"vac-menu-item",onClick:u=>i.menuActionHandler(f)},Je(f.title),9,g_)]))),128))])])),[[l,i.closeMenu]]):Ie("",!0)]),_:1})):Ie("",!0)]):Ie("",!0)],64)):Ie("",!0)])])])}var x_=xt(a_,[["render",b_]]);function Sa(e){if(typeof e!="string"||!e)throw new Error("expected a non-empty string, got: "+e)}function $s(e){if(typeof e!="number")throw new Error("expected a number, got: "+e)}const y_=1,w_=1,Mr="emoji",Kr="keyvalue",eo="favorites",k_="tokens",dc="tokens",S_="unicode",fc="count",M_="group",A_="order",mc="group-order",to="eTag",Ma="url",hc="skinTone",Gr="readonly",no="readwrite",_c="skinUnicodes",E_="skinUnicodes",T_="https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",R_="en";function I_(e,t){const n=new Set,r=[];for(const a of e){const i=t(a);n.has(i)||(n.add(i),r.push(a))}return r}function pc(e){return I_(e,t=>t.unicode)}function C_(e){function t(n,r,a){const i=r?e.createObjectStore(n,{keyPath:r}):e.createObjectStore(n);if(a)for(const[s,[l,f]]of Object.entries(a))i.createIndex(s,l,{multiEntry:f});return i}t(Kr),t(Mr,S_,{[dc]:[k_,!0],[mc]:[[M_,A_]],[_c]:[E_,!0]}),t(eo,void 0,{[fc]:[""]})}const ro={},Aa={},Ea={};function vc(e,t,n){n.onerror=()=>t(n.error),n.onblocked=()=>t(new Error("IDB blocked")),n.onsuccess=()=>e(n.result)}async function B_(e){const t=await new Promise((n,r)=>{const a=indexedDB.open(e,y_);ro[e]=a,a.onupgradeneeded=i=>{i.oldVersionio(e),t}function O_(e){return Aa[e]||(Aa[e]=B_(e)),Aa[e]}function Yn(e,t,n,r){return new Promise((a,i)=>{const s=e.transaction(t,n,{durability:"relaxed"}),l=typeof t=="string"?s.objectStore(t):t.map(u=>s.objectStore(u));let f;r(l,s,u=>{f=u}),s.oncomplete=()=>a(f),s.onerror=()=>i(s.error)})}function io(e){const t=ro[e],n=t&&t.result;if(n){n.close();const r=Ea[e];if(r)for(const a of r)a()}delete ro[e],delete Aa[e],delete Ea[e]}function F_(e){return new Promise((t,n)=>{io(e);const r=indexedDB.deleteDatabase(e);vc(t,n,r)})}function L_(e,t){let n=Ea[e];n||(n=Ea[e]=[]),n.push(t)}const j_=new Set([":D","XD",":'D","O:)",":X",":P",";P","XP",":L",":Z",":j","8D","XO","8)",":B",":O",":S",":'o","Dx","X(","D:",":C",">0)",":3","3","<3","\\M/",":E","8#"]);function Wr(e){return e.split(/[\s_]+/).map(t=>!t.match(/\w/)||j_.has(t)?t.toLowerCase():t.replace(/[)(:,]/g,"").replace(/’/g,"'").toLowerCase()).filter(Boolean)}const N_=2;function gc(e){return e.filter(Boolean).map(t=>t.toLowerCase()).filter(t=>t.length>=N_)}function H_(e){return e.map(({annotation:n,emoticon:r,group:a,order:i,shortcodes:s,skins:l,tags:f,emoji:u,version:h})=>{const c=[...new Set(gc([...(s||[]).map(Wr).flat(),...f.map(Wr).flat(),...Wr(n),r]))].sort(),v={annotation:n,group:a,order:i,tags:f,tokens:c,unicode:u,version:h};if(r&&(v.emoticon=r),s&&(v.shortcodes=s),l){v.skinTones=[],v.skinUnicodes=[],v.skinVersions=[];for(const{tone:_,emoji:o,version:j}of l)v.skinTones.push(_),v.skinUnicodes.push(o),v.skinVersions.push(j)}return v})}function bc(e,t,n,r){e[t](n).onsuccess=a=>r&&r(a.target.result)}function Ar(e,t,n){bc(e,"get",t,n)}function xc(e,t,n){bc(e,"getAll",t,n)}function ao(e){e.commit&&e.commit()}function D_(e,t){let n=e[0];for(let r=1;rt(a)&&(n=a)}return n}function yc(e,t){const n=D_(e,a=>a.length),r=[];for(const a of n)e.some(i=>i.findIndex(s=>t(s)===t(a))===-1)||r.push(a);return r}async function P_(e){return!await so(e,Kr,Ma)}async function z_(e,t,n){const[r,a]=await Promise.all([to,Ma].map(i=>so(e,Kr,i)));return r===n&&a===t}async function U_(e,t){return Yn(e,Mr,Gr,(r,a,i)=>{let s;const l=()=>{r.getAll(s&&IDBKeyRange.lowerBound(s,!0),50).onsuccess=f=>{const u=f.target.result;for(const h of u)if(s=h.unicode,t(h))return i(h);if(u.length<50)return i();l()}};l()})}async function wc(e,t,n,r){try{const a=H_(t);await Yn(e,[Mr,Kr],no,([i,s],l)=>{let f,u,h=0;function c(){++h===2&&v()}function v(){if(!(f===r&&u===n)){i.clear();for(const _ of a)i.put(_);s.put(r,to),s.put(n,Ma),ao(l)}}Ar(s,to,_=>{f=_,c()}),Ar(s,Ma,_=>{u=_,c()})})}finally{}}async function V_(e,t){return Yn(e,Mr,Gr,(n,r,a)=>{const i=IDBKeyRange.bound([t,0],[t+1,0],!1,!0);xc(n.index(mc),i,a)})}async function kc(e,t){const n=gc(Wr(t));return n.length?Yn(e,Mr,Gr,(r,a,i)=>{const s=[],l=()=>{s.length===n.length&&f()},f=()=>{const u=yc(s,h=>h.unicode);i(u.sort((h,c)=>h.order{s.push(v),l()})}}):[]}async function q_(e,t){const n=await kc(e,t);return n.length?n.filter(r=>(r.shortcodes||[]).map(i=>i.toLowerCase()).includes(t.toLowerCase()))[0]||null:await U_(e,a=>(a.shortcodes||[]).includes(t.toLowerCase()))||null}async function X_(e,t){return Yn(e,Mr,Gr,(n,r,a)=>Ar(n,t,i=>{if(i)return a(i);Ar(n.index(_c),t,s=>a(s||null))}))}function so(e,t,n){return Yn(e,t,Gr,(r,a,i)=>Ar(r,n,i))}function Y_(e,t,n,r){return Yn(e,t,no,(a,i)=>{a.put(r,n),ao(i)})}function K_(e,t){return Yn(e,eo,no,(n,r)=>Ar(n,t,a=>{n.put((a||0)+1,t),ao(r)}))}function G_(e,t,n){return n===0?[]:Yn(e,[eo,Mr],Gr,([r,a],i,s)=>{const l=[];r.index(fc).openCursor(void 0,"prev").onsuccess=f=>{const u=f.target.result;if(!u)return s(l);function h(_){if(l.push(_),l.length===n)return s(l);u.continue()}const c=u.primaryKey,v=t.byName(c);if(v)return h(v);Ar(a,c,_=>{if(_)return h(_);u.continue()})}})}const Ta="";function W_(e,t){const n=new Map;for(const a of e){const i=t(a);for(const s of i){let l=n;for(let u=0;u{let s=n;for(let u=0;uc[0]!(r in e[0])));if(!t||n)throw new Error("Custom emojis are in the wrong format")}function Sc(e){Q_(e);const t=(v,_)=>v.name.toLowerCase()<_.name.toLowerCase()?-1:1,n=e.sort(t),a=W_(e,v=>[...new Set((v.shortcodes||[]).map(_=>Wr(_)).flat())]),i=v=>a(v,!0),s=v=>a(v,!1),l=v=>{const _=Wr(v),o=_.map((j,O)=>(O<_.length-1?i:s)(j));return yc(o,j=>j.name).sort(t)},f=new Map,u=new Map;for(const v of e){u.set(v.name.toLowerCase(),v);for(const _ of v.shortcodes||[])f.set(_.toLowerCase(),v)}return{all:n,search:l,byShortcode:v=>f.get(v.toLowerCase()),byName:v=>u.get(v.toLowerCase())}}function yi(e){if(!e)return e;if(delete e.tokens,e.skinTones){const t=e.skinTones.length;e.skins=Array(t);for(let n=0;n!(t in e[0])))throw new Error("Emoji data is in the wrong format")}function Ac(e,t){if(Math.floor(e.status/100)!==2)throw new Error("Failed to fetch: "+t+": "+e.status)}async function ep(e){const t=await fetch(e,{method:"HEAD"});Ac(t,e);const n=t.headers.get("etag");return Mc(n),n}async function oo(e){const t=await fetch(e);Ac(t,e);const n=t.headers.get("etag");Mc(n);const r=await t.json();return $_(r),[n,r]}function tp(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,a=-1;++a(this._ready||(this._ready=this._init()),this._ready);await t(),this._db||await t()}async getEmojiByGroup(t){return $s(t),await this.ready(),pc(await V_(this._db,t)).map(yi)}async getEmojiBySearchQuery(t){Sa(t),await this.ready();const n=this._custom.search(t),r=pc(await kc(this._db,t)).map(yi);return[...n,...r]}async getEmojiByShortcode(t){Sa(t),await this.ready();const n=this._custom.byShortcode(t);return n||yi(await q_(this._db,t))}async getEmojiByUnicodeOrName(t){Sa(t),await this.ready();const n=this._custom.byName(t);return n||yi(await X_(this._db,t))}async getPreferredSkinTone(){return await this.ready(),await so(this._db,Kr,hc)||0}async setPreferredSkinTone(t){return $s(t),await this.ready(),Y_(this._db,Kr,hc,t)}async incrementFavoriteEmojiCount(t){return Sa(t),await this.ready(),K_(this._db,t)}async getTopFavoriteEmoji(t){return $s(t),await this.ready(),(await G_(this._db,this._custom,t)).map(yi)}set customEmoji(t){this._custom=Sc(t)}get customEmoji(){return this._custom.all}async _shutdown(){await this.ready();try{await this._lazyUpdate}catch{}}_clear(){this._db=this._ready=this._lazyUpdate=void 0}async close(){await this._shutdown(),await io(this._dbName)}async delete(){await this._shutdown(),await F_(this._dbName)}}function wi(){}function Rc(e){return e()}function Ic(){return Object.create(null)}function ki(e){e.forEach(Rc)}function Cc(e){return typeof e=="function"}function ap(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Ra;function Ia(e,t){return Ra||(Ra=document.createElement("a")),Ra.href=t,e===Ra.href}function sp(e){return Object.keys(e).length===0}function op(e){return e&&Cc(e.destroy)?e.destroy:wi}function wt(e,t){e.appendChild(t)}function xn(e,t,n){e.insertBefore(t,n||null)}function yn(e){e.parentNode.removeChild(e)}function gt(e){return document.createElement(e)}function On(e){return document.createTextNode(e)}function wn(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function ie(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Fn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Bc(e,t){e.value=t==null?"":t}function ir(e,t,n,r){n===null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}let lo;function Si(e){lo=e}const Mi=[],Zr=[],Ca=[],Oc=[],Fc=Promise.resolve();let co=!1;function Lc(){co||(co=!0,Fc.then(jc))}function lp(){return Lc(),Fc}function uo(e){Ca.push(e)}const fo=new Set;let Ba=0;function jc(){const e=lo;do{for(;Bap.get(S)?(F.add(A),T(R)):(E.add(S),v--):(f(g,s),v--)}for(;v--;){const R=e[v];I.has(R.key)||f(R,s)}for(;_;)T(O[_-1]);return O}function mp(e,t,n,r){const{fragment:a,on_mount:i,on_destroy:s,after_update:l}=e.$$;a&&a.m(t,n),r||uo(()=>{const f=i.map(Rc).filter(Cc);s?s.push(...f):ki(f),e.$$.on_mount=[]}),l.forEach(uo)}function hp(e,t){const n=e.$$;n.fragment!==null&&(ki(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function _p(e,t){e.$$.dirty[0]===-1&&(Mi.push(e),Lc(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const o=_.length?_[0]:v;return u.ctx&&a(u.ctx[c],u.ctx[c]=o)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](o),h&&_p(e,c)),v}):[],u.update(),h=!0,ki(u.before_update),u.fragment=r?r(u.ctx):!1,t.target&&(u.fragment&&u.fragment.c(),mp(e,t.target,void 0,void 0),jc()),Si(f)}class vp{$destroy(){hp(this,1),this.$destroy=wi}$on(t,n){const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const a=r.indexOf(n);a!==-1&&r.splice(a,1)}}$set(t){this.$$set&&!sp(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nc=[[-1,"\u2728","custom"],[0,"\u{1F600}","smileys-emotion"],[1,"\u{1F44B}","people-body"],[3,"\u{1F431}","animals-nature"],[4,"\u{1F34E}","food-drink"],[5,"\u{1F3E0}\uFE0F","travel-places"],[6,"\u26BD","activities"],[7,"\u{1F4DD}","objects"],[8,"\u26D4\uFE0F","symbols"],[9,"\u{1F3C1}","flags"]].map(([e,t,n])=>({id:e,emoji:t,name:n})),Oa=Nc.slice(1),gp=Nc[0],bp=2,Hc=6,Dc=typeof requestIdleCallback=="function"?requestIdleCallback:setTimeout;function Pc(e){return e.unicode.includes("\u200D")}const xp={"\u{1FAE0}":14,"\u{1F972}":13.1,"\u{1F97B}":12.1,"\u{1F970}":11,"\u{1F929}":5,"\u{1F471}\u200D\u2640\uFE0F":4,"\u{1F923}":3,"\u{1F441}\uFE0F\u200D\u{1F5E8}\uFE0F":2,"\u{1F600}":1,"\u{1F610}\uFE0F":.7,"\u{1F603}":.6},yp=1e3,wp="\u{1F590}\uFE0F",kp=8,Sp=["\u{1F60A}","\u{1F612}","\u2665\uFE0F","\u{1F44D}\uFE0F","\u{1F60D}","\u{1F602}","\u{1F62D}","\u263A\uFE0F","\u{1F614}","\u{1F629}","\u{1F60F}","\u{1F495}","\u{1F64C}","\u{1F618}"],zc='"Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',Mp=(e,t)=>et?1:0,Uc=(e,t)=>{const n=document.createElement("canvas");n.width=n.height=1;const r=n.getContext("2d");return r.textBaseline="top",r.font=`100px ${zc}`,r.fillStyle=t,r.scale(.01,.01),r.fillText(e,0,0),r.getImageData(0,0,1,1).data},Ap=(e,t)=>{const n=[...e].join(","),r=[...t].join(",");return n===r&&!n.startsWith("0,0,0,")};function Ep(e){const t=Uc(e,"#000"),n=Uc(e,"#fff");return t&&n&&Ap(t,n)}function Tp(){const e=Object.entries(xp);try{for(const[t,n]of e)if(Ep(t))return n}catch{}finally{}return e[0][1]}const mo=new Promise(e=>Dc(()=>e(Tp()))),ho=new Map,Rp="\uFE0F",Ip="\uD83C",Cp="\u200D",Bp=127995,Op=57339;function Fp(e,t){if(t===0)return e;const n=e.indexOf(Cp);return n!==-1?e.substring(0,n)+String.fromCodePoint(Bp+t-1)+e.substring(n):(e.endsWith(Rp)&&(e=e.substring(0,e.length-1)),e+Ip+String.fromCodePoint(Op+t-1))}function ar(e){e.preventDefault(),e.stopPropagation()}function _o(e,t,n){return t+=e?-1:1,t<0?t=n.length-1:t>=n.length&&(t=0),t}function Vc(e,t){const n=new Set,r=[];for(const a of e){const i=t(a);n.has(i)||(n.add(i),r.push(a))}return r}function Lp(e,t){const n=r=>{const a={};for(const i of r)typeof i.tone=="number"&&i.version<=t&&(a[i.tone]=i.unicode);return a};return e.map(({unicode:r,skins:a,shortcodes:i,url:s,name:l,category:f})=>({unicode:r,name:l,shortcodes:i,url:s,category:f,id:r||l,skins:a&&n(a),title:(i||[]).join(", ")}))}const Fa=requestAnimationFrame;let jp=typeof ResizeObserver=="function";function Np(e,t){let n;return jp?(n=new ResizeObserver(r=>t(r[0].contentRect.width)),n.observe(e)):Fa(()=>t(e.getBoundingClientRect().width)),{destroy(){n&&n.disconnect()}}}function qc(e){{const t=document.createRange();return t.selectNode(e.firstChild),t.getBoundingClientRect().width}}let po;function Hp(e,t,n){for(const r of e){const a=n(r),i=qc(a);typeof po=="undefined"&&(po=qc(t));const s=i/1.8t)}const{Map:Ti}=fp;function Xc(e,t,n){const r=e.slice();return r[63]=t[n],r[65]=n,r}function Yc(e,t,n){const r=e.slice();return r[66]=t[n],r[65]=n,r}function Kc(e,t,n){const r=e.slice();return r[63]=t[n],r[65]=n,r}function Gc(e,t,n){const r=e.slice();return r[69]=t[n],r}function Wc(e,t,n){const r=e.slice();return r[72]=t[n],r[65]=n,r}function Zc(e,t){let n,r=t[72]+"",a,i,s,l,f,u;return{key:e,first:null,c(){n=gt("div"),a=On(r),ie(n,"id",i="skintone-"+t[65]),ie(n,"class",s="emoji hide-focus "+(t[65]===t[20]?"active":"")),ie(n,"aria-selected",l=t[65]===t[20]),ie(n,"role","option"),ie(n,"title",f=t[0].skinTones[t[65]]),ie(n,"tabindex","-1"),ie(n,"aria-label",u=t[0].skinTones[t[65]]),this.first=n},m(h,c){xn(h,n,c),wt(n,a)},p(h,c){t=h,c[0]&512&&r!==(r=t[72]+"")&&Fn(a,r),c[0]&512&&i!==(i="skintone-"+t[65])&&ie(n,"id",i),c[0]&1049088&&s!==(s="emoji hide-focus "+(t[65]===t[20]?"active":""))&&ie(n,"class",s),c[0]&1049088&&l!==(l=t[65]===t[20])&&ie(n,"aria-selected",l),c[0]&513&&f!==(f=t[0].skinTones[t[65]])&&ie(n,"title",f),c[0]&513&&u!==(u=t[0].skinTones[t[65]])&&ie(n,"aria-label",u)},d(h){h&&yn(n)}}}function Qc(e,t){let n,r,a=t[69].emoji+"",i,s,l,f,u,h,c;function v(){return t[49](t[69])}return{key:e,first:null,c(){n=gt("button"),r=gt("div"),i=On(a),ie(r,"class","nav-emoji emoji"),ie(n,"role","tab"),ie(n,"class","nav-button"),ie(n,"aria-controls",s="tab-"+t[69].id),ie(n,"aria-label",l=t[0].categories[t[69].name]),ie(n,"aria-selected",f=!t[4]&&t[13].id===t[69].id),ie(n,"title",u=t[0].categories[t[69].name]),this.first=n},m(_,o){xn(_,n,o),wt(n,r),wt(r,i),h||(c=wn(n,"click",v),h=!0)},p(_,o){t=_,o[0]&4096&&a!==(a=t[69].emoji+"")&&Fn(i,a),o[0]&4096&&s!==(s="tab-"+t[69].id)&&ie(n,"aria-controls",s),o[0]&4097&&l!==(l=t[0].categories[t[69].name])&&ie(n,"aria-label",l),o[0]&12304&&f!==(f=!t[4]&&t[13].id===t[69].id)&&ie(n,"aria-selected",f),o[0]&4097&&u!==(u=t[0].categories[t[69].name])&&ie(n,"title",u)},d(_){_&&yn(n),h=!1,c()}}}function Pp(e){let t,n;return{c(){t=gt("img"),ie(t,"class","custom-emoji"),Ia(t.src,n=e[63].url)||ie(t,"src",n),ie(t,"alt",""),ie(t,"loading","lazy")},m(r,a){xn(r,t,a)},p(r,a){a[0]&32768&&!Ia(t.src,n=r[63].url)&&ie(t,"src",n)},d(r){r&&yn(t)}}}function zp(e){let t=e[27](e[63],e[8])+"",n;return{c(){n=On(t)},m(r,a){xn(r,n,a)},p(r,a){a[0]&33024&&t!==(t=r[27](r[63],r[8])+"")&&Fn(n,t)},d(r){r&&yn(n)}}}function Jc(e,t){let n,r,a,i,s,l,f;function u(v,_){return v[63].unicode?zp:Pp}let h=u(t),c=h(t);return{key:e,first:null,c(){n=gt("button"),c.c(),ie(n,"role",r=t[4]?"option":"menuitem"),ie(n,"aria-selected",a=t[4]?t[65]==t[5]:""),ie(n,"aria-label",i=t[28](t[63],t[8])),ie(n,"title",s=t[63].title),ie(n,"class",l="emoji "+(t[4]&&t[65]===t[5]?"active":"")),ie(n,"id",f="emo-"+t[63].id),this.first=n},m(v,_){xn(v,n,_),c.m(n,null)},p(v,_){t=v,h===(h=u(t))&&c?c.p(t,_):(c.d(1),c=h(t),c&&(c.c(),c.m(n,null))),_[0]&16&&r!==(r=t[4]?"option":"menuitem")&&ie(n,"role",r),_[0]&32816&&a!==(a=t[4]?t[65]==t[5]:"")&&ie(n,"aria-selected",a),_[0]&33024&&i!==(i=t[28](t[63],t[8]))&&ie(n,"aria-label",i),_[0]&32768&&s!==(s=t[63].title)&&ie(n,"title",s),_[0]&32816&&l!==(l="emoji "+(t[4]&&t[65]===t[5]?"active":""))&&ie(n,"class",l),_[0]&32768&&f!==(f="emo-"+t[63].id)&&ie(n,"id",f)},d(v){v&&yn(n),c.d()}}}function $c(e,t){let n,r=(t[4]?t[0].searchResultsLabel:t[66].category?t[66].category:t[15].length>1?t[0].categories.custom:t[0].categories[t[13].name])+"",a,i,s,l,f=[],u=new Ti,h,c,v,_=t[66].emojis;const o=j=>j[63].id;for(let j=0;j<_.length;j+=1){let O=Kc(t,_,j),I=o(O);u.set(I,f[j]=Jc(I,O))}return{key:e,first:null,c(){n=gt("div"),a=On(r),l=gt("div");for(let j=0;j1?t[0].categories.custom:t[0].categories[t[13].name])+"")&&Fn(a,r),O[0]&32768&&i!==(i="menu-label-"+t[65])&&ie(n,"id",i),O[0]&32768&&s!==(s="category "+(t[15].length===1&&t[15][0].category===""?"gone":""))&&ie(n,"class",s),O[0]&402686256&&(_=t[66].emojis,f=Ei(f,O,o,1,t,_,u,l,Ai,Jc,null,Kc)),O[0]&16&&h!==(h=t[4]?"listbox":"menu")&&ie(l,"role",h),O[0]&32768&&c!==(c="menu-label-"+t[65])&&ie(l,"aria-labelledby",c),O[0]&16&&v!==(v=t[4]?"search-results":"")&&ie(l,"id",v)},d(j){j&&yn(n),j&&yn(l);for(let O=0;Oue[72];for(let ue=0;ueue[69].id;for(let ue=0;ueue[66].category;for(let ue=0;ueue[63].id;for(let ue=0;ue{_.getRootNode().getElementById(ee).focus()},C=(ee,Ce)=>{_.dispatchEvent(new CustomEvent(ee,{detail:Ce,bubbles:!0,composed:!0}))},me=(ee,Ce)=>Ce&&ee.skins&&ee.skins[Ce]||ee.unicode,Se=(ee,Ce)=>Dp([ee.name||me(ee,Ce),...ee.shortcodes||[]]).join(", "),ve=ee=>/^skintone-/.test(ee.id);mo.then(ee=>{ee||n(18,p=a.emojiUnsupportedMessage)});function pe(ee){return Np(ee,Ce=>{{const B=getComputedStyle(_),N=parseInt(B.getPropertyValue("--num-columns"),10),U=B.getPropertyValue("direction")==="rtl",K=ee.parentElement.getBoundingClientRect().width-Ce;n(46,k=N),n(25,H=K),n(24,w=U)}})}function He(ee){const Ce=_.getRootNode();Hp(ee,o,N=>Ce.getElementById(`emo-${N.id}`)),n(1,u=u)}function Te(ee){return!ee.unicode||!Pc(ee)||ho.get(ee.unicode)}async function he(ee){const Ce=await mo;return ee.filter(({version:B})=>!B||B<=Ce)}async function Ve(ee){return Lp(ee,await mo)}async function at(ee){if(typeof ee=="undefined")return[];const Ce=ee===-1?s:await i.getEmojiByGroup(ee);return Ve(await he(Ce))}async function z(ee){return Ve(await he(await i.getEmojiBySearchQuery(ee)))}function X(ee){if(!O||!u.length)return;const Ce=B=>{ar(ee),n(5,I=_o(B,I,u))};switch(ee.key){case"ArrowDown":return Ce(!1);case"ArrowUp":return Ce(!0);case"Enter":if(I!==-1)return ar(ee),de(u[I].id);u.length&&n(5,I=0)}}function ne(ee){n(2,c=""),n(44,v=""),n(5,I=-1),n(11,Y=P.findIndex(Ce=>Ce.id===ee.id))}function ce(ee){const{target:Ce,key:B}=ee,N=U=>{U&&(ar(ee),U.focus())};switch(B){case"ArrowLeft":return N(Ce.previousSibling);case"ArrowRight":return N(Ce.nextSibling);case"Home":return N(Ce.parentElement.firstChild);case"End":return N(Ce.parentElement.lastChild)}}async function de(ee){const Ce=await i.getEmojiByUnicodeOrName(ee),B=[...u,...b].find(U=>U.id===ee),N=B.unicode&&me(B,R);await i.incrementFavoriteEmojiCount(ee),C("emoji-click",{emoji:Ce,skinTone:R,...N&&{unicode:N},...B.name&&{name:B.name}})}async function Me(ee){const{target:Ce}=ee;if(!Ce.classList.contains("emoji"))return;ar(ee);const B=Ce.id.substring(4);de(B)}async function Ee(ee){const{target:Ce}=ee;if(!ve(Ce))return;ar(ee);const B=parseInt(Ce.id.slice(9),10);n(8,R=B),n(6,E=!1),W("skintone-button"),C("skin-tone-change",{skinTone:B}),i.setPreferredSkinTone(B)}async function ye(ee){n(6,E=!E),n(20,g=R),E&&(ar(ee),Fa(()=>W(`skintone-${g}`)))}function Ae(ee){if(!E)return;const Ce=async B=>{ar(ee),n(20,g=B),await lp(),W(`skintone-${g}`)};switch(ee.key){case"ArrowUp":return Ce(_o(!0,g,x));case"ArrowDown":return Ce(_o(!1,g,x));case"Home":return Ce(0);case"End":return Ce(x.length-1);case"Enter":return Ee(ee);case"Escape":return ar(ee),n(6,E=!1),W("skintone-button")}}function ge(ee){if(!!E)switch(ee.key){case" ":return Ee(ee)}}async function Pe(ee){const{relatedTarget:Ce}=ee;(!Ce||!ve(Ce))&&n(6,E=!1)}function je(){c=this.value,n(2,c)}function ze(ee){Zr[ee?"unshift":"push"](()=>{T=ee,n(7,T)})}const Ue=ee=>ne(ee);function Ke(ee){Zr[ee?"unshift":"push"](()=>{j=ee,n(3,j)})}function ue(ee){Zr[ee?"unshift":"push"](()=>{o=ee,n(17,o)})}function we(ee){Zr[ee?"unshift":"push"](()=>{_=ee,n(16,_)})}return e.$$set=ee=>{"skinToneEmoji"in ee&&n(40,r=ee.skinToneEmoji),"i18n"in ee&&n(0,a=ee.i18n),"database"in ee&&n(39,i=ee.database),"customEmoji"in ee&&n(41,s=ee.customEmoji),"customCategorySorting"in ee&&n(42,l=ee.customCategorySorting)},e.$$.update=()=>{if(e.$$.dirty[1]&1280&&s&&i&&n(39,i.customEmoji=s,i),e.$$.dirty[0]&1|e.$$.dirty[1]&256){async function ee(){let Ce=!1;const B=setTimeout(()=>{Ce=!0,n(18,p=a.loadingMessage)},yp);try{await i.ready(),n(14,d=!0)}catch(N){console.error(N),n(18,p=a.networkErrorMessage)}finally{clearTimeout(B),Ce&&(Ce=!1,n(18,p=""))}}i&&ee()}if(e.$$.dirty[0]&6144|e.$$.dirty[1]&1024&&(s&&s.length?n(12,P=[gp,...Oa]):P!==Oa&&(Y&&n(11,Y--,Y),n(12,P=Oa))),e.$$.dirty[0]&4&&Dc(()=>{n(44,v=(c||"").trim()),n(5,I=-1)}),e.$$.dirty[0]&6144&&n(13,V=P[Y]),e.$$.dirty[0]&24576|e.$$.dirty[1]&8192){async function ee(){if(!d)n(1,u=[]),n(4,O=!1);else if(v.length>=bp){const Ce=v,B=await z(Ce);Ce===v&&(n(1,u=B),n(4,O=!0))}else if(V){const Ce=V.id,B=await at(Ce);Ce===V.id&&(n(1,u=B),n(4,O=!1))}}ee()}if(e.$$.dirty[0]&4112&&n(22,S=`
+ --font-family: ${zc};
--num-groups: ${P.length};
- --indicator-opacity: ${B?0:1};
- --num-skintones: ${g1};`),e.$$.dirty[0]&16384|e.$$.dirty[1]&256){async function $(){d&&s(8,L=await r.getPreferredSkinTone())}$()}if(e.$$.dirty[1]&512&&s(9,b=Array(g1).fill().map(($,Ce)=>r_(a,Ce))),e.$$.dirty[0]&768&&s(21,E=b[L]),e.$$.dirty[0]&257&&s(23,h=n.skinToneLabel.replace("{skinTone}",n.skinTones[L])),e.$$.dirty[0]&16384|e.$$.dirty[1]&256){async function $(){s(45,v=(await Promise.all(Gv.map(Ce=>r.getEmojiByUnicodeOrName(Ce)))).filter(Boolean))}d&&$()}if(e.$$.dirty[0]&16384|e.$$.dirty[1]&49408){async function $(){const Ce=await r.getTopFavoriteEmoji(x),k=await Ke(S1([...Ce,...v],I=>I.unicode||I.name).slice(0,x));s(10,_=k)}d&&v&&$()}if(e.$$.dirty[0]&10){const $=l.filter(Ce=>Ce.unicode).filter(Ce=>y1(Ce)&&!$o.has(Ce.unicode));$.length?ui(()=>Ue($)):(s(1,l=l.filter(Le)),ui(()=>{(H||{}).scrollTop=0}))}e.$$.dirty[0]&1026|e.$$.dirty[1]&4096,e.$$.dirty[0]&18|e.$$.dirty[1]&2048&&s(15,p=function(){if(B)return[{category:"",emojis:l}];const Ce=new Map;for(const k of l){const I=k.category||"";let D=Ce.get(I);D||(D=[],Ce.set(I,D)),D.push(k)}return[...Ce.entries()].map(([k,I])=>({category:k,emojis:I})).sort((k,I)=>u(k.category,I.category))}()),e.$$.dirty[0]&34&&s(26,S=N!==-1&&l[N].id),e.$$.dirty[0]&192&&(R?T.addEventListener("transitionend",()=>{s(19,C=!0)},{once:!0}):s(19,C=!1))},[n,l,c,H,B,N,R,T,L,b,_,X,P,V,d,p,A,i,m,C,f,E,w,h,y,j,S,de,Me,he,z,te,le,xe,Ee,be,Se,me,Fe,r,a,o,u,g,M,v,x,Ne,Pe,De,Ze,ce,ye]}class __ extends Dv{constructor(t){super(),Uv(this,t,v_,h_,Rv,{skinToneEmoji:40,i18n:0,database:39,customEmoji:41,customCategorySorting:42},null,[-1,-1,-1])}}const p_="https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",g_="en";var b_={categoriesLabel:"Categories",emojiUnsupportedMessage:"Your browser does not support color emoji.",favoritesLabel:"Favorites",loadingMessage:"Loading\u2026",networkErrorMessage:"Could not load emoji.",regionLabel:"Emoji picker",searchDescription:"When search results are available, press up or down to select and enter to choose.",searchLabel:"Search",searchResultsLabel:"Search results",skinToneDescription:"When expanded, press up or down to select and enter to choose.",skinToneLabel:"Choose a skin tone (currently {skinTone})",skinTonesLabel:"Skin tones",skinTones:["Default","Light","Medium-Light","Medium","Medium-Dark","Dark"],categories:{custom:"Custom","smileys-emotion":"Smileys and emoticons","people-body":"People and body","animals-nature":"Animals and nature","food-drink":"Food and drink","travel-places":"Travel and places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"}};const N1=["customEmoji","customCategorySorting","database","dataSource","i18n","locale","skinToneEmoji"];class j1 extends HTMLElement{constructor(t){super(),this.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=":host{--emoji-size:1.375rem;--emoji-padding:0.5rem;--category-emoji-size:var(--emoji-size);--category-emoji-padding:var(--emoji-padding);--indicator-height:3px;--input-border-radius:0.5rem;--input-border-size:1px;--input-font-size:1rem;--input-line-height:1.5;--input-padding:0.25rem;--num-columns:8;--outline-size:2px;--border-size:1px;--skintone-border-radius:1rem;--category-font-size:1rem;display:flex;width:min-content;height:400px}:host,:host(.light){--background:#fff;--border-color:#e0e0e0;--indicator-color:#385ac1;--input-border-color:#999;--input-font-color:#111;--input-placeholder-color:#999;--outline-color:#999;--category-font-color:#111;--button-active-background:#e6e6e6;--button-hover-background:#d9d9d9}:host(.dark){--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}@media (prefers-color-scheme:dark){:host{--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}}:host([hidden]){display:none}button{margin:0;padding:0;border:0;background:0 0;box-shadow:none;-webkit-tap-highlight-color:transparent}button::-moz-focus-inner{border:0}input{padding:0;margin:0;line-height:1.15;font-family:inherit}input[type=search]{-webkit-appearance:none}:focus{outline:var(--outline-color) solid var(--outline-size);outline-offset:calc(-1*var(--outline-size))}:host([data-js-focus-visible]) :focus:not([data-focus-visible-added]){outline:0}:focus:not(:focus-visible){outline:0}.hide-focus{outline:0}*{box-sizing:border-box}.picker{contain:content;display:flex;flex-direction:column;background:var(--background);border:var(--border-size) solid var(--border-color);width:100%;height:100%;overflow:hidden;--total-emoji-size:calc(var(--emoji-size) + (2 * var(--emoji-padding)));--total-category-emoji-size:calc(var(--category-emoji-size) + (2 * var(--category-emoji-padding)))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.hidden{opacity:0;pointer-events:none}.abs-pos{position:absolute;left:0;top:0}.gone{display:none!important}.skintone-button-wrapper,.skintone-list{background:var(--background);z-index:3}.skintone-button-wrapper.expanded{z-index:1}.skintone-list{position:absolute;inset-inline-end:0;top:0;z-index:2;overflow:visible;border-bottom:var(--border-size) solid var(--border-color);border-radius:0 0 var(--skintone-border-radius) var(--skintone-border-radius);will-change:transform;transition:transform .2s ease-in-out;transform-origin:center 0}@media (prefers-reduced-motion:reduce){.skintone-list{transition-duration:.001s}}@supports not (inset-inline-end:0){.skintone-list{right:0}}.skintone-list.no-animate{transition:none}.tabpanel{overflow-y:auto;-webkit-overflow-scrolling:touch;will-change:transform;min-height:0;flex:1;contain:content}.emoji-menu{display:grid;grid-template-columns:repeat(var(--num-columns),var(--total-emoji-size));justify-content:space-around;align-items:flex-start;width:100%}.category{padding:var(--emoji-padding);font-size:var(--category-font-size);color:var(--category-font-color)}.custom-emoji,.emoji,button.emoji{height:var(--total-emoji-size);width:var(--total-emoji-size)}.emoji,button.emoji{font-size:var(--emoji-size);display:flex;align-items:center;justify-content:center;border-radius:100%;line-height:1;overflow:hidden;font-family:var(--font-family);cursor:pointer}@media (hover:hover) and (pointer:fine){.emoji:hover,button.emoji:hover{background:var(--button-hover-background)}}.emoji.active,.emoji:active,button.emoji.active,button.emoji:active{background:var(--button-active-background)}.custom-emoji{padding:var(--emoji-padding);object-fit:contain;pointer-events:none;background-repeat:no-repeat;background-position:center center;background-size:var(--emoji-size) var(--emoji-size)}.nav,.nav-button{align-items:center}.nav{display:grid;justify-content:space-between;contain:content}.nav-button{display:flex;justify-content:center}.nav-emoji{font-size:var(--category-emoji-size);width:var(--total-category-emoji-size);height:var(--total-category-emoji-size)}.indicator-wrapper{display:flex;border-bottom:1px solid var(--border-color)}.indicator{width:calc(100%/var(--num-groups));height:var(--indicator-height);opacity:var(--indicator-opacity);background-color:var(--indicator-color);will-change:transform,opacity;transition:opacity .1s linear,transform .25s ease-in-out}@media (prefers-reduced-motion:reduce){.indicator{will-change:opacity;transition:opacity .1s linear}}.pad-top,input.search{background:var(--background);width:100%}.pad-top{height:var(--emoji-padding);z-index:3}.search-row{display:flex;align-items:center;position:relative;padding-inline-start:var(--emoji-padding);padding-bottom:var(--emoji-padding)}.search-wrapper{flex:1;min-width:0}input.search{padding:var(--input-padding);border-radius:var(--input-border-radius);border:var(--input-border-size) solid var(--input-border-color);color:var(--input-font-color);font-size:var(--input-font-size);line-height:var(--input-line-height)}input.search::placeholder{color:var(--input-placeholder-color)}.favorites{display:flex;flex-direction:row;border-top:var(--border-size) solid var(--border-color);contain:content}.message{padding:var(--emoji-padding)}",this.shadowRoot.appendChild(s),this._ctx={locale:g_,dataSource:p_,skinToneEmoji:Xv,customCategorySorting:Zv,customEmoji:null,i18n:b_,...t};for(const a of N1)a!=="database"&&Object.prototype.hasOwnProperty.call(this,a)&&(this._ctx[a]=this[a],delete this[a]);this._dbFlush()}connectedCallback(){this._cmp=new __({target:this.shadowRoot,props:this._ctx})}disconnectedCallback(){this._cmp.$destroy(),this._cmp=void 0;const{database:t}=this._ctx;t&&t.close().catch(s=>console.error(s))}static get observedAttributes(){return["locale","data-source","skin-tone-emoji"]}attributeChangedCallback(t,s,a){this._set(t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()),a)}_set(t,s){this._ctx[t]=s,this._cmp&&this._cmp.$set({[t]:s}),["locale","dataSource"].includes(t)&&this._dbFlush()}_dbCreate(){const{locale:t,dataSource:s,database:a}=this._ctx;(!a||a.locale!==t||a.dataSource!==s)&&this._set("database",new l1({locale:t,dataSource:s}))}_dbFlush(){Promise.resolve().then(()=>this._dbCreate())}}const H1={};for(const e of N1)H1[e]={get(){return e==="database"&&this._dbCreate(),this._ctx[e]},set(t){if(e==="database")throw new Error("database is read-only");this._set(e,t)}};Object.defineProperties(j1.prototype,H1),customElements.get("emoji-picker")||customElements.define("emoji-picker",j1);function F1(e,t){for(;e&&!e.querySelector(t);){e=e.parentNode;const s=e.querySelector(t);if(s)return s}return null}const y_={name:"EmojiPickerContainer",components:{SvgIcon:Ut},props:{emojiOpened:{type:Boolean,default:!1},emojiReaction:{type:Boolean,default:!1},positionTop:{type:Boolean,default:!1},positionRight:{type:Boolean,default:!1},messageId:{type:String,default:""},emojiDataSource:{type:String,default:void 0}},emits:["add-emoji","open-emoji"],data(){return{emojiPickerHeight:320,emojiPickerTop:0,emojiPickerRight:""}},watch:{emojiOpened(e){e&&setTimeout(()=>{this.addCustomStyling(),this.$refs.emojiPicker.shadowRoot.addEventListener("emoji-click",({detail:t})=>{this.$emit("add-emoji",{unicode:t.unicode})})},0)}},methods:{addCustomStyling(){const e=`.picker {
+ --indicator-opacity: ${O?0:1};
+ --num-skintones: ${Hc};`),e.$$.dirty[0]&16384|e.$$.dirty[1]&256){async function ee(){d&&n(8,R=await i.getPreferredSkinTone())}ee()}if(e.$$.dirty[1]&512&&n(9,x=Array(Hc).fill().map((ee,Ce)=>Fp(r,Ce))),e.$$.dirty[0]&768&&n(21,A=x[R]),e.$$.dirty[0]&257&&n(23,m=a.skinToneLabel.replace("{skinTone}",a.skinTones[R])),e.$$.dirty[0]&16384|e.$$.dirty[1]&256){async function ee(){n(45,y=(await Promise.all(Sp.map(Ce=>i.getEmojiByUnicodeOrName(Ce)))).filter(Boolean))}d&&ee()}if(e.$$.dirty[0]&16384|e.$$.dirty[1]&49408){async function ee(){const Ce=await i.getTopFavoriteEmoji(k),B=await Ve(Vc([...Ce,...y],N=>N.unicode||N.name).slice(0,k));n(10,b=B)}d&&y&&ee()}if(e.$$.dirty[0]&10){const ee=u.filter(Ce=>Ce.unicode).filter(Ce=>Pc(Ce)&&!ho.has(Ce.unicode));ee.length?Fa(()=>He(ee)):(n(1,u=u.filter(Te)),Fa(()=>{(j||{}).scrollTop=0}))}e.$$.dirty[0]&1026|e.$$.dirty[1]&4096,e.$$.dirty[0]&18|e.$$.dirty[1]&2048&&n(15,h=function(){if(O)return[{category:"",emojis:u}];const Ce=new Map;for(const B of u){const N=B.category||"";let U=Ce.get(N);U||(U=[],Ce.set(N,U)),U.push(B)}return[...Ce.entries()].map(([B,N])=>({category:B,emojis:N})).sort((B,N)=>l(B.category,N.category))}()),e.$$.dirty[0]&34&&n(26,M=I!==-1&&u[I].id),e.$$.dirty[0]&192&&(E?T.addEventListener("transitionend",()=>{n(19,F=!0)},{once:!0}):n(19,F=!1))},[a,u,c,j,O,I,E,T,R,x,b,Y,P,V,d,h,_,o,p,F,g,A,S,m,w,H,M,me,Se,pe,X,ne,ce,Me,Ee,ye,Ae,ge,Pe,i,r,s,l,f,v,y,k,je,ze,Ue,Ke,ue,we]}class Yp extends vp{constructor(t){super(),pp(this,t,Xp,qp,ap,{skinToneEmoji:40,i18n:0,database:39,customEmoji:41,customCategorySorting:42},null,[-1,-1,-1])}}const Kp="https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",Gp="en";var Wp={categoriesLabel:"Categories",emojiUnsupportedMessage:"Your browser does not support color emoji.",favoritesLabel:"Favorites",loadingMessage:"Loading\u2026",networkErrorMessage:"Could not load emoji.",regionLabel:"Emoji picker",searchDescription:"When search results are available, press up or down to select and enter to choose.",searchLabel:"Search",searchResultsLabel:"Search results",skinToneDescription:"When expanded, press up or down to select and enter to choose.",skinToneLabel:"Choose a skin tone (currently {skinTone})",skinTonesLabel:"Skin tones",skinTones:["Default","Light","Medium-Light","Medium","Medium-Dark","Dark"],categories:{custom:"Custom","smileys-emotion":"Smileys and emoticons","people-body":"People and body","animals-nature":"Animals and nature","food-drink":"Food and drink","travel-places":"Travel and places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"}};const tu=["customEmoji","customCategorySorting","database","dataSource","i18n","locale","skinToneEmoji"];class nu extends HTMLElement{constructor(t){super(),this.attachShadow({mode:"open"});const n=document.createElement("style");n.textContent=":host{--emoji-size:1.375rem;--emoji-padding:0.5rem;--category-emoji-size:var(--emoji-size);--category-emoji-padding:var(--emoji-padding);--indicator-height:3px;--input-border-radius:0.5rem;--input-border-size:1px;--input-font-size:1rem;--input-line-height:1.5;--input-padding:0.25rem;--num-columns:8;--outline-size:2px;--border-size:1px;--skintone-border-radius:1rem;--category-font-size:1rem;display:flex;width:min-content;height:400px}:host,:host(.light){--background:#fff;--border-color:#e0e0e0;--indicator-color:#385ac1;--input-border-color:#999;--input-font-color:#111;--input-placeholder-color:#999;--outline-color:#999;--category-font-color:#111;--button-active-background:#e6e6e6;--button-hover-background:#d9d9d9}:host(.dark){--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}@media (prefers-color-scheme:dark){:host{--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}}:host([hidden]){display:none}button{margin:0;padding:0;border:0;background:0 0;box-shadow:none;-webkit-tap-highlight-color:transparent}button::-moz-focus-inner{border:0}input{padding:0;margin:0;line-height:1.15;font-family:inherit}input[type=search]{-webkit-appearance:none}:focus{outline:var(--outline-color) solid var(--outline-size);outline-offset:calc(-1*var(--outline-size))}:host([data-js-focus-visible]) :focus:not([data-focus-visible-added]){outline:0}:focus:not(:focus-visible){outline:0}.hide-focus{outline:0}*{box-sizing:border-box}.picker{contain:content;display:flex;flex-direction:column;background:var(--background);border:var(--border-size) solid var(--border-color);width:100%;height:100%;overflow:hidden;--total-emoji-size:calc(var(--emoji-size) + (2 * var(--emoji-padding)));--total-category-emoji-size:calc(var(--category-emoji-size) + (2 * var(--category-emoji-padding)))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.hidden{opacity:0;pointer-events:none}.abs-pos{position:absolute;left:0;top:0}.gone{display:none!important}.skintone-button-wrapper,.skintone-list{background:var(--background);z-index:3}.skintone-button-wrapper.expanded{z-index:1}.skintone-list{position:absolute;inset-inline-end:0;top:0;z-index:2;overflow:visible;border-bottom:var(--border-size) solid var(--border-color);border-radius:0 0 var(--skintone-border-radius) var(--skintone-border-radius);will-change:transform;transition:transform .2s ease-in-out;transform-origin:center 0}@media (prefers-reduced-motion:reduce){.skintone-list{transition-duration:.001s}}@supports not (inset-inline-end:0){.skintone-list{right:0}}.skintone-list.no-animate{transition:none}.tabpanel{overflow-y:auto;-webkit-overflow-scrolling:touch;will-change:transform;min-height:0;flex:1;contain:content}.emoji-menu{display:grid;grid-template-columns:repeat(var(--num-columns),var(--total-emoji-size));justify-content:space-around;align-items:flex-start;width:100%}.category{padding:var(--emoji-padding);font-size:var(--category-font-size);color:var(--category-font-color)}.custom-emoji,.emoji,button.emoji{height:var(--total-emoji-size);width:var(--total-emoji-size)}.emoji,button.emoji{font-size:var(--emoji-size);display:flex;align-items:center;justify-content:center;border-radius:100%;line-height:1;overflow:hidden;font-family:var(--font-family);cursor:pointer}@media (hover:hover) and (pointer:fine){.emoji:hover,button.emoji:hover{background:var(--button-hover-background)}}.emoji.active,.emoji:active,button.emoji.active,button.emoji:active{background:var(--button-active-background)}.custom-emoji{padding:var(--emoji-padding);object-fit:contain;pointer-events:none;background-repeat:no-repeat;background-position:center center;background-size:var(--emoji-size) var(--emoji-size)}.nav,.nav-button{align-items:center}.nav{display:grid;justify-content:space-between;contain:content}.nav-button{display:flex;justify-content:center}.nav-emoji{font-size:var(--category-emoji-size);width:var(--total-category-emoji-size);height:var(--total-category-emoji-size)}.indicator-wrapper{display:flex;border-bottom:1px solid var(--border-color)}.indicator{width:calc(100%/var(--num-groups));height:var(--indicator-height);opacity:var(--indicator-opacity);background-color:var(--indicator-color);will-change:transform,opacity;transition:opacity .1s linear,transform .25s ease-in-out}@media (prefers-reduced-motion:reduce){.indicator{will-change:opacity;transition:opacity .1s linear}}.pad-top,input.search{background:var(--background);width:100%}.pad-top{height:var(--emoji-padding);z-index:3}.search-row{display:flex;align-items:center;position:relative;padding-inline-start:var(--emoji-padding);padding-bottom:var(--emoji-padding)}.search-wrapper{flex:1;min-width:0}input.search{padding:var(--input-padding);border-radius:var(--input-border-radius);border:var(--input-border-size) solid var(--input-border-color);color:var(--input-font-color);font-size:var(--input-font-size);line-height:var(--input-line-height)}input.search::placeholder{color:var(--input-placeholder-color)}.favorites{display:flex;flex-direction:row;border-top:var(--border-size) solid var(--border-color);contain:content}.message{padding:var(--emoji-padding)}",this.shadowRoot.appendChild(n),this._ctx={locale:Gp,dataSource:Kp,skinToneEmoji:wp,customCategorySorting:Mp,customEmoji:null,i18n:Wp,...t};for(const r of tu)r!=="database"&&Object.prototype.hasOwnProperty.call(this,r)&&(this._ctx[r]=this[r],delete this[r]);this._dbFlush()}connectedCallback(){this._cmp=new Yp({target:this.shadowRoot,props:this._ctx})}disconnectedCallback(){this._cmp.$destroy(),this._cmp=void 0;const{database:t}=this._ctx;t&&t.close().catch(n=>console.error(n))}static get observedAttributes(){return["locale","data-source","skin-tone-emoji"]}attributeChangedCallback(t,n,r){this._set(t.replace(/-([a-z])/g,(a,i)=>i.toUpperCase()),r)}_set(t,n){this._ctx[t]=n,this._cmp&&this._cmp.$set({[t]:n}),["locale","dataSource"].includes(t)&&this._dbFlush()}_dbCreate(){const{locale:t,dataSource:n,database:r}=this._ctx;(!r||r.locale!==t||r.dataSource!==n)&&this._set("database",new Tc({locale:t,dataSource:n}))}_dbFlush(){Promise.resolve().then(()=>this._dbCreate())}}const ru={};for(const e of tu)ru[e]={get(){return e==="database"&&this._dbCreate(),this._ctx[e]},set(t){if(e==="database")throw new Error("database is read-only");this._set(e,t)}};Object.defineProperties(nu.prototype,ru),customElements.get("emoji-picker")||customElements.define("emoji-picker",nu);function iu(e,t){for(;e&&!e.querySelector(t);){e=e.parentNode;const n=e.querySelector(t);if(n)return n}return null}const Zp={name:"EmojiPickerContainer",components:{SvgIcon:zt},props:{emojiOpened:{type:Boolean,default:!1},emojiReaction:{type:Boolean,default:!1},positionTop:{type:Boolean,default:!1},positionRight:{type:Boolean,default:!1},messageId:{type:String,default:""},emojiDataSource:{type:String,default:void 0}},emits:["add-emoji","open-emoji"],data(){return{emojiPickerHeight:320,emojiPickerTop:0,emojiPickerRight:""}},watch:{emojiOpened(e){e&&setTimeout(()=>{this.addCustomStyling(),this.$refs.emojiPicker.shadowRoot.addEventListener("emoji-click",({detail:t})=>{this.$emit("add-emoji",{unicode:t.unicode})})},0)}},methods:{addCustomStyling(){const e=`.picker {
border: none;
}`,t=`.nav {
overflow-x: auto;
- }`,s=`.search-wrapper {
+ }`,n=`.search-wrapper {
padding-right: 2px;
padding-left: 2px;
- }`,a=`input.search {
+ }`,r=`input.search {
height: 32px;
font-size: 14px;
border-radius: 10rem;
@@ -22,10 +21,10 @@
outline: none;
background: var(--chat-bg-color-input);
color: var(--chat-color);
- }`,n=document.createElement("style");n.textContent=e+t+s+a,this.$refs.emojiPicker.shadowRoot.appendChild(n)},openEmoji(e){this.$emit("open-emoji",!this.emojiOpened),this.setEmojiPickerPosition(e.clientY,e.view.innerWidth,e.view.innerHeight)},setEmojiPickerPosition(e,t,s){const a=t<500||s<700,n=F1(this.$el,"#room-footer");if(!n){a&&(this.emojiPickerRight="-50px");return}a?(this.emojiPickerRight=t/2-(this.positionTop?200:150)+"px",this.emojiPickerTop=100,this.emojiPickerHeight=s-200):(n.getBoundingClientRect().top-e>this.emojiPickerHeight-50?this.emojiPickerTop=e+10:this.emojiPickerTop=e-this.emojiPickerHeight-10,this.emojiPickerRight=this.positionTop?"0px":this.positionRight?"60px":"")}}},x_={class:"vac-emoji-wrapper"};function w_(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Xe("emoji-picker");return Q(),ne("div",x_,[ge("div",{class:at(["vac-svg-button",{"vac-emoji-reaction":s.emojiReaction}]),onClick:t[0]||(t[0]=(...g)=>r.openEmoji&&r.openEmoji(...g))},[Re(e.$slots,s.messageId?"emoji-picker-reaction-icon_"+s.messageId:"emoji-picker-icon",{},()=>[Ie(o,{name:"emoji",param:s.emojiReaction?"reaction":""},null,8,["param"])])],2),s.emojiOpened?(Q(),vt(Lt,{key:0,name:"vac-slide-up",appear:""},{default:Ge(()=>[ge("div",{class:at(["vac-emoji-picker",{"vac-picker-reaction":s.emojiReaction}]),style:Et({height:`${n.emojiPickerHeight}px`,top:s.positionTop?n.emojiPickerHeight:`${n.emojiPickerTop}px`,right:n.emojiPickerRight,display:n.emojiPickerTop||!s.emojiReaction?"initial":"none"})},[s.emojiOpened?(Q(),vt(u,{key:0,ref:"emojiPicker","data-source":s.emojiDataSource},null,8,["data-source"])):ke("",!0)],6)]),_:1})):ke("",!0)])}var P1=wt(y_,[["render",w_]]);const S_={name:"RoomFiles",components:{Loader:Dn,SvgIcon:Ut},props:{file:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["remove-file"],computed:{isImage(){return ar(this.file)},isVideo(){return Kr(this.file)}}},M_={class:"vac-room-file-container"},A_=["src"],E_={class:"vac-text-ellipsis"},T_={key:0,class:"vac-text-ellipsis vac-text-extension"};function k_(e,t,s,a,n,r){const o=Xe("loader"),u=Xe("svg-icon");return Q(),ne("div",M_,[Ie(o,{show:s.file.loading,type:"room-file"},gt({_:2},[tt(e.$slots,(g,l)=>({name:l,fn:Ge(p=>[Re(e.$slots,l,pt(_t(p)))])}))]),1032,["show"]),ge("div",{class:"vac-svg-button vac-icon-remove",onClick:t[0]||(t[0]=g=>e.$emit("remove-file",s.index))},[Re(e.$slots,"image-close-icon",{},()=>[Ie(u,{name:"close",param:"image"})])]),r.isImage?(Q(),ne("div",{key:0,class:at(["vac-message-image",{"vac-blur-loading":s.file.loading}]),style:Et({"background-image":`url('${s.file.localUrl||s.file.url}')`})},null,6)):r.isVideo?(Q(),ne("video",{key:1,controls:"",class:at({"vac-blur-loading":s.file.loading})},[ge("source",{src:s.file.localUrl||s.file.url},null,8,A_)],2)):(Q(),ne("div",{key:2,class:at(["vac-file-container",{"vac-blur-loading":s.file.loading}])},[ge("div",null,[Re(e.$slots,"file-icon",{},()=>[Ie(u,{name:"file"})])]),ge("div",E_,Je(s.file.name),1),s.file.extension?(Q(),ne("div",T_,Je(s.file.extension),1)):ke("",!0)],2))])}var R_=wt(S_,[["render",k_]]);const O_={name:"RoomFiles",components:{SvgIcon:Ut,RoomFile:R_},props:{files:{type:Array,required:!0}},emits:["remove-file","reset-message"],computed:{}},I_={key:0,class:"vac-room-files-container"},C_={class:"vac-files-box"},B_={class:"vac-icon-close"};function L_(e,t,s,a,n,r){const o=Xe("room-file"),u=Xe("svg-icon");return Q(),vt(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.files.length?(Q(),ne("div",I_,[ge("div",C_,[(Q(!0),ne(ut,null,tt(s.files,(g,l)=>(Q(),ne("div",{key:l},[Ie(o,{file:g,index:l,onRemoveFile:t[0]||(t[0]=p=>e.$emit("remove-file",p))},gt({_:2},[tt(e.$slots,(p,c)=>({name:c,fn:Ge(M=>[Re(e.$slots,c,pt(_t(M)))])}))]),1032,["file","index"])]))),128))]),ge("div",B_,[ge("div",{class:"vac-svg-button",onClick:t[1]||(t[1]=g=>e.$emit("reset-message"))},[Re(e.$slots,"files-close-icon",{},()=>[Ie(u,{name:"close-outline"})])])])])):ke("",!0)]),_:3})}var N_=wt(O_,[["render",L_]]);const j_={props:{percentage:{type:Number,default:0},messageSelectionEnabled:{type:Boolean,required:!0}},emits:["hover-audio-progress","change-linehead"],data(){return{isMouseDown:!1}},methods:{onMouseDown(e){if(this.messageSelectionEnabled)return;this.isMouseDown=!0;const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)},onMouseUp(e){if(this.messageSelectionEnabled)return;this.isMouseDown=!1,document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove);const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t)},onMouseMove(e){if(this.messageSelectionEnabled)return;const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t)},calculateLineHeadPosition(e,t){const s=t.getBoundingClientRect().width,a=t.getBoundingClientRect().left;let n=(e.clientX-a)/s;return n=n<0?0:n,n=n>1?1:n,n}}},H_={class:"vac-player-progress"},F_={class:"vac-line-container"};function P_(e,t,s,a,n,r){return Q(),ne("div",{ref:"progress",class:"vac-player-bar",onMousedown:t[0]||(t[0]=(...o)=>r.onMouseDown&&r.onMouseDown(...o)),onMouseover:t[1]||(t[1]=o=>e.$emit("hover-audio-progress",!0)),onMouseout:t[2]||(t[2]=o=>e.$emit("hover-audio-progress",!1))},[ge("div",H_,[ge("div",F_,[ge("div",{class:"vac-line-progress",style:Et({width:`${s.percentage}%`})},null,4),ge("div",{class:at(["vac-line-dot",{"vac-line-dot__active":n.isMouseDown}]),style:Et({left:`${s.percentage}%`})},null,6)])])],544)}var U_=wt(j_,[["render",P_]]);const D_={name:"AudioPlayer",components:{SvgIcon:Ut,AudioControl:U_},props:{messageId:{type:[String,Number],default:null},src:{type:String,default:null},messageSelectionEnabled:{type:Boolean,required:!0}},emits:["hover-audio-progress","update-progress-time"],data(){return{isPlaying:!1,duration:this.convertTimeMMSS(0),playedTime:this.convertTimeMMSS(0),progress:0}},computed:{playerUniqId(){return`audio-player${this.messageId}`},audioSource(){return this.src?this.src:(this.resetProgress(),null)}},mounted(){this.player=this.$el.querySelector("#"+this.playerUniqId),this.player.addEventListener("ended",()=>{this.isPlaying=!1}),this.player.addEventListener("loadeddata",()=>{this.resetProgress(),this.duration=this.convertTimeMMSS(this.player.duration),this.updateProgressTime()}),this.player.addEventListener("timeupdate",this.onTimeUpdate)},methods:{convertTimeMMSS(e){return new Date(e*1e3).toISOString().substr(14,5)},playback(){this.messageSelectionEnabled||!this.audioSource||(this.isPlaying?this.player.pause():setTimeout(()=>this.player.play()),this.isPlaying=!this.isPlaying)},resetProgress(){this.isPlaying&&this.player.pause(),this.duration=this.convertTimeMMSS(0),this.playedTime=this.convertTimeMMSS(0),this.progress=0,this.isPlaying=!1,this.updateProgressTime()},onTimeUpdate(){this.playedTime=this.convertTimeMMSS(this.player.currentTime),this.progress=this.player.currentTime/this.player.duration*100,this.updateProgressTime()},onUpdateProgress(e){e&&(this.player.currentTime=e*this.player.duration)},updateProgressTime(){this.$emit("update-progress-time",this.progress>1?this.playedTime:this.duration)}}},q_={class:"vac-audio-player"},V_=["id","src"];function z_(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Xe("audio-control");return Q(),ne("div",null,[ge("div",q_,[ge("div",{class:"vac-svg-button",onClick:t[0]||(t[0]=(...g)=>r.playback&&r.playback(...g))},[n.isPlaying?Re(e.$slots,"audio-pause-icon_"+s.messageId,{key:0},()=>[Ie(o,{name:"audio-pause"})]):Re(e.$slots,"audio-play-icon_"+s.messageId,{key:1},()=>[Ie(o,{name:"audio-play"})])]),Ie(u,{percentage:n.progress,"message-selection-enabled":s.messageSelectionEnabled,onChangeLinehead:r.onUpdateProgress,onHoverAudioProgress:t[1]||(t[1]=g=>e.$emit("hover-audio-progress",g))},null,8,["percentage","message-selection-enabled","onChangeLinehead"]),ge("audio",{id:r.playerUniqId,src:r.audioSource},null,8,V_)])])}var sl=wt(D_,[["render",z_]]);const Y_={name:"RoomMessageReply",components:{SvgIcon:Ut,FormatMessage:Yr,AudioPlayer:sl},props:{room:{type:Object,required:!0},messageReply:{type:Object,default:null},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0}},emits:["reset-message"],computed:{firstFile(){var e,t;return(t=(e=this.messageReply)==null?void 0:e.files)!=null&&t.length?this.messageReply.files[0]:{}},isImage(){return ar(this.firstFile)},isVideo(){return Kr(this.firstFile)},isAudio(){return Jn(this.firstFile)},isOtherFile(){var e,t;return((t=(e=this.messageReply)==null?void 0:e.files)==null?void 0:t.length)&&!this.isAudio&&!this.isVideo&&!this.isImage}}},X_={key:0,class:"vac-reply-container"},K_={class:"vac-reply-box"},G_={class:"vac-reply-info"},Z_={class:"vac-reply-username"},W_={class:"vac-reply-content"},Q_=["src"],J_={key:1,controls:"",class:"vac-image-reply"},$_=["src"],ep={key:3,class:"vac-image-reply vac-file-container"},tp={class:"vac-text-ellipsis"},sp={key:0,class:"vac-text-ellipsis vac-text-extension"},ap={class:"vac-icon-reply"};function rp(e,t,s,a,n,r){const o=Xe("format-message"),u=Xe("audio-player"),g=Xe("svg-icon");return Q(),vt(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.messageReply?(Q(),ne("div",X_,[ge("div",K_,[ge("div",G_,[ge("div",Z_,Je(s.messageReply.username),1),ge("div",W_,[Ie(o,{"message-id":s.messageReply._id,content:s.messageReply.content,users:s.room.users,"text-formatting":s.textFormatting,"link-options":s.linkOptions,reply:!0},null,8,["message-id","content","users","text-formatting","link-options"])])]),r.isImage?(Q(),ne("img",{key:0,src:r.firstFile.url,class:"vac-image-reply"},null,8,Q_)):r.isVideo?(Q(),ne("video",J_,[ge("source",{src:r.firstFile.url},null,8,$_)])):r.isAudio?(Q(),vt(u,{key:2,src:r.firstFile.url,"message-selection-enabled":!1,class:"vac-audio-reply"},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["src"])):r.isOtherFile?(Q(),ne("div",ep,[ge("div",null,[Re(e.$slots,"file-icon",{},()=>[Ie(g,{name:"file"})])]),ge("div",tp,Je(r.firstFile.name),1),r.firstFile.extension?(Q(),ne("div",sp,Je(r.firstFile.extension),1)):ke("",!0)])):ke("",!0)]),ge("div",ap,[ge("div",{class:"vac-svg-button",onClick:t[0]||(t[0]=l=>e.$emit("reset-message"))},[Re(e.$slots,"reply-close-icon",{},()=>[Ie(g,{name:"close-outline"})])])])])):ke("",!0)]),_:3})}var np=wt(Y_,[["render",rp]]);const ip={name:"RoomUsersTag",props:{filteredUsersTag:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-user-tag","activate-item"],data(){return{activeItem:null}},watch:{filteredUsersTag(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-user-tag",this.filteredUsersTag[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},op={key:0,class:"vac-tags-container"},lp=["onMouseover","onClick"],cp={class:"vac-tags-info"},up={class:"vac-tags-username"};function dp(e,t,s,a,n,r){return Q(),vt(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.filteredUsersTag.length?(Q(),ne("div",op,[(Q(!0),ne(ut,null,tt(s.filteredUsersTag,(o,u)=>(Q(),ne("div",{key:o._id,class:at(["vac-tags-box",{"vac-tags-box-active":u===n.activeItem}]),onMouseover:g=>n.activeItem=u,onClick:g=>e.$emit("select-user-tag",o)},[ge("div",cp,[o.avatar?(Q(),ne("div",{key:0,class:"vac-avatar vac-tags-avatar",style:Et({"background-image":`url('${o.avatar}')`})},null,4)):ke("",!0),ge("div",up,Je(o.username),1)])],42,lp))),128))])):ke("",!0)]),_:1})}var fp=wt(ip,[["render",dp]]);const mp={name:"RoomEmojis",props:{filteredEmojis:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-emoji","activate-item"],data(){return{activeItem:null}},watch:{filteredEmojis(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-emoji",this.filteredEmojis[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},hp={key:0,class:"vac-emojis-container"},vp=["onMouseover","onClick"];function _p(e,t,s,a,n,r){return Q(),vt(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.filteredEmojis.length?(Q(),ne("div",hp,[(Q(!0),ne(ut,null,tt(s.filteredEmojis,(o,u)=>(Q(),ne("div",{key:o,class:at(["vac-emoji-element",{"vac-emoji-element-active":u===n.activeItem}]),onMouseover:g=>n.activeItem=u,onClick:g=>e.$emit("select-emoji",o)},Je(o),43,vp))),128))])):ke("",!0)]),_:1})}var pp=wt(mp,[["render",_p]]);const gp={name:"RoomTemplatesText",props:{filteredTemplatesText:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-template-text","activate-item"],data(){return{activeItem:null}},watch:{filteredTemplatesText(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-template-text",this.filteredTemplatesText[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},bp={key:0,class:"vac-template-container vac-app-box-shadow"},yp=["onMouseover","onClick"],xp={class:"vac-template-info"},wp={class:"vac-template-tag"},Sp={class:"vac-template-text"};function Mp(e,t,s,a,n,r){return Q(),vt(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.filteredTemplatesText.length?(Q(),ne("div",bp,[(Q(!0),ne(ut,null,tt(s.filteredTemplatesText,(o,u)=>(Q(),ne("div",{key:u,class:at(["vac-template-box",{"vac-template-active":u===n.activeItem}]),onMouseover:g=>n.activeItem=u,onClick:g=>e.$emit("select-template-text",o)},[ge("div",xp,[ge("div",wp," /"+Je(o.tag),1),ge("div",Sp,Je(o.text),1)])],42,yp))),128))])):ke("",!0)]),_:1})}var Ap=wt(gp,[["render",Mp]]);function Ep(e){return new Int8Array(e)}function U1(e){return new Int16Array(e)}function D1(e){return new Int32Array(e)}function q1(e){return new Float32Array(e)}function Tp(e){return new Float64Array(e)}function V1(e){if(e.length==1)return q1(e[0]);var t=e[0];e=e.slice(1);for(var s=[],a=0;a=0;--w){var X,P;X=T[L+w]*o[20+w]+T[L+-1-w]*u[28+w],P=T[L+w]*u[28+w]-T[L+-1-w]*o[20+w],T[L+-1-w]=X,T[L+w]=P}}}if(H=i,B=286,M.mode_gr==1)for(var V=0;V<18;V++)Rp.arraycopy(M.sb_sample[N][1][V],0,M.sb_sample[N][0][V],0,32)}}}var Bp=Te.System,Lp=Te.new_float,Np=Te.new_float_n;function fi(){this.l=Lp(O.SBMAX_l),this.s=Np([O.SBMAX_s,3]);var e=this;this.assign=function(t){Bp.arraycopy(t.l,0,e.l,0,O.SBMAX_l);for(var s=0;s.03125)p.ATH.adjust>=1?p.ATH.adjust=1:p.ATH.adjust=A?(p.ATH.adjust*=A*.075+.925,p.ATH.adjust=A?p.ATH.adjust=A:p.ATH.adjust=0&&p.bitrate_index<16),hi(p.mode_ext>=0&&p.mode_ext<4),p.bitrate_stereoMode_Hist[p.bitrate_index][4]++,p.bitrate_stereoMode_Hist[15][4]++,p.channels_out==2&&(p.bitrate_stereoMode_Hist[p.bitrate_index][p.mode_ext]++,p.bitrate_stereoMode_Hist[15][p.mode_ext]++),c=0;c=O.BLKSIZE+p.framesize-O.FFTOFFSET),hi(M.mf_size>=512+p.framesize-32)}}this.lame_encode_mp3_frame=function(p,c,M,A,i,H){var B,N=W1([2,2]);N[0][0]=new da,N[0][1]=new da,N[1][0]=new da,N[1][1]=new da;var m=W1([2,2]);m[0][0]=new da,m[0][1]=new da,m[1][0]=new da,m[1][1]=new da;var R,C=[null,null],T=p.internal_flags,L=jp([2,4]),f=[.5,.5],E=[[0,0],[0,0]],w=[[0,0],[0,0]],h,b,_;if(C[0]=c,C[1]=M,T.lame_encode_frame_init==0&&l(p,C),T.padding=0,(T.slot_lag-=T.frac_SpF)<0&&(T.slot_lag+=p.out_samplerate,T.padding=1),T.psymodel!=0){var v,x=[null,null],y=0,j=Hp(2);for(_=0;_0&&(f[_]=L[_][3]/f[_])),b=0;b>1,B=l,N=l<<1,m=N+B,l=N<<1,p=o,c=p+R;do{var C,T,L,f;T=r[p+0]-r[p+B],C=r[p+0]+r[p+B],f=r[p+N]-r[p+m],L=r[p+N]+r[p+m],r[p+N]=C-L,r[p+0]=C+L,r[p+m]=T-f,r[p+B]=T+f,T=r[c+0]-r[c+B],C=r[c+0]+r[c+B],f=J1.SQRT2*r[c+m],L=J1.SQRT2*r[c+N],r[c+N]=C-L,r[c+0]=C+L,r[c+m]=T-f,r[c+B]=T+f,c+=l,p+=l}while(p=0);a(o[p],c,O.BLKSIZE_s/2)}},this.fft_long=function(r,o,u,g,l){var p=O.BLKSIZE/8-1,c=O.BLKSIZE/2;do{var M,A,i,H,B,N=n[p]&255;M=e[N]*g[u][l+N],B=e[N+512]*g[u][l+N+512],A=M-B,M=M+B,i=e[N+256]*g[u][l+N+256],B=e[N+768]*g[u][l+N+768],H=i-B,i=i+B,c-=4,o[c+0]=M+i,o[c+2]=M-i,o[c+1]=A+H,o[c+3]=A-H,M=e[N+1]*g[u][l+N+1],B=e[N+513]*g[u][l+N+513],A=M-B,M=M+B,i=e[N+257]*g[u][l+N+257],B=e[N+769]*g[u][l+N+769],H=i-B,i=i+B,o[c+O.BLKSIZE/2+0]=M+i,o[c+O.BLKSIZE/2+2]=M-i,o[c+O.BLKSIZE/2+1]=A+H,o[c+O.BLKSIZE/2+3]=A-H}while(--p>=0);a(o,c,O.BLKSIZE/2)},this.init_fft=function(r){for(var o=0;o=0;--Oe){var ze=q[Y+0][Oe],ve=q[Y+1][Oe];q[Y+0][Oe]=(ze+ve)*ts.SQRT2*.5,q[Y+1][Oe]=(ze-ve)*ts.SQRT2*.5}for(var Ve=2;Ve>=0;--Ve)for(var Oe=O.BLKSIZE_s-1;Oe>=0;--Oe){var ze=F[G+0][Ve][Oe],ve=F[G+1][Ve][Oe];F[G+0][Ve][Oe]=(ze+ve)*ts.SQRT2*.5,F[G+1][Ve][Oe]=(ze-ve)*ts.SQRT2*.5}}I[0]=q[Y+0][0],I[0]*=I[0];for(var Oe=O.BLKSIZE/2-1;Oe>=0;--Oe){var ae=q[Y+0][O.BLKSIZE/2-Oe],je=q[Y+0][O.BLKSIZE/2+Oe];I[O.BLKSIZE/2-Oe]=(ae*ae+je*je)*.5}for(var Ve=2;Ve>=0;--Ve){D[Ve][0]=F[G+0][Ve][0],D[Ve][0]*=D[Ve][0];for(var Oe=O.BLKSIZE_s/2-1;Oe>=0;--Oe){var ae=F[G+0][Ve][O.BLKSIZE_s/2-Oe],je=F[G+0][Ve][O.BLKSIZE_s/2+Oe];D[Ve][O.BLKSIZE_s/2-Oe]=(ae*ae+je*je)*.5}}{for(var $e=0,Oe=11;Oek)if(I=I*L)return k+I;G=k/I}if(k+=I,q+3<=3+3){if(G>=T)return k;var J=0|ts.FAST_LOG10_X(G,16);return k*b[J]}var J=0|ts.FAST_LOG10_X(G,16);if(F!=0?I=Y.ATH.cb_s[D]*Y.ATH.adjust:I=Y.ATH.cb_l[D]*Y.ATH.adjust,kI){var K,ie;return K=1,J<=13&&(K=_[J]),ie=ts.FAST_LOG10_X(k/I,10/15),k*((h[J]-K)*ie+K)}return J>13?k:k*_[J]}return k*h[J]}var x=[1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.30382*1.30382,1.22321*1.22321,1.14758*1.14758,1];function y(k,I,D){var q;if(k<0&&(k=0),I<0&&(I=0),k<=0)return I;if(I<=0)return k;if(I>k?q=I/k:q=k/I,D>=-2&&D<=2){if(q>=T)return k+I;var Y=0|ts.FAST_LOG10_X(q,16);return(k+I)*x[Y]}return q1){for(var q=0;q1.58*k.thm[1].l[I]||k.thm[1].l[I]>1.58*k.thm[0].l[I])){var D=k.mld_l[I]*k.en[3].l[I],q=Math.max(k.thm[2].l[I],Math.min(k.thm[3].l[I],D));D=k.mld_l[I]*k.en[2].l[I];var Y=Math.max(k.thm[3].l[I],Math.min(k.thm[2].l[I],D));k.thm[2].l[I]=q,k.thm[3].l[I]=Y}for(var I=0;I1.58*k.thm[1].s[I][F]||k.thm[1].s[I][F]>1.58*k.thm[0].s[I][F])){var D=k.mld_s[I]*k.en[3].s[I][F],q=Math.max(k.thm[2].s[I][F],Math.min(k.thm[3].s[I][F],D));D=k.mld_s[I]*k.en[2].s[I][F];var Y=Math.max(k.thm[3].s[I][F],Math.min(k.thm[2].s[I][F],D));k.thm[2].s[I][F]=q,k.thm[3].s[I][F]=Y}}function P(k,I,D){var q=I,Y=Math.pow(10,D);I*=2,q*=2;for(var F=0;F=0),et(D[G]>=0),J+=I[G],K+=D[G],G++;if(k.en[q].s[F][Y]=J,k.thm[q].s[F][Y]=K,G>=ee){++F;break}et(I[G]>=0),et(D[G]>=0);{var Oe=k.PSY.bo_s_weight[F],ze=1-Oe;J=Oe*I[G],K=Oe*D[G],k.en[q].s[F][Y]+=J,k.thm[q].s[F][Y]+=K,J=ze*I[G],K=ze*D[G]}}for(;F=0),et(D[F]>=0),G+=I[F],J+=D[F],F++;if(k.en[q].l[Y]=G,k.thm[q].l[Y]=J,F>=ie){++Y;break}et(I[F]>=0),et(D[F]>=0);{var oe=k.PSY.bo_l_weight[Y],Oe=1-oe;G=oe*I[F],J=oe*D[F],k.en[q].l[Y]+=G,k.thm[q].l[Y]+=J,G=Oe*I[F],J=Oe*D[F]}}for(;Y=0)}for(;K<=O.CBANDS;++K)D[K]=0,q[K]=0}function Z(k,I,D,q){var Y=k.internal_flags;k.short_blocks==cr.short_block_coupled&&!(I[0]!=0&&I[1]!=0)&&(I[0]=I[1]=0);for(var F=0;F=1?k:D<=0?I:I>0?Math.pow(k/I,D)*I:0}var de=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function Me(k,I){for(var D=309.07,q=0;q0){var G=F*I,J=k.en.s[q][Y];J>G&&(J>G*1e10?D+=de[q]*(10*t):D+=de[q]*ts.FAST_LOG10(J/G))}}return D}var Ae=[6.8,5.8,5.8,6.4,6.5,9.9,12.1,14.4,15,18.9,21.6,26.9,34.2,40.2,46.8,56.5,60.7,73.9,85.7,93.4,126.1];function he(k,I){for(var D=281.0575,q=0;q0){var F=Y*I,G=k.en.l[q];G>F&&(G>F*1e10?D+=Ae[q]*(10*t):D+=Ae[q]*ts.FAST_LOG10(G/F))}}return D}function Ue(k,I,D,q,Y){var F,G;for(F=G=0;F=0),et(D[F]>=0),et(q[F]>=0),et(Y[F]>=0)}}function Le(k,I,D,q){var Y=E.length-1,F=0,G=D[F]+D[F+1];if(G>0){var J=I[F];J0),G=20*(J*2-G)/(G*(k.numlines_l[F]+k.numlines_l[F+1]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;for(F=1;F0){var J=I[F-1];J0),G=20*(J*3-G)/(G*(k.numlines_l[F-1]+k.numlines_l[F]+k.numlines_l[F+1]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;if(et(F==k.npart_l-1),G=D[F-1]+D[F],G>0){var J=I[F-1];J0),G=20*(J*2-G)/(G*(k.numlines_l[F-1]+k.numlines_l[F]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;et(F==k.npart_l-1)}var fe=[-865163e-23*2,-.00851586*2,-674764e-23*2,.0209036*2,-336639e-22*2,-.0438162*2,-154175e-22*2,.0931738*2,-552212e-22*2,-.313819*2];this.L3psycho_anal_ns=function(k,I,D,q,Y,F,G,J,K,ie){var ee=k.internal_flags,oe=ps([2,O.BLKSIZE]),Oe=ps([2,3,O.BLKSIZE_s]),ze=jt(O.CBANDS+1),ve=jt(O.CBANDS+1),Ve=jt(O.CBANDS+2),ae=Na(2),je=Na(2),$e,_e,He,pe,Ye,Tt,Be,We,st=ps([2,576]),kt,us=Na(O.CBANDS+2),Nt=Na(O.CBANDS+2);for(Pp.fill(Nt,0),$e=ee.channels_out,k.mode==ft.JOINT_STEREO&&($e=4),k.VBR==lr.vbr_off?kt=ee.ResvMax==0?0:ee.ResvSize/ee.ResvMax*.5:k.VBR==lr.vbr_rh||k.VBR==lr.vbr_mtrh||k.VBR==lr.vbr_mt?kt=.6:kt=1,_e=0;_e2&&(F[q][_e].en.assign(ee.en[_e+2]),F[q][_e].thm.assign(ee.thm[_e+2]))}for(_e=0;_e<$e;_e++){var Es,Ts,Xt=jt(12),Ds=[0,0,0,0],fr=jt(12),ml=1,gu,bu=jt(O.CBANDS),yu=jt(O.CBANDS),Ot=[0,0,0,0],xu=jt(O.HBLKSIZE),wu=ps([3,O.HBLKSIZE_s]);for(et(ee.npart_s<=O.CBANDS),et(ee.npart_l<=O.CBANDS),pe=0;pe<3;pe++)Xt[pe]=ee.nsPsy.last_en_subshort[_e][pe+6],et(ee.nsPsy.last_en_subshort[_e][pe+4]>0),fr[pe]=Xt[pe]/ee.nsPsy.last_en_subshort[_e][pe+4],Ds[0]+=Xt[pe];if(_e==2)for(pe=0;pe<576;pe++){var hl,vl;hl=st[0][pe],vl=st[1][pe],st[0][pe]=hl+vl,st[1][pe]=hl-vl}{var Su=st[_e&1],un=0;for(pe=0;pe<9;pe++){for(var M4=un+64,Pt=1;unXt[pe+3-2]?(et(Xt[pe+3-2]>0),Pt=Pt/Xt[pe+3-2]):Xt[pe+3-2]>Pt*10?Pt=Xt[pe+3-2]/(Pt*10):Pt=0,fr[pe+3]=Pt}}if(k.analysis){var _l=fr[0];for(pe=1;pe<12;pe++)_lgu&&(Ot[pe/3]=pe%3+1);for(pe=1;pe<4;pe++){var pl;Ds[pe-1]>Ds[pe]?(et(Ds[pe]>0),pl=Ds[pe-1]/Ds[pe]):(et(Ds[pe-1]>0),pl=Ds[pe]/Ds[pe-1]),pl<1.7&&(Ot[pe]=0,pe==1&&(Ot[0]=0))}for(Ot[0]!=0&&ee.nsPsy.lastAttacks[_e]!=0&&(Ot[0]=0),(ee.nsPsy.lastAttacks[_e]==3||Ot[0]+Ot[1]+Ot[2]+Ot[3]!=0)&&(ml=0,Ot[1]!=0&&Ot[0]!=0&&(Ot[1]=0),Ot[2]!=0&&Ot[1]!=0&&(Ot[2]=0),Ot[3]!=0&&Ot[2]!=0&&(Ot[3]=0)),_e<2?je[_e]=ml:ml==0&&(je[0]=je[1]=0),K[_e]=ee.tot_ener[_e],Ts=Oe,Es=oe,N(k,xu,wu,Es,_e&1,Ts,_e&1,q,_e,I,D),Ue(ee,xu,ze,bu,yu),Le(ee,bu,yu,us),We=0;We<3;We++){var gl,rs;for(S(k,wu,ve,Ve,_e,We),V(ee,ve,Ve,_e,We),Be=0;Be=2||Ot[We+1]==1){var dn=We!=0?We-1:2,Pt=W(ee.thm[_e].s[Be][dn],rs,p*kt);rs=Math.min(rs,Pt)}if(Ot[We]==1){var dn=We!=0?We-1:2,Pt=W(ee.thm[_e].s[Be][dn],rs,c*kt);rs=Math.min(rs,Pt)}else if(We!=0&&Ot[We-1]==3||We==0&&ee.nsPsy.lastAttacks[_e]==3){var dn=We!=2?We+1:0,Pt=W(ee.thm[_e].s[Be][dn],rs,c*kt);rs=Math.min(rs,Pt)}gl=Xt[We*3+3]+Xt[We*3+4]+Xt[We*3+5],Xt[We*3+5]*60&&j(k,k.interChRatio),k.mode==ft.JOINT_STEREO){var yl;X(ee),yl=k.msfix,Math.abs(yl)>0&&P(ee,yl,k.ATHlower*ee.ATH.adjust)}for(Z(k,je,ie,ae),_e=0;_e<$e;_e++){var fn,mn=0,wi,Si;_e>1?(fn=J,mn=-2,wi=O.NORM_TYPE,(ie[0]==O.SHORT_TYPE||ie[1]==O.SHORT_TYPE)&&(wi=O.SHORT_TYPE),Si=F[q][_e-2]):(fn=G,mn=0,wi=ie[_e],Si=Y[q][_e]),wi==O.SHORT_TYPE?fn[mn+_e]=Me(Si,ee.masking_lower):fn[mn+_e]=he(Si,ee.masking_lower),k.analysis&&(ee.pinfo.pe[q][_e]=fn[mn+_e])}return 0};function Ke(k,I,D,q,Y,F,G,J){var K=k.internal_flags;if(q<2)e.fft_long(K,G[J],q,I,D);else if(q==2)for(var ie=O.BLKSIZE-1;ie>=0;--ie){var ee=G[J+0][ie],oe=G[J+1][ie];G[J+0][ie]=(ee+oe)*ts.SQRT2*.5,G[J+1][ie]=(ee-oe)*ts.SQRT2*.5}F[0]=G[J+0][0],F[0]*=F[0];for(var ie=O.BLKSIZE/2-1;ie>=0;--ie){var Oe=G[J+0][O.BLKSIZE/2-ie],ze=G[J+0][O.BLKSIZE/2+ie];F[O.BLKSIZE/2-ie]=(Oe*Oe+ze*ze)*.5}{for(var ve=0,ie=11;ie=0;--ie){var ee=G[J+0][Y][ie],oe=G[J+1][Y][ie];G[J+0][Y][ie]=(ee+oe)*ts.SQRT2*.5,G[J+1][Y][ie]=(ee-oe)*ts.SQRT2*.5}F[Y][0]=G[J+0][Y][0],F[Y][0]*=F[Y][0];for(var ie=O.BLKSIZE_s/2-1;ie>=0;--ie){var Oe=G[J+0][Y][O.BLKSIZE_s/2-ie],ze=G[J+0][Y][O.BLKSIZE_s/2+ie];F[Y][O.BLKSIZE_s/2-ie]=(Oe*Oe+ze*ze)*.5}}function U(k,I,D,q){var Y=k.internal_flags;k.athaa_loudapprox==2&&D<2&&(Y.loudness_sq[I][D]=Y.loudness_sq_save[D],Y.loudness_sq_save[D]=B(q,Y))}var z=[-865163e-23*2,-.00851586*2,-674764e-23*2,.0209036*2,-336639e-22*2,-.0438162*2,-154175e-22*2,.0931738*2,-552212e-22*2,-.313819*2];function te(k,I,D,q,Y,F,G,J,K,ie){for(var ee=ps([2,576]),oe=k.internal_flags,Oe=oe.channels_out,ze=k.mode==ft.JOINT_STEREO?4:Oe,ve=0;ve2&&(F[q][ve].en.assign(oe.en[ve+2]),F[q][ve].thm.assign(oe.thm[ve+2]))}for(var ve=0;ve0;++ae,--_e){var kt=ee[0][ae],us=ee[1][ae];ee[0][ae]=kt+us,ee[1][ae]=kt-us}for(var ae=0;ae<3;ae++)pe[ae]=oe.nsPsy.last_en_subshort[ve][ae+6],et(oe.nsPsy.last_en_subshort[ve][ae+4]>0),He[ae]=pe[ae]/oe.nsPsy.last_en_subshort[ve][ae+4],Ye[0]+=pe[ae];for(var ae=0;ae<9;ae++){for(var Nt=Be+64,Rt=1;Bepe[ae+3-2]?(et(pe[ae+3-2]>0),Rt=Rt/pe[ae+3-2]):pe[ae+3-2]>Rt*10?Rt=pe[ae+3-2]/(Rt*10):Rt=0,He[ae+3]=Rt}for(var ae=0;ae<3;++ae){var as=pe[ae*3+3]+pe[ae*3+4]+pe[ae*3+5],ds=1;pe[ae*3+5]*6We&&(K[ve][ae/3]=ae%3+1);for(var ae=1;ae<4;ae++){var Es=Ye[ae-1],Ts=Ye[ae],Xt=Math.max(Es,Ts);Xt<4e4&&Es<1.7*Ts&&Ts<1.7*Es&&(ae==1&&K[ve][0]<=K[ve][ae]&&(K[ve][0]=0),K[ve][ae]=0)}K[ve][0]<=oe.nsPsy.lastAttacks[ve]&&(K[ve][0]=0),(oe.nsPsy.lastAttacks[ve]==3||K[ve][0]+K[ve][1]+K[ve][2]+K[ve][3]!=0)&&(st=0,K[ve][1]!=0&&K[ve][0]!=0&&(K[ve][1]=0),K[ve][2]!=0&&K[ve][1]!=0&&(K[ve][2]=0),K[ve][3]!=0&&K[ve][2]!=0&&(K[ve][3]=0)),ve<2?ie[ve]=st:st==0&&(ie[0]=ie[1]=0),G[ve]=oe.tot_ener[ve]}}function le(k,I,D){if(D==0)for(var q=0;q0){var J=I[F];J0),G=20*(J*2-G)/(G*(k.numlines_s[F]+k.numlines_s[F+1]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;for(F=1;F0){var J=I[F-1];J0),G=20*(J*3-G)/(G*(k.numlines_s[F-1]+k.numlines_s[F]+k.numlines_s[F+1]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;if(et(F==k.npart_s-1),G=D[F-1]+D[F],G>0){var J=I[F-1];J0),G=20*(J*2-G)/(G*(k.numlines_s[F-1]+k.numlines_s[F]-1));var K=0|G;K>Y&&(K=Y),q[F]=K}else q[F]=0;et(F==k.npart_s-1)}function Ee(k,I,D,q,Y,F){var G=k.internal_flags,J=new float[O.CBANDS],K=jt(O.CBANDS),ie,ee,oe,Oe=new int[O.CBANDS];for(oe=ee=0;oe=0)}for(et(oe==G.npart_s);oepe&&(q[oe]=pe),G.masking_lower>1&&(q[oe]*=G.masking_lower),q[oe]>D[oe]&&(q[oe]=D[oe]),G.masking_lower<1&&(q[oe]*=G.masking_lower),et(q[oe]>=0)}for(;oe0?q[K]=Math.min(oe,$e):q[K]=Math.min(oe,D[K]*c)}else{var _e=a*k.nb_2[Y][K],He=s*k.nb_1[Y][K],$e;_e<=0&&(_e=oe),He<=0&&(He=oe),k.blocktype_old[Y&1]==O.NORM_TYPE?$e=Math.min(He,_e):$e=He,q[K]=Math.min(oe,$e)}k.nb_2[Y][K]=k.nb_1[Y][K],k.nb_1[Y][K]=oe,ee=F[K],ee*=k.minval_l[K],ee*=Oe,q[K]>ee&&(q[K]=ee),k.masking_lower>1&&(q[K]*=k.masking_lower),q[K]>D[K]&&(q[K]=D[K]),k.masking_lower<1&&(q[K]*=k.masking_lower),et(q[K]>=0)}for(;K0?Math.pow(10,Y):1,ie,ee,oe=0;oe0){var He,pe,Ye=q[oe]*K;if(He=Math.min(Math.max(ve,Ye),Math.max(Ve,Ye)),ae=Math.max(ee,Ye),je=Math.max(ie,Ye),pe=ae+je,pe>0&&He*JOe&&(ee=Oe),ie>ze&&(ie=ze),I[2][oe]=ee,I[3][oe]=ie}}this.L3psycho_anal_vbr=function(k,I,D,q,Y,F,G,J,K,ie){var ee=k.internal_flags,oe,Oe,ze=jt(O.HBLKSIZE),ve=ps([3,O.HBLKSIZE_s]),Ve=ps([2,O.BLKSIZE]),ae=ps([2,3,O.BLKSIZE_s]),je=ps([4,O.CBANDS]),$e=ps([4,O.CBANDS]),_e=ps([4,3]),He=.6,pe=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],Ye=Na(2),Tt=k.mode==ft.JOINT_STEREO?4:ee.channels_out;te(k,I,D,q,Y,F,K,_e,pe,Ye),Se(k,Ye);{for(var Be=0;Be=2||pe[Be][st+1]==1){var Rt=st!=0?st-1:2,as=W(ee.thm[Be].s[kt][Rt],Nt,p*He);Nt=Math.min(Nt,as)}else if(pe[Be][st]==1){var Rt=st!=0?st-1:2,as=W(ee.thm[Be].s[kt][Rt],Nt,c*He);Nt=Math.min(Nt,as)}else if(st!=0&&pe[Be][st-1]==3||st==0&&ee.nsPsy.lastAttacks[Be]==3){var Rt=st!=2?st+1:0,as=W(ee.thm[Be].s[kt][Rt],Nt,c*He);Nt=Math.min(Nt,as)}Nt*=_e[Be][st],us[st]=Nt}for(var st=0;st<3;st++)ee.thm[Be].s[kt][st]=us[st]}}}for(var Be=0;Be1?(ds=J,fs=-2,Es=O.NORM_TYPE,(ie[0]==O.SHORT_TYPE||ie[1]==O.SHORT_TYPE)&&(Es=O.SHORT_TYPE),Ts=F[q][Be-2]):(ds=G,fs=0,Es=ie[Be],Ts=Y[q][Be]),Es==O.SHORT_TYPE?ds[fs+Be]=Me(Ts,ee.masking_lower):ds[fs+Be]=he(Ts,ee.masking_lower),k.analysis&&(ee.pinfo.pe[q][Be]=ds[fs+Be])}return 0};function Ne(k,I){var D=k,q;return D>=0?q=-D*27:q=D*I,q<=-72?0:Math.exp(q*i)}function Pe(k){var I=0,D=0;{var q=0,Y,F;for(q=0;Ne(q,k)>1e-20;q-=1);for(Y=q,F=0;Math.abs(F-Y)>1e-12;)q=(F+Y)/2,Ne(q,k)>0?F=q:Y=q;I=Y}{var q=0,Y,F;for(q=0;Ne(q,k)>1e-20;q+=1);for(Y=0,F=q;Math.abs(F-Y)>1e-12;)q=(F+Y)/2,Ne(q,k)>0?Y=q:F=q;D=F}{var G=0,J=1e3,K;for(K=0;K<=J;++K){var q=I+K*(D-I)/J,ie=Ne(q,k);G+=ie}{var ee=(J+1)/(G*(D-I));return ee}}}function De(k){var I,D,q,Y;return I=k,I>=0?I*=3:I*=1.5,I>=.5&&I<=2.5?(Y=I-.5,D=8*(Y*Y-2*Y)):D=0,I+=.474,q=15.811389+7.5*I-17.5*Math.sqrt(1+I*I),q<=-60?0:(I=Math.exp((D+q)*i),I/=.6609193,I)}function Ze(k){return k<0&&(k=0),k=k*.001,13*Math.atan(.76*k)+3.5*Math.atan(k*k/(7.5*7.5))}function ce(k,I,D,q,Y,F,G,J,K,ie,ee,oe){var Oe=jt(O.CBANDS+1),ze=J/(oe>15?2*576:2*192),ve=Na(O.HBLKSIZE),Ve;J/=K;var ae=0,je=0;for(Ve=0;VeK/2){ae=K/2,++Ve;break}}Oe[Ve]=J*ae;for(var He=0;HeK/2&&(Ye=K/2),D[He]=(ve[pe]+ve[Ye])/2,I[He]=ve[Ye];var st=ze*Be;G[He]=(st-Oe[I[He]])/(Oe[I[He]+1]-Oe[I[He]]),G[He]<0?G[He]=0:G[He]>1&&(G[He]=1),We=Ze(J*ie[He]*ee),We=Math.min(We,15.5)/15.5,F[He]=Math.pow(10,1.25*(1-Math.cos(Math.PI*We))-2.5)}ae=0;for(var kt=0;kt0);J++);for(k[ie][0]=J,J=I-1;J>0&&!(G[ie][J]>0);J--);k[ie][1]=J,K+=k[ie][1]-k[ie][0]+1}for(var ze=jt(K),ve=0,ie=0;ie=Y&&(Ve=J*(ee[D]-Y)/(F-Y)+G*(F-ee[D])/(F-Y)),Oe[D]=Math.pow(10,Ve/10),I.numlines_l[D]>0?I.rnumlines_l[D]=1/I.numlines_l[D]:I.rnumlines_l[D]=0}I.s3_ll=ye(I.s3ind,I.npart_l,ee,oe,Oe,q);var ae=0;for(D=0;DHe&&(je=He)}I.ATH.cb_l[D]=je,je=-20+ee[D]*20/10,je>6&&(je=100),je<-15&&(je=-15),je-=8,I.minval_l[D]=Math.pow(10,je/10)*I.numlines_l[D]}for(I.npart_s=ce(I.numlines_s,I.bo_s,I.bm_s,ee,oe,I.mld_s,I.PSY.bo_s_weight,ze,O.BLKSIZE_s,I.scalefac_band.s,O.BLKSIZE_s/(2*192),O.SBMAX_s),et(I.npart_s=Y&&(Ve=ie*(ee[D]-Y)/(F-Y)+K*(F-ee[D])/(F-Y)),Oe[D]=Math.pow(10,Ve/10),je=eu.MAX_VALUE;for(var $e=0;$eHe&&(je=He)}I.ATH.cb_s[D]=je,je=-7+ee[D]*7/12,ee[D]>12&&(je*=1+Math.log(1+je)*3.1),ee[D]<12&&(je*=1+Math.log(1-je)*2.3),je<-15&&(je=-15),je-=8,I.minval_s[D]=Math.pow(10,je/10)*I.numlines_s[D]}I.s3_ss=ye(I.s3ind_s,I.npart_s,ee,oe,Oe,q),w(),e.init_fft(I),I.decay=Math.exp(-1*t/(g*ze/192));{var pe;pe=M,(k.exp_nspsytune&2)!=0&&(pe=1),Math.abs(k.msfix)>0&&(pe=k.msfix),k.msfix=pe;for(var Ye=0;YeI.npart_l-1&&(I.s3ind[Ye][1]=I.npart_l-1)}var Tt=576*I.mode_gr/ze;if(I.ATH.decay=Math.pow(10,-12/10*Tt),I.ATH.adjust=.01,I.ATH.adjustLimit=1,et(I.bo_l[O.SBMAX_l-1]<=I.npart_l),et(I.bo_s[O.SBMAX_s-1]<=I.npart_s),k.ATHtype!=-1){var _e,Be=k.out_samplerate/O.BLKSIZE,We=0;for(_e=0,D=0;D=0;)I.ATH.eql_w[D]*=We}{for(var Ye=ae=0;Ye0;){f=L>c.sampleWindow-c.totsamp?c.sampleWindow-c.totsamp:L,EMAX_ORDER-E&&(f=MAX_ORDER-E)):(m=A+E,R=M,C=H+E,T=i),o(R,m,c.lstepbuf,c.lstep+c.totsamp,f,n[c.reqindex]),o(T,C,c.rstepbuf,c.rstep+c.totsamp,f,n[c.reqindex]),u(c.lstepbuf,c.lstep+c.totsamp,c.loutbuf,c.lout+c.totsamp,f,r[c.reqindex]),u(c.rstepbuf,c.rstep+c.totsamp,c.routbuf,c.rout+c.totsamp,f,r[c.reqindex]),m=c.lout+c.totsamp,R=c.loutbuf,C=c.rout+c.totsamp,T=c.routbuf;for(var w=f%8;w--!=0;)c.lsum+=l(R[m++]),c.rsum+=l(T[C++]);for(w=f/8;w--!=0;)c.lsum+=l(R[m+0])+l(R[m+1])+l(R[m+2])+l(R[m+3])+l(R[m+4])+l(R[m+5])+l(R[m+6])+l(R[m+7]),m+=8,c.rsum+=l(T[C+0])+l(T[C+1])+l(T[C+2])+l(T[C+3])+l(T[C+4])+l(T[C+5])+l(T[C+6])+l(T[C+7]),C+=8;if(L-=f,E+=f,c.totsamp+=f,c.totsamp==c.sampleWindow){var h=Bt.STEPS_per_dB*10*Math.log10((c.lsum+c.rsum)/c.totsamp*.5+1e-37),b=h<=0?0:0|h;b>=c.A.length&&(b=c.A.length-1),c.A[b]++,c.lsum=c.rsum=0,ss.arraycopy(c.loutbuf,c.totsamp,c.loutbuf,0,MAX_ORDER),ss.arraycopy(c.routbuf,c.totsamp,c.routbuf,0,MAX_ORDER),ss.arraycopy(c.lstepbuf,c.totsamp,c.lstepbuf,0,MAX_ORDER),ss.arraycopy(c.rstepbuf,c.totsamp,c.rstepbuf,0,MAX_ORDER),c.totsamp=0}if(c.totsamp>c.sampleWindow)return GAIN_ANALYSIS_ERROR}return B0&&!((H-=c[A])<=0););return e-A/Bt.STEPS_per_dB}this.GetTitleGain=function(c){for(var M=p(c.A,c.A.length),A=0;A>2&63,T>=32&&(T-=64),L=Math.pow(10,T/4/10),T=m.exp_nspsytune>>8&63,T>=32&&(T-=64),f=Math.pow(10,T/4/10),T=m.exp_nspsytune>>14&63,T>=32&&(T-=64),E=Math.pow(10,T/4/10),T=m.exp_nspsytune>>20&63,T>=32&&(T-=64),w=E*Math.pow(10,T/4/10),T=0;Tdt.MAX_BITS_PER_GRANULE&&(y=dt.MAX_BITS_PER_GRANULE),h=0,_=0;_T*3/4&&(b[_]=T*3/4),b[_]<0&&(b[_]=0),b[_]+C[_]>dt.MAX_BITS_PER_CHANNEL&&(b[_]=Math.max(0,dt.MAX_BITS_PER_CHANNEL-C[_])),h+=b[_];if(h>x)for(_=0;_dt.MAX_BITS_PER_GRANULE){var j=0;for(_=0;_.5&&(L=.5);var f=0|L*.5*(m[0]+m[1]);f>dt.MAX_BITS_PER_CHANNEL-m[0]&&(f=dt.MAX_BITS_PER_CHANNEL-m[0]),f<0&&(f=0),m[1]>=125&&(m[1]-f>125?(m[0]T&&(m[0]=T*m[0]/f,m[1]=T*m[1]/f),an(m[0]<=dt.MAX_BITS_PER_CHANNEL),an(m[1]<=dt.MAX_BITS_PER_CHANNEL),an(m[0]+m[1]<=dt.MAX_BITS_PER_GRANULE)},this.athAdjust=function(m,R,C){var T=90.30873362,L=94.82444863,f=nl.FAST_LOG10_X(R,10),E=m*m,w=0;return f-=C,E>1e-20&&(w=1+nl.FAST_LOG10_X(E,10/T)),w<0&&(w=0),f*=w,f+=C+T-L,Math.pow(10,.1*f)},this.calc_xmin=function(m,R,C,T){var L=0,f=m.internal_flags,E,w=0,h=0,b=f.ATH,_=C.xr,v=m.VBR==Pa.vbr_mtrh?1:0,x=f.masking_lower;for((m.VBR==Pa.vbr_mtrh||m.VBR==Pa.vbr_mt)&&(x=1),E=0;E>1,y=0;do{var S,Z;S=_[w]*_[w],y+=S,P+=S0);if(y>j&&h++,E==O.SBPSY_l){var W=j*f.nsPsy.longfact[E];P0){var W;W=y*R.thm.l[E]*x/de,v!=0&&(W*=f.nsPsy.longfact[E]),j>1;X=Le/V,P=n;do{var S,Z;S=_[w]*_[w],y+=S,P+=S0);if(y>Le&&h++,he==O.SBPSY_s){var W=Le*f.nsPsy.shortfact[he];P0){var W;W=y*R.thm.s[he][Ue]*x/de,v!=0&&(W*=f.nsPsy.shortfact[he]),jT[L-3+1]&&(T[L-3+1]+=(T[L-3]-T[L-3+1])*f.decay),T[L-3+1]>T[L-3+2]&&(T[L-3+2]+=(T[L-3+1]-T[L-3+2])*f.decay))}return h};function N(m){this.s=m}this.calc_noise_core=function(m,R,C,T){var L=0,f=R.s,E=m.l3_enc;if(f>m.count1)for(;C--!=0;){var w;w=m.xr[f],f++,L+=w*w,w=m.xr[f],f++,L+=w*w}else if(f>m.big_values){var h=Ua(2);for(h[0]=0,h[1]=T;C--!=0;){var w;w=Math.abs(m.xr[f])-h[E[f]],f++,L+=w*w,w=Math.abs(m.xr[f])-h[E[f]],f++,L+=w*w}}else for(;C--!=0;){var w;w=Math.abs(m.xr[f])-A[E[f]]*T,f++,L+=w*w,w=Math.abs(m.xr[f])-A[E[f]]*T,f++,L+=w*w}return R.s=f,L},this.calc_noise=function(m,R,C,T,L){var f=0,E=0,w,h,b=0,_=0,v=0,x=-20,y=0,j=m.scalefac,X=0;for(T.over_SSD=0,w=0;w>1,y+m.width[w]>m.max_nonzero_coeff){var S;S=m.max_nonzero_coeff-y+1,S>0?h=S>>1:h=0}var Z=new N(y);V=this.calc_noise_core(m,Z,h,d),y=Z.s,L!=null&&(L.step[w]=P,L.noise[w]=V),V=C[f++]=V/R[E++],V=nl.FAST_LOG10(Math.max(V,1e-20)),L!=null&&(L.noise_log[w]=V)}if(L!=null&&(L.global_gain=m.global_gain),v+=V,V>0){var W;W=Math.max(0|V*10+.5,1),T.over_SSD+=W*W,b++,_+=V}x=Math.max(x,V)}return T.over_count=b,T.tot_noise=v,T.over_noise=_,T.max_noise=x,b},this.set_pinfo=function(m,R,C,T,L){var f=m.internal_flags,E,w,h,b,_,v=R.scalefac_scale==0?.5:1,x=R.scalefac,y=Ua(L3Side.SFBMAX),j=Ua(L3Side.SFBMAX),X=new CalcNoiseResult;calc_xmin(m,C,R,y),calc_noise(R,y,j,X,null);var P=0;for(w=R.sfb_lmax,R.block_type!=O.SHORT_TYPE&&R.mixed_block_flag==0&&(w=22),E=0;E0&&!m.ATHonly?b=b/C.en.l[E]:b=0,f.pinfo.thr[T][L][E]=_*Math.max(b*C.thm.l[E],f.ATH.l[E]),f.pinfo.LAMEsfb[T][L][E]=0,R.preflag!=0&&E>=11&&(f.pinfo.LAMEsfb[T][L][E]=-v*p[E]),E=0),f.pinfo.LAMEsfb[T][L][E]-=v*x[E])}if(R.block_type==O.SHORT_TYPE)for(w=E,E=R.sfb_smin;E0?b=b/C.en.s[E][Z]:b=0,(m.ATHonly||m.ATHshort)&&(b=0),f.pinfo.thr_s[T][L][3*E+Z]=_*Math.max(b*C.thm.s[E][Z],f.ATH.s[E]),f.pinfo.LAMEsfb_s[T][L][3*E+Z]=-2*R.subblock_gain[Z],E>1;h--!=0;)x[y++]=j>_[v++]?0:1,x[y++]=j>_[v++]?0:1}function n(h,b,_,v,x,y){h=h>>1;var j=h%2;for(h=h>>1;h--!=0;){var X,P,V,d,S,Z,W,de;X=_[v++]*b,P=_[v++]*b,S=0|X,V=_[v++]*b,Z=0|P,d=_[v++]*b,W=0|V,X+=e.adj43[S],de=0|d,P+=e.adj43[Z],x[y++]=0|X,V+=e.adj43[W],x[y++]=0|P,d+=e.adj43[de],x[y++]=0|V,x[y++]=0|d}if(j!=0){var X,P,S,Z;X=_[v++]*b,P=_[v++]*b,S=0|X,Z=0|P,X+=e.adj43[S],P+=e.adj43[Z],x[y++]=0|X,x[y++]=0|P}}function r(h,b,_,v,x){var y,j,X=0,P,V=0,d=0,S=0,Z=b,W=0,de=Z,Me=0,Ae=h,he=0;for(P=x!=null&&v.global_gain==x.global_gain,v.block_type==O.SHORT_TYPE?j=38:j=21,y=0;y<=j;y++){var Ue=-1;if((P||v.block_type==O.NORM_TYPE)&&(Ue=v.global_gain-(v.scalefac[y]+(v.preflag!=0?e.pretab[y]:0)<=0),P&&x.step[y]==Ue)V!=0&&(n(V,_,Ae,he,de,Me),V=0),d!=0&&(a(d,_,Ae,he,de,Me),d=0);else{var Le=v.width[y];if(X+v.width[y]>v.max_nonzero_coeff){var fe;fe=v.max_nonzero_coeff-X+1,t3.fill(b,v.max_nonzero_coeff,576,0),Le=fe,Le<0&&(Le=0),y=j+1}if(V==0&&d==0&&(de=Z,Me=W,Ae=h,he=S),x!=null&&x.sfb_count1>0&&y>=x.sfb_count1&&x.step[y]>0&&Ue>=x.step[y]?(V!=0&&(n(V,_,Ae,he,de,Me),V=0,de=Z,Me=W,Ae=h,he=S),d+=Le):(d!=0&&(a(d,_,Ae,he,de,Me),d=0,de=Z,Me=W,Ae=h,he=S),V+=Le),Le<=0){d!=0&&(a(d,_,Ae,he,de,Me),d=0),V!=0&&(n(V,_,Ae,he,de,Me),V=0);break}}y<=j&&(W+=v.width[y],S+=v.width[y],X+=v.width[y])}V!=0&&(n(V,_,Ae,he,de,Me),V=0),d!=0&&(a(d,_,Ae,he,de,Me),d=0)}function o(h,b,_){var v=0,x=0;do{var y=h[b++],j=h[b++];v14&&(V=15,X+=j),V*=16),d!=0&&(d>14&&(d=15,X+=j),V+=d),X+=re.largetbl[V]}while(b<_);return P=X&65535,X>>=16,X>P&&(X=P,v=x),y.bits+=X,v}function g(h,b,_,v){var x=0,y=re.ht[1].hlen;do{var j=h[b+0]*2+h[b+1];b+=2,x+=y[j]}while(b<_);return v.bits+=x,1}function l(h,b,_,v,x){var y=0,j,X=re.ht[v].xlen,P;v==2?P=re.table23:P=re.table56;do{var V=h[b+0]*X+h[b+1];b+=2,y+=P[V]}while(b<_);return j=y&65535,y>>=16,y>j&&(y=j,v++),x.bits+=y,v}function p(h,b,_,v,x){var y=0,j=0,X=0,P=re.ht[v].xlen,V=re.ht[v].hlen,d=re.ht[v+1].hlen,S=re.ht[v+2].hlen;do{var Z=h[b+0]*P+h[b+1];b+=2,y+=V[Z],j+=d[Z],X+=S[Z]}while(b<_);var W=v;return y>j&&(y=j,W++),y>X&&(y=X,W=v+2),x.bits+=y,W}var c=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];function M(h,b,_,v){var x=o(h,b,_);switch(x){case 0:return x;case 1:return g(h,b,_,v);case 2:case 3:return l(h,b,_,c[x-1],v);case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:return p(h,b,_,c[x-1],v);default:if(x>Yt.IXMAX_VAL)return v.bits=Yt.LARGE_BITS,-1;x-=15;var y;for(y=24;y<32&&!(re.ht[y].linmax>=x);y++);var j;for(j=y-8;j<24&&!(re.ht[j].linmax>=x);j++);return u(h,b,_,j,y,v)}}this.noquant_count_bits=function(h,b,_){var v=b.l3_enc,x=Math.min(576,b.max_nonzero_coeff+2>>1<<1);for(_!=null&&(_.sfb_count1=0);x>1&&(v[x-1]|v[x-2])==0;x-=2);b.count1=x;for(var y=0,j=0;x>3;x-=4){var X;if(((v[x-1]|v[x-2]|v[x-3]|v[x-4])&2147483647)>1)break;X=((v[x-4]*2+v[x-3])*2+v[x-2])*2+v[x-1],y+=re.t32l[X],j+=re.t33l[X]}var P=y;if(b.count1table_select=0,y>j&&(P=j,b.count1table_select=1),b.count1bits=P,b.big_values=x,x==0)return P;if(b.block_type==O.SHORT_TYPE)y=3*h.scalefac_band.s[3],y>b.big_values&&(y=b.big_values),j=b.big_values;else if(b.block_type==O.NORM_TYPE){if(y=b.region0_count=h.bv_scf[x-2],j=b.region1_count=h.bv_scf[x-1],j=h.scalefac_band.l[y+j+2],y=h.scalefac_band.l[y+1],jj&&(y=j);if(y=Math.min(y,x),j=Math.min(j,x),y>0){var V=new t(P);b.table_select[0]=M(v,0,y,V),P=V.bits}if(yy)return Yt.LARGE_BITS;if(r(b,x,e.IPOW20(_.global_gain),_,v),(h.substep_shaping&2)!=0)for(var j=0,X=_.global_gain+_.scalefac_scale,P=.634521682242439/e.IPOW20(X),V=0;V<_.sfbmax;V++){var d=_.width[V];if(h.pseudohalf[V]==0)j+=d;else{var S;for(S=j,j+=d;S=P?x[S]:0}}return this.noquant_count_bits(h,_,v)};function A(h,b,_,v,x,y,j){for(var X=b.big_values,P=0;P<=7+15;P++)v[P]=Yt.LARGE_BITS;for(var P=0;P<16;P++){var V=h.scalefac_band.l[P+1];if(V>=X)break;var d=0,S=new t(d),Z=M(_,0,V,S);d=S.bits;for(var W=0;W<8;W++){var de=h.scalefac_band.l[P+W+2];if(de>=X)break;var Me=d;S=new t(Me);var Ae=M(_,V,de,S);Me=S.bits,v[P+W]>Me&&(v[P+W]=Me,x[P+W]=P,y[P+W]=Z,j[P+W]=Ae)}}}function i(h,b,_,v,x,y,j,X){for(var P=b.big_values,V=2;V=P)break;var S=x[V-2]+b.count1bits;if(_.part2_3_length<=S)break;var Z=new t(S),W=M(v,d,P,Z);S=Z.bits,!(_.part2_3_length<=S)&&(_.assign(b),_.part2_3_length=S,_.region0_count=y[V-2],_.region1_count=V-2-y[V-2],_.table_select[0]=j[V-2],_.table_select[1]=X[V-2],_.table_select[2]=W)}}this.best_huffman_divide=function(h,b){var _=new vi,v=b.l3_enc,x=rn(7+15+1),y=rn(7+15+1),j=rn(7+15+1),X=rn(7+15+1);if(!(b.block_type==O.SHORT_TYPE&&h.mode_gr==1)){_.assign(b),b.block_type==O.NORM_TYPE&&(A(h,b,v,x,y,j,X),i(h,_,b,v,x,y,j,X));var P=_.big_values;if(!(P==0||(v[P-2]|v[P-1])>1)&&(P=b.count1+2,!(P>576))){_.assign(b),_.count1=P;for(var V=0,d=0;P>_.big_values;P-=4){var S=((v[P-4]*2+v[P-3])*2+v[P-2])*2+v[P-1];V+=re.t32l[S],d+=re.t33l[S]}if(_.big_values=P,_.count1table_select=0,V>d&&(V=d,_.count1table_select=1),_.count1bits=V,_.block_type==O.NORM_TYPE)i(h,_,b,v,x,y,j,X);else{if(_.part2_3_length=V,V=h.scalefac_band.l[7+1],V>P&&(V=P),V>0){var Z=new t(_.part2_3_length);_.table_select[0]=M(v,0,V,Z),_.part2_3_length=Z.bits}if(P>V){var Z=new t(_.part2_3_length);_.table_select[1]=M(v,V,P,Z),_.part2_3_length=Z.bits}b.part2_3_length>_.part2_3_length&&b.assign(_)}}}};var H=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16],B=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8],N=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4],m=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];nn.slen1_tab=N,nn.slen2_tab=m;function R(h,b){for(var _,v=b.tt[1][h],x=b.tt[0][h],y=0;y=0);_++);if(_==re.scfsi_band[y+1]){for(_=re.scfsi_band[y];_d&&(v.part2_length=d,v.scalefac_compress=y)}}this.best_scalefac_store=function(h,b,_,v){var x=v.tt[b][_],y,j,X,P,V=0;for(X=0,y=0;y0&&(S|=x.scalefac[y]);if((S&1)==0&&S!=0){for(y=0;y0&&(x.scalefac[y]>>=1);x.scalefac_scale=V=1}}if(x.preflag==0&&x.block_type!=O.SHORT_TYPE&&h.mode_gr==2){for(y=11;y0&&(x.scalefac[y]-=e.pretab[y]);x.preflag=V=1}}for(j=0;j<4;j++)v.scfsi[_][j]=0;for(h.mode_gr==2&&b==1&&v.tt[0][_].block_type!=O.SHORT_TYPE&&v.tt[1][_].block_type!=O.SHORT_TYPE&&(R(_,v),V=0),y=0;yy[b]&&(h.part2_length=y[b],h.scalefac_compress=b);return h.part2_length==Yt.LARGE_BITS};var E=[[15,15,7,7],[15,15,7,0],[7,3,0,0],[15,31,31,0],[7,7,7,0],[3,3,0,0]];this.scale_bitcount_lsf=function(h,b){var _,v,x,y,j,X,P,V,d=rn(4),S=b.scalefac;for(b.preflag!=0?_=2:_=0,P=0;P<4;P++)d[P]=0;if(b.block_type==O.SHORT_TYPE){v=1;var Z=e.nr_of_sfb_block[_][v];for(V=0,x=0;x<4;x++)for(y=Z[x]/3,P=0;Pd[x]&&(d[x]=S[V*3+j])}else{v=0;var Z=e.nr_of_sfb_block[_][v];for(V=0,x=0;x<4;x++)for(y=Z[x],P=0;Pd[x]&&(d[x]=S[V])}for(X=!1,x=0;x<4;x++)d[x]>E[_][x]&&(X=!0);if(!X){var W,de,Me,Ae;for(b.sfb_partition_table=e.nr_of_sfb_block[_][v],x=0;x<4;x++)b.slen[x]=w[d[x]];switch(W=b.slen[0],de=b.slen[1],Me=b.slen[2],Ae=b.slen[3],_){case 0:b.scalefac_compress=(W*5+de<<4)+(Me<<2)+Ae;break;case 1:b.scalefac_compress=400+(W*5+de<<2)+Me;break;case 2:b.scalefac_compress=500+W*3+de;break;default:e3.err.printf(`intensity stereo not implemented yet
-`);break}}if(!X)for(il(b.sfb_partition_table!=null),b.part2_length=0,x=0;x<4;x++)b.part2_length+=b.slen[x]*b.sfb_partition_table[x];return X};var w=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(h){for(var b=2;b<=576;b+=2){for(var _=0,v;h.scalefac_band.l[++_]b;)v--;for(v<0&&(v=s[_][0]),h.bv_scf[b-2]=v,v=s[_][1];h.scalefac_band.l[v+h.bv_scf[b-2]+2]>b;)v--;v<0&&(v=s[_][1]),h.bv_scf[b-1]=v}}}var Ps=Te.System,s3=Te.Arrays,a3=Te.new_byte,r3=Te.new_float_n,n3=Te.new_int,Ht=Te.assert;bs.EQ=function(e,t){return Math.abs(e)>Math.abs(t)?Math.abs(e-t)<=Math.abs(e)*1e-6:Math.abs(e-t)<=Math.abs(t)*1e-6},bs.NEQ=function(e,t){return!bs.EQ(e,t)};function bs(){var e=this,t=32773,s=null,a=null,n=null,r=null;this.setModules=function(E,w,h,b){s=E,a=w,n=h,r=b};var o=null,u=0,g=0,l=0;this.getframebits=function(E){var w=E.internal_flags,h;w.bitrate_index!=0?h=re.bitrate_table[E.version][w.bitrate_index]:h=E.brate;var b=0|(E.version+1)*72e3*h/E.out_samplerate+w.padding;return 8*b};function p(E){Ps.arraycopy(E.header[E.w_ptr].buf,0,o,g,E.sideinfo_len),g+=E.sideinfo_len,u+=E.sideinfo_len*8,E.w_ptr=E.w_ptr+1&dt.MAX_HEADER_BUF-1}function c(E,w,h){for(;h>0;){var b;l==0&&(l=8,g++,Ht(E.header[E.w_ptr].write_timing>=u),E.header[E.w_ptr].write_timing==u&&p(E),o[g]=0),b=Math.min(h,l),h-=b,l-=b,o[g]|=w>>h<0;){var b;l==0&&(l=8,g++,o[g]=0),b=Math.min(h,l),h-=b,l-=b,o[g]|=w>>h<=8&&(c(h,76,8),w-=8),w>=8&&(c(h,65,8),w-=8),w>=8&&(c(h,77,8),w-=8),w>=8&&(c(h,69,8),w-=8),w>=32){var _=n.getLameShortVersion();if(w>=32)for(b=0;b<_.length&&w>=8;++b)w-=8,c(h,_.charAt(b),8)}for(;w>=1;w-=1)c(h,h.ancillary_flag,1),h.ancillary_flag^=E.disable_reservoir?0:1}function i(E,w,h){for(var b=E.header[E.h_ptr].ptr;h>0;){var _=Math.min(h,8-(b&7));h-=_,E.header[E.h_ptr].buf[b>>3]|=w>>h<<8-(b&7)-_,b+=_}E.header[E.h_ptr].ptr=b}function H(E,w){E<<=8;for(var h=0;h<8;h++)E<<=1,w<<=1,((w^E)&65536)!=0&&(w^=t);return w}this.CRC_writeheader=function(E,w){var h=65535;h=H(w[2]&255,h),h=H(w[3]&255,h);for(var b=6;b>8),w[5]=byte(h&255)};function B(E,w){var h=E.internal_flags,b,_,v;if(b=h.l3_side,h.header[h.h_ptr].ptr=0,s3.fill(h.header[h.h_ptr].buf,0,h.sideinfo_len,0),E.out_samplerate<16e3?i(h,4094,12):i(h,4095,12),i(h,E.version,1),i(h,4-3,2),i(h,E.error_protection?0:1,1),i(h,h.bitrate_index,4),i(h,h.samplerate_index,2),i(h,h.padding,1),i(h,E.extension,1),i(h,E.mode.ordinal(),2),i(h,h.mode_ext,2),i(h,E.copyright,1),i(h,E.original,1),i(h,E.emphasis,2),E.error_protection&&i(h,0,16),E.version==1){for(Ht(b.main_data_begin>=0),i(h,b.main_data_begin,9),h.channels_out==2?i(h,b.private_bits,3):i(h,b.private_bits,5),v=0;v=0&&y.region0_count<16),Ht(y.region1_count>=0&&y.region1_count<8),i(h,y.region0_count,4),i(h,y.region1_count,3)),i(h,y.preflag,1),i(h,y.scalefac_scale,1),i(h,y.count1table_select,1)}}else for(Ht(b.main_data_begin>=0),i(h,b.main_data_begin,8),i(h,b.private_bits,h.channels_out),_=0,v=0;v=0&&y.region0_count<16),Ht(y.region1_count>=0&&y.region1_count<8),i(h,y.region0_count,4),i(h,y.region1_count,3)),i(h,y.scalefac_scale,1),i(h,y.count1table_select,1)}E.error_protection&&CRC_writeheader(h,h.header[h.h_ptr].buf);{var j=h.h_ptr;Ht(h.header[j].ptr==h.sideinfo_len*8),h.h_ptr=j+1&dt.MAX_HEADER_BUF-1,h.header[h.h_ptr].write_timing=h.header[j].write_timing+w,h.h_ptr==h.w_ptr&&Ps.err.println(`Error: MAX_HEADER_BUF too small in bitstream.c
-`)}}function N(E,w){var h=re.ht[w.count1table_select+32],b,_=0,v=w.big_values,x=w.big_values;for(Ht(w.count1table_select<2),b=(w.count1-w.big_values)/4;b>0;--b){var y=0,j=0,X;X=w.l3_enc[v+0],X!=0&&(j+=8,w.xr[x+0]<0&&y++),X=w.l3_enc[v+1],X!=0&&(j+=4,y*=2,w.xr[x+1]<0&&y++),X=w.l3_enc[v+2],X!=0&&(j+=2,y*=2,w.xr[x+2]<0&&y++),X=w.l3_enc[v+3],X!=0&&(j++,y*=2,w.xr[x+3]<0&&y++),v+=4,x+=4,c(E,y+h.table[j],h.hlen[j]),_+=h.hlen[j]}return _}function m(E,w,h,b,_){var v=re.ht[w],x=0;if(w==0)return x;for(var y=h;y15){if(S>14){var W=S-15;Ht(W<=v.linmax),d|=W<<1,X=P,S=15}if(Z>14){var de=Z-15;Ht(de<=v.linmax),d<<=P,d|=de,X+=P,Z=15}V=16}Z!=0&&(d<<=1,_.xr[y+1]<0&&d++,j--),S=S*V+Z,X-=j,j+=v.hlen[S],c(E,v.table[S],j),c(E,d,X),x+=j+X}return x}function R(E,w){var h=3*E.scalefac_band.s[3];h>w.big_values&&(h=w.big_values);var b=m(E,w.table_select[0],0,h,w);return b+=m(E,w.table_select[1],h,w.big_values,w),b}function C(E,w){var h,b,_,v;h=w.big_values;var x=w.region0_count+1;return Ht(xh&&(_=h),v>h&&(v=h),b=m(E,w.table_select[0],0,_,w),b+=m(E,w.table_select[1],_,v,w),b+=m(E,w.table_select[2],v,h,w),b}function T(E){var w,h,b,_,v=0,x=E.internal_flags,y=x.l3_side;if(E.version==1)for(w=0;w<2;w++)for(h=0;h=0&&(_=1+x-y,x0&&(EQ(E.scale,1)||EQ(E.scale,0))?w.noclipScale=Math.floor(32767/w.PeakSample*100)/100:w.noclipScale=-1)}},this.add_dummy_byte=function(E,w,h){for(var b=E.internal_flags,_;h-- >0;)for(M(b,w,8),_=0;_ ResvSize"),h.main_data_begin*8!=w.ResvSize&&(Ps.err.printf(`bit reservoir error:
+ }`,a=document.createElement("style");a.textContent=e+t+n+r,this.$refs.emojiPicker.shadowRoot.appendChild(a)},openEmoji(e){this.$emit("open-emoji",!this.emojiOpened),this.setEmojiPickerPosition(e.clientY,e.view.innerWidth,e.view.innerHeight)},setEmojiPickerPosition(e,t,n){const r=t<500||n<700,a=iu(this.$el,"#room-footer");if(!a){r&&(this.emojiPickerRight="-50px");return}r?(this.emojiPickerRight=t/2-(this.positionTop?200:150)+"px",this.emojiPickerTop=100,this.emojiPickerHeight=n-200):(a.getBoundingClientRect().top-e>this.emojiPickerHeight-50?this.emojiPickerTop=e+10:this.emojiPickerTop=e-this.emojiPickerHeight-10,this.emojiPickerRight=this.positionTop?"0px":this.positionRight?"60px":"")}}},Qp={class:"vac-emoji-wrapper"};function Jp(e,t,n,r,a,i){const s=Ye("svg-icon"),l=Ye("emoji-picker");return $(),le("div",Qp,[ke("div",{class:rt(["vac-svg-button",{"vac-emoji-reaction":n.emojiReaction}]),onClick:t[0]||(t[0]=(...f)=>i.openEmoji&&i.openEmoji(...f))},[Be(e.$slots,n.messageId?"emoji-picker-reaction-icon_"+n.messageId:"emoji-picker-icon",{},()=>[Oe(s,{name:"emoji",param:n.emojiReaction?"reaction":""},null,8,["param"])])],2),n.emojiOpened?($(),ht(Ct,{key:0,name:"vac-slide-up",appear:""},{default:Ge(()=>[ke("div",{class:rt(["vac-emoji-picker",{"vac-picker-reaction":n.emojiReaction}]),style:St({height:`${a.emojiPickerHeight}px`,top:n.positionTop?a.emojiPickerHeight:`${a.emojiPickerTop}px`,right:a.emojiPickerRight,display:a.emojiPickerTop||!n.emojiReaction?"initial":"none"})},[n.emojiOpened?($(),ht(l,{key:0,ref:"emojiPicker","data-source":n.emojiDataSource},null,8,["data-source"])):Ie("",!0)],6)]),_:1})):Ie("",!0)])}var au=xt(Zp,[["render",Jp]]);const $p={name:"RoomFiles",components:{Loader:_a,SvgIcon:zt},props:{file:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["remove-file"],computed:{isImage(){return Yr(this.file)},isVideo(){return xi(this.file)}}},ev={class:"vac-room-file-container"},tv=["src"],nv={class:"vac-text-ellipsis"},rv={key:0,class:"vac-text-ellipsis vac-text-extension"};function iv(e,t,n,r,a,i){const s=Ye("loader"),l=Ye("svg-icon");return $(),le("div",ev,[Oe(s,{show:n.file.loading,type:"room-file"},vt({_:2},[tt(e.$slots,(f,u)=>({name:u,fn:Ge(h=>[Be(e.$slots,u,pt(_t(h)))])}))]),1032,["show"]),ke("div",{class:"vac-svg-button vac-icon-remove",onClick:t[0]||(t[0]=f=>e.$emit("remove-file",n.index))},[Be(e.$slots,"image-close-icon",{},()=>[Oe(l,{name:"close",param:"image"})])]),i.isImage?($(),le("div",{key:0,class:rt(["vac-message-image",{"vac-blur-loading":n.file.loading}]),style:St({"background-image":`url('${n.file.localUrl||n.file.url}')`})},null,6)):i.isVideo?($(),le("video",{key:1,controls:"",class:rt({"vac-blur-loading":n.file.loading})},[ke("source",{src:n.file.localUrl||n.file.url},null,8,tv)],2)):($(),le("div",{key:2,class:rt(["vac-file-container",{"vac-blur-loading":n.file.loading}])},[ke("div",null,[Be(e.$slots,"file-icon",{},()=>[Oe(l,{name:"file"})])]),ke("div",nv,Je(n.file.name),1),n.file.extension?($(),le("div",rv,Je(n.file.extension),1)):Ie("",!0)],2))])}var av=xt($p,[["render",iv]]);const sv={name:"RoomFiles",components:{SvgIcon:zt,RoomFile:av},props:{files:{type:Array,required:!0}},emits:["remove-file","reset-message"],computed:{}},ov={key:0,class:"vac-room-files-container"},lv={class:"vac-files-box"},cv={class:"vac-icon-close"};function uv(e,t,n,r,a,i){const s=Ye("room-file"),l=Ye("svg-icon");return $(),ht(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.files.length?($(),le("div",ov,[ke("div",lv,[($(!0),le(ot,null,tt(n.files,(f,u)=>($(),le("div",{key:u},[Oe(s,{file:f,index:u,onRemoveFile:t[0]||(t[0]=h=>e.$emit("remove-file",h))},vt({_:2},[tt(e.$slots,(h,c)=>({name:c,fn:Ge(v=>[Be(e.$slots,c,pt(_t(v)))])}))]),1032,["file","index"])]))),128))]),ke("div",cv,[ke("div",{class:"vac-svg-button",onClick:t[1]||(t[1]=f=>e.$emit("reset-message"))},[Be(e.$slots,"files-close-icon",{},()=>[Oe(l,{name:"close-outline"})])])])])):Ie("",!0)]),_:3})}var dv=xt(sv,[["render",uv]]);const fv={props:{percentage:{type:Number,default:0},messageSelectionEnabled:{type:Boolean,required:!0}},emits:["hover-audio-progress","change-linehead"],data(){return{isMouseDown:!1}},methods:{onMouseDown(e){if(this.messageSelectionEnabled)return;this.isMouseDown=!0;const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)},onMouseUp(e){if(this.messageSelectionEnabled)return;this.isMouseDown=!1,document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove);const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t)},onMouseMove(e){if(this.messageSelectionEnabled)return;const t=this.calculateLineHeadPosition(e,this.$refs.progress);this.$emit("change-linehead",t)},calculateLineHeadPosition(e,t){const n=t.getBoundingClientRect().width,r=t.getBoundingClientRect().left;let a=(e.clientX-r)/n;return a=a<0?0:a,a=a>1?1:a,a}}},mv={class:"vac-player-progress"},hv={class:"vac-line-container"};function _v(e,t,n,r,a,i){return $(),le("div",{ref:"progress",class:"vac-player-bar",onMousedown:t[0]||(t[0]=(...s)=>i.onMouseDown&&i.onMouseDown(...s)),onMouseover:t[1]||(t[1]=s=>e.$emit("hover-audio-progress",!0)),onMouseout:t[2]||(t[2]=s=>e.$emit("hover-audio-progress",!1))},[ke("div",mv,[ke("div",hv,[ke("div",{class:"vac-line-progress",style:St({width:`${n.percentage}%`})},null,4),ke("div",{class:rt(["vac-line-dot",{"vac-line-dot__active":a.isMouseDown}]),style:St({left:`${n.percentage}%`})},null,6)])])],544)}var pv=xt(fv,[["render",_v]]);const vv={name:"AudioPlayer",components:{SvgIcon:zt,AudioControl:pv},props:{messageId:{type:[String,Number],default:null},src:{type:String,default:null},messageSelectionEnabled:{type:Boolean,required:!0}},emits:["hover-audio-progress","update-progress-time"],data(){return{isPlaying:!1,duration:this.convertTimeMMSS(0),playedTime:this.convertTimeMMSS(0),progress:0}},computed:{playerUniqId(){return`audio-player${this.messageId}`},audioSource(){return this.src?this.src:(this.resetProgress(),null)}},mounted(){this.player=this.$el.querySelector("#"+this.playerUniqId),this.player.addEventListener("ended",()=>{this.isPlaying=!1}),this.player.addEventListener("loadeddata",()=>{this.resetProgress(),this.duration=this.convertTimeMMSS(this.player.duration),this.updateProgressTime()}),this.player.addEventListener("timeupdate",this.onTimeUpdate)},methods:{convertTimeMMSS(e){return new Date(e*1e3).toISOString().substr(14,5)},playback(){this.messageSelectionEnabled||!this.audioSource||(this.isPlaying?this.player.pause():setTimeout(()=>this.player.play()),this.isPlaying=!this.isPlaying)},resetProgress(){this.isPlaying&&this.player.pause(),this.duration=this.convertTimeMMSS(0),this.playedTime=this.convertTimeMMSS(0),this.progress=0,this.isPlaying=!1,this.updateProgressTime()},onTimeUpdate(){this.playedTime=this.convertTimeMMSS(this.player.currentTime),this.progress=this.player.currentTime/this.player.duration*100,this.updateProgressTime()},onUpdateProgress(e){e&&(this.player.currentTime=e*this.player.duration)},updateProgressTime(){this.$emit("update-progress-time",this.progress>1?this.playedTime:this.duration)}}},gv={class:"vac-audio-player"},bv=["id","src"];function xv(e,t,n,r,a,i){const s=Ye("svg-icon"),l=Ye("audio-control");return $(),le("div",null,[ke("div",gv,[ke("div",{class:"vac-svg-button",onClick:t[0]||(t[0]=(...f)=>i.playback&&i.playback(...f))},[a.isPlaying?Be(e.$slots,"audio-pause-icon_"+n.messageId,{key:0},()=>[Oe(s,{name:"audio-pause"})]):Be(e.$slots,"audio-play-icon_"+n.messageId,{key:1},()=>[Oe(s,{name:"audio-play"})])]),Oe(l,{percentage:a.progress,"message-selection-enabled":n.messageSelectionEnabled,onChangeLinehead:i.onUpdateProgress,onHoverAudioProgress:t[1]||(t[1]=f=>e.$emit("hover-audio-progress",f))},null,8,["percentage","message-selection-enabled","onChangeLinehead"]),ke("audio",{id:i.playerUniqId,src:i.audioSource},null,8,bv)])])}var vo=xt(vv,[["render",xv]]);const yv={name:"RoomMessageReply",components:{SvgIcon:zt,FormatMessage:gi,AudioPlayer:vo},props:{room:{type:Object,required:!0},messageReply:{type:Object,default:null},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0}},emits:["reset-message"],computed:{firstFile(){var e,t;return(t=(e=this.messageReply)==null?void 0:e.files)!=null&&t.length?this.messageReply.files[0]:{}},isImage(){return Yr(this.firstFile)},isVideo(){return xi(this.firstFile)},isAudio(){return wa(this.firstFile)},isOtherFile(){var e,t;return((t=(e=this.messageReply)==null?void 0:e.files)==null?void 0:t.length)&&!this.isAudio&&!this.isVideo&&!this.isImage}}},wv={key:0,class:"vac-reply-container"},kv={class:"vac-reply-box"},Sv={class:"vac-reply-info"},Mv={class:"vac-reply-username"},Av={class:"vac-reply-content"},Ev=["src"],Tv={key:1,controls:"",class:"vac-image-reply"},Rv=["src"],Iv={key:3,class:"vac-image-reply vac-file-container"},Cv={class:"vac-text-ellipsis"},Bv={key:0,class:"vac-text-ellipsis vac-text-extension"},Ov={class:"vac-icon-reply"};function Fv(e,t,n,r,a,i){const s=Ye("format-message"),l=Ye("audio-player"),f=Ye("svg-icon");return $(),ht(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.messageReply?($(),le("div",wv,[ke("div",kv,[ke("div",Sv,[ke("div",Mv,Je(n.messageReply.username),1),ke("div",Av,[Oe(s,{"message-id":n.messageReply._id,content:n.messageReply.content,users:n.room.users,"text-formatting":n.textFormatting,"link-options":n.linkOptions,reply:!0},null,8,["message-id","content","users","text-formatting","link-options"])])]),i.isImage?($(),le("img",{key:0,src:i.firstFile.url,class:"vac-image-reply"},null,8,Ev)):i.isVideo?($(),le("video",Tv,[ke("source",{src:i.firstFile.url},null,8,Rv)])):i.isAudio?($(),ht(l,{key:2,src:i.firstFile.url,"message-selection-enabled":!1,class:"vac-audio-reply"},vt({_:2},[tt(e.$slots,(u,h)=>({name:h,fn:Ge(c=>[Be(e.$slots,h,pt(_t(c)))])}))]),1032,["src"])):i.isOtherFile?($(),le("div",Iv,[ke("div",null,[Be(e.$slots,"file-icon",{},()=>[Oe(f,{name:"file"})])]),ke("div",Cv,Je(i.firstFile.name),1),i.firstFile.extension?($(),le("div",Bv,Je(i.firstFile.extension),1)):Ie("",!0)])):Ie("",!0)]),ke("div",Ov,[ke("div",{class:"vac-svg-button",onClick:t[0]||(t[0]=u=>e.$emit("reset-message"))},[Be(e.$slots,"reply-close-icon",{},()=>[Oe(f,{name:"close-outline"})])])])])):Ie("",!0)]),_:3})}var Lv=xt(yv,[["render",Fv]]);const jv={name:"RoomUsersTag",props:{filteredUsersTag:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-user-tag","activate-item"],data(){return{activeItem:null}},watch:{filteredUsersTag(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-user-tag",this.filteredUsersTag[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},Nv={key:0,class:"vac-tags-container"},Hv=["onMouseover","onClick"],Dv={class:"vac-tags-info"},Pv={class:"vac-tags-username"};function zv(e,t,n,r,a,i){return $(),ht(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.filteredUsersTag.length?($(),le("div",Nv,[($(!0),le(ot,null,tt(n.filteredUsersTag,(s,l)=>($(),le("div",{key:s._id,class:rt(["vac-tags-box",{"vac-tags-box-active":l===a.activeItem}]),onMouseover:f=>a.activeItem=l,onClick:f=>e.$emit("select-user-tag",s)},[ke("div",Dv,[s.avatar?($(),le("div",{key:0,class:"vac-avatar vac-tags-avatar",style:St({"background-image":`url('${s.avatar}')`})},null,4)):Ie("",!0),ke("div",Pv,Je(s.username),1)])],42,Hv))),128))])):Ie("",!0)]),_:1})}var Uv=xt(jv,[["render",zv]]);const Vv={name:"RoomEmojis",props:{filteredEmojis:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-emoji","activate-item"],data(){return{activeItem:null}},watch:{filteredEmojis(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-emoji",this.filteredEmojis[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},qv={key:0,class:"vac-emojis-container"},Xv=["onMouseover","onClick"];function Yv(e,t,n,r,a,i){return $(),ht(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.filteredEmojis.length?($(),le("div",qv,[($(!0),le(ot,null,tt(n.filteredEmojis,(s,l)=>($(),le("div",{key:s,class:rt(["vac-emoji-element",{"vac-emoji-element-active":l===a.activeItem}]),onMouseover:f=>a.activeItem=l,onClick:f=>e.$emit("select-emoji",s)},Je(s),43,Xv))),128))])):Ie("",!0)]),_:1})}var Kv=xt(Vv,[["render",Yv]]);const Gv={name:"RoomTemplatesText",props:{filteredTemplatesText:{type:Array,required:!0},selectItem:{type:Boolean,default:null},activeUpOrDown:{type:Number,default:null}},emits:["select-template-text","activate-item"],data(){return{activeItem:null}},watch:{filteredTemplatesText(e,t){(!t.length||e.length!==t.length)&&(this.activeItem=0)},selectItem(e){e&&this.$emit("select-template-text",this.filteredTemplatesText[this.activeItem])},activeUpOrDown(){this.activeUpOrDown>0&&this.activeItem0&&this.activeItem--,this.$emit("activate-item")}}},Wv={key:0,class:"vac-template-container vac-app-box-shadow"},Zv=["onMouseover","onClick"],Qv={class:"vac-template-info"},Jv={class:"vac-template-tag"},$v={class:"vac-template-text"};function eg(e,t,n,r,a,i){return $(),ht(Ct,{name:"vac-slide-up"},{default:Ge(()=>[n.filteredTemplatesText.length?($(),le("div",Wv,[($(!0),le(ot,null,tt(n.filteredTemplatesText,(s,l)=>($(),le("div",{key:l,class:rt(["vac-template-box",{"vac-template-active":l===a.activeItem}]),onMouseover:f=>a.activeItem=l,onClick:f=>e.$emit("select-template-text",s)},[ke("div",Qv,[ke("div",Jv," /"+Je(s.tag),1),ke("div",$v,Je(s.text),1)])],42,Zv))),128))])):Ie("",!0)]),_:1})}var tg=xt(Gv,[["render",eg]]);function ng(e){return new Int8Array(e)}function su(e){return new Int16Array(e)}function ou(e){return new Int32Array(e)}function lu(e){return new Float32Array(e)}function rg(e){return new Float64Array(e)}function cu(e){if(e.length==1)return lu(e[0]);var t=e[0];e=e.slice(1);for(var n=[],r=0;r=0;--S){var Y,P;Y=T[R+S]*s[20+S]+T[R+-1-S]*l[28+S],P=T[R+S]*l[28+S]-T[R+-1-S]*s[20+S],T[R+-1-S]=Y,T[R+S]=P}}}if(j=o,O=286,v.mode_gr==1)for(var V=0;V<18;V++)ag.arraycopy(v.sb_sample[I][1][V],0,v.sb_sample[I][0][V],0,32)}}}var cg=Re.System,ug=Re.new_float,dg=Re.new_float_n;function ja(){this.l=ug(L.SBMAX_l),this.s=dg([L.SBMAX_s,3]);var e=this;this.assign=function(t){cg.arraycopy(t.l,0,e.l,0,L.SBMAX_l);for(var n=0;n.03125)h.ATH.adjust>=1?h.ATH.adjust=1:h.ATH.adjust=_?(h.ATH.adjust*=_*.075+.925,h.ATH.adjust<_&&(h.ATH.adjust=_)):h.ATH.adjustLimit>=_?h.ATH.adjust=_:h.ATH.adjust=0&&h.bitrate_index<16),Ha(h.mode_ext>=0&&h.mode_ext<4),h.bitrate_stereoMode_Hist[h.bitrate_index][4]++,h.bitrate_stereoMode_Hist[15][4]++,h.channels_out==2&&(h.bitrate_stereoMode_Hist[h.bitrate_index][h.mode_ext]++,h.bitrate_stereoMode_Hist[15][h.mode_ext]++),c=0;c=L.BLKSIZE+h.framesize-L.FFTOFFSET),Ha(v.mf_size>=512+h.framesize-32)}}this.lame_encode_mp3_frame=function(h,c,v,_,o,j){var O,I=pu([2,2]);I[0][0]=new sr,I[0][1]=new sr,I[1][0]=new sr,I[1][1]=new sr;var p=pu([2,2]);p[0][0]=new sr,p[0][1]=new sr,p[1][0]=new sr,p[1][1]=new sr;var E,F=[null,null],T=h.internal_flags,R=fg([2,4]),g=[.5,.5],A=[[0,0],[0,0]],S=[[0,0],[0,0]],m,x,b;if(F[0]=c,F[1]=v,T.lame_encode_frame_init==0&&u(h,F),T.padding=0,(T.slot_lag-=T.frac_SpF)<0&&(T.slot_lag+=h.out_samplerate,T.padding=1),T.psymodel!=0){var y,k=[null,null],w=0,H=mg(2);for(b=0;b0&&(g[b]=R[b][3]/g[b])),x=0;x>1,O=u,I=u<<1,p=I+O,u=I<<1,h=s,c=h+E;do{var F,T,R,g;T=i[h+0]-i[h+O],F=i[h+0]+i[h+O],g=i[h+I]-i[h+p],R=i[h+I]+i[h+p],i[h+I]=F-R,i[h+0]=F+R,i[h+p]=T-g,i[h+O]=T+g,T=i[c+0]-i[c+O],F=i[c+0]+i[c+O],g=gu.SQRT2*i[c+p],R=gu.SQRT2*i[c+I],i[c+I]=F-R,i[c+0]=F+R,i[c+p]=T-g,i[c+O]=T+g,c+=u,h+=u}while(h=0);r(s[h],c,L.BLKSIZE_s/2)}},this.fft_long=function(i,s,l,f,u){var h=L.BLKSIZE/8-1,c=L.BLKSIZE/2;do{var v,_,o,j,O,I=a[h]&255;v=e[I]*f[l][u+I],O=e[I+512]*f[l][u+I+512],_=v-O,v=v+O,o=e[I+256]*f[l][u+I+256],O=e[I+768]*f[l][u+I+768],j=o-O,o=o+O,c-=4,s[c+0]=v+o,s[c+2]=v-o,s[c+1]=_+j,s[c+3]=_-j,v=e[I+1]*f[l][u+I+1],O=e[I+513]*f[l][u+I+513],_=v-O,v=v+O,o=e[I+257]*f[l][u+I+257],O=e[I+769]*f[l][u+I+769],j=o-O,o=o+O,s[c+L.BLKSIZE/2+0]=v+o,s[c+L.BLKSIZE/2+2]=v-o,s[c+L.BLKSIZE/2+1]=_+j,s[c+L.BLKSIZE/2+3]=_-j}while(--h>=0);r(s,c,L.BLKSIZE/2)},this.init_fft=function(i){for(var s=0;s=0;--Q){var _e=q[K+0][Q],fe=q[K+1][Q];q[K+0][Q]=(_e+fe)*Jt.SQRT2*.5,q[K+1][Q]=(_e-fe)*Jt.SQRT2*.5}for(var De=2;De>=0;--De)for(var Q=L.BLKSIZE_s-1;Q>=0;--Q){var _e=D[Z+0][De][Q],fe=D[Z+1][De][Q];D[Z+0][De][Q]=(_e+fe)*Jt.SQRT2*.5,D[Z+1][De][Q]=(_e-fe)*Jt.SQRT2*.5}}N[0]=q[K+0][0],N[0]*=N[0];for(var Q=L.BLKSIZE/2-1;Q>=0;--Q){var re=q[K+0][L.BLKSIZE/2-Q],Fe=q[K+0][L.BLKSIZE/2+Q];N[L.BLKSIZE/2-Q]=(re*re+Fe*Fe)*.5}for(var De=2;De>=0;--De){U[De][0]=D[Z+0][De][0],U[De][0]*=U[De][0];for(var Q=L.BLKSIZE_s/2-1;Q>=0;--Q){var re=D[Z+0][De][L.BLKSIZE_s/2-Q],Fe=D[Z+0][De][L.BLKSIZE_s/2+Q];U[De][L.BLKSIZE_s/2-Q]=(re*re+Fe*Fe)*.5}}{for(var Xe=0,Q=11;QB)if(N=N*R)return B+N;Z=B/N}if(B+=N,q+3<=3+3){if(Z>=T)return B;var J=0|Jt.FAST_LOG10_X(Z,16);return B*x[J]}var J=0|Jt.FAST_LOG10_X(Z,16);if(D!=0?N=K.ATH.cb_s[U]*K.ATH.adjust:N=K.ATH.cb_l[U]*K.ATH.adjust,BN){var G,se;return G=1,J<=13&&(G=b[J]),se=Jt.FAST_LOG10_X(B/N,10/15),B*((m[J]-G)*se+G)}return J>13?B:B*b[J]}return B*m[J]}var k=[1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.30382*1.30382,1.22321*1.22321,1.14758*1.14758,1];function w(B,N,U){var q;if(B<0&&(B=0),N<0&&(N=0),B<=0)return N;if(N<=0)return B;if(N>B?q=N/B:q=B/N,U>=-2&&U<=2){if(q>=T)return B+N;var K=0|Jt.FAST_LOG10_X(q,16);return(B+N)*k[K]}return q1){for(var q=0;q1.58*B.thm[1].l[N]||B.thm[1].l[N]>1.58*B.thm[0].l[N])){var U=B.mld_l[N]*B.en[3].l[N],q=Math.max(B.thm[2].l[N],Math.min(B.thm[3].l[N],U));U=B.mld_l[N]*B.en[2].l[N];var K=Math.max(B.thm[3].l[N],Math.min(B.thm[2].l[N],U));B.thm[2].l[N]=q,B.thm[3].l[N]=K}for(var N=0;N1.58*B.thm[1].s[N][D]||B.thm[1].s[N][D]>1.58*B.thm[0].s[N][D])){var U=B.mld_s[N]*B.en[3].s[N][D],q=Math.max(B.thm[2].s[N][D],Math.min(B.thm[3].s[N][D],U));U=B.mld_s[N]*B.en[2].s[N][D];var K=Math.max(B.thm[3].s[N][D],Math.min(B.thm[2].s[N][D],U));B.thm[2].s[N][D]=q,B.thm[3].s[N][D]=K}}function P(B,N,U){var q=N,K=Math.pow(10,U);N*=2,q*=2;for(var D=0;D=0),et(U[Z]>=0),J+=N[Z],G+=U[Z],Z++;if(B.en[q].s[D][K]=J,B.thm[q].s[D][K]=G,Z>=te){++D;break}et(N[Z]>=0),et(U[Z]>=0);{var Q=B.PSY.bo_s_weight[D],_e=1-Q;J=Q*N[Z],G=Q*U[Z],B.en[q].s[D][K]+=J,B.thm[q].s[D][K]+=G,J=_e*N[Z],G=_e*U[Z]}}for(;D=0),et(U[D]>=0),Z+=N[D],J+=U[D],D++;if(B.en[q].l[K]=Z,B.thm[q].l[K]=J,D>=se){++K;break}et(N[D]>=0),et(U[D]>=0);{var oe=B.PSY.bo_l_weight[K],Q=1-oe;Z=oe*N[D],J=oe*U[D],B.en[q].l[K]+=Z,B.thm[q].l[K]+=J,Z=Q*N[D],J=Q*U[D]}}for(;K=0)}for(;G<=L.CBANDS;++G)U[G]=0,q[G]=0}function W(B,N,U,q){var K=B.internal_flags;B.short_blocks==Jr.short_block_coupled&&!(N[0]!=0&&N[1]!=0)&&(N[0]=N[1]=0);for(var D=0;D=1?B:U<=0?N:N>0?Math.pow(B/N,U)*N:0}var me=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function Se(B,N){for(var U=309.07,q=0;q0){var Z=D*N,J=B.en.s[q][K];J>Z&&(J>Z*1e10?U+=me[q]*(10*t):U+=me[q]*Jt.FAST_LOG10(J/Z))}}return U}var ve=[6.8,5.8,5.8,6.4,6.5,9.9,12.1,14.4,15,18.9,21.6,26.9,34.2,40.2,46.8,56.5,60.7,73.9,85.7,93.4,126.1];function pe(B,N){for(var U=281.0575,q=0;q0){var D=K*N,Z=B.en.l[q];Z>D&&(Z>D*1e10?U+=ve[q]*(10*t):U+=ve[q]*Jt.FAST_LOG10(Z/D))}}return U}function He(B,N,U,q,K){var D,Z;for(D=Z=0;D=0),et(U[D]>=0),et(q[D]>=0),et(K[D]>=0)}}function Te(B,N,U,q){var K=A.length-1,D=0,Z=U[D]+U[D+1];if(Z>0){var J=N[D];J0),Z=20*(J*2-Z)/(Z*(B.numlines_l[D]+B.numlines_l[D+1]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;for(D=1;D0){var J=N[D-1];J0),Z=20*(J*3-Z)/(Z*(B.numlines_l[D-1]+B.numlines_l[D]+B.numlines_l[D+1]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;if(et(D==B.npart_l-1),Z=U[D-1]+U[D],Z>0){var J=N[D-1];J0),Z=20*(J*2-Z)/(Z*(B.numlines_l[D-1]+B.numlines_l[D]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;et(D==B.npart_l-1)}var he=[-865163e-23*2,-.00851586*2,-674764e-23*2,.0209036*2,-336639e-22*2,-.0438162*2,-154175e-22*2,.0931738*2,-552212e-22*2,-.313819*2];this.L3psycho_anal_ns=function(B,N,U,q,K,D,Z,J,G,se){var te=B.internal_flags,oe=hn([2,L.BLKSIZE]),Q=hn([2,3,L.BLKSIZE_s]),_e=Ft(L.CBANDS+1),fe=Ft(L.CBANDS+1),De=Ft(L.CBANDS+2),re=Er(2),Fe=Er(2),Xe,be,Ne,xe,qe,Mt,Le,Ze,nt=hn([2,576]),At,on=Er(L.CBANDS+2),Bt=Er(L.CBANDS+2);for(_g.fill(Bt,0),Xe=te.channels_out,B.mode==ft.JOINT_STEREO&&(Xe=4),B.VBR==Qr.vbr_off?At=te.ResvMax==0?0:te.ResvSize/te.ResvMax*.5:B.VBR==Qr.vbr_rh||B.VBR==Qr.vbr_mtrh||B.VBR==Qr.vbr_mt?At=.6:At=1,be=0;be2&&(D[q][be].en.assign(te.en[be+2]),D[q][be].thm.assign(te.thm[be+2]))}for(be=0;be0),ti[xe]=Yt[xe]/te.nsPsy.last_en_subshort[be][xe+4],Hn[0]+=Yt[xe];if(be==2)for(xe=0;xe<576;xe++){var Ro,Io;Ro=nt[0][xe],Io=nt[1][xe],nt[0][xe]=Ro+Io,nt[1][xe]=Ro-Io}{var Vu=nt[be&1],ji=0;for(xe=0;xe<9;xe++){for(var e5=ji+64,Pt=1;jiYt[xe+3-2]?(et(Yt[xe+3-2]>0),Pt=Pt/Yt[xe+3-2]):Yt[xe+3-2]>Pt*10?Pt=Yt[xe+3-2]/(Pt*10):Pt=0,ti[xe+3]=Pt}}if(B.analysis){var Co=ti[0];for(xe=1;xe<12;xe++)CoHu&&(Tt[xe/3]=xe%3+1);for(xe=1;xe<4;xe++){var Bo;Hn[xe-1]>Hn[xe]?(et(Hn[xe]>0),Bo=Hn[xe-1]/Hn[xe]):(et(Hn[xe-1]>0),Bo=Hn[xe]/Hn[xe-1]),Bo<1.7&&(Tt[xe]=0,xe==1&&(Tt[0]=0))}for(Tt[0]!=0&&te.nsPsy.lastAttacks[be]!=0&&(Tt[0]=0),(te.nsPsy.lastAttacks[be]==3||Tt[0]+Tt[1]+Tt[2]+Tt[3]!=0)&&(To=0,Tt[1]!=0&&Tt[0]!=0&&(Tt[1]=0),Tt[2]!=0&&Tt[1]!=0&&(Tt[2]=0),Tt[3]!=0&&Tt[2]!=0&&(Tt[3]=0)),be<2?Fe[be]=To:To==0&&(Fe[0]=Fe[1]=0),G[be]=te.tot_ener[be],Mn=Q,Sn=oe,I(B,zu,Uu,Sn,be&1,Mn,be&1,q,be,N,U),He(te,zu,_e,Du,Pu),Te(te,Du,Pu,on),Ze=0;Ze<3;Ze++){var Oo,tn;for(M(B,Uu,fe,De,be,Ze),V(te,fe,De,be,Ze),Le=0;Le=2||Tt[Ze+1]==1){var Ni=Ze!=0?Ze-1:2,Pt=C(te.thm[be].s[Le][Ni],tn,h*At);tn=Math.min(tn,Pt)}if(Tt[Ze]==1){var Ni=Ze!=0?Ze-1:2,Pt=C(te.thm[be].s[Le][Ni],tn,c*At);tn=Math.min(tn,Pt)}else if(Ze!=0&&Tt[Ze-1]==3||Ze==0&&te.nsPsy.lastAttacks[be]==3){var Ni=Ze!=2?Ze+1:0,Pt=C(te.thm[be].s[Le][Ni],tn,c*At);tn=Math.min(tn,Pt)}Oo=Yt[Ze*3+3]+Yt[Ze*3+4]+Yt[Ze*3+5],Yt[Ze*3+5]*60&&H(B,B.interChRatio),B.mode==ft.JOINT_STEREO){var Lo;Y(te),Lo=B.msfix,Math.abs(Lo)>0&&P(te,Lo,B.ATHlower*te.ATH.adjust)}for(W(B,Fe,se,re),be=0;be1?(Hi=J,Di=-2,Ya=L.NORM_TYPE,(se[0]==L.SHORT_TYPE||se[1]==L.SHORT_TYPE)&&(Ya=L.SHORT_TYPE),Ka=D[q][be-2]):(Hi=Z,Di=0,Ya=se[be],Ka=K[q][be]),Ya==L.SHORT_TYPE?Hi[Di+be]=Se(Ka,te.masking_lower):Hi[Di+be]=pe(Ka,te.masking_lower),B.analysis&&(te.pinfo.pe[q][be]=Hi[Di+be])}return 0};function Ve(B,N,U,q,K,D,Z,J){var G=B.internal_flags;if(q<2)e.fft_long(G,Z[J],q,N,U);else if(q==2)for(var se=L.BLKSIZE-1;se>=0;--se){var te=Z[J+0][se],oe=Z[J+1][se];Z[J+0][se]=(te+oe)*Jt.SQRT2*.5,Z[J+1][se]=(te-oe)*Jt.SQRT2*.5}D[0]=Z[J+0][0],D[0]*=D[0];for(var se=L.BLKSIZE/2-1;se>=0;--se){var Q=Z[J+0][L.BLKSIZE/2-se],_e=Z[J+0][L.BLKSIZE/2+se];D[L.BLKSIZE/2-se]=(Q*Q+_e*_e)*.5}{for(var fe=0,se=11;se=0;--se){var te=Z[J+0][K][se],oe=Z[J+1][K][se];Z[J+0][K][se]=(te+oe)*Jt.SQRT2*.5,Z[J+1][K][se]=(te-oe)*Jt.SQRT2*.5}D[K][0]=Z[J+0][K][0],D[K][0]*=D[K][0];for(var se=L.BLKSIZE_s/2-1;se>=0;--se){var Q=Z[J+0][K][L.BLKSIZE_s/2-se],_e=Z[J+0][K][L.BLKSIZE_s/2+se];D[K][L.BLKSIZE_s/2-se]=(Q*Q+_e*_e)*.5}}function z(B,N,U,q){var K=B.internal_flags;B.athaa_loudapprox==2&&U<2&&(K.loudness_sq[N][U]=K.loudness_sq_save[U],K.loudness_sq_save[U]=O(q,K))}var X=[-865163e-23*2,-.00851586*2,-674764e-23*2,.0209036*2,-336639e-22*2,-.0438162*2,-154175e-22*2,.0931738*2,-552212e-22*2,-.313819*2];function ne(B,N,U,q,K,D,Z,J,G,se){for(var te=hn([2,576]),oe=B.internal_flags,Q=oe.channels_out,_e=B.mode==ft.JOINT_STEREO?4:Q,fe=0;fe2&&(D[q][fe].en.assign(oe.en[fe+2]),D[q][fe].thm.assign(oe.thm[fe+2]))}for(var fe=0;fe<_e;fe++){var Ne=Ft(12),xe=Ft(12),qe=[0,0,0,0],Mt=te[fe&1],Le=0,Ze=fe==3?oe.nsPsy.attackthre_s:oe.nsPsy.attackthre,nt=1;if(fe==2)for(var re=0,be=576;be>0;++re,--be){var At=te[0][re],on=te[1][re];te[0][re]=At+on,te[1][re]=At-on}for(var re=0;re<3;re++)xe[re]=oe.nsPsy.last_en_subshort[fe][re+6],et(oe.nsPsy.last_en_subshort[fe][re+4]>0),Ne[re]=xe[re]/oe.nsPsy.last_en_subshort[fe][re+4],qe[0]+=xe[re];for(var re=0;re<9;re++){for(var Bt=Le+64,Et=1;Lexe[re+3-2]?(et(xe[re+3-2]>0),Et=Et/xe[re+3-2]):xe[re+3-2]>Et*10?Et=xe[re+3-2]/(Et*10):Et=0,Ne[re+3]=Et}for(var re=0;re<3;++re){var en=xe[re*3+3]+xe[re*3+4]+xe[re*3+5],ln=1;xe[re*3+5]*6Ze&&(G[fe][re/3]=re%3+1);for(var re=1;re<4;re++){var Sn=qe[re-1],Mn=qe[re],Yt=Math.max(Sn,Mn);Yt<4e4&&Sn<1.7*Mn&&Mn<1.7*Sn&&(re==1&&G[fe][0]<=G[fe][re]&&(G[fe][0]=0),G[fe][re]=0)}G[fe][0]<=oe.nsPsy.lastAttacks[fe]&&(G[fe][0]=0),(oe.nsPsy.lastAttacks[fe]==3||G[fe][0]+G[fe][1]+G[fe][2]+G[fe][3]!=0)&&(nt=0,G[fe][1]!=0&&G[fe][0]!=0&&(G[fe][1]=0),G[fe][2]!=0&&G[fe][1]!=0&&(G[fe][2]=0),G[fe][3]!=0&&G[fe][2]!=0&&(G[fe][3]=0)),fe<2?se[fe]=nt:nt==0&&(se[0]=se[1]=0),Z[fe]=oe.tot_ener[fe]}}function ce(B,N,U){if(U==0)for(var q=0;q0){var J=N[D];J0),Z=20*(J*2-Z)/(Z*(B.numlines_s[D]+B.numlines_s[D+1]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;for(D=1;D0){var J=N[D-1];J0),Z=20*(J*3-Z)/(Z*(B.numlines_s[D-1]+B.numlines_s[D]+B.numlines_s[D+1]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;if(et(D==B.npart_s-1),Z=U[D-1]+U[D],Z>0){var J=N[D-1];J0),Z=20*(J*2-Z)/(Z*(B.numlines_s[D-1]+B.numlines_s[D]-1));var G=0|Z;G>K&&(G=K),q[D]=G}else q[D]=0;et(D==B.npart_s-1)}function Ee(B,N,U,q,K,D){var Z=B.internal_flags,J=new float[L.CBANDS],G=Ft(L.CBANDS),se,te,oe,Q=new int[L.CBANDS];for(oe=te=0;oe=0)}for(et(oe==Z.npart_s);oexe&&(q[oe]=xe),Z.masking_lower>1&&(q[oe]*=Z.masking_lower),q[oe]>U[oe]&&(q[oe]=U[oe]),Z.masking_lower<1&&(q[oe]*=Z.masking_lower),et(q[oe]>=0)}for(;oe0?q[G]=Math.min(oe,Xe):q[G]=Math.min(oe,U[G]*c)}else{var be=r*B.nb_2[K][G],Ne=n*B.nb_1[K][G],Xe;be<=0&&(be=oe),Ne<=0&&(Ne=oe),B.blocktype_old[K&1]==L.NORM_TYPE?Xe=Math.min(Ne,be):Xe=Ne,q[G]=Math.min(oe,Xe)}B.nb_2[K][G]=B.nb_1[K][G],B.nb_1[K][G]=oe,te=D[G],te*=B.minval_l[G],te*=Q,q[G]>te&&(q[G]=te),B.masking_lower>1&&(q[G]*=B.masking_lower),q[G]>U[G]&&(q[G]=U[G]),B.masking_lower<1&&(q[G]*=B.masking_lower),et(q[G]>=0)}for(;G0?Math.pow(10,K):1,se,te,oe=0;oe0){var Ne,xe,qe=q[oe]*G;if(Ne=Math.min(Math.max(fe,qe),Math.max(De,qe)),re=Math.max(te,qe),Fe=Math.max(se,qe),xe=re+Fe,xe>0&&Ne*JQ&&(te=Q),se>_e&&(se=_e),N[2][oe]=te,N[3][oe]=se}}this.L3psycho_anal_vbr=function(B,N,U,q,K,D,Z,J,G,se){var te=B.internal_flags,oe,Q,_e=Ft(L.HBLKSIZE),fe=hn([3,L.HBLKSIZE_s]),De=hn([2,L.BLKSIZE]),re=hn([2,3,L.BLKSIZE_s]),Fe=hn([4,L.CBANDS]),Xe=hn([4,L.CBANDS]),be=hn([4,3]),Ne=.6,xe=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],qe=Er(2),Mt=B.mode==ft.JOINT_STEREO?4:te.channels_out;ne(B,N,U,q,K,D,G,be,xe,qe),Ae(B,qe);{for(var Le=0;Le=2||xe[Le][nt+1]==1){var Et=nt!=0?nt-1:2,en=C(te.thm[Le].s[At][Et],Bt,h*Ne);Bt=Math.min(Bt,en)}else if(xe[Le][nt]==1){var Et=nt!=0?nt-1:2,en=C(te.thm[Le].s[At][Et],Bt,c*Ne);Bt=Math.min(Bt,en)}else if(nt!=0&&xe[Le][nt-1]==3||nt==0&&te.nsPsy.lastAttacks[Le]==3){var Et=nt!=2?nt+1:0,en=C(te.thm[Le].s[At][Et],Bt,c*Ne);Bt=Math.min(Bt,en)}Bt*=be[Le][nt],on[nt]=Bt}for(var nt=0;nt<3;nt++)te.thm[Le].s[At][nt]=on[nt]}}}for(var Le=0;Le1?(ln=J,cn=-2,Sn=L.NORM_TYPE,(se[0]==L.SHORT_TYPE||se[1]==L.SHORT_TYPE)&&(Sn=L.SHORT_TYPE),Mn=D[q][Le-2]):(ln=Z,cn=0,Sn=se[Le],Mn=K[q][Le]),Sn==L.SHORT_TYPE?ln[cn+Le]=Se(Mn,te.masking_lower):ln[cn+Le]=pe(Mn,te.masking_lower),B.analysis&&(te.pinfo.pe[q][Le]=ln[cn+Le])}return 0};function je(B,N){var U=B,q;return U>=0?q=-U*27:q=U*N,q<=-72?0:Math.exp(q*o)}function ze(B){var N=0,U=0;{var q=0,K,D;for(q=0;je(q,B)>1e-20;q-=1);for(K=q,D=0;Math.abs(D-K)>1e-12;)q=(D+K)/2,je(q,B)>0?D=q:K=q;N=K}{var q=0,K,D;for(q=0;je(q,B)>1e-20;q+=1);for(K=0,D=q;Math.abs(D-K)>1e-12;)q=(D+K)/2,je(q,B)>0?K=q:D=q;U=D}{var Z=0,J=1e3,G;for(G=0;G<=J;++G){var q=N+G*(U-N)/J,se=je(q,B);Z+=se}{var te=(J+1)/(Z*(U-N));return te}}}function Ue(B){var N,U,q,K;return N=B,N>=0?N*=3:N*=1.5,N>=.5&&N<=2.5?(K=N-.5,U=8*(K*K-2*K)):U=0,N+=.474,q=15.811389+7.5*N-17.5*Math.sqrt(1+N*N),q<=-60?0:(N=Math.exp((U+q)*o),N/=.6609193,N)}function Ke(B){return B<0&&(B=0),B=B*.001,13*Math.atan(.76*B)+3.5*Math.atan(B*B/(7.5*7.5))}function ue(B,N,U,q,K,D,Z,J,G,se,te,oe){var Q=Ft(L.CBANDS+1),_e=J/(oe>15?2*576:2*192),fe=Er(L.HBLKSIZE),De;J/=G;var re=0,Fe=0;for(De=0;DeG/2){re=G/2,++De;break}}Q[De]=J*re;for(var Ne=0;NeG/2&&(qe=G/2),U[Ne]=(fe[xe]+fe[qe])/2,N[Ne]=fe[qe];var nt=_e*Le;Z[Ne]=(nt-Q[N[Ne]])/(Q[N[Ne]+1]-Q[N[Ne]]),Z[Ne]<0?Z[Ne]=0:Z[Ne]>1&&(Z[Ne]=1),Ze=Ke(J*se[Ne]*te),Ze=Math.min(Ze,15.5)/15.5,D[Ne]=Math.pow(10,1.25*(1-Math.cos(Math.PI*Ze))-2.5)}re=0;for(var At=0;At0);J++);for(B[se][0]=J,J=N-1;J>0&&!(Z[se][J]>0);J--);B[se][1]=J,G+=B[se][1]-B[se][0]+1}for(var _e=Ft(G),fe=0,se=0;se=K&&(De=J*(te[U]-K)/(D-K)+Z*(D-te[U])/(D-K)),Q[U]=Math.pow(10,De/10),N.numlines_l[U]>0?N.rnumlines_l[U]=1/N.numlines_l[U]:N.rnumlines_l[U]=0}N.s3_ll=we(N.s3ind,N.npart_l,te,oe,Q,q);var re=0;for(U=0;UNe&&(Fe=Ne)}N.ATH.cb_l[U]=Fe,Fe=-20+te[U]*20/10,Fe>6&&(Fe=100),Fe<-15&&(Fe=-15),Fe-=8,N.minval_l[U]=Math.pow(10,Fe/10)*N.numlines_l[U]}for(N.npart_s=ue(N.numlines_s,N.bo_s,N.bm_s,te,oe,N.mld_s,N.PSY.bo_s_weight,_e,L.BLKSIZE_s,N.scalefac_band.s,L.BLKSIZE_s/(2*192),L.SBMAX_s),et(N.npart_s=K&&(De=se*(te[U]-K)/(D-K)+G*(D-te[U])/(D-K)),Q[U]=Math.pow(10,De/10),Fe=xu.MAX_VALUE;for(var Xe=0;XeNe&&(Fe=Ne)}N.ATH.cb_s[U]=Fe,Fe=-7+te[U]*7/12,te[U]>12&&(Fe*=1+Math.log(1+Fe)*3.1),te[U]<12&&(Fe*=1+Math.log(1-Fe)*2.3),Fe<-15&&(Fe=-15),Fe-=8,N.minval_s[U]=Math.pow(10,Fe/10)*N.numlines_s[U]}N.s3_ss=we(N.s3ind_s,N.npart_s,te,oe,Q,q),S(),e.init_fft(N),N.decay=Math.exp(-1*t/(f*_e/192));{var xe;xe=v,(B.exp_nspsytune&2)!=0&&(xe=1),Math.abs(B.msfix)>0&&(xe=B.msfix),B.msfix=xe;for(var qe=0;qeN.npart_l-1&&(N.s3ind[qe][1]=N.npart_l-1)}var Mt=576*N.mode_gr/_e;if(N.ATH.decay=Math.pow(10,-12/10*Mt),N.ATH.adjust=.01,N.ATH.adjustLimit=1,et(N.bo_l[L.SBMAX_l-1]<=N.npart_l),et(N.bo_s[L.SBMAX_s-1]<=N.npart_s),B.ATHtype!=-1){var be,Le=B.out_samplerate/L.BLKSIZE,Ze=0;for(be=0,U=0;U